ARM i.MX5: Add IPU device support
Subsystems (3)
PATCH 2/9 ARM i.MX5: Add IPU device support
From: Jason Chen <[email protected]>
Signed-off-by Sascha Hauer <[email protected]>
Signed-off-by Jason Chen <[email protected]>
Signed-off-by Jason Chen <[email protected]>
--- arch/arm/mach-mx5/devices-imx51.h | 4 + arch/arm/mach-mx5/devices-imx53.h | 4 + arch/arm/plat-mxc/devices/Kconfig | 4 + arch/arm/plat-mxc/devices/Makefile | 1 + arch/arm/plat-mxc/devices/platform-imx_ipuv3.c | 87 +++++++++++++++++++++++ arch/arm/plat-mxc/include/mach/devices-common.h | 13 ++++ arch/arm/plat-mxc/include/mach/mx53.h | 2 +- 7 files changed, 114 insertions(+), 1 deletions(-)
arch/arm/mach-mx5/devices-imx51.h +4 -0
@@ -52,3 +52,7 @@ extern const struct imx_mxc_pwm_data imx51_mxc_pwm_data[];extern const struct imx_imx_keypad_data imx51_imx_keypad_data;#define imx51_add_imx_keypad (pdata) \ imx_add_imx_keypad(&imx51_imx_keypad_data, pdata) + +extern const struct imx_ipuv3_data imx51_ipuv3_data__initconst ; +#define imx51_add_ipuv3 (id, pdata) \ + imx_add_ipuv3(id, &imx51_ipuv3_data, pdata)
arch/arm/mach-mx5/devices-imx53.h +4 -0
@@ -32,3 +32,7 @@ extern const struct imx_spi_imx_data imx53_ecspi_data[];extern const struct imx_imx2_wdt_data imx53_imx2_wdt_data[];#define imx53_add_imx2_wdt (id, pdata) \ imx_add_imx2_wdt(&imx53_imx2_wdt_data[id]) + +extern const struct imx_ipuv3_data imx53_ipuv3_data__initconst ; +#define imx53_add_ipuv3 (id, pdata) \ + imx_add_ipuv3(id, &imx53_ipuv3_data, pdata)
arch/arm/plat-mxc/devices/Kconfig +4 -0
@@ -76,3 +76,7 @@ config IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX config IMX_HAVE_PLATFORM_SPI_IMX bool + +config IMX_HAVE_PLATFORM_IMX_IPUV3 + bool +
arch/arm/plat-mxc/devices/Makefile +1 -0
@@ -24,3 +24,4 @@ obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_RTC) += platform-mxc_rtc.o obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_W1) += platform-mxc_w1.o obj-$(CONFIG_IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX) += platform-sdhci-esdhc-imx.o obj-$(CONFIG_IMX_HAVE_PLATFORM_SPI_IMX) += platform-spi_imx.o +obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_IPUV3) += platform-imx_ipuv3.o
arch/arm/plat-mxc/devices/platform-imx_ipuv3.c new file +87 -0
87 lines not on this page · raw message
arch/arm/plat-mxc/include/mach/devices-common.h +13 -0
@@ -291,3 +291,16 @@ struct imx_spi_imx_data {struct platform_device *__init imx_add_spi_imx (const struct imx_spi_imx_data *data,const struct spi_imx_master *pdata); + +#include <mach/ipu-v3.h> +struct imx_ipuv3_data { +resource_size_t iobase; +resource_size_t iosize; +resource_size_t irq_err; +resource_size_t irq; +unsigned int irq_start; +int (*init) (void ); +}; +struct platform_device *__init imx_add_ipuv3 ( +int id,const struct imx_ipuv3_data *data, +struct imx_ipuv3_platform_data *pdata);
arch/arm/plat-mxc/include/mach/mx53.h +1 -1
@@ -31,7 +31,7 @@/* * Graphics Memory of GPU */ -#define MX53_IPU_CTRL_BASE_ADDR 0x18000000 +#define MX53_IPU_CTRL_BASE_ADDR 0x00000000/*real is 0x18000000, for codeing convenience*/ #define MX53_GPU2D_BASE_ADDR 0x20000000#define MX53_GPU_BASE_ADDR 0x30000000#define MX53_GPU_GMEM_BASE_ADDR 0xF8020000
Signature · 1 line
1.7.1
PATCH 2/9 ARM i.MX5: Add IPU device support
arch/arm/plat-mxc/include/mach/devices-common.h struct imx_spi_imx_data { · line 300
Quoted 6 lines · weitway at gmail.com
arch/arm/plat-mxc/include/mach/devices-common.h +6
-0+#include <mach/ipu-v3.h> +struct imx_ipuv3_data { +resource_size_t iobase; +resource_size_t iosize; +resource_size_t irq_err; +resource_size_t irq;
IRQs don't need to be resource_size_t. They're treated as 'int's by the request_irq() API, so high bits get truncated anyway. Keep them as int or unsigned int in this structure and just allow the compiler to promote them as required to resource_size_t on assignment.