diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-06-22 03:27:33 -0400 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-06-30 03:00:39 -0400 |
commit | 2b92084f75c74a5496380833cb60185985959ec6 (patch) | |
tree | 4cf766a5d1989181a03b5342442fd6e9069153d2 | |
parent | 6348e6b54e8609be11826a8e30357a03ba201500 (diff) |
ARM: imx: dynamically register imx-i2c devices (imx21)
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-rw-r--r-- | arch/arm/mach-imx/devices-imx21.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-imx/devices.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/devices.h | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/devices-imx21.h b/arch/arm/mach-imx/devices-imx21.h index e85dcb1b4604..c6e5f50a7297 100644 --- a/arch/arm/mach-imx/devices-imx21.h +++ b/arch/arm/mach-imx/devices-imx21.h | |||
@@ -9,5 +9,8 @@ | |||
9 | #include <mach/mx21.h> | 9 | #include <mach/mx21.h> |
10 | #include <mach/devices-common.h> | 10 | #include <mach/devices-common.h> |
11 | 11 | ||
12 | #define imx21_add_i2c_imx(pdata) \ | ||
13 | imx_add_imx_i2c(0, MX2x_I2C_BASE_ADDR, SZ_4K, MX2x_INT_I2C, pdata) | ||
14 | |||
12 | #define imx21_add_mxc_nand(pdata) \ | 15 | #define imx21_add_mxc_nand(pdata) \ |
13 | imx_add_mxc_nand_v1(MX21_NFC_BASE_ADDR, MX21_INT_NANDFC, pdata) | 16 | imx_add_mxc_nand_v1(MX21_NFC_BASE_ADDR, MX21_INT_NANDFC, pdata) |
diff --git a/arch/arm/mach-imx/devices.c b/arch/arm/mach-imx/devices.c index a34ad60e8f0a..b9f5b69df8f1 100644 --- a/arch/arm/mach-imx/devices.c +++ b/arch/arm/mach-imx/devices.c | |||
@@ -368,6 +368,7 @@ struct platform_device mxc_fec_device = { | |||
368 | }; | 368 | }; |
369 | #endif | 369 | #endif |
370 | 370 | ||
371 | #ifdef CONFIG_MACH_MX27 | ||
371 | #define DEFINE_IMX_I2C_DEVICE(n, baseaddr, irq) \ | 372 | #define DEFINE_IMX_I2C_DEVICE(n, baseaddr, irq) \ |
372 | static struct resource mxc_i2c_resources ## n[] = { \ | 373 | static struct resource mxc_i2c_resources ## n[] = { \ |
373 | { \ | 374 | { \ |
@@ -390,7 +391,6 @@ struct platform_device mxc_fec_device = { | |||
390 | 391 | ||
391 | DEFINE_IMX_I2C_DEVICE(0, MX2x_I2C_BASE_ADDR, MX2x_INT_I2C); | 392 | DEFINE_IMX_I2C_DEVICE(0, MX2x_I2C_BASE_ADDR, MX2x_INT_I2C); |
392 | 393 | ||
393 | #ifdef CONFIG_MACH_MX27 | ||
394 | DEFINE_IMX_I2C_DEVICE(1, MX27_I2C2_BASE_ADDR, MX27_INT_I2C2); | 394 | DEFINE_IMX_I2C_DEVICE(1, MX27_I2C2_BASE_ADDR, MX27_INT_I2C2); |
395 | #endif | 395 | #endif |
396 | 396 | ||
diff --git a/arch/arm/mach-imx/devices.h b/arch/arm/mach-imx/devices.h index b4eb8a0c6207..dcaa4f96ed3a 100644 --- a/arch/arm/mach-imx/devices.h +++ b/arch/arm/mach-imx/devices.h | |||
@@ -28,8 +28,8 @@ extern struct platform_device mxc_w1_master_device; | |||
28 | extern struct platform_device mxc_fb_device; | 28 | extern struct platform_device mxc_fb_device; |
29 | extern struct platform_device mxc_fec_device; | 29 | extern struct platform_device mxc_fec_device; |
30 | extern struct platform_device mxc_pwm_device; | 30 | extern struct platform_device mxc_pwm_device; |
31 | extern struct platform_device mxc_i2c_device0; | ||
32 | #ifdef CONFIG_MACH_MX27 | 31 | #ifdef CONFIG_MACH_MX27 |
32 | extern struct platform_device mxc_i2c_device0; | ||
33 | extern struct platform_device mxc_i2c_device1; | 33 | extern struct platform_device mxc_i2c_device1; |
34 | #endif | 34 | #endif |
35 | extern struct platform_device mxc_sdhc_device0; | 35 | extern struct platform_device mxc_sdhc_device0; |