diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2011-03-11 18:58:01 -0500 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-03-11 18:58:01 -0500 |
commit | 604eefeb2308cda72325fd8754aecb55075ae866 (patch) | |
tree | 0377fa607c223a072739327ff8f7df841344ee8b /arch/arm | |
parent | 9e65bbf21371ea6705acd88229c8a7439f46e25e (diff) |
ARM: S5P: Add platform definitions for FIMC3
Add support for fourth FIMC platform device definition and define
resources for FIMC modules on EXYNOS4 machines.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-exynos4/cpu.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-exynos4/include/mach/irqs.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-exynos4/include/mach/map.h | 9 | ||||
-rw-r--r-- | arch/arm/plat-s5p/Kconfig | 5 | ||||
-rw-r--r-- | arch/arm/plat-s5p/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/plat-s5p/dev-fimc3.c | 43 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/devs.h | 1 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/fimc-core.h | 5 |
8 files changed, 76 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos4/cpu.c b/arch/arm/mach-exynos4/cpu.c index 479dfa1951c8..793011391943 100644 --- a/arch/arm/mach-exynos4/cpu.c +++ b/arch/arm/mach-exynos4/cpu.c | |||
@@ -21,6 +21,8 @@ | |||
21 | #include <plat/clock.h> | 21 | #include <plat/clock.h> |
22 | #include <plat/exynos4.h> | 22 | #include <plat/exynos4.h> |
23 | #include <plat/sdhci.h> | 23 | #include <plat/sdhci.h> |
24 | #include <plat/devs.h> | ||
25 | #include <plat/fimc-core.h> | ||
24 | 26 | ||
25 | #include <mach/regs-irq.h> | 27 | #include <mach/regs-irq.h> |
26 | 28 | ||
@@ -120,6 +122,11 @@ void __init exynos4_map_io(void) | |||
120 | exynos4_default_sdhci1(); | 122 | exynos4_default_sdhci1(); |
121 | exynos4_default_sdhci2(); | 123 | exynos4_default_sdhci2(); |
122 | exynos4_default_sdhci3(); | 124 | exynos4_default_sdhci3(); |
125 | |||
126 | s3c_fimc_setname(0, "exynos4-fimc"); | ||
127 | s3c_fimc_setname(1, "exynos4-fimc"); | ||
128 | s3c_fimc_setname(2, "exynos4-fimc"); | ||
129 | s3c_fimc_setname(3, "exynos4-fimc"); | ||
123 | } | 130 | } |
124 | 131 | ||
125 | void __init exynos4_init_clocks(int xtal) | 132 | void __init exynos4_init_clocks(int xtal) |
diff --git a/arch/arm/mach-exynos4/include/mach/irqs.h b/arch/arm/mach-exynos4/include/mach/irqs.h index e3556d45c75b..1db1de8e3e81 100644 --- a/arch/arm/mach-exynos4/include/mach/irqs.h +++ b/arch/arm/mach-exynos4/include/mach/irqs.h | |||
@@ -108,6 +108,11 @@ | |||
108 | #define IRQ_MIPI_CSIS0 COMBINER_IRQ(30, 0) | 108 | #define IRQ_MIPI_CSIS0 COMBINER_IRQ(30, 0) |
109 | #define IRQ_MIPI_CSIS1 COMBINER_IRQ(30, 1) | 109 | #define IRQ_MIPI_CSIS1 COMBINER_IRQ(30, 1) |
110 | 110 | ||
111 | #define IRQ_FIMC0 COMBINER_IRQ(32, 0) | ||
112 | #define IRQ_FIMC1 COMBINER_IRQ(32, 1) | ||
113 | #define IRQ_FIMC2 COMBINER_IRQ(33, 0) | ||
114 | #define IRQ_FIMC3 COMBINER_IRQ(33, 1) | ||
115 | |||
111 | #define IRQ_ONENAND_AUDI COMBINER_IRQ(34, 0) | 116 | #define IRQ_ONENAND_AUDI COMBINER_IRQ(34, 0) |
112 | 117 | ||
113 | #define IRQ_MCT_L1 COMBINER_IRQ(35, 3) | 118 | #define IRQ_MCT_L1 COMBINER_IRQ(35, 3) |
diff --git a/arch/arm/mach-exynos4/include/mach/map.h b/arch/arm/mach-exynos4/include/mach/map.h index 89ab6f75776c..4f50b07a376a 100644 --- a/arch/arm/mach-exynos4/include/mach/map.h +++ b/arch/arm/mach-exynos4/include/mach/map.h | |||
@@ -25,6 +25,11 @@ | |||
25 | 25 | ||
26 | #define EXYNOS4_PA_SYSRAM 0x02020000 | 26 | #define EXYNOS4_PA_SYSRAM 0x02020000 |
27 | 27 | ||
28 | #define EXYNOS4_PA_FIMC0 0x11800000 | ||
29 | #define EXYNOS4_PA_FIMC1 0x11810000 | ||
30 | #define EXYNOS4_PA_FIMC2 0x11820000 | ||
31 | #define EXYNOS4_PA_FIMC3 0x11830000 | ||
32 | |||
28 | #define EXYNOS4_PA_I2S0 0x03830000 | 33 | #define EXYNOS4_PA_I2S0 0x03830000 |
29 | #define EXYNOS4_PA_I2S1 0xE3100000 | 34 | #define EXYNOS4_PA_I2S1 0xE3100000 |
30 | #define EXYNOS4_PA_I2S2 0xE2A00000 | 35 | #define EXYNOS4_PA_I2S2 0xE2A00000 |
@@ -120,6 +125,10 @@ | |||
120 | #define S3C_PA_WDT EXYNOS4_PA_WATCHDOG | 125 | #define S3C_PA_WDT EXYNOS4_PA_WATCHDOG |
121 | 126 | ||
122 | #define S5P_PA_CHIPID EXYNOS4_PA_CHIPID | 127 | #define S5P_PA_CHIPID EXYNOS4_PA_CHIPID |
128 | #define S5P_PA_FIMC0 EXYNOS4_PA_FIMC0 | ||
129 | #define S5P_PA_FIMC1 EXYNOS4_PA_FIMC1 | ||
130 | #define S5P_PA_FIMC2 EXYNOS4_PA_FIMC2 | ||
131 | #define S5P_PA_FIMC3 EXYNOS4_PA_FIMC3 | ||
123 | #define S5P_PA_MIPI_CSIS0 EXYNOS4_PA_MIPI_CSIS0 | 132 | #define S5P_PA_MIPI_CSIS0 EXYNOS4_PA_MIPI_CSIS0 |
124 | #define S5P_PA_MIPI_CSIS1 EXYNOS4_PA_MIPI_CSIS1 | 133 | #define S5P_PA_MIPI_CSIS1 EXYNOS4_PA_MIPI_CSIS1 |
125 | #define S5P_PA_ONENAND EXYNOS4_PA_ONENAND | 134 | #define S5P_PA_ONENAND EXYNOS4_PA_ONENAND |
diff --git a/arch/arm/plat-s5p/Kconfig b/arch/arm/plat-s5p/Kconfig index 0e4144771240..849229716586 100644 --- a/arch/arm/plat-s5p/Kconfig +++ b/arch/arm/plat-s5p/Kconfig | |||
@@ -65,6 +65,11 @@ config S5P_DEV_FIMC2 | |||
65 | help | 65 | help |
66 | Compile in platform device definitions for FIMC controller 2 | 66 | Compile in platform device definitions for FIMC controller 2 |
67 | 67 | ||
68 | config S5P_DEV_FIMC3 | ||
69 | bool | ||
70 | help | ||
71 | Compile in platform device definitions for FIMC controller 3 | ||
72 | |||
68 | config S5P_DEV_ONENAND | 73 | config S5P_DEV_ONENAND |
69 | bool | 74 | bool |
70 | help | 75 | help |
diff --git a/arch/arm/plat-s5p/Makefile b/arch/arm/plat-s5p/Makefile index a788266b5e5f..42afff7f60be 100644 --- a/arch/arm/plat-s5p/Makefile +++ b/arch/arm/plat-s5p/Makefile | |||
@@ -29,6 +29,7 @@ obj-$(CONFIG_S5P_HRT) += s5p-time.o | |||
29 | obj-$(CONFIG_S5P_DEV_FIMC0) += dev-fimc0.o | 29 | obj-$(CONFIG_S5P_DEV_FIMC0) += dev-fimc0.o |
30 | obj-$(CONFIG_S5P_DEV_FIMC1) += dev-fimc1.o | 30 | obj-$(CONFIG_S5P_DEV_FIMC1) += dev-fimc1.o |
31 | obj-$(CONFIG_S5P_DEV_FIMC2) += dev-fimc2.o | 31 | obj-$(CONFIG_S5P_DEV_FIMC2) += dev-fimc2.o |
32 | obj-$(CONFIG_S5P_DEV_FIMC3) += dev-fimc3.o | ||
32 | obj-$(CONFIG_S5P_DEV_ONENAND) += dev-onenand.o | 33 | obj-$(CONFIG_S5P_DEV_ONENAND) += dev-onenand.o |
33 | obj-$(CONFIG_S5P_DEV_CSIS0) += dev-csis0.o | 34 | obj-$(CONFIG_S5P_DEV_CSIS0) += dev-csis0.o |
34 | obj-$(CONFIG_S5P_DEV_CSIS1) += dev-csis1.o | 35 | obj-$(CONFIG_S5P_DEV_CSIS1) += dev-csis1.o |
diff --git a/arch/arm/plat-s5p/dev-fimc3.c b/arch/arm/plat-s5p/dev-fimc3.c new file mode 100644 index 000000000000..ef31beca386c --- /dev/null +++ b/arch/arm/plat-s5p/dev-fimc3.c | |||
@@ -0,0 +1,43 @@ | |||
1 | /* linux/arch/arm/plat-s5p/dev-fimc3.c | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics | ||
4 | * | ||
5 | * Base S5P FIMC3 resource and device definitions | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/dma-mapping.h> | ||
14 | #include <linux/platform_device.h> | ||
15 | #include <linux/interrupt.h> | ||
16 | #include <linux/ioport.h> | ||
17 | #include <mach/map.h> | ||
18 | |||
19 | static struct resource s5p_fimc3_resource[] = { | ||
20 | [0] = { | ||
21 | .start = S5P_PA_FIMC3, | ||
22 | .end = S5P_PA_FIMC3 + SZ_4K - 1, | ||
23 | .flags = IORESOURCE_MEM, | ||
24 | }, | ||
25 | [1] = { | ||
26 | .start = IRQ_FIMC3, | ||
27 | .end = IRQ_FIMC3, | ||
28 | .flags = IORESOURCE_IRQ, | ||
29 | }, | ||
30 | }; | ||
31 | |||
32 | static u64 s5p_fimc3_dma_mask = DMA_BIT_MASK(32); | ||
33 | |||
34 | struct platform_device s5p_device_fimc3 = { | ||
35 | .name = "s5p-fimc", | ||
36 | .id = 3, | ||
37 | .num_resources = ARRAY_SIZE(s5p_fimc3_resource), | ||
38 | .resource = s5p_fimc3_resource, | ||
39 | .dev = { | ||
40 | .dma_mask = &s5p_fimc3_dma_mask, | ||
41 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
42 | }, | ||
43 | }; | ||
diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-samsung/include/plat/devs.h index e2b3ab997cff..7231ccf89ebb 100644 --- a/arch/arm/plat-samsung/include/plat/devs.h +++ b/arch/arm/plat-samsung/include/plat/devs.h | |||
@@ -136,6 +136,7 @@ extern struct platform_device samsung_device_keypad; | |||
136 | extern struct platform_device s5p_device_fimc0; | 136 | extern struct platform_device s5p_device_fimc0; |
137 | extern struct platform_device s5p_device_fimc1; | 137 | extern struct platform_device s5p_device_fimc1; |
138 | extern struct platform_device s5p_device_fimc2; | 138 | extern struct platform_device s5p_device_fimc2; |
139 | extern struct platform_device s5p_device_fimc3; | ||
139 | 140 | ||
140 | extern struct platform_device s5p_device_mipi_csis0; | 141 | extern struct platform_device s5p_device_mipi_csis0; |
141 | extern struct platform_device s5p_device_mipi_csis1; | 142 | extern struct platform_device s5p_device_mipi_csis1; |
diff --git a/arch/arm/plat-samsung/include/plat/fimc-core.h b/arch/arm/plat-samsung/include/plat/fimc-core.h index 81a3bfeeccad..945a99d59563 100644 --- a/arch/arm/plat-samsung/include/plat/fimc-core.h +++ b/arch/arm/plat-samsung/include/plat/fimc-core.h | |||
@@ -38,6 +38,11 @@ static inline void s3c_fimc_setname(int id, char *name) | |||
38 | s5p_device_fimc2.name = name; | 38 | s5p_device_fimc2.name = name; |
39 | break; | 39 | break; |
40 | #endif | 40 | #endif |
41 | #ifdef CONFIG_S5P_DEV_FIMC3 | ||
42 | case 3: | ||
43 | s5p_device_fimc3.name = name; | ||
44 | break; | ||
45 | #endif | ||
41 | } | 46 | } |
42 | } | 47 | } |
43 | 48 | ||