diff options
-rw-r--r-- | arch/arm/mach-imx/clk-imx27.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-imx/devices-imx27.h | 4 | ||||
-rw-r--r-- | arch/arm/plat-mxc/devices/Kconfig | 6 | ||||
-rw-r--r-- | arch/arm/plat-mxc/devices/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/plat-mxc/devices/platform-imx27-coda.c | 37 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/devices-common.h | 8 |
6 files changed, 57 insertions, 3 deletions
diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c index 7aa6313fb167..b60ada1572bc 100644 --- a/arch/arm/mach-imx/clk-imx27.c +++ b/arch/arm/mach-imx/clk-imx27.c | |||
@@ -239,8 +239,8 @@ int __init mx27_clocks_init(unsigned long fref) | |||
239 | clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "imx-ssi.0"); | 239 | clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "imx-ssi.0"); |
240 | clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1"); | 240 | clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1"); |
241 | clk_register_clkdev(clk[nfc_baud_gate], NULL, "mxc_nand.0"); | 241 | clk_register_clkdev(clk[nfc_baud_gate], NULL, "mxc_nand.0"); |
242 | clk_register_clkdev(clk[vpu_baud_gate], "per", "imx-vpu"); | 242 | clk_register_clkdev(clk[vpu_baud_gate], "per", "coda-imx27.0"); |
243 | clk_register_clkdev(clk[vpu_ahb_gate], "ahb", "imx-vpu"); | 243 | clk_register_clkdev(clk[vpu_ahb_gate], "ahb", "coda-imx27.0"); |
244 | clk_register_clkdev(clk[dma_ahb_gate], "ahb", "imx-dma"); | 244 | clk_register_clkdev(clk[dma_ahb_gate], "ahb", "imx-dma"); |
245 | clk_register_clkdev(clk[dma_ipg_gate], "ipg", "imx-dma"); | 245 | clk_register_clkdev(clk[dma_ipg_gate], "ipg", "imx-dma"); |
246 | clk_register_clkdev(clk[fec_ipg_gate], "ipg", "imx27-fec.0"); | 246 | clk_register_clkdev(clk[fec_ipg_gate], "ipg", "imx27-fec.0"); |
diff --git a/arch/arm/mach-imx/devices-imx27.h b/arch/arm/mach-imx/devices-imx27.h index 436c5720fe6a..04822932cdd1 100644 --- a/arch/arm/mach-imx/devices-imx27.h +++ b/arch/arm/mach-imx/devices-imx27.h | |||
@@ -17,6 +17,10 @@ extern const struct imx_fsl_usb2_udc_data imx27_fsl_usb2_udc_data; | |||
17 | #define imx27_add_fsl_usb2_udc(pdata) \ | 17 | #define imx27_add_fsl_usb2_udc(pdata) \ |
18 | imx_add_fsl_usb2_udc(&imx27_fsl_usb2_udc_data, pdata) | 18 | imx_add_fsl_usb2_udc(&imx27_fsl_usb2_udc_data, pdata) |
19 | 19 | ||
20 | extern const struct imx_imx27_coda_data imx27_coda_data; | ||
21 | #define imx27_add_coda() \ | ||
22 | imx_add_imx27_coda(&imx27_coda_data) | ||
23 | |||
20 | extern const struct imx_imx2_wdt_data imx27_imx2_wdt_data; | 24 | extern const struct imx_imx2_wdt_data imx27_imx2_wdt_data; |
21 | #define imx27_add_imx2_wdt() \ | 25 | #define imx27_add_imx2_wdt() \ |
22 | imx_add_imx2_wdt(&imx27_imx2_wdt_data) | 26 | imx_add_imx2_wdt(&imx27_imx2_wdt_data) |
diff --git a/arch/arm/plat-mxc/devices/Kconfig b/arch/arm/plat-mxc/devices/Kconfig index cb3e3eef55c0..6b46cee2f9cd 100644 --- a/arch/arm/plat-mxc/devices/Kconfig +++ b/arch/arm/plat-mxc/devices/Kconfig | |||
@@ -15,7 +15,11 @@ config IMX_HAVE_PLATFORM_GPIO_KEYS | |||
15 | 15 | ||
16 | config IMX_HAVE_PLATFORM_IMX21_HCD | 16 | config IMX_HAVE_PLATFORM_IMX21_HCD |
17 | bool | 17 | bool |
18 | 18 | ||
19 | config IMX_HAVE_PLATFORM_IMX27_CODA | ||
20 | bool | ||
21 | default y if SOC_IMX27 | ||
22 | |||
19 | config IMX_HAVE_PLATFORM_IMX2_WDT | 23 | config IMX_HAVE_PLATFORM_IMX2_WDT |
20 | bool | 24 | bool |
21 | 25 | ||
diff --git a/arch/arm/plat-mxc/devices/Makefile b/arch/arm/plat-mxc/devices/Makefile index c11ac8472beb..76f3195475d0 100644 --- a/arch/arm/plat-mxc/devices/Makefile +++ b/arch/arm/plat-mxc/devices/Makefile | |||
@@ -4,6 +4,7 @@ obj-$(CONFIG_IMX_HAVE_PLATFORM_FSL_USB2_UDC) += platform-fsl-usb2-udc.o | |||
4 | obj-$(CONFIG_IMX_HAVE_PLATFORM_GPIO_KEYS) += platform-gpio_keys.o | 4 | obj-$(CONFIG_IMX_HAVE_PLATFORM_GPIO_KEYS) += platform-gpio_keys.o |
5 | obj-y += platform-gpio-mxc.o | 5 | obj-y += platform-gpio-mxc.o |
6 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX21_HCD) += platform-imx21-hcd.o | 6 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX21_HCD) += platform-imx21-hcd.o |
7 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX27_CODA) += platform-imx27-coda.o | ||
7 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX2_WDT) += platform-imx2-wdt.o | 8 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX2_WDT) += platform-imx2-wdt.o |
8 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMXDI_RTC) += platform-imxdi_rtc.o | 9 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMXDI_RTC) += platform-imxdi_rtc.o |
9 | obj-y += platform-imx-dma.o | 10 | obj-y += platform-imx-dma.o |
diff --git a/arch/arm/plat-mxc/devices/platform-imx27-coda.c b/arch/arm/plat-mxc/devices/platform-imx27-coda.c new file mode 100644 index 000000000000..8b12aacdf396 --- /dev/null +++ b/arch/arm/plat-mxc/devices/platform-imx27-coda.c | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Vista Silicon | ||
3 | * Javier Martin <javier.martin@vista-silicon.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | |||
10 | #include <mach/hardware.h> | ||
11 | #include <mach/devices-common.h> | ||
12 | |||
13 | #ifdef CONFIG_SOC_IMX27 | ||
14 | const struct imx_imx27_coda_data imx27_coda_data __initconst = { | ||
15 | .iobase = MX27_VPU_BASE_ADDR, | ||
16 | .iosize = SZ_512, | ||
17 | .irq = MX27_INT_VPU, | ||
18 | }; | ||
19 | #endif | ||
20 | |||
21 | struct platform_device *__init imx_add_imx27_coda( | ||
22 | const struct imx_imx27_coda_data *data) | ||
23 | { | ||
24 | struct resource res[] = { | ||
25 | { | ||
26 | .start = data->iobase, | ||
27 | .end = data->iobase + data->iosize - 1, | ||
28 | .flags = IORESOURCE_MEM, | ||
29 | }, { | ||
30 | .start = data->irq, | ||
31 | .end = data->irq, | ||
32 | .flags = IORESOURCE_IRQ, | ||
33 | }, | ||
34 | }; | ||
35 | return imx_add_platform_device_dmamask("coda-imx27", 0, res, 2, NULL, | ||
36 | 0, DMA_BIT_MASK(32)); | ||
37 | } | ||
diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h index a7f5bb1084d7..762780cad1bd 100644 --- a/arch/arm/plat-mxc/include/mach/devices-common.h +++ b/arch/arm/plat-mxc/include/mach/devices-common.h | |||
@@ -83,6 +83,14 @@ struct platform_device *__init imx_add_imx21_hcd( | |||
83 | const struct imx_imx21_hcd_data *data, | 83 | const struct imx_imx21_hcd_data *data, |
84 | const struct mx21_usbh_platform_data *pdata); | 84 | const struct mx21_usbh_platform_data *pdata); |
85 | 85 | ||
86 | struct imx_imx27_coda_data { | ||
87 | resource_size_t iobase; | ||
88 | resource_size_t iosize; | ||
89 | resource_size_t irq; | ||
90 | }; | ||
91 | struct platform_device *__init imx_add_imx27_coda( | ||
92 | const struct imx_imx27_coda_data *data); | ||
93 | |||
86 | struct imx_imx2_wdt_data { | 94 | struct imx_imx2_wdt_data { |
87 | int id; | 95 | int id; |
88 | resource_size_t iobase; | 96 | resource_size_t iobase; |