[PATCH] ppc32: 85xx PHY Platform Update
authorAndy Fleming <afleming@freescale.com>
Sat, 29 Oct 2005 00:46:27 +0000 (17:46 -0700)
committerPaul Mackerras <paulus@samba.org>
Sat, 29 Oct 2005 04:42:28 +0000 (14:42 +1000)
This patch updates the 85xx platform code to support the new PHY Layer.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Kumar Gala <Kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/ppc/platforms/85xx/mpc8540_ads.c
arch/ppc/platforms/85xx/mpc8560_ads.c
arch/ppc/platforms/85xx/mpc85xx_cds_common.c
arch/ppc/platforms/85xx/sbc8560.c
arch/ppc/platforms/85xx/stx_gp3.c
arch/ppc/syslib/mpc85xx_devices.c
arch/ppc/syslib/mpc85xx_sys.c
include/asm-ppc/mpc85xx.h
include/linux/fsl_devices.h

index 7dc8a68acfd03a99e5c9c5fe18fae9b3b94b5a31..7e952c1228cba50c4cd3823e4612f4b0ef7705ca 100644 (file)
 
 #include <syslib/ppc85xx_setup.h>
 
+static const char *GFAR_PHY_0 = "phy0:0";
+static const char *GFAR_PHY_1 = "phy0:1";
+static const char *GFAR_PHY_3 = "phy0:3";
+
 /* ************************************************************************
  *
  * Setup the architecture
@@ -63,6 +67,7 @@ mpc8540ads_setup_arch(void)
        bd_t *binfo = (bd_t *) __res;
        unsigned int freq;
        struct gianfar_platform_data *pdata;
+       struct gianfar_mdio_data *mdata;
 
        /* get the core frequency */
        freq = binfo->bi_intfreq;
@@ -89,34 +94,35 @@ mpc8540ads_setup_arch(void)
        invalidate_tlbcam_entry(num_tlbcam_entries - 1);
 #endif
 
+       /* setup the board related info for the MDIO bus */
+       mdata = (struct gianfar_mdio_data *) ppc_sys_get_pdata(MPC85xx_MDIO);
+
+       mdata->irq[0] = MPC85xx_IRQ_EXT5;
+       mdata->irq[1] = MPC85xx_IRQ_EXT5;
+       mdata->irq[2] = -1;
+       mdata->irq[3] = MPC85xx_IRQ_EXT5;
+       mdata->irq[31] = -1;
+       mdata->paddr += binfo->bi_immr_base;
+
        /* setup the board related information for the enet controllers */
        pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1);
        if (pdata) {
                pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
-               pdata->interruptPHY = MPC85xx_IRQ_EXT5;
-               pdata->phyid = 0;
-               /* fixup phy address */
-               pdata->phy_reg_addr += binfo->bi_immr_base;
+               pdata->bus_id = GFAR_PHY_0;
                memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
        }
 
        pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2);
        if (pdata) {
                pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
-               pdata->interruptPHY = MPC85xx_IRQ_EXT5;
-               pdata->phyid = 1;
-               /* fixup phy address */
-               pdata->phy_reg_addr += binfo->bi_immr_base;
+               pdata->bus_id = GFAR_PHY_1;
                memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
        }
 
        pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_FEC);
        if (pdata) {
                pdata->board_flags = 0;
-               pdata->interruptPHY = MPC85xx_IRQ_EXT5;
-               pdata->phyid = 3;
-               /* fixup phy address */
-               pdata->phy_reg_addr += binfo->bi_immr_base;
+               pdata->bus_id = GFAR_PHY_3;
                memcpy(pdata->mac_addr, binfo->bi_enet2addr, 6);
        }
 
index 8841fd7da6eeb2246349f5a6313b593b8021f880..208433f1e93ae32a1bcf207073374146da8ef6a0 100644 (file)
 #include <syslib/ppc85xx_setup.h>
 
 
+static const char *GFAR_PHY_0 = "phy0:0";
+static const char *GFAR_PHY_1 = "phy0:1";
+static const char *GFAR_PHY_3 = "phy0:3";
+
 /* ************************************************************************
  *
  * Setup the architecture
@@ -68,6 +72,7 @@ mpc8560ads_setup_arch(void)
        bd_t *binfo = (bd_t *) __res;
        unsigned int freq;
        struct gianfar_platform_data *pdata;
+       struct gianfar_mdio_data *mdata;
 
        cpm2_reset();
 
@@ -86,24 +91,28 @@ mpc8560ads_setup_arch(void)
        mpc85xx_setup_hose();
 #endif
 
+       /* setup the board related info for the MDIO bus */
+       mdata = (struct gianfar_mdio_data *) ppc_sys_get_pdata(MPC85xx_MDIO);
+
+       mdata->irq[0] = MPC85xx_IRQ_EXT5;
+       mdata->irq[1] = MPC85xx_IRQ_EXT5;
+       mdata->irq[2] = -1;
+       mdata->irq[3] = MPC85xx_IRQ_EXT5;
+       mdata->irq[31] = -1;
+       mdata->paddr += binfo->bi_immr_base;
+
        /* setup the board related information for the enet controllers */
        pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1);
        if (pdata) {
                pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
-               pdata->interruptPHY = MPC85xx_IRQ_EXT5;
-               pdata->phyid = 0;
-               /* fixup phy address */
-               pdata->phy_reg_addr += binfo->bi_immr_base;
+               pdata->bus_id = GFAR_PHY_0;
                memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
        }
 
        pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2);
        if (pdata) {
                pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
-               pdata->interruptPHY = MPC85xx_IRQ_EXT5;
-               pdata->phyid = 1;
-               /* fixup phy address */
-               pdata->phy_reg_addr += binfo->bi_immr_base;
+               pdata->bus_id = GFAR_PHY_1;
                memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
        }
 
index eda659916f24254d9e7100f7374bc77d49d957b1..a21156967a5e130ea0ca70f76c9503965156edff 100644 (file)
@@ -391,6 +391,9 @@ mpc85xx_cds_pcibios_fixup(void)
 
 TODC_ALLOC();
 
+static const char *GFAR_PHY_0 = "phy0:0";
+static const char *GFAR_PHY_1 = "phy0:1";
+
 /* ************************************************************************
  *
  * Setup the architecture
@@ -402,6 +405,7 @@ mpc85xx_cds_setup_arch(void)
        bd_t *binfo = (bd_t *) __res;
        unsigned int freq;
        struct gianfar_platform_data *pdata;
+       struct gianfar_mdio_data *mdata;
 
        /* get the core frequency */
        freq = binfo->bi_intfreq;
@@ -445,44 +449,42 @@ mpc85xx_cds_setup_arch(void)
        invalidate_tlbcam_entry(num_tlbcam_entries - 1);
 #endif
 
+       /* setup the board related info for the MDIO bus */
+       mdata = (struct gianfar_mdio_data *) ppc_sys_get_pdata(MPC85xx_MDIO);
+
+       mdata->irq[0] = MPC85xx_IRQ_EXT5;
+       mdata->irq[1] = MPC85xx_IRQ_EXT5;
+       mdata->irq[2] = -1;
+       mdata->irq[3] = -1;
+       mdata->irq[31] = -1;
+       mdata->paddr += binfo->bi_immr_base;
+
        /* setup the board related information for the enet controllers */
        pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1);
        if (pdata) {
                pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
-               pdata->interruptPHY = MPC85xx_IRQ_EXT5;
-               pdata->phyid = 0;
-               /* fixup phy address */
-               pdata->phy_reg_addr += binfo->bi_immr_base;
+               pdata->bus_id = GFAR_PHY_0;
                memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
        }
 
        pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2);
        if (pdata) {
                pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
-               pdata->interruptPHY = MPC85xx_IRQ_EXT5;
-               pdata->phyid = 1;
-               /* fixup phy address */
-               pdata->phy_reg_addr += binfo->bi_immr_base;
+               pdata->bus_id = GFAR_PHY_1;
                memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
        }
 
        pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_eTSEC1);
        if (pdata) {
                pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
-               pdata->interruptPHY = MPC85xx_IRQ_EXT5;
-               pdata->phyid = 0;
-               /* fixup phy address */
-               pdata->phy_reg_addr += binfo->bi_immr_base;
+               pdata->bus_id = GFAR_PHY_0;
                memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
        }
 
        pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_eTSEC2);
        if (pdata) {
                pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
-               pdata->interruptPHY = MPC85xx_IRQ_EXT5;
-               pdata->phyid = 1;
-               /* fixup phy address */
-               pdata->phy_reg_addr += binfo->bi_immr_base;
+               pdata->bus_id = GFAR_PHY_1;
                memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
        }
 
index c76760a781c173089aa065f0d9371c5d24f8af98..b4ee1707a836ce81693f4eae22d8bc5efae75a2d 100644 (file)
@@ -91,6 +91,9 @@ sbc8560_early_serial_map(void)
 }
 #endif
 
+static const char *GFAR_PHY_25 = "phy0:25";
+static const char *GFAR_PHY_26 = "phy0:26";
+
 /* ************************************************************************
  *
  * Setup the architecture
@@ -102,6 +105,7 @@ sbc8560_setup_arch(void)
        bd_t *binfo = (bd_t *) __res;
        unsigned int freq;
        struct gianfar_platform_data *pdata;
+       struct gianfar_mdio_data *mdata;
 
        /* get the core frequency */
        freq = binfo->bi_intfreq;
@@ -126,24 +130,26 @@ sbc8560_setup_arch(void)
        invalidate_tlbcam_entry(num_tlbcam_entries - 1);
 #endif
 
+       /* setup the board related info for the MDIO bus */
+       mdata = (struct gianfar_mdio_data *) ppc_sys_get_pdata(MPC85xx_MDIO);
+
+       mdata->irq[25] = MPC85xx_IRQ_EXT6;
+       mdata->irq[26] = MPC85xx_IRQ_EXT7;
+       mdata->irq[31] = -1;
+       mdata->paddr += binfo->bi_immr_base;
+
        /* setup the board related information for the enet controllers */
        pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1);
        if (pdata) {
                pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
-               pdata->interruptPHY = MPC85xx_IRQ_EXT6;
-               pdata->phyid = 25;
-               /* fixup phy address */
-               pdata->phy_reg_addr += binfo->bi_immr_base;
+               pdata->bus_id = GFAR_PHY_25;
                memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
        }
 
        pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2);
        if (pdata) {
                pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
-               pdata->interruptPHY = MPC85xx_IRQ_EXT7;
-               pdata->phyid = 26;
-               /* fixup phy address */
-               pdata->phy_reg_addr += binfo->bi_immr_base;
+               pdata->bus_id = GFAR_PHY_26;
                memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
        }
 
index 20940f4044f477aee7f53fab6edcbeb411eee97b..1e1b85f8193a480a12030e7e84f6c07ff9fdbabb 100644 (file)
@@ -91,6 +91,9 @@ static u8 gp3_openpic_initsenses[] __initdata = {
        0x0,                            /* External 11: */
 };
 
+static const char *GFAR_PHY_2 = "phy0:2";
+static const char *GFAR_PHY_4 = "phy0:4";
+
 /*
  * Setup the architecture
  */
@@ -100,6 +103,7 @@ gp3_setup_arch(void)
        bd_t *binfo = (bd_t *) __res;
        unsigned int freq;
        struct gianfar_platform_data *pdata;
+       struct gianfar_mdio_data *mdata;
 
        cpm2_reset();
 
@@ -118,23 +122,26 @@ gp3_setup_arch(void)
        mpc85xx_setup_hose();
 #endif
 
+       /* setup the board related info for the MDIO bus */
+       mdata = (struct gianfar_mdio_data *) ppc_sys_get_pdata(MPC85xx_MDIO);
+
+       mdata->irq[2] = MPC85xx_IRQ_EXT5;
+       mdata->irq[4] = MPC85xx_IRQ_EXT5;
+       mdata->irq[31] = -1;
+       mdata->paddr += binfo->bi_immr_base;
+
        /* setup the board related information for the enet controllers */
        pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1);
        if (pdata) {
        /*      pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; */
-               pdata->interruptPHY = MPC85xx_IRQ_EXT5;
-               pdata->phyid = 2;
-               pdata->phy_reg_addr += binfo->bi_immr_base;
+               pdata->bus_id = GFAR_PHY_2;
                memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
        }
 
        pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2);
        if (pdata) {
        /*      pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; */
-               pdata->interruptPHY = MPC85xx_IRQ_EXT5;
-               pdata->phyid = 4;
-               /* fixup phy address */
-               pdata->phy_reg_addr += binfo->bi_immr_base;
+               pdata->bus_id = GFAR_PHY_4;
                memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
        }
 
index bbc5ac0de87835f7251fc0980f89166efb2fc6cc..2ede677a0a53c37d24ad208a8a9447f7acb195b7 100644 (file)
 /* We use offsets for IORESOURCE_MEM since we do not know at compile time
  * what CCSRBAR is, will get fixed up by mach_mpc85xx_fixup
  */
+struct gianfar_mdio_data mpc85xx_mdio_pdata = {
+       .paddr = MPC85xx_MIIM_OFFSET,
+};
 
 static struct gianfar_platform_data mpc85xx_tsec1_pdata = {
        .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT |
            FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON |
            FSL_GIANFAR_DEV_HAS_MULTI_INTR,
-       .phy_reg_addr = MPC85xx_ENET1_OFFSET,
 };
 
 static struct gianfar_platform_data mpc85xx_tsec2_pdata = {
        .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT |
            FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON |
            FSL_GIANFAR_DEV_HAS_MULTI_INTR,
-       .phy_reg_addr = MPC85xx_ENET1_OFFSET,
 };
 
 static struct gianfar_platform_data mpc85xx_etsec1_pdata = {
@@ -46,7 +47,6 @@ static struct gianfar_platform_data mpc85xx_etsec1_pdata = {
            FSL_GIANFAR_DEV_HAS_MULTI_INTR |
            FSL_GIANFAR_DEV_HAS_CSUM | FSL_GIANFAR_DEV_HAS_VLAN |
            FSL_GIANFAR_DEV_HAS_EXTENDED_HASH,
-       .phy_reg_addr = MPC85xx_ENET1_OFFSET,
 };
 
 static struct gianfar_platform_data mpc85xx_etsec2_pdata = {
@@ -55,7 +55,6 @@ static struct gianfar_platform_data mpc85xx_etsec2_pdata = {
            FSL_GIANFAR_DEV_HAS_MULTI_INTR |
            FSL_GIANFAR_DEV_HAS_CSUM | FSL_GIANFAR_DEV_HAS_VLAN |
            FSL_GIANFAR_DEV_HAS_EXTENDED_HASH,
-       .phy_reg_addr = MPC85xx_ENET1_OFFSET,
 };
 
 static struct gianfar_platform_data mpc85xx_etsec3_pdata = {
@@ -64,7 +63,6 @@ static struct gianfar_platform_data mpc85xx_etsec3_pdata = {
            FSL_GIANFAR_DEV_HAS_MULTI_INTR |
            FSL_GIANFAR_DEV_HAS_CSUM | FSL_GIANFAR_DEV_HAS_VLAN |
            FSL_GIANFAR_DEV_HAS_EXTENDED_HASH,
-       .phy_reg_addr = MPC85xx_ENET1_OFFSET,
 };
 
 static struct gianfar_platform_data mpc85xx_etsec4_pdata = {
@@ -73,11 +71,10 @@ static struct gianfar_platform_data mpc85xx_etsec4_pdata = {
            FSL_GIANFAR_DEV_HAS_MULTI_INTR |
            FSL_GIANFAR_DEV_HAS_CSUM | FSL_GIANFAR_DEV_HAS_VLAN |
            FSL_GIANFAR_DEV_HAS_EXTENDED_HASH,
-       .phy_reg_addr = MPC85xx_ENET1_OFFSET,
 };
 
 static struct gianfar_platform_data mpc85xx_fec_pdata = {
-       .phy_reg_addr = MPC85xx_ENET1_OFFSET,
+       .device_flags = 0,
 };
 
 static struct fsl_i2c_platform_data mpc85xx_fsl_i2c_pdata = {
@@ -719,6 +716,12 @@ struct platform_device ppc_sys_platform_devices[] = {
                        },
                },
        },
+       [MPC85xx_MDIO] = {
+               .name = "fsl-gianfar_mdio",
+               .id = 0,
+               .dev.platform_data = &mpc85xx_mdio_pdata,
+               .num_resources = 0,
+       },
 };
 
 static int __init mach_mpc85xx_fixup(struct platform_device *pdev)
index 6e3184ab354f4da230f362d471564f4979c9ef45..cb68d8c58348528d98a4414f7d607fe5c4ced4cf 100644 (file)
@@ -24,19 +24,19 @@ struct ppc_sys_spec ppc_sys_specs[] = {
                .ppc_sys_name   = "8540",
                .mask           = 0xFFFF0000,
                .value          = 0x80300000,
-               .num_devices    = 10,
+               .num_devices    = 11,
                .device_list    = (enum ppc_sys_devices[])
                {
                        MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_FEC, MPC85xx_IIC1,
                        MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
-                       MPC85xx_PERFMON, MPC85xx_DUART,
+                       MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_MDIO,
                },
        },
        {
                .ppc_sys_name   = "8560",
                .mask           = 0xFFFF0000,
                .value          = 0x80700000,
-               .num_devices    = 19,
+               .num_devices    = 20,
                .device_list    = (enum ppc_sys_devices[])
                {
                        MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1,
@@ -45,14 +45,14 @@ struct ppc_sys_spec ppc_sys_specs[] = {
                        MPC85xx_CPM_SPI, MPC85xx_CPM_I2C, MPC85xx_CPM_SCC1,
                        MPC85xx_CPM_SCC2, MPC85xx_CPM_SCC3, MPC85xx_CPM_SCC4,
                        MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2, MPC85xx_CPM_FCC3,
-                       MPC85xx_CPM_MCC1, MPC85xx_CPM_MCC2,
+                       MPC85xx_CPM_MCC1, MPC85xx_CPM_MCC2, MPC85xx_MDIO,
                },
        },
        {
                .ppc_sys_name   = "8541",
                .mask           = 0xFFFF0000,
                .value          = 0x80720000,
-               .num_devices    = 13,
+               .num_devices    = 14,
                .device_list    = (enum ppc_sys_devices[])
                {
                        MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1,
@@ -60,13 +60,14 @@ struct ppc_sys_spec ppc_sys_specs[] = {
                        MPC85xx_PERFMON, MPC85xx_DUART,
                        MPC85xx_CPM_SPI, MPC85xx_CPM_I2C,
                        MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2,
+                       MPC85xx_MDIO,
                },
        },
        {
                .ppc_sys_name   = "8541E",
                .mask           = 0xFFFF0000,
                .value          = 0x807A0000,
-               .num_devices    = 14,
+               .num_devices    = 15,
                .device_list    = (enum ppc_sys_devices[])
                {
                        MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1,
@@ -74,13 +75,14 @@ struct ppc_sys_spec ppc_sys_specs[] = {
                        MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_SEC2,
                        MPC85xx_CPM_SPI, MPC85xx_CPM_I2C,
                        MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2,
+                       MPC85xx_MDIO,
                },
        },
        {
                .ppc_sys_name   = "8555",
                .mask           = 0xFFFF0000,
                .value          = 0x80710000,
-               .num_devices    = 19,
+               .num_devices    = 20,
                .device_list    = (enum ppc_sys_devices[])
                {
                        MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1,
@@ -91,13 +93,14 @@ struct ppc_sys_spec ppc_sys_specs[] = {
                        MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2,
                        MPC85xx_CPM_SMC1, MPC85xx_CPM_SMC2,
                        MPC85xx_CPM_USB,
+                       MPC85xx_MDIO,
                },
        },
        {
                .ppc_sys_name   = "8555E",
                .mask           = 0xFFFF0000,
                .value          = 0x80790000,
-               .num_devices    = 20,
+               .num_devices    = 21,
                .device_list    = (enum ppc_sys_devices[])
                {
                        MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1,
@@ -108,6 +111,7 @@ struct ppc_sys_spec ppc_sys_specs[] = {
                        MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2,
                        MPC85xx_CPM_SMC1, MPC85xx_CPM_SMC2,
                        MPC85xx_CPM_USB,
+                       MPC85xx_MDIO,
                },
        },
        /* SVRs on 8548 rev1.0 matches for 8548/8547/8545 */
@@ -115,104 +119,112 @@ struct ppc_sys_spec ppc_sys_specs[] = {
                .ppc_sys_name   = "8548E",
                .mask           = 0xFFFF00F0,
                .value          = 0x80390010,
-               .num_devices    = 13,
+               .num_devices    = 14,
                .device_list    = (enum ppc_sys_devices[])
                {
                        MPC85xx_eTSEC1, MPC85xx_eTSEC2, MPC85xx_eTSEC3,
                        MPC85xx_eTSEC4, MPC85xx_IIC1, MPC85xx_IIC2,
                        MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
                        MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_SEC2,
+                       MPC85xx_MDIO,
                },
        },
        {
                .ppc_sys_name   = "8548",
                .mask           = 0xFFFF00F0,
                .value          = 0x80310010,
-               .num_devices    = 12,
+               .num_devices    = 13,
                .device_list    = (enum ppc_sys_devices[])
                {
                        MPC85xx_eTSEC1, MPC85xx_eTSEC2, MPC85xx_eTSEC3,
                        MPC85xx_eTSEC4, MPC85xx_IIC1, MPC85xx_IIC2,
                        MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
                        MPC85xx_PERFMON, MPC85xx_DUART,
+                       MPC85xx_MDIO,
                },
        },
        {
                .ppc_sys_name   = "8547E",
                .mask           = 0xFFFF00F0,
                .value          = 0x80390010,
-               .num_devices    = 13,
+               .num_devices    = 14,
                .device_list    = (enum ppc_sys_devices[])
                {
                        MPC85xx_eTSEC1, MPC85xx_eTSEC2, MPC85xx_eTSEC3,
                        MPC85xx_eTSEC4, MPC85xx_IIC1, MPC85xx_IIC2,
                        MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
                        MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_SEC2,
+                       MPC85xx_MDIO,
                },
        },
        {
                .ppc_sys_name   = "8547",
                .mask           = 0xFFFF00F0,
                .value          = 0x80310010,
-               .num_devices    = 12,
+               .num_devices    = 13,
                .device_list    = (enum ppc_sys_devices[])
                {
                        MPC85xx_eTSEC1, MPC85xx_eTSEC2, MPC85xx_eTSEC3,
                        MPC85xx_eTSEC4, MPC85xx_IIC1, MPC85xx_IIC2,
                        MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
                        MPC85xx_PERFMON, MPC85xx_DUART,
+                       MPC85xx_MDIO,
                },
        },
        {
                .ppc_sys_name   = "8545E",
                .mask           = 0xFFFF00F0,
                .value          = 0x80390010,
-               .num_devices    = 11,
+               .num_devices    = 12,
                .device_list    = (enum ppc_sys_devices[])
                {
                        MPC85xx_eTSEC1, MPC85xx_eTSEC2,
                        MPC85xx_IIC1, MPC85xx_IIC2,
                        MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
                        MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_SEC2,
+                       MPC85xx_MDIO,
                },
        },
        {
                .ppc_sys_name   = "8545",
                .mask           = 0xFFFF00F0,
                .value          = 0x80310010,
-               .num_devices    = 10,
+               .num_devices    = 11,
                .device_list    = (enum ppc_sys_devices[])
                {
                        MPC85xx_eTSEC1, MPC85xx_eTSEC2,
                        MPC85xx_IIC1, MPC85xx_IIC2,
                        MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
                        MPC85xx_PERFMON, MPC85xx_DUART,
+                       MPC85xx_MDIO,
                },
        },
        {
                .ppc_sys_name   = "8543E",
                .mask           = 0xFFFF00F0,
                .value          = 0x803A0010,
-               .num_devices    = 11,
+               .num_devices    = 12,
                .device_list    = (enum ppc_sys_devices[])
                {
                        MPC85xx_eTSEC1, MPC85xx_eTSEC2,
                        MPC85xx_IIC1, MPC85xx_IIC2,
                        MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
                        MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_SEC2,
+                       MPC85xx_MDIO,
                },
        },
        {
                .ppc_sys_name   = "8543",
                .mask           = 0xFFFF00F0,
                .value          = 0x80320010,
-               .num_devices    = 10,
+               .num_devices    = 11,
                .device_list    = (enum ppc_sys_devices[])
                {
                        MPC85xx_eTSEC1, MPC85xx_eTSEC2,
                        MPC85xx_IIC1, MPC85xx_IIC2,
                        MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
                        MPC85xx_PERFMON, MPC85xx_DUART,
+                       MPC85xx_MDIO,
                },
        },
        {       /* default match */
index 516984ee14b58782f98fb6168e7cea4c3c44e00f..d98db980cd498cdfbdf424c471d166a4fd652eb1 100644 (file)
@@ -67,6 +67,8 @@ extern unsigned char __res[];
 #define MPC85xx_DMA3_SIZE      (0x00080)
 #define MPC85xx_ENET1_OFFSET   (0x24000)
 #define MPC85xx_ENET1_SIZE     (0x01000)
+#define MPC85xx_MIIM_OFFSET    (0x24520)
+#define MPC85xx_MIIM_SIZE      (0x00018)
 #define MPC85xx_ENET2_OFFSET   (0x25000)
 #define MPC85xx_ENET2_SIZE     (0x01000)
 #define MPC85xx_ENET3_OFFSET   (0x26000)
@@ -132,6 +134,7 @@ enum ppc_sys_devices {
        MPC85xx_eTSEC3,
        MPC85xx_eTSEC4,
        MPC85xx_IIC2,
+       MPC85xx_MDIO,
 };
 
 /* Internal interrupts are all Level Sensitive, and Positive Polarity */
index 70f54af87b9f116f1ffda706c0293f6a7f6a3e24..114d5d59f695bf952837620e4c26e1b024462ca7 100644 (file)
 struct gianfar_platform_data {
        /* device specific information */
        u32 device_flags;
-       u32 phy_reg_addr;
 
        /* board specific information */
        u32 board_flags;
-       u32 phy_flags;
-       u32 phyid;
-       u32 interruptPHY;
+       const char *bus_id;
        u8 mac_addr[6];
 };
 
+struct gianfar_mdio_data {
+       /* device specific information */
+       u32 paddr;
+
+       /* board specific information */
+       int irq[32];
+};
+
 /* Flags related to gianfar device features */
 #define FSL_GIANFAR_DEV_HAS_GIGABIT            0x00000001
 #define FSL_GIANFAR_DEV_HAS_COALESCE           0x00000002