NET: Base support for etsec2.0
PATCH v4 2/2 NET: Base support for etsec2.0
1. Modified the tsec_mdio structure to include the new regs
2. Modified the MDIO_BASE_ADDR so that it will handle both older version and new version of etsec.
Signed-off-by Sandeep Gopalpet <[email protected]>
--- include/asm-ppc/immap_83xx.h | 2 +- include/asm-ppc/immap_85xx.h | 6 +++++- include/asm-ppc/immap_86xx.h | 2 +- include/configs/P1_P2_RDB.h | 5 +++++ include/tsec.h | 7 +++++++ 5 files changed, 19 insertions(+), 3 deletions(-)
include/asm-ppc/immap_83xx.h +1 -1
@@ -872,7 +872,7 @@ typedef struct immap {#define CONFIG_SYS_TSEC1_OFFSET 0x24000#define TSEC_SIZE 0x01000 -#define CONFIG_SYS_MDIO1_OFFSET 0x24520 +#define CONFIG_SYS_MDIO1_OFFSET 0x24000#define TSEC_MDIO_OFFSET 0x01000#define TSEC_BASE_ADDR (CONFIG_SYS_IMMR + CONFIG_SYS_TSEC1_OFFSET)
include/asm-ppc/immap_85xx.h +5 -1
@@ -1933,9 +1933,13 @@ typedef struct ccsr_gur { (CONFIG_SYS_IMMR + CONFIG_SYS_MPC85xx_USB_OFFSET) /* TSEC and MDIO OFFSETS */ +#ifdef CONFIG_TSECV2 +#define CONFIG_SYS_TSEC1_OFFSET 0xB0000 +#else #define CONFIG_SYS_TSEC1_OFFSET 0x24000 +#endif -#define CONFIG_SYS_MDIO1_OFFSET 0x24520 +#define CONFIG_SYS_MDIO1_OFFSET 0x24000#define TSEC_MDIO_OFFSET 0x01000#define TSEC_BASE_ADDR (CONFIG_SYS_IMMR + CONFIG_SYS_TSEC1_OFFSET)
include/asm-ppc/immap_86xx.h +1 -1
@@ -1300,7 +1300,7 @@ extern immap_t *immr;#define CONFIG_SYS_TSEC1_OFFSET 0x24000 -#define CONFIG_SYS_MDIO1_OFFSET 0x24520 +#define CONFIG_SYS_MDIO1_OFFSET 0x24000#define TSEC_MDIO_OFFSET 0x01000#define TSEC_BASE_ADDR (CONFIG_SYS_IMMR + CONFIG_SYS_TSEC1_OFFSET)
include/configs/P1_P2_RDB.h +5 -0
@@ -84,6 +84,11 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);#define CONFIG_MP #endif +/* TSECV2 */ +#if defined(CONFIG_P1020 ) +#define CONFIG_TSECV2 +#endif +/* * These can be toggled for performance analysis, otherwise use default. */
include/tsec.h +7 -0
@@ -456,12 +456,19 @@ typedef struct tsec_hash_regs } tsec_hash_t;typedef struct tsec_mdio { +uint res1[4 ]; +uint ieventm; +uint imaskm; +uint res2; +uint emapm; +uint res3[320 ];uint miimcfg;/* MII Management: Configuration */ uint miimcom;/* MII Management: Command */ uint miimadd;/* MII Management: Address */ uint miimcon;/* MII Management: Control */ uint miimstat;/* MII Management: Status */ uint miimind;/* MII Management: Indicators */ +uint res4[690 ]; }tsec_mdio_t ; typedef struct tsec
Signature · 1 line
1.5.2.2
Kumar Gala
AppliedPATCH v4 2/2 NET: Base support for etsec2.0
Quoted 4 lines · Sandeep Gopalpet
1. Modified the
tsec_mdiostructure to include the new regs
2. Modified theMDIO_BASE_ADDRso that it will handle both older version and new version of etsec.
Quoted 8 lines
Signed-off-by Sandeep Gopalpet <[email protected]>---
include/asm-ppc/immap_83xx.h | 2 +- include/asm-ppc/immap_85xx.h | 6 +++++- include/asm-ppc/immap_86xx.h | 2 +- include/configs/P1_P2_RDB.h | 5 +++++ include/tsec.h | 7 +++++++ 5 files changed, 19 insertions(+), 3 deletions(-)
applied to 8xxx-next w/following changes:
* Moved TSECV2 out of P1_P2_RDB.h and into asm-ppc/config.h
* Fixes for previous patch
- k