diff options
| author | Linus Torvalds <[email protected]> | 2009-03-28 14:03:14 -0700 | 
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2009-03-28 14:03:14 -0700 | 
| commit | 0fe41b8982001cd14ee2c77cd776735a5024e98b (patch) | |
| tree | 83e65d595c413d55259ea14fb97748ce5efe5707 /arch/arm/mach-mx3/devices.c | |
| parent | eedf2c5296a8dfaaf9aec1a938c1d3bd73159a30 (diff) | |
| parent | 9759d22c8348343b0da4e25d6150c41712686c14 (diff) | |
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (422 commits)
  [ARM] 5435/1: fix compile warning in sanity_check_meminfo()
  [ARM] 5434/1: ARM: OMAP: Fix mailbox compile for 24xx
  [ARM] pxa: fix the bad assumption that PCMCIA sockets always start with 0
  [ARM] pxa: fix Colibri PXA300 and PXA320 LCD backlight pins
  imxfb: Fix TFT mode
  i.MX21/27: remove ifdef CONFIG_FB_IMX
  imxfb: add clock support
  mxc: add arch_reset() function
  clkdev: add possibility to get a clock based on the device name
  i.MX1: remove fb support from mach-imx
  [ARM] pxa: build arch/arm/plat-pxa/mfp.c only when PXA3xx or ARCH_MMP defined
  Gemini: Add support for Teltonika RUT100
  Gemini: gpiolib based GPIO support v2
  MAINTAINERS: add myself as Gemini architecture maintainer
  ARM: Add Gemini architecture v3
  [ARM] OMAP: Fix compile for omap2_init_common_hw()
  MAINTAINERS: Add myself as Faraday ARM core variant maintainer
  ARM: Add support for FA526 v2
  [ARM] acorn,ebsa110,footbridge,integrator,sa1100: Convert asm/io.h to linux/io.h
  [ARM] collie: fix two minor formatting nits
  ...
Diffstat (limited to 'arch/arm/mach-mx3/devices.c')
| -rw-r--r-- | arch/arm/mach-mx3/devices.c | 193 | 
1 files changed, 191 insertions, 2 deletions
| diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c index f8428800f286..380be0c9b213 100644 --- a/arch/arm/mach-mx3/devices.c +++ b/arch/arm/mach-mx3/devices.c @@ -25,6 +25,8 @@  #include <mach/irqs.h>  #include <mach/imx-uart.h> +#include "devices.h" +  static struct resource uart0[] = {  	{  		.start = UART1_BASE_ADDR, @@ -82,6 +84,7 @@ struct platform_device mxc_uart_device2 = {  	.num_resources = ARRAY_SIZE(uart2),  }; +#ifdef CONFIG_ARCH_MX31  static struct resource uart3[] = {  	{  		.start = UART4_BASE_ADDR, @@ -119,6 +122,7 @@ struct platform_device mxc_uart_device4 = {  	.resource = uart4,  	.num_resources = ARRAY_SIZE(uart4),  }; +#endif /* CONFIG_ARCH_MX31 */  /* GPIO port description */  static struct mxc_gpio_port imx_gpio_ports[] = { @@ -164,8 +168,8 @@ struct platform_device mxc_w1_master_device = {  static struct resource mxc_nand_resources[] = {  	{ -		.start	= NFC_BASE_ADDR, -		.end	= NFC_BASE_ADDR + 0xfff, +		.start	= 0, /* runtime dependent */ +		.end	= 0,  		.flags	= IORESOURCE_MEM  	}, {  		.start	= MXC_INT_NANDFC, @@ -180,3 +184,188 @@ struct platform_device mxc_nand_device = {  	.num_resources = ARRAY_SIZE(mxc_nand_resources),  	.resource = mxc_nand_resources,  }; + +static struct resource mxc_i2c0_resources[] = { +	{ +		.start = I2C_BASE_ADDR, +		.end = I2C_BASE_ADDR + SZ_4K - 1, +		.flags = IORESOURCE_MEM, +	}, +	{ +		.start = MXC_INT_I2C, +		.end = MXC_INT_I2C, +		.flags = IORESOURCE_IRQ, +	}, +}; + +struct platform_device mxc_i2c_device0 = { +	.name = "imx-i2c", +	.id = 0, +	.num_resources = ARRAY_SIZE(mxc_i2c0_resources), +	.resource = mxc_i2c0_resources, +}; + +static struct resource mxc_i2c1_resources[] = { +	{ +		.start = I2C2_BASE_ADDR, +		.end = I2C2_BASE_ADDR + SZ_4K - 1, +		.flags = IORESOURCE_MEM, +	}, +	{ +		.start = MXC_INT_I2C2, +		.end = MXC_INT_I2C2, +		.flags = IORESOURCE_IRQ, +	}, +}; + +struct platform_device mxc_i2c_device1 = { +	.name = "imx-i2c", +	.id = 1, +	.num_resources = ARRAY_SIZE(mxc_i2c1_resources), +	.resource = mxc_i2c1_resources, +}; + +static struct resource mxc_i2c2_resources[] = { +	{ +		.start = I2C3_BASE_ADDR, +		.end = I2C3_BASE_ADDR + SZ_4K - 1, +		.flags = IORESOURCE_MEM, +	}, +	{ +		.start = MXC_INT_I2C3, +		.end = MXC_INT_I2C3, +		.flags = IORESOURCE_IRQ, +	}, +}; + +struct platform_device mxc_i2c_device2 = { +	.name = "imx-i2c", +	.id = 2, +	.num_resources = ARRAY_SIZE(mxc_i2c2_resources), +	.resource = mxc_i2c2_resources, +}; + +#ifdef CONFIG_ARCH_MX31 +static struct resource mxcsdhc0_resources[] = { +	{ +		.start = MMC_SDHC1_BASE_ADDR, +		.end = MMC_SDHC1_BASE_ADDR + SZ_16K - 1, +		.flags = IORESOURCE_MEM, +	}, { +		.start = MXC_INT_MMC_SDHC1, +		.end = MXC_INT_MMC_SDHC1, +		.flags = IORESOURCE_IRQ, +	}, +}; + +static struct resource mxcsdhc1_resources[] = { +	{ +		.start = MMC_SDHC2_BASE_ADDR, +		.end = MMC_SDHC2_BASE_ADDR + SZ_16K - 1, +		.flags = IORESOURCE_MEM, +	}, { +		.start = MXC_INT_MMC_SDHC2, +		.end = MXC_INT_MMC_SDHC2, +		.flags = IORESOURCE_IRQ, +	}, +}; + +struct platform_device mxcsdhc_device0 = { +	.name = "mxc-mmc", +	.id = 0, +	.num_resources = ARRAY_SIZE(mxcsdhc0_resources), +	.resource = mxcsdhc0_resources, +}; + +struct platform_device mxcsdhc_device1 = { +	.name = "mxc-mmc", +	.id = 1, +	.num_resources = ARRAY_SIZE(mxcsdhc1_resources), +	.resource = mxcsdhc1_resources, +}; +#endif /* CONFIG_ARCH_MX31 */ + +/* i.MX31 Image Processing Unit */ + +/* The resource order is important! */ +static struct resource mx3_ipu_rsrc[] = { +	{ +		.start = IPU_CTRL_BASE_ADDR, +		.end = IPU_CTRL_BASE_ADDR + 0x5F, +		.flags = IORESOURCE_MEM, +	}, { +		.start = IPU_CTRL_BASE_ADDR + 0x88, +		.end = IPU_CTRL_BASE_ADDR + 0xB3, +		.flags = IORESOURCE_MEM, +	}, { +		.start = MXC_INT_IPU_SYN, +		.end = MXC_INT_IPU_SYN, +		.flags = IORESOURCE_IRQ, +	}, { +		.start = MXC_INT_IPU_ERR, +		.end = MXC_INT_IPU_ERR, +		.flags = IORESOURCE_IRQ, +	}, +}; + +struct platform_device mx3_ipu = { +	.name = "ipu-core", +	.id = -1, +	.num_resources = ARRAY_SIZE(mx3_ipu_rsrc), +	.resource = mx3_ipu_rsrc, +}; + +static struct resource fb_resources[] = { +	{ +		.start	= IPU_CTRL_BASE_ADDR + 0xB4, +		.end	= IPU_CTRL_BASE_ADDR + 0x1BF, +		.flags	= IORESOURCE_MEM, +	}, +}; + +struct platform_device mx3_fb = { +	.name		= "mx3_sdc_fb", +	.id		= -1, +	.num_resources	= ARRAY_SIZE(fb_resources), +	.resource	= fb_resources, +	.dev		= { +		.coherent_dma_mask = 0xffffffff, +       }, +}; + +#ifdef CONFIG_ARCH_MX35 +static struct resource mxc_fec_resources[] = { +	{ +		.start	= MXC_FEC_BASE_ADDR, +		.end	= MXC_FEC_BASE_ADDR + 0xfff, +		.flags	= IORESOURCE_MEM +	}, { +		.start	= MXC_INT_FEC, +		.end	= MXC_INT_FEC, +		.flags	= IORESOURCE_IRQ +	}, +}; + +struct platform_device mxc_fec_device = { +	.name = "fec", +	.id = 0, +	.num_resources = ARRAY_SIZE(mxc_fec_resources), +	.resource = mxc_fec_resources, +}; +#endif + +static int mx3_devices_init(void) +{ +	if (cpu_is_mx31()) { +		mxc_nand_resources[0].start = MX31_NFC_BASE_ADDR; +		mxc_nand_resources[0].end = MX31_NFC_BASE_ADDR + 0xfff; +	} +	if (cpu_is_mx35()) { +		mxc_nand_resources[0].start = MX35_NFC_BASE_ADDR; +		mxc_nand_resources[0].end = MX35_NFC_BASE_ADDR + 0xfff; +	} + +	return 0; +} + +subsys_initcall(mx3_devices_init); |