diff options
author | Richard Zhao <richard.zhao@freescale.com> | 2011-08-09 20:00:57 +0800 |
---|---|---|
committer | Jason Liu <r64343@freescale.com> | 2012-01-09 20:21:57 +0800 |
commit | d719289b8b912999c1afb003af35ad0c552016c2 (patch) | |
tree | 39a3c30c87edef552d037b1e41dca7bd1d0890a5 /arch/arm/plat-mxc | |
parent | dc04c7da884a165b2edfe5582187b8d932baf282 (diff) |
ENGR00154647 mxc: viv-gpu: squash gpu devices
gpu multi-core dirver 4.4.2 needs one single gpu device.
Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Diffstat (limited to 'arch/arm/plat-mxc')
-rw-r--r-- | arch/arm/plat-mxc/devices/platform-viv_gpu.c | 55 | ||||
-rwxr-xr-x | arch/arm/plat-mxc/include/mach/devices-common.h | 9 |
2 files changed, 40 insertions, 24 deletions
diff --git a/arch/arm/plat-mxc/devices/platform-viv_gpu.c b/arch/arm/plat-mxc/devices/platform-viv_gpu.c index 82d175897874..b11efe0de1cf 100644 --- a/arch/arm/plat-mxc/devices/platform-viv_gpu.c +++ b/arch/arm/plat-mxc/devices/platform-viv_gpu.c @@ -22,42 +22,55 @@ #include <mach/devices-common.h> #ifdef CONFIG_ARCH_MX6 -const struct imx_viv_gpu_data imx6_gc2000_data __initconst = { - .iobase = GPU_3D_ARB_BASE_ADDR, - .irq = MXC_INT_GPU3D_IRQ, -}; - -const struct imx_viv_gpu_data imx6_gc320_data __initconst = { - .iobase = GPU_2D_ARB_BASE_ADDR, - .irq = MXC_INT_GPU2D_IRQ, -}; - -const struct imx_viv_gpu_data imx6_gc355_data __initconst = { - .iobase = OPENVG_ARB_BASE_ADDR, - .irq = MXC_INT_OPENVG_XAQ2, +const struct imx_viv_gpu_data imx6_gpu_data __initconst = { + .iobase_3d = GPU_3D_ARB_BASE_ADDR, + .irq_3d = MXC_INT_GPU3D_IRQ, + .iobase_2d = GPU_2D_ARB_BASE_ADDR, + .irq_2d = MXC_INT_GPU2D_IRQ, + .iobase_vg = OPENVG_ARB_BASE_ADDR, + .irq_vg = MXC_INT_OPENVG_XAQ2, }; #endif struct platform_device *__init imx_add_viv_gpu( - const char *name, const struct imx_viv_gpu_data *data, const struct viv_gpu_platform_data *pdata) { struct resource res[] = { { - .name = "gpu_base", - .start = data->iobase, - .end = data->iobase + SZ_16K - 1, + .name = "iobase_3d", + .start = data->iobase_3d, + .end = data->iobase_3d + SZ_16K - 1, + .flags = IORESOURCE_MEM, + }, { + .name = "irq_3d", + .start = data->irq_3d, + .end = data->irq_3d, + .flags = IORESOURCE_IRQ, + }, { + .name = "iobase_2d", + .start = data->iobase_2d, + .end = data->iobase_2d + SZ_16K - 1, + .flags = IORESOURCE_MEM, + }, { + .name = "irq_2d", + .start = data->irq_2d, + .end = data->irq_2d, + .flags = IORESOURCE_IRQ, + }, { + .name = "iobase_vg", + .start = data->iobase_vg, + .end = data->iobase_vg + SZ_16K - 1, .flags = IORESOURCE_MEM, }, { - .name = "gpu_irq", - .start = data->irq, - .end = data->irq, + .name = "irq_vg", + .start = data->irq_vg, + .end = data->irq_vg, .flags = IORESOURCE_IRQ, }, }; - return imx_add_platform_device_dmamask(name, 0, + return imx_add_platform_device_dmamask("galcore", 0, res, ARRAY_SIZE(res), pdata, sizeof(*pdata), DMA_BIT_MASK(32)); diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h index eca636129b68..370e681bf022 100755 --- a/arch/arm/plat-mxc/include/mach/devices-common.h +++ b/arch/arm/plat-mxc/include/mach/devices-common.h @@ -482,11 +482,14 @@ struct platform_device *__init imx_add_spdif_audio_device(void); #include <mach/viv_gpu.h> struct imx_viv_gpu_data { - resource_size_t irq; - resource_size_t iobase; + resource_size_t irq_3d; + resource_size_t iobase_3d; + resource_size_t irq_2d; + resource_size_t iobase_2d; + resource_size_t irq_vg; + resource_size_t iobase_vg; }; struct platform_device *__init imx_add_viv_gpu( - const char *name, const struct imx_viv_gpu_data *data, const struct viv_gpu_platform_data *pdata); |