From e48135519bd569eed374e0e17ed5233d4105fa97 Mon Sep 17 00:00:00 2001 From: Holger Schurig Date: Mon, 26 Jan 2009 16:34:56 +0100 Subject: arm/imx21: Framebuffer support for i.MX21 This patch mimicks what Martin wrote on the mailing list: * move arch/arm/mach-imx/include/mach/imxfb.h into arch/arm/mach-mxc/include/mach/imxfb.h * changes Kconfig so that CONFIG_FB_IMX is selectable * adds a platform device (copied from some pengutronix patches) Signed-off-by: Holger Schurig Signed-off-by: Sascha Hauer --- arch/arm/mach-mx2/devices.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-mx2/devices.h') diff --git a/arch/arm/mach-mx2/devices.h b/arch/arm/mach-mx2/devices.h index 1e8cb577a64..f4cb0ce29f1 100644 --- a/arch/arm/mach-mx2/devices.h +++ b/arch/arm/mach-mx2/devices.h @@ -1,4 +1,3 @@ - extern struct platform_device mxc_gpt1; extern struct platform_device mxc_gpt2; extern struct platform_device mxc_gpt3; @@ -14,3 +13,4 @@ extern struct platform_device mxc_uart_device4; extern struct platform_device mxc_uart_device5; extern struct platform_device mxc_w1_master_device; extern struct platform_device mxc_nand_device; +extern struct platform_device mxc_fb_device; -- cgit v1.2.3-70-g09d2 From 879fea1b486d2b6fa399c40b8aed172b0dfdedb9 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Mon, 26 Jan 2009 17:26:02 +0100 Subject: [ARM] MX2: Add FEC platform device The in kernel FEC driver has recently been ported to a platform driver. Add a platform_device for it and register it for pcm038 and mx27ads. Signed-off-by: Sascha Hauer --- arch/arm/mach-mx2/devices.c | 20 ++++++++++++++++++++ arch/arm/mach-mx2/devices.h | 1 + arch/arm/mach-mx2/mx27ads.c | 1 + arch/arm/mach-mx2/pcm038.c | 1 + 4 files changed, 23 insertions(+) (limited to 'arch/arm/mach-mx2/devices.h') diff --git a/arch/arm/mach-mx2/devices.c b/arch/arm/mach-mx2/devices.c index 07061e64454..684d5d92c2e 100644 --- a/arch/arm/mach-mx2/devices.c +++ b/arch/arm/mach-mx2/devices.c @@ -258,7 +258,27 @@ struct platform_device mxc_fb_device = { .coherent_dma_mask = 0xFFFFFFFF, }, }; +#endif +#ifdef CONFIG_MACH_MX27 +static struct resource mxc_fec_resources[] = { + { + .start = FEC_BASE_ADDR, + .end = 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 /* GPIO port description */ diff --git a/arch/arm/mach-mx2/devices.h b/arch/arm/mach-mx2/devices.h index f4cb0ce29f1..d85d5b26c98 100644 --- a/arch/arm/mach-mx2/devices.h +++ b/arch/arm/mach-mx2/devices.h @@ -14,3 +14,4 @@ extern struct platform_device mxc_uart_device5; extern struct platform_device mxc_w1_master_device; extern struct platform_device mxc_nand_device; extern struct platform_device mxc_fb_device; +extern struct platform_device mxc_fec_device; diff --git a/arch/arm/mach-mx2/mx27ads.c b/arch/arm/mach-mx2/mx27ads.c index 3c967f460b3..4a3b097adc1 100644 --- a/arch/arm/mach-mx2/mx27ads.c +++ b/arch/arm/mach-mx2/mx27ads.c @@ -180,6 +180,7 @@ static int uart_mxc_port5_exit(struct platform_device *pdev) static struct platform_device *platform_devices[] __initdata = { &mx27ads_nor_mtd_device, + &mxc_fec_device, }; static int mxc_fec_pins[] = { diff --git a/arch/arm/mach-mx2/pcm038.c b/arch/arm/mach-mx2/pcm038.c index 58552a01c0d..d246eb1bb3c 100644 --- a/arch/arm/mach-mx2/pcm038.c +++ b/arch/arm/mach-mx2/pcm038.c @@ -191,6 +191,7 @@ static struct mxc_nand_platform_data pcm038_nand_board_info = { static struct platform_device *platform_devices[] __initdata = { &pcm038_nor_mtd_device, &mxc_w1_master_device, + &mxc_fec_device, &pcm038_sram_mtd_device, }; -- cgit v1.2.3-70-g09d2 From 824b16e66b70f5df61345f5708c149f6886eef30 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Fri, 16 Jan 2009 15:17:46 +0100 Subject: [ARM] MX2: add pwm device/resources Signed-off-by: Sascha Hauer --- arch/arm/mach-mx2/devices.c | 20 ++++++++++++++++++++ arch/arm/mach-mx2/devices.h | 1 + 2 files changed, 21 insertions(+) (limited to 'arch/arm/mach-mx2/devices.h') diff --git a/arch/arm/mach-mx2/devices.c b/arch/arm/mach-mx2/devices.c index 684d5d92c2e..bef418e0e60 100644 --- a/arch/arm/mach-mx2/devices.c +++ b/arch/arm/mach-mx2/devices.c @@ -281,6 +281,26 @@ struct platform_device mxc_fec_device = { }; #endif +static struct resource mxc_pwm_resources[] = { + [0] = { + .start = PWM_BASE_ADDR, + .end = PWM_BASE_ADDR + 0x0fff, + .flags = IORESOURCE_MEM + }, + [1] = { + .start = MXC_INT_PWM, + .end = MXC_INT_PWM, + .flags = IORESOURCE_IRQ, + } +}; + +struct platform_device mxc_pwm_device = { + .name = "mxc_pwm", + .id = 0, + .num_resources = ARRAY_SIZE(mxc_pwm_resources), + .resource = mxc_pwm_resources +}; + /* GPIO port description */ static struct mxc_gpio_port imx_gpio_ports[] = { [0] = { diff --git a/arch/arm/mach-mx2/devices.h b/arch/arm/mach-mx2/devices.h index d85d5b26c98..94a241419af 100644 --- a/arch/arm/mach-mx2/devices.h +++ b/arch/arm/mach-mx2/devices.h @@ -15,3 +15,4 @@ extern struct platform_device mxc_w1_master_device; extern struct platform_device mxc_nand_device; extern struct platform_device mxc_fb_device; extern struct platform_device mxc_fec_device; +extern struct platform_device mxc_pwm_device; -- cgit v1.2.3-70-g09d2 From c5d4dbff965b77b39c0188e4146892d76c775a98 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Wed, 28 Jan 2009 13:26:56 +0100 Subject: [ARM] MX2: Add I2C devices / resources Signed-off-by: Sascha Hauer --- arch/arm/mach-mx2/devices.c | 42 ++++++++++++++++++++++++++++++++++++++++++ arch/arm/mach-mx2/devices.h | 2 ++ 2 files changed, 44 insertions(+) (limited to 'arch/arm/mach-mx2/devices.h') diff --git a/arch/arm/mach-mx2/devices.c b/arch/arm/mach-mx2/devices.c index bef418e0e60..7d12c2c4108 100644 --- a/arch/arm/mach-mx2/devices.c +++ b/arch/arm/mach-mx2/devices.c @@ -281,6 +281,48 @@ struct platform_device mxc_fec_device = { }; #endif +static struct resource mxc_i2c_1_resources[] = { + [0] = { + .start = I2C_BASE_ADDR, + .end = I2C_BASE_ADDR + 0x0fff, + .flags = IORESOURCE_MEM + }, + [1] = { + .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_i2c_1_resources), + .resource = mxc_i2c_1_resources +}; + +#ifdef CONFIG_MACH_MX27 +static struct resource mxc_i2c_2_resources[] = { + [0] = { + .start = I2C2_BASE_ADDR, + .end = I2C2_BASE_ADDR + 0x0fff, + .flags = IORESOURCE_MEM + }, + [1] = { + .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_i2c_2_resources), + .resource = mxc_i2c_2_resources +}; +#endif + static struct resource mxc_pwm_resources[] = { [0] = { .start = PWM_BASE_ADDR, diff --git a/arch/arm/mach-mx2/devices.h b/arch/arm/mach-mx2/devices.h index 94a241419af..271ab1e6982 100644 --- a/arch/arm/mach-mx2/devices.h +++ b/arch/arm/mach-mx2/devices.h @@ -16,3 +16,5 @@ extern struct platform_device mxc_nand_device; extern struct platform_device mxc_fb_device; extern struct platform_device mxc_fec_device; extern struct platform_device mxc_pwm_device; +extern struct platform_device mxc_i2c_device0; +extern struct platform_device mxc_i2c_device1; -- cgit v1.2.3-70-g09d2 From 1a02be0ee77b68aef67b656bc47f0fb4ab177e67 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Fri, 19 Dec 2008 14:32:07 +0100 Subject: MX2: Add SDHC platform_devices and resources Signed-of-by: Julien Boibessot Signed-off-by: Sascha Hauer --- arch/arm/mach-mx2/devices.c | 66 +++++++++++++++++++++++++++++++++++++++++++++ arch/arm/mach-mx2/devices.h | 2 ++ 2 files changed, 68 insertions(+) (limited to 'arch/arm/mach-mx2/devices.h') diff --git a/arch/arm/mach-mx2/devices.c b/arch/arm/mach-mx2/devices.c index 7d12c2c4108..f81aa8a8fbb 100644 --- a/arch/arm/mach-mx2/devices.c +++ b/arch/arm/mach-mx2/devices.c @@ -35,6 +35,7 @@ #include #include #include +#include #include "devices.h" @@ -343,6 +344,71 @@ struct platform_device mxc_pwm_device = { .resource = mxc_pwm_resources }; +/* + * Resource definition for the MXC SDHC + */ +static struct resource mxc_sdhc1_resources[] = { + [0] = { + .start = SDHC1_BASE_ADDR, + .end = SDHC1_BASE_ADDR + SZ_4K - 1, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = MXC_INT_SDHC1, + .end = MXC_INT_SDHC1, + .flags = IORESOURCE_IRQ, + }, + [2] = { + .start = DMA_REQ_SDHC1, + .end = DMA_REQ_SDHC1, + .flags = IORESOURCE_DMA + }, +}; + +static u64 mxc_sdhc1_dmamask = 0xffffffffUL; + +struct platform_device mxc_sdhc_device0 = { + .name = "mxc-mmc", + .id = 0, + .dev = { + .dma_mask = &mxc_sdhc1_dmamask, + .coherent_dma_mask = 0xffffffff, + }, + .num_resources = ARRAY_SIZE(mxc_sdhc1_resources), + .resource = mxc_sdhc1_resources, +}; + +static struct resource mxc_sdhc2_resources[] = { + [0] = { + .start = SDHC2_BASE_ADDR, + .end = SDHC2_BASE_ADDR + SZ_4K - 1, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = MXC_INT_SDHC2, + .end = MXC_INT_SDHC2, + .flags = IORESOURCE_IRQ, + }, + [2] = { + .start = DMA_REQ_SDHC2, + .end = DMA_REQ_SDHC2, + .flags = IORESOURCE_DMA + }, +}; + +static u64 mxc_sdhc2_dmamask = 0xffffffffUL; + +struct platform_device mxc_sdhc_device1 = { + .name = "mxc-mmc", + .id = 1, + .dev = { + .dma_mask = &mxc_sdhc2_dmamask, + .coherent_dma_mask = 0xffffffff, + }, + .num_resources = ARRAY_SIZE(mxc_sdhc2_resources), + .resource = mxc_sdhc2_resources, +}; + /* GPIO port description */ static struct mxc_gpio_port imx_gpio_ports[] = { [0] = { diff --git a/arch/arm/mach-mx2/devices.h b/arch/arm/mach-mx2/devices.h index 271ab1e6982..049005bb6aa 100644 --- a/arch/arm/mach-mx2/devices.h +++ b/arch/arm/mach-mx2/devices.h @@ -18,3 +18,5 @@ extern struct platform_device mxc_fec_device; extern struct platform_device mxc_pwm_device; extern struct platform_device mxc_i2c_device0; extern struct platform_device mxc_i2c_device1; +extern struct platform_device mxc_sdhc_device0; +extern struct platform_device mxc_sdhc_device1; -- cgit v1.2.3-70-g09d2