提交 be225442 编写于 作者: L Luigi 'Comio' Mantellini 提交者: Ben Warren

Update all board to support new bbmiiphy driver (with multibus support)

Signed-off-by: NLuigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com>
Signed-off-by: NBen Warren <biggerbadderben@gmail.com>
上级 310cecb8
...@@ -84,6 +84,10 @@ ...@@ -84,6 +84,10 @@
* GPIO pins used for bit-banged MII communications * GPIO pins used for bit-banged MII communications
*/ */
#define MDIO_PORT 3 /* Port D */ #define MDIO_PORT 3 /* Port D */
#define MDIO_DECLARE volatile ioport_t *iop = ioport_addr ( \
(immap_t *) CONFIG_SYS_IMMR, MDIO_PORT )
#define MDC_DECLARE MDIO_DECLARE
#define CONFIG_SYS_MDIO_PIN 0x00040000 /* PD13 */ #define CONFIG_SYS_MDIO_PIN 0x00040000 /* PD13 */
#define CONFIG_SYS_MDC_PIN 0x00080000 /* PD12 */ #define CONFIG_SYS_MDC_PIN 0x00080000 /* PD12 */
......
...@@ -150,6 +150,9 @@ ...@@ -150,6 +150,9 @@
* GPIO pins used for bit-banged MII communications * GPIO pins used for bit-banged MII communications
*/ */
#define MDIO_PORT 2 /* Port C */ #define MDIO_PORT 2 /* Port C */
#define MDIO_DECLARE volatile ioport_t *iop = ioport_addr ( \
(immap_t *) CONFIG_SYS_IMMR, MDIO_PORT )
#define MDC_DECLARE MDIO_DECLARE
#if CONFIG_ADSTYPE == CONFIG_SYS_8272ADS #if CONFIG_ADSTYPE == CONFIG_SYS_8272ADS
#define CONFIG_SYS_MDIO_PIN 0x00002000 /* PC18 */ #define CONFIG_SYS_MDIO_PIN 0x00002000 /* PC18 */
......
...@@ -96,6 +96,10 @@ ...@@ -96,6 +96,10 @@
* Port pins used for bit-banged MII communictions (if applicable). * Port pins used for bit-banged MII communictions (if applicable).
*/ */
#define MDIO_PORT 2 /* Port C */ #define MDIO_PORT 2 /* Port C */
#define MDIO_DECLARE volatile ioport_t *iop = ioport_addr ( \
(immap_t *) CONFIG_SYS_IMMR, MDIO_PORT )
#define MDC_DECLARE MDIO_DECLARE
#define MDIO_ACTIVE (iop->pdir |= 0x00400000) #define MDIO_ACTIVE (iop->pdir |= 0x00400000)
#define MDIO_TRISTATE (iop->pdir &= ~0x00400000) #define MDIO_TRISTATE (iop->pdir &= ~0x00400000)
#define MDIO_READ ((iop->pdat & 0x00400000) != 0) #define MDIO_READ ((iop->pdat & 0x00400000) != 0)
......
...@@ -363,6 +363,10 @@ ...@@ -363,6 +363,10 @@
* GPIO pins used for bit-banged MII communications * GPIO pins used for bit-banged MII communications
*/ */
#define MDIO_PORT 2 /* Port C */ #define MDIO_PORT 2 /* Port C */
#define MDIO_DECLARE volatile ioport_t *iop = ioport_addr ( \
(immap_t *) CONFIG_SYS_IMMR, MDIO_PORT )
#define MDC_DECLARE MDIO_DECLARE
#define MDIO_ACTIVE (iop->pdir |= 0x00400000) #define MDIO_ACTIVE (iop->pdir |= 0x00400000)
#define MDIO_TRISTATE (iop->pdir &= ~0x00400000) #define MDIO_TRISTATE (iop->pdir &= ~0x00400000)
#define MDIO_READ ((iop->pdat & 0x00400000) != 0) #define MDIO_READ ((iop->pdat & 0x00400000) != 0)
......
...@@ -103,6 +103,10 @@ ...@@ -103,6 +103,10 @@
* GPIO pins used for bit-banged MII communications * GPIO pins used for bit-banged MII communications
*/ */
#define MDIO_PORT 2 /* Port C */ #define MDIO_PORT 2 /* Port C */
#define MDIO_DECLARE volatile ioport_t *iop = ioport_addr ( \
(immap_t *) CONFIG_SYS_IMMR, MDIO_PORT )
#define MDC_DECLARE MDIO_DECLARE
#define MDIO_ACTIVE (iop->pdir |= 0x00400000) #define MDIO_ACTIVE (iop->pdir |= 0x00400000)
#define MDIO_TRISTATE (iop->pdir &= ~0x00400000) #define MDIO_TRISTATE (iop->pdir &= ~0x00400000)
#define MDIO_READ ((iop->pdat & 0x00400000) != 0) #define MDIO_READ ((iop->pdat & 0x00400000) != 0)
......
...@@ -290,6 +290,10 @@ ...@@ -290,6 +290,10 @@
* GPIO pins used for bit-banged MII communications * GPIO pins used for bit-banged MII communications
*/ */
#define MDIO_PORT 2 /* Port C */ #define MDIO_PORT 2 /* Port C */
#define MDIO_DECLARE volatile ioport_t *iop = ioport_addr ( \
(immap_t *) CONFIG_SYS_IMMR, MDIO_PORT )
#define MDC_DECLARE MDIO_DECLARE
#define MDIO_ACTIVE (iop->pdir |= 0x00400000) #define MDIO_ACTIVE (iop->pdir |= 0x00400000)
#define MDIO_TRISTATE (iop->pdir &= ~0x00400000) #define MDIO_TRISTATE (iop->pdir &= ~0x00400000)
#define MDIO_READ ((iop->pdat & 0x00400000) != 0) #define MDIO_READ ((iop->pdat & 0x00400000) != 0)
......
...@@ -219,6 +219,9 @@ ...@@ -219,6 +219,9 @@
* GPIO pins used for bit-banged MII communications * GPIO pins used for bit-banged MII communications
*/ */
#define MDIO_PORT 2 /* Port C */ #define MDIO_PORT 2 /* Port C */
#define MDIO_DECLARE volatile ioport_t *iop = ioport_addr ( \
(immap_t *) CONFIG_SYS_IMMR, MDIO_PORT )
#define MDC_DECLARE MDIO_DECLARE
#if STK82xx_150 #if STK82xx_150
#define CONFIG_SYS_MDIO_PIN 0x00008000 /* PC16 */ #define CONFIG_SYS_MDIO_PIN 0x00008000 /* PC16 */
......
...@@ -124,6 +124,11 @@ ...@@ -124,6 +124,11 @@
#define CONFIG_BITBANGMII #define CONFIG_BITBANGMII
#define MDIO_PORT 1 /* Port B */ #define MDIO_PORT 1 /* Port B */
#define MDIO_DECLARE volatile ioport_t *iop = ioport_addr ( \
(immap_t *) CONFIG_SYS_IMMR, MDIO_PORT )
#define MDC_DECLARE MDIO_DECLARE
#define CONFIG_SYS_MDIO_PIN 0x00002000 /* PB18 */ #define CONFIG_SYS_MDIO_PIN 0x00002000 /* PB18 */
#define CONFIG_SYS_MDC_PIN 0x00001000 /* PB19 */ #define CONFIG_SYS_MDC_PIN 0x00001000 /* PB19 */
#define MDIO_ACTIVE (iop->pdir |= CONFIG_SYS_MDIO_PIN) #define MDIO_ACTIVE (iop->pdir |= CONFIG_SYS_MDIO_PIN)
......
...@@ -86,6 +86,10 @@ ...@@ -86,6 +86,10 @@
* GPIO pins used for bit-banged MII communications * GPIO pins used for bit-banged MII communications
*/ */
#define MDIO_PORT 2 /* Port C */ #define MDIO_PORT 2 /* Port C */
#define MDIO_DECLARE volatile ioport_t *iop = ioport_addr ( \
(immap_t *) CONFIG_SYS_IMMR, MDIO_PORT )
#define MDC_DECLARE MDIO_DECLARE
#define MDIO_ACTIVE (iop->pdir |= 0x00400000) #define MDIO_ACTIVE (iop->pdir |= 0x00400000)
#define MDIO_TRISTATE (iop->pdir &= ~0x00400000) #define MDIO_TRISTATE (iop->pdir &= ~0x00400000)
#define MDIO_READ ((iop->pdat & 0x00400000) != 0) #define MDIO_READ ((iop->pdat & 0x00400000) != 0)
......
...@@ -92,6 +92,7 @@ ...@@ -92,6 +92,7 @@
* GPIO pins used for bit-banged MII communications * GPIO pins used for bit-banged MII communications
*/ */
#define MDIO_PORT 0 /* Not used - implemented in BCSR */ #define MDIO_PORT 0 /* Not used - implemented in BCSR */
#define MDIO_ACTIVE (*(vu_char *)(CONFIG_SYS_BCSR + 8) &= 0xFB) #define MDIO_ACTIVE (*(vu_char *)(CONFIG_SYS_BCSR + 8) &= 0xFB)
#define MDIO_TRISTATE (*(vu_char *)(CONFIG_SYS_BCSR + 8) |= 0x04) #define MDIO_TRISTATE (*(vu_char *)(CONFIG_SYS_BCSR + 8) |= 0x04)
#define MDIO_READ (*(vu_char *)(CONFIG_SYS_BCSR + 8) & 1) #define MDIO_READ (*(vu_char *)(CONFIG_SYS_BCSR + 8) & 1)
......
...@@ -85,6 +85,7 @@ ...@@ -85,6 +85,7 @@
* GPIO pins used for bit-banged MII communications * GPIO pins used for bit-banged MII communications
*/ */
#define MDIO_PORT 0 /* Not used - implemented in BCSR */ #define MDIO_PORT 0 /* Not used - implemented in BCSR */
#define MDIO_ACTIVE (*(vu_char *)(CONFIG_SYS_BCSR + 8) &= 0xFB) #define MDIO_ACTIVE (*(vu_char *)(CONFIG_SYS_BCSR + 8) &= 0xFB)
#define MDIO_TRISTATE (*(vu_char *)(CONFIG_SYS_BCSR + 8) |= 0x04) #define MDIO_TRISTATE (*(vu_char *)(CONFIG_SYS_BCSR + 8) |= 0x04)
#define MDIO_READ (*(vu_char *)(CONFIG_SYS_BCSR + 8) & 1) #define MDIO_READ (*(vu_char *)(CONFIG_SYS_BCSR + 8) & 1)
......
...@@ -212,6 +212,11 @@ ...@@ -212,6 +212,11 @@
* Port pins used for bit-banged MII communictions (if applicable). * Port pins used for bit-banged MII communictions (if applicable).
*/ */
#define MDIO_PORT 2 /* Port C */ #define MDIO_PORT 2 /* Port C */
#define MDIO_DECLARE volatile ioport_t *iop = ioport_addr ( \
(immap_t *) CONFIG_SYS_IMMR, MDIO_PORT )
#define MDC_DECLARE MDIO_DECLARE
#define MDIO_ACTIVE (iop->pdir |= 0x00400000) #define MDIO_ACTIVE (iop->pdir |= 0x00400000)
#define MDIO_TRISTATE (iop->pdir &= ~0x00400000) #define MDIO_TRISTATE (iop->pdir &= ~0x00400000)
#define MDIO_READ ((iop->pdat & 0x00400000) != 0) #define MDIO_READ ((iop->pdat & 0x00400000) != 0)
......
...@@ -93,6 +93,10 @@ ...@@ -93,6 +93,10 @@
# define CONFIG_SYS_FCC_PSMR (FCC_PSMR_FDE|FCC_PSMR_LPB) # define CONFIG_SYS_FCC_PSMR (FCC_PSMR_FDE|FCC_PSMR_LPB)
# define MDIO_PORT 0 /* Port A */ # define MDIO_PORT 0 /* Port A */
# define MDIO_DECLARE volatile ioport_t *iop = ioport_addr ( \
(immap_t *) CONFIG_SYS_IMMR, MDIO_PORT )
# define MDC_DECLARE MDIO_DECLARE
# define MDIO_DATA_PINMASK 0x00040000 /* Pin 13 */ # define MDIO_DATA_PINMASK 0x00040000 /* Pin 13 */
# define MDIO_CLCK_PINMASK 0x00080000 /* Pin 12 */ # define MDIO_CLCK_PINMASK 0x00080000 /* Pin 12 */
...@@ -110,6 +114,10 @@ ...@@ -110,6 +114,10 @@
# define CONFIG_SYS_FCC_PSMR (FCC_PSMR_FDE|FCC_PSMR_LPB) # define CONFIG_SYS_FCC_PSMR (FCC_PSMR_FDE|FCC_PSMR_LPB)
# define MDIO_PORT 0 /* Port A */ # define MDIO_PORT 0 /* Port A */
# define MDIO_DECLARE volatile ioport_t *iop = ioport_addr ( \
(immap_t *) CONFIG_SYS_IMMR, MDIO_PORT )
# define MDC_DECLARE MDIO_DECLARE
# define MDIO_DATA_PINMASK 0x00000040 /* Pin 25 */ # define MDIO_DATA_PINMASK 0x00000040 /* Pin 25 */
# define MDIO_CLCK_PINMASK 0x00000080 /* Pin 24 */ # define MDIO_CLCK_PINMASK 0x00000080 /* Pin 24 */
...@@ -127,6 +135,10 @@ ...@@ -127,6 +135,10 @@
# define CONFIG_SYS_FCC_PSMR (FCC_PSMR_FDE|FCC_PSMR_LPB) # define CONFIG_SYS_FCC_PSMR (FCC_PSMR_FDE|FCC_PSMR_LPB)
# define MDIO_PORT 0 /* Port A */ # define MDIO_PORT 0 /* Port A */
# define MDIO_DECLARE volatile ioport_t *iop = ioport_addr ( \
(immap_t *) CONFIG_SYS_IMMR, MDIO_PORT )
# define MDC_DECLARE MDIO_DECLARE
# define MDIO_DATA_PINMASK 0x00000100 /* Pin 23 */ # define MDIO_DATA_PINMASK 0x00000100 /* Pin 23 */
# define MDIO_CLCK_PINMASK 0x00000200 /* Pin 22 */ # define MDIO_CLCK_PINMASK 0x00000200 /* Pin 22 */
......
...@@ -101,6 +101,10 @@ ...@@ -101,6 +101,10 @@
* GPIO pins used for bit-banged MII communications * GPIO pins used for bit-banged MII communications
*/ */
#define MDIO_PORT 0 /* Port A */ #define MDIO_PORT 0 /* Port A */
#define MDIO_DECLARE volatile ioport_t *iop = ioport_addr ( \
(immap_t *) CONFIG_SYS_IMMR, MDIO_PORT )
#define MDC_DECLARE MDIO_DECLARE
#define CONFIG_SYS_MDIO_PIN 0x00200000 /* PA10 */ #define CONFIG_SYS_MDIO_PIN 0x00200000 /* PA10 */
#define CONFIG_SYS_MDC_PIN 0x00400000 /* PA9 */ #define CONFIG_SYS_MDC_PIN 0x00400000 /* PA9 */
......
...@@ -182,6 +182,10 @@ ...@@ -182,6 +182,10 @@
* Port pins used for bit-banged MII communictions (if applicable). * Port pins used for bit-banged MII communictions (if applicable).
*/ */
#define MDIO_PORT 2 /* Port C */ #define MDIO_PORT 2 /* Port C */
#define MDIO_DECLARE volatile ioport_t *iop = ioport_addr ( \
(immap_t *) CONFIG_SYS_IMMR, MDIO_PORT )
#define MDC_DECLARE MDIO_DECLARE
#define MDIO_ACTIVE (iop->pdir |= 0x00400000) #define MDIO_ACTIVE (iop->pdir |= 0x00400000)
#define MDIO_TRISTATE (iop->pdir &= ~0x00400000) #define MDIO_TRISTATE (iop->pdir &= ~0x00400000)
#define MDIO_READ ((iop->pdat & 0x00400000) != 0) #define MDIO_READ ((iop->pdat & 0x00400000) != 0)
......
...@@ -179,6 +179,10 @@ ...@@ -179,6 +179,10 @@
*/ */
#define MDIO_PORT 2 /* Port A=0, B=1, C=2, D=3 */ #define MDIO_PORT 2 /* Port A=0, B=1, C=2, D=3 */
#define MDIO_DECLARE volatile ioport_t *iop = ioport_addr ( \
(immap_t *) CONFIG_SYS_IMMR, MDIO_PORT )
#define MDC_DECLARE MDIO_DECLARE
#define MDIO_ACTIVE (iop->pdir |= 0x40000000) #define MDIO_ACTIVE (iop->pdir |= 0x40000000)
#define MDIO_TRISTATE (iop->pdir &= ~0x40000000) #define MDIO_TRISTATE (iop->pdir &= ~0x40000000)
#define MDIO_READ ((iop->pdat & 0x40000000) != 0) #define MDIO_READ ((iop->pdat & 0x40000000) != 0)
......
...@@ -201,6 +201,10 @@ ...@@ -201,6 +201,10 @@
* Port pins used for bit-banged MII communictions (if applicable). * Port pins used for bit-banged MII communictions (if applicable).
*/ */
#define MDIO_PORT 2 /* Port C */ #define MDIO_PORT 2 /* Port C */
#define MDIO_DECLARE volatile ioport_t *iop = ioport_addr ( \
(immap_t *) CONFIG_SYS_IMMR, MDIO_PORT )
#define MDC_DECLARE MDIO_DECLARE
#define MDIO_ACTIVE (iop->pdir |= 0x00400000) #define MDIO_ACTIVE (iop->pdir |= 0x00400000)
#define MDIO_TRISTATE (iop->pdir &= ~0x00400000) #define MDIO_TRISTATE (iop->pdir &= ~0x00400000)
#define MDIO_READ ((iop->pdat & 0x00400000) != 0) #define MDIO_READ ((iop->pdat & 0x00400000) != 0)
......
...@@ -293,6 +293,10 @@ ...@@ -293,6 +293,10 @@
* GPIO pins used for bit-banged MII communications * GPIO pins used for bit-banged MII communications
*/ */
#define MDIO_PORT 2 /* Port C */ #define MDIO_PORT 2 /* Port C */
#define MDIO_DECLARE volatile ioport_t *iop = ioport_addr ( \
(immap_t *) CONFIG_SYS_IMMR, MDIO_PORT )
#define MDC_DECLARE MDIO_DECLARE
#define MDIO_ACTIVE (iop->pdir |= 0x00400000) #define MDIO_ACTIVE (iop->pdir |= 0x00400000)
#define MDIO_TRISTATE (iop->pdir &= ~0x00400000) #define MDIO_TRISTATE (iop->pdir &= ~0x00400000)
#define MDIO_READ ((iop->pdat & 0x00400000) != 0) #define MDIO_READ ((iop->pdat & 0x00400000) != 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册