提交 2b92084f 编写于 作者: U Uwe Kleine-König

ARM: imx: dynamically register imx-i2c devices (imx21)

Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
上级 6348e6b5
...@@ -9,5 +9,8 @@ ...@@ -9,5 +9,8 @@
#include <mach/mx21.h> #include <mach/mx21.h>
#include <mach/devices-common.h> #include <mach/devices-common.h>
#define imx21_add_i2c_imx(pdata) \
imx_add_imx_i2c(0, MX2x_I2C_BASE_ADDR, SZ_4K, MX2x_INT_I2C, pdata)
#define imx21_add_mxc_nand(pdata) \ #define imx21_add_mxc_nand(pdata) \
imx_add_mxc_nand_v1(MX21_NFC_BASE_ADDR, MX21_INT_NANDFC, pdata) imx_add_mxc_nand_v1(MX21_NFC_BASE_ADDR, MX21_INT_NANDFC, pdata)
...@@ -368,6 +368,7 @@ struct platform_device mxc_fec_device = { ...@@ -368,6 +368,7 @@ struct platform_device mxc_fec_device = {
}; };
#endif #endif
#ifdef CONFIG_MACH_MX27
#define DEFINE_IMX_I2C_DEVICE(n, baseaddr, irq) \ #define DEFINE_IMX_I2C_DEVICE(n, baseaddr, irq) \
static struct resource mxc_i2c_resources ## n[] = { \ static struct resource mxc_i2c_resources ## n[] = { \
{ \ { \
...@@ -390,7 +391,6 @@ struct platform_device mxc_fec_device = { ...@@ -390,7 +391,6 @@ struct platform_device mxc_fec_device = {
DEFINE_IMX_I2C_DEVICE(0, MX2x_I2C_BASE_ADDR, MX2x_INT_I2C); DEFINE_IMX_I2C_DEVICE(0, MX2x_I2C_BASE_ADDR, MX2x_INT_I2C);
#ifdef CONFIG_MACH_MX27
DEFINE_IMX_I2C_DEVICE(1, MX27_I2C2_BASE_ADDR, MX27_INT_I2C2); DEFINE_IMX_I2C_DEVICE(1, MX27_I2C2_BASE_ADDR, MX27_INT_I2C2);
#endif #endif
......
...@@ -28,8 +28,8 @@ extern struct platform_device mxc_w1_master_device; ...@@ -28,8 +28,8 @@ extern struct platform_device mxc_w1_master_device;
extern struct platform_device mxc_fb_device; extern struct platform_device mxc_fb_device;
extern struct platform_device mxc_fec_device; extern struct platform_device mxc_fec_device;
extern struct platform_device mxc_pwm_device; extern struct platform_device mxc_pwm_device;
extern struct platform_device mxc_i2c_device0;
#ifdef CONFIG_MACH_MX27 #ifdef CONFIG_MACH_MX27
extern struct platform_device mxc_i2c_device0;
extern struct platform_device mxc_i2c_device1; extern struct platform_device mxc_i2c_device1;
#endif #endif
extern struct platform_device mxc_sdhc_device0; extern struct platform_device mxc_sdhc_device0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册