diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-10-06 12:00:18 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-10-11 15:31:37 +0200 |
commit | 6bd96f3c332d422c0dda302f1b32c8e21dd75ee3 (patch) | |
tree | 5a885aac1d005df8d0dc51896d4dfe9ef03e62df /arch/arm/mach-mx3 | |
parent | 8a8d20600dce01553c8505b7c576f8d4307e4ba8 (diff) | |
download | blackbird-obmc-linux-6bd96f3c332d422c0dda302f1b32c8e21dd75ee3.tar.gz blackbird-obmc-linux-6bd96f3c332d422c0dda302f1b32c8e21dd75ee3.zip |
ARM: imx: dynamically register fec devices
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx3')
-rw-r--r-- | arch/arm/mach-mx3/devices-imx35.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-mx3/devices.c | 21 | ||||
-rw-r--r-- | arch/arm/mach-mx3/devices.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mach-cpuimx35.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mach-mx35_3ds.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mach-pcm043.c | 2 |
6 files changed, 7 insertions, 25 deletions
diff --git a/arch/arm/mach-mx3/devices-imx35.h b/arch/arm/mach-mx3/devices-imx35.h index 766008451ccd..509b346b7fef 100644 --- a/arch/arm/mach-mx3/devices-imx35.h +++ b/arch/arm/mach-mx3/devices-imx35.h @@ -9,6 +9,10 @@ #include <mach/mx35.h> #include <mach/devices-common.h> +extern const struct imx_fec_data imx35_fec_data __initconst; +#define imx35_add_fec(pdata) \ + imx_add_fec(&imx35_fec_data, pdata) + #define imx35_add_flexcan0(pdata) \ imx_add_flexcan(0, MX35_CAN1_BASE_ADDR, SZ_16K, MX35_INT_CAN1, pdata) #define imx35_add_flexcan1(pdata) \ diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c index 87a9a21457b9..f4dff11aaee7 100644 --- a/arch/arm/mach-mx3/devices.c +++ b/arch/arm/mach-mx3/devices.c @@ -281,27 +281,6 @@ struct platform_device mxc_usbh2 = { .num_resources = ARRAY_SIZE(mxc_usbh2_resources), }; -#if defined(CONFIG_ARCH_MX35) -static struct resource mxc_fec_resources[] = { - { - .start = MXC_FEC_BASE_ADDR, - .end = MXC_FEC_BASE_ADDR + 0xfff, - .flags = IORESOURCE_MEM, - }, { - .start = MXC_INT_FEC, - .end = MXC_INT_FEC, - .flags = IORESOURCE_IRQ, - }, -}; - -struct platform_device mxc_fec_device = { - .name = "fec", - .id = 0, - .num_resources = ARRAY_SIZE(mxc_fec_resources), - .resource = mxc_fec_resources, -}; -#endif - static struct resource imx_wdt_resources[] = { { .flags = IORESOURCE_MEM, diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h index 2a69465bc542..585f814473d5 100644 --- a/arch/arm/mach-mx3/devices.h +++ b/arch/arm/mach-mx3/devices.h @@ -2,7 +2,6 @@ extern struct platform_device mxc_w1_master_device; extern struct platform_device mx3_ipu; extern struct platform_device mx3_fb; extern struct platform_device mx3_camera; -extern struct platform_device mxc_fec_device; extern struct platform_device mxcsdhc_device0; extern struct platform_device mxcsdhc_device1; extern struct platform_device mxc_otg_udc_device; diff --git a/arch/arm/mach-mx3/mach-cpuimx35.c b/arch/arm/mach-mx3/mach-cpuimx35.c index ea0a85f1c9aa..781ab4694a0f 100644 --- a/arch/arm/mach-mx3/mach-cpuimx35.c +++ b/arch/arm/mach-mx3/mach-cpuimx35.c @@ -76,7 +76,6 @@ static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = { }; static struct platform_device *devices[] __initdata = { - &mxc_fec_device, &imx_wdt_device0, }; @@ -158,6 +157,7 @@ static void __init mxc_board_init(void) mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx35_pads, ARRAY_SIZE(eukrea_cpuimx35_pads)); + imx35_add_fec(NULL); platform_add_devices(devices, ARRAY_SIZE(devices)); imx35_add_imx_uart0(&uart_pdata); diff --git a/arch/arm/mach-mx3/mach-mx35_3ds.c b/arch/arm/mach-mx3/mach-mx35_3ds.c index 1dd7baae4507..91bb06552af1 100644 --- a/arch/arm/mach-mx3/mach-mx35_3ds.c +++ b/arch/arm/mach-mx3/mach-mx35_3ds.c @@ -74,7 +74,6 @@ static const struct mxc_nand_platform_data mx35pdk_nand_board_info __initconst = }; static struct platform_device *devices[] __initdata = { - &mxc_fec_device, &mx35pdk_flash, }; @@ -131,6 +130,7 @@ static void __init mxc_board_init(void) { mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads)); + imx35_add_fec(NULL); platform_add_devices(devices, ARRAY_SIZE(devices)); imx35_add_imx_uart0(&uart_pdata); diff --git a/arch/arm/mach-mx3/mach-pcm043.c b/arch/arm/mach-mx3/mach-pcm043.c index c427b3c35ca7..e790a00cf99f 100644 --- a/arch/arm/mach-mx3/mach-pcm043.c +++ b/arch/arm/mach-mx3/mach-pcm043.c @@ -140,7 +140,6 @@ static struct i2c_board_info pcm043_i2c_devices[] = { static struct platform_device *devices[] __initdata = { &pcm043_flash, - &mxc_fec_device, &imx_wdt_device0, }; @@ -363,6 +362,7 @@ static void __init mxc_board_init(void) MXC_AUDMUX_V2_PTCR_TCLKDIR, /* clock is output */ MXC_AUDMUX_V2_PDCR_RXDSEL(3)); + imx35_add_fec(NULL); platform_add_devices(devices, ARRAY_SIZE(devices)); imx35_add_imx_uart0(&uart_pdata); |