diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-11-11 11:57:21 +0100 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-11-17 10:01:40 +0100 |
commit | e7c74b343091e0c6b7bb67c12f9f7fb345aa6a50 (patch) | |
tree | 08b808dad98c3b098eaa49c6588b6b16d46d7bd8 /arch/arm/mach-mx25 | |
parent | ab9cee4b2167f8bf01d85b537df5b9cbe342c780 (diff) | |
download | linux-3.10-e7c74b343091e0c6b7bb67c12f9f7fb345aa6a50.tar.gz linux-3.10-e7c74b343091e0c6b7bb67c12f9f7fb345aa6a50.tar.bz2 linux-3.10-e7c74b343091e0c6b7bb67c12f9f7fb345aa6a50.zip |
ARM: mx25: dynamically allocate imxdi_rtc devices
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx25')
-rw-r--r-- | arch/arm/mach-mx25/Kconfig | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx25/devices-imx25.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-mx25/devices.c | 19 | ||||
-rw-r--r-- | arch/arm/mach-mx25/devices.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-mx25/mach-cpuimx25.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx25/mach-mx25_3ds.c | 2 |
6 files changed, 8 insertions, 22 deletions
diff --git a/arch/arm/mach-mx25/Kconfig b/arch/arm/mach-mx25/Kconfig index e9d445649d4..baa75fecf2f 100644 --- a/arch/arm/mach-mx25/Kconfig +++ b/arch/arm/mach-mx25/Kconfig @@ -5,6 +5,7 @@ comment "MX25 platforms:" config MACH_MX25_3DS bool "Support MX25PDK (3DS) Platform" select IMX_HAVE_PLATFORM_ESDHC + select IMX_HAVE_PLATFORM_IMXDI_RTC select IMX_HAVE_PLATFORM_IMX_KEYPAD select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_MXC_EHCI @@ -15,6 +16,7 @@ config MACH_EUKREA_CPUIMX25 select IMX_HAVE_PLATFORM_ESDHC select IMX_HAVE_PLATFORM_FLEXCAN select IMX_HAVE_PLATFORM_FSL_USB2_UDC + select IMX_HAVE_PLATFORM_IMXDI_RTC select IMX_HAVE_PLATFORM_IMX_I2C select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_MXC_EHCI diff --git a/arch/arm/mach-mx25/devices-imx25.h b/arch/arm/mach-mx25/devices-imx25.h index a35123fef39..a4980ecd394 100644 --- a/arch/arm/mach-mx25/devices-imx25.h +++ b/arch/arm/mach-mx25/devices-imx25.h @@ -23,6 +23,10 @@ extern const struct imx_fsl_usb2_udc_data imx25_fsl_usb2_udc_data __initconst; #define imx25_add_fsl_usb2_udc(pdata) \ imx_add_fsl_usb2_udc(&imx25_fsl_usb2_udc_data, pdata) +extern struct imx_imxdi_rtc_data imx25_imxdi_rtc_data __initconst; +#define imx25_add_imxdi_rtc(pdata) \ + imx_add_imxdi_rtc(&imx25_imxdi_rtc_data) + extern const struct imx_imx_i2c_data imx25_imx_i2c_data[] __initconst; #define imx25_add_imx_i2c(id, pdata) \ imx_add_imx_i2c(&imx25_imx_i2c_data[id], pdata) diff --git a/arch/arm/mach-mx25/devices.c b/arch/arm/mach-mx25/devices.c index 052adbbb3de..12743969222 100644 --- a/arch/arm/mach-mx25/devices.c +++ b/arch/arm/mach-mx25/devices.c @@ -22,25 +22,6 @@ #include <mach/mx25.h> #include <mach/irqs.h> -static struct resource mx25_rtc_resources[] = { - { - .start = MX25_DRYICE_BASE_ADDR, - .end = MX25_DRYICE_BASE_ADDR + 0x40, - .flags = IORESOURCE_MEM, - }, - { - .start = MX25_INT_DRYICE, - .flags = IORESOURCE_IRQ - }, -}; - -struct platform_device mx25_rtc_device = { - .name = "imxdi_rtc", - .id = 0, - .num_resources = ARRAY_SIZE(mx25_rtc_resources), - .resource = mx25_rtc_resources, -}; - static struct resource mx25_fb_resources[] = { { .start = MX25_LCDC_BASE_ADDR, diff --git a/arch/arm/mach-mx25/devices.h b/arch/arm/mach-mx25/devices.h index dd1fdeddb83..f37f9a2d8ee 100644 --- a/arch/arm/mach-mx25/devices.h +++ b/arch/arm/mach-mx25/devices.h @@ -1,4 +1,3 @@ -extern struct platform_device mx25_rtc_device; extern struct platform_device mx25_fb_device; extern struct platform_device mxc_wdt; extern struct platform_device mx25_csi_device; diff --git a/arch/arm/mach-mx25/mach-cpuimx25.c b/arch/arm/mach-mx25/mach-cpuimx25.c index 2094bddb3e4..d1a04bafb43 100644 --- a/arch/arm/mach-mx25/mach-cpuimx25.c +++ b/arch/arm/mach-mx25/mach-cpuimx25.c @@ -124,7 +124,7 @@ static void __init eukrea_cpuimx25_init(void) imx25_add_imx_uart0(&uart_pdata); imx25_add_mxc_nand(&eukrea_cpuimx25_nand_board_info); - mxc_register_device(&mx25_rtc_device, NULL); + imx25_add_imxdi_rtc(NULL); imx25_add_fec(&mx25_fec_pdata); i2c_register_board_info(0, eukrea_cpuimx25_i2c_devices, diff --git a/arch/arm/mach-mx25/mach-mx25_3ds.c b/arch/arm/mach-mx25/mach-mx25_3ds.c index 1d07cfbd8ff..0566d3cb10c 100644 --- a/arch/arm/mach-mx25/mach-mx25_3ds.c +++ b/arch/arm/mach-mx25/mach-mx25_3ds.c @@ -194,7 +194,7 @@ static void __init mx25pdk_init(void) imx25_add_imx_uart0(&uart_pdata); imx25_add_mxc_ehci_hs(NULL); imx25_add_mxc_nand(&mx25pdk_nand_board_info); - mxc_register_device(&mx25_rtc_device, NULL); + imx25_add_imxdi_rtc(NULL); mxc_register_device(&mx25_fb_device, &mx25pdk_fb_pdata); mxc_register_device(&mxc_wdt, NULL); |