aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorTimur Tabi <timur@freescale.com>2011-10-04 16:44:43 -0500
committerKumar Gala <galak@kernel.crashing.org>2011-10-09 17:57:53 -0500
commit30381716284b688cb1b4e315aa6b8ef7422fa172 (patch)
treedcc69b390f3aa32f12547903f19c4ebc336cc568 /arch
parent712cf7ab0b58e51a69e339397457d3591b6b650e (diff)
powerpc/85xx: fix null pointer dereference when init the SGMII TBI PHY
Function dtsec_configure_serdes() needs to know where the TBI PHY registers are in order to configure SGMII for proper SerDes operation. During SGMII initialzation, fm_eth_init_mac() passing NULL for 'phyregs' when it called init_dtsec(), because it was believed that phyregs was not used. In fact, it is used by dtsec_configure_serdes() to configure the TBI PHY registers. We also need to define the PHY registers in struct fm_mdio. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/include/asm/fsl_fman.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/fsl_fman.h b/arch/powerpc/include/asm/fsl_fman.h
index fddc0cc8c..2c0c9bc2f 100644
--- a/arch/powerpc/include/asm/fsl_fman.h
+++ b/arch/powerpc/include/asm/fsl_fman.h
@@ -405,7 +405,14 @@ typedef struct fm_dtesc {
} fm_dtsec_t;
typedef struct fm_mdio {
- u8 res[4*1024];
+ u8 res0[0x120];
+ u32 miimcfg; /* MII management configuration reg */
+ u32 miimcom; /* MII management command reg */
+ u32 miimadd; /* MII management address reg */
+ u32 miimcon; /* MII management control reg */
+ u32 miimstat; /* MII management status reg */
+ u32 miimind; /* MII management indication reg */
+ u8 res1[0x1000 - 0x138];
} fm_mdio_t;
typedef struct fm_10gec {