Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a9b8b0b authored by Uwe Kleine-König's avatar Uwe Kleine-König
Browse files

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

parent c6987159
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@ comment "MX3 platforms:"
config MACH_MX31ADS
	bool "Support MX31ADS platforms"
	select ARCH_MX31
	select IMX_HAVE_PLATFORM_IMX_I2C
	default y
	help
	  Include support for MX31ADS platform. This includes specific
@@ -34,6 +35,7 @@ config MACH_MX31ADS_WM1133_EV1
config MACH_PCM037
	bool "Support Phytec pcm037 (i.MX31) platforms"
	select ARCH_MX31
	select IMX_HAVE_PLATFORM_IMX_I2C
	select IMX_HAVE_PLATFORM_MXC_NAND
	select MXC_ULPI if USB_ULPI
	help
@@ -77,6 +79,7 @@ config MACH_MX31_3DS_MXC_NAND_USE_BBT
config MACH_MX31MOBOARD
	bool "Support mx31moboard platforms (EPFL Mobots group)"
	select ARCH_MX31
	select IMX_HAVE_PLATFORM_IMX_I2C
	select MXC_ULPI if USB_ULPI
	help
	  Include support for mx31moboard platform. This includes specific
@@ -109,6 +112,7 @@ config MACH_PCM043
config MACH_ARMADILLO5X0
	bool "Support Atmark Armadillo-500 Development Base Board"
	select ARCH_MX31
	select IMX_HAVE_PLATFORM_IMX_I2C
	select IMX_HAVE_PLATFORM_MXC_NAND
	select MXC_ULPI if USB_ULPI
	help
+7 −0
Original line number Diff line number Diff line
@@ -9,5 +9,12 @@
#include <mach/mx31.h>
#include <mach/devices-common.h>

#define imx31_add_imx_i2c0(pdata)	\
	imx_add_imx_i2c(0, MX31_I2C1_BASE_ADDR, SZ_4K, MX31_INT_I2C1, pdata)
#define imx31_add_imx_i2c1(pdata)	\
	imx_add_imx_i2c(1, MX31_I2C2_BASE_ADDR, SZ_4K, MX31_INT_I2C2, pdata)
#define imx31_add_imx_i2c2(pdata)	\
	imx_add_imx_i2c(2, MX31_I2C3_BASE_ADDR, SZ_4K, MX31_INT_I2C3, pdata)

#define imx31_add_mxc_nand(pdata)	\
	imx_add_mxc_nand_v1(MX31_NFC_BASE_ADDR, MX31_INT_NANDFC, pdata)
+2 −0
Original line number Diff line number Diff line
@@ -167,6 +167,7 @@ struct platform_device mxc_w1_master_device = {
	.resource = mxc_w1_master_resources,
};

#if defined(CONFIG_ARCH_MX35)
static struct resource mxc_i2c0_resources[] = {
	{
		.start = I2C_BASE_ADDR,
@@ -223,6 +224,7 @@ struct platform_device mxc_i2c_device2 = {
	.num_resources = ARRAY_SIZE(mxc_i2c2_resources),
	.resource = mxc_i2c2_resources,
};
#endif

#ifdef CONFIG_ARCH_MX31
static struct resource mxcsdhc0_resources[] = {
+2 −0
Original line number Diff line number Diff line
@@ -5,9 +5,11 @@ extern struct platform_device mxc_uart_device2;
extern struct platform_device mxc_uart_device3;
extern struct platform_device mxc_uart_device4;
extern struct platform_device mxc_w1_master_device;
#if defined(CONFIG_ARCH_MX35)
extern struct platform_device mxc_i2c_device0;
extern struct platform_device mxc_i2c_device1;
extern struct platform_device mxc_i2c_device2;
#endif
extern struct platform_device mx3_ipu;
extern struct platform_device mx3_fb;
extern struct platform_device mx3_camera;
+1 −1
Original line number Diff line number Diff line
@@ -499,7 +499,6 @@ static struct imxuart_platform_data uart_pdata = {

static struct platform_device *devices[] __initdata = {
	&armadillo5x0_smc911x_device,
	&mxc_i2c_device1,
	&armadillo5x0_button_device,
};

@@ -512,6 +511,7 @@ static void __init armadillo5x0_init(void)
			ARRAY_SIZE(armadillo5x0_pins), "armadillo5x0");

	platform_add_devices(devices, ARRAY_SIZE(devices));
	imx31_add_imx_i2c1(NULL);

	/* Register UART */
	mxc_register_device(&mxc_uart_device0, &uart_pdata);
Loading