ARM: imx: dynamically register imx-i2c devices (imx27)
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This commit is contained in:
@ -368,32 +368,6 @@ struct platform_device mxc_fec_device = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MACH_MX27
|
||||
#define DEFINE_IMX_I2C_DEVICE(n, baseaddr, irq) \
|
||||
static struct resource mxc_i2c_resources ## n[] = { \
|
||||
{ \
|
||||
.start = baseaddr, \
|
||||
.end = baseaddr + SZ_4K - 1, \
|
||||
.flags = IORESOURCE_MEM, \
|
||||
}, { \
|
||||
.start = irq, \
|
||||
.end = irq, \
|
||||
.flags = IORESOURCE_IRQ, \
|
||||
} \
|
||||
}; \
|
||||
\
|
||||
struct platform_device mxc_i2c_device ## n = { \
|
||||
.name = "imx-i2c", \
|
||||
.id = n, \
|
||||
.num_resources = ARRAY_SIZE(mxc_i2c_resources ## n), \
|
||||
.resource = mxc_i2c_resources ## n, \
|
||||
}
|
||||
|
||||
DEFINE_IMX_I2C_DEVICE(0, MX2x_I2C_BASE_ADDR, MX2x_INT_I2C);
|
||||
|
||||
DEFINE_IMX_I2C_DEVICE(1, MX27_I2C2_BASE_ADDR, MX27_INT_I2C2);
|
||||
#endif
|
||||
|
||||
static struct resource mxc_pwm_resources[] = {
|
||||
{
|
||||
.start = MX2x_PWM_BASE_ADDR,
|
||||
|
Reference in New Issue
Block a user