diff options
Diffstat (limited to 'arch/arm/mach-exynos')
-rw-r--r-- | arch/arm/mach-exynos/Kconfig | 14 | ||||
-rw-r--r-- | arch/arm/mach-exynos/Makefile | 7 | ||||
-rw-r--r-- | arch/arm/mach-exynos/Makefile.boot | 3 | ||||
-rw-r--r-- | arch/arm/mach-exynos/clock-exynos4212.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-exynos/clock-exynos5.c | 51 | ||||
-rw-r--r-- | arch/arm/mach-exynos/common.c | 182 | ||||
-rw-r--r-- | arch/arm/mach-exynos/dev-drm.c | 29 | ||||
-rw-r--r-- | arch/arm/mach-exynos/dma.c | 141 | ||||
-rw-r--r-- | arch/arm/mach-exynos/include/mach/gpio.h | 9 | ||||
-rw-r--r-- | arch/arm/mach-exynos/include/mach/irqs.h | 40 | ||||
-rw-r--r-- | arch/arm/mach-exynos/include/mach/map.h | 7 | ||||
-rw-r--r-- | arch/arm/mach-exynos/include/mach/regs-clock.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-exynos/include/mach/regs-pmu.h | 10 | ||||
-rw-r--r-- | arch/arm/mach-exynos/include/mach/spi-clocks.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-exynos/mach-exynos5-dt.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-exynos/mct.c | 17 | ||||
-rw-r--r-- | arch/arm/mach-exynos/pm.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-exynos/pmu.c | 24 |
18 files changed, 423 insertions, 133 deletions
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index e3cfd5fd7dd5..43ebe9094411 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig | |||
@@ -61,6 +61,7 @@ config SOC_EXYNOS5250 | |||
61 | bool "SAMSUNG EXYNOS5250" | 61 | bool "SAMSUNG EXYNOS5250" |
62 | default y | 62 | default y |
63 | depends on ARCH_EXYNOS5 | 63 | depends on ARCH_EXYNOS5 |
64 | select SAMSUNG_DMADEV | ||
64 | help | 65 | help |
65 | Enable EXYNOS5250 SoC support | 66 | Enable EXYNOS5250 SoC support |
66 | 67 | ||
@@ -70,7 +71,7 @@ config EXYNOS4_MCT | |||
70 | help | 71 | help |
71 | Use MCT (Multi Core Timer) as kernel timers | 72 | Use MCT (Multi Core Timer) as kernel timers |
72 | 73 | ||
73 | config EXYNOS4_DEV_DMA | 74 | config EXYNOS_DEV_DMA |
74 | bool | 75 | bool |
75 | help | 76 | help |
76 | Compile in amba device definitions for DMA controller | 77 | Compile in amba device definitions for DMA controller |
@@ -80,6 +81,11 @@ config EXYNOS4_DEV_AHCI | |||
80 | help | 81 | help |
81 | Compile in platform device definitions for AHCI | 82 | Compile in platform device definitions for AHCI |
82 | 83 | ||
84 | config EXYNOS_DEV_DRM | ||
85 | bool | ||
86 | help | ||
87 | Compile in platform device definitions for core DRM device | ||
88 | |||
83 | config EXYNOS4_SETUP_FIMD0 | 89 | config EXYNOS4_SETUP_FIMD0 |
84 | bool | 90 | bool |
85 | help | 91 | help |
@@ -161,7 +167,7 @@ config EXYNOS4_SETUP_USB_PHY | |||
161 | help | 167 | help |
162 | Common setup code for USB PHY controller | 168 | Common setup code for USB PHY controller |
163 | 169 | ||
164 | config EXYNOS4_SETUP_SPI | 170 | config EXYNOS_SETUP_SPI |
165 | bool | 171 | bool |
166 | help | 172 | help |
167 | Common setup code for SPI GPIO configurations. | 173 | Common setup code for SPI GPIO configurations. |
@@ -224,7 +230,7 @@ config MACH_ARMLEX4210 | |||
224 | select S3C_DEV_HSMMC2 | 230 | select S3C_DEV_HSMMC2 |
225 | select S3C_DEV_HSMMC3 | 231 | select S3C_DEV_HSMMC3 |
226 | select EXYNOS4_DEV_AHCI | 232 | select EXYNOS4_DEV_AHCI |
227 | select EXYNOS4_DEV_DMA | 233 | select EXYNOS_DEV_DMA |
228 | select EXYNOS4_SETUP_SDHCI | 234 | select EXYNOS4_SETUP_SDHCI |
229 | help | 235 | help |
230 | Machine support for Samsung ARMLEX4210 based on EXYNOS4210 | 236 | Machine support for Samsung ARMLEX4210 based on EXYNOS4210 |
@@ -362,7 +368,7 @@ config MACH_SMDK4212 | |||
362 | select SAMSUNG_DEV_KEYPAD | 368 | select SAMSUNG_DEV_KEYPAD |
363 | select SAMSUNG_DEV_PWM | 369 | select SAMSUNG_DEV_PWM |
364 | select EXYNOS_DEV_SYSMMU | 370 | select EXYNOS_DEV_SYSMMU |
365 | select EXYNOS4_DEV_DMA | 371 | select EXYNOS_DEV_DMA |
366 | select EXYNOS4_SETUP_I2C1 | 372 | select EXYNOS4_SETUP_I2C1 |
367 | select EXYNOS4_SETUP_I2C3 | 373 | select EXYNOS4_SETUP_I2C3 |
368 | select EXYNOS4_SETUP_I2C7 | 374 | select EXYNOS4_SETUP_I2C7 |
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile index 272625231c73..440a637c76f1 100644 --- a/arch/arm/mach-exynos/Makefile +++ b/arch/arm/mach-exynos/Makefile | |||
@@ -50,10 +50,11 @@ obj-$(CONFIG_MACH_EXYNOS5_DT) += mach-exynos5-dt.o | |||
50 | obj-y += dev-uart.o | 50 | obj-y += dev-uart.o |
51 | obj-$(CONFIG_ARCH_EXYNOS4) += dev-audio.o | 51 | obj-$(CONFIG_ARCH_EXYNOS4) += dev-audio.o |
52 | obj-$(CONFIG_EXYNOS4_DEV_AHCI) += dev-ahci.o | 52 | obj-$(CONFIG_EXYNOS4_DEV_AHCI) += dev-ahci.o |
53 | obj-$(CONFIG_EXYNOS_DEV_SYSMMU) += dev-sysmmu.o | ||
54 | obj-$(CONFIG_EXYNOS4_DEV_DWMCI) += dev-dwmci.o | 53 | obj-$(CONFIG_EXYNOS4_DEV_DWMCI) += dev-dwmci.o |
55 | obj-$(CONFIG_EXYNOS4_DEV_DMA) += dma.o | 54 | obj-$(CONFIG_EXYNOS_DEV_DMA) += dma.o |
56 | obj-$(CONFIG_EXYNOS4_DEV_USB_OHCI) += dev-ohci.o | 55 | obj-$(CONFIG_EXYNOS4_DEV_USB_OHCI) += dev-ohci.o |
56 | obj-$(CONFIG_EXYNOS_DEV_DRM) += dev-drm.o | ||
57 | obj-$(CONFIG_EXYNOS_DEV_SYSMMU) += dev-sysmmu.o | ||
57 | 58 | ||
58 | obj-$(CONFIG_ARCH_EXYNOS) += setup-i2c0.o | 59 | obj-$(CONFIG_ARCH_EXYNOS) += setup-i2c0.o |
59 | obj-$(CONFIG_EXYNOS4_SETUP_FIMC) += setup-fimc.o | 60 | obj-$(CONFIG_EXYNOS4_SETUP_FIMC) += setup-fimc.o |
@@ -68,4 +69,4 @@ obj-$(CONFIG_EXYNOS4_SETUP_I2C7) += setup-i2c7.o | |||
68 | obj-$(CONFIG_EXYNOS4_SETUP_KEYPAD) += setup-keypad.o | 69 | obj-$(CONFIG_EXYNOS4_SETUP_KEYPAD) += setup-keypad.o |
69 | obj-$(CONFIG_EXYNOS4_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o | 70 | obj-$(CONFIG_EXYNOS4_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o |
70 | obj-$(CONFIG_EXYNOS4_SETUP_USB_PHY) += setup-usb-phy.o | 71 | obj-$(CONFIG_EXYNOS4_SETUP_USB_PHY) += setup-usb-phy.o |
71 | obj-$(CONFIG_EXYNOS4_SETUP_SPI) += setup-spi.o | 72 | obj-$(CONFIG_EXYNOS_SETUP_SPI) += setup-spi.o |
diff --git a/arch/arm/mach-exynos/Makefile.boot b/arch/arm/mach-exynos/Makefile.boot index b9862e22bf10..31bd181b0514 100644 --- a/arch/arm/mach-exynos/Makefile.boot +++ b/arch/arm/mach-exynos/Makefile.boot | |||
@@ -1,2 +1,5 @@ | |||
1 | zreladdr-y += 0x40008000 | 1 | zreladdr-y += 0x40008000 |
2 | params_phys-y := 0x40000100 | 2 | params_phys-y := 0x40000100 |
3 | |||
4 | dtb-$(CONFIG_MACH_EXYNOS4_DT) += exynos4210-origen.dtb exynos4210-smdkv310.dtb | ||
5 | dtb-$(CONFIG_MACH_EXYNOS5_DT) += exynos5250-smdk5250.dtb | ||
diff --git a/arch/arm/mach-exynos/clock-exynos4212.c b/arch/arm/mach-exynos/clock-exynos4212.c index 98823120570e..da397d21bbcf 100644 --- a/arch/arm/mach-exynos/clock-exynos4212.c +++ b/arch/arm/mach-exynos/clock-exynos4212.c | |||
@@ -92,6 +92,16 @@ static struct clk init_clocks_off[] = { | |||
92 | .devname = SYSMMU_CLOCK_DEVNAME(isp, 9), | 92 | .devname = SYSMMU_CLOCK_DEVNAME(isp, 9), |
93 | .enable = exynos4212_clk_ip_isp1_ctrl, | 93 | .enable = exynos4212_clk_ip_isp1_ctrl, |
94 | .ctrlbit = (1 << 4), | 94 | .ctrlbit = (1 << 4), |
95 | }, { | ||
96 | .name = "flite", | ||
97 | .devname = "exynos-fimc-lite.0", | ||
98 | .enable = exynos4212_clk_ip_isp0_ctrl, | ||
99 | .ctrlbit = (1 << 4), | ||
100 | }, { | ||
101 | .name = "flite", | ||
102 | .devname = "exynos-fimc-lite.1", | ||
103 | .enable = exynos4212_clk_ip_isp0_ctrl, | ||
104 | .ctrlbit = (1 << 3), | ||
95 | } | 105 | } |
96 | }; | 106 | }; |
97 | 107 | ||
diff --git a/arch/arm/mach-exynos/clock-exynos5.c b/arch/arm/mach-exynos/clock-exynos5.c index 9f87a07b0bf8..5aa460b01fdf 100644 --- a/arch/arm/mach-exynos/clock-exynos5.c +++ b/arch/arm/mach-exynos/clock-exynos5.c | |||
@@ -165,11 +165,29 @@ static struct clksrc_clk exynos5_clk_sclk_apll = { | |||
165 | .reg_div = { .reg = EXYNOS5_CLKDIV_CPU0, .shift = 24, .size = 3 }, | 165 | .reg_div = { .reg = EXYNOS5_CLKDIV_CPU0, .shift = 24, .size = 3 }, |
166 | }; | 166 | }; |
167 | 167 | ||
168 | static struct clksrc_clk exynos5_clk_mout_bpll_fout = { | ||
169 | .clk = { | ||
170 | .name = "mout_bpll_fout", | ||
171 | }, | ||
172 | .sources = &clk_src_bpll_fout, | ||
173 | .reg_src = { .reg = EXYNOS5_PLL_DIV2_SEL, .shift = 0, .size = 1 }, | ||
174 | }; | ||
175 | |||
176 | static struct clk *exynos5_clk_src_bpll_list[] = { | ||
177 | [0] = &clk_fin_bpll, | ||
178 | [1] = &exynos5_clk_mout_bpll_fout.clk, | ||
179 | }; | ||
180 | |||
181 | static struct clksrc_sources exynos5_clk_src_bpll = { | ||
182 | .sources = exynos5_clk_src_bpll_list, | ||
183 | .nr_sources = ARRAY_SIZE(exynos5_clk_src_bpll_list), | ||
184 | }; | ||
185 | |||
168 | static struct clksrc_clk exynos5_clk_mout_bpll = { | 186 | static struct clksrc_clk exynos5_clk_mout_bpll = { |
169 | .clk = { | 187 | .clk = { |
170 | .name = "mout_bpll", | 188 | .name = "mout_bpll", |
171 | }, | 189 | }, |
172 | .sources = &clk_src_bpll, | 190 | .sources = &exynos5_clk_src_bpll, |
173 | .reg_src = { .reg = EXYNOS5_CLKSRC_CDREX, .shift = 0, .size = 1 }, | 191 | .reg_src = { .reg = EXYNOS5_CLKSRC_CDREX, .shift = 0, .size = 1 }, |
174 | }; | 192 | }; |
175 | 193 | ||
@@ -207,11 +225,29 @@ static struct clksrc_clk exynos5_clk_mout_epll = { | |||
207 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP2, .shift = 12, .size = 1 }, | 225 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP2, .shift = 12, .size = 1 }, |
208 | }; | 226 | }; |
209 | 227 | ||
228 | static struct clksrc_clk exynos5_clk_mout_mpll_fout = { | ||
229 | .clk = { | ||
230 | .name = "mout_mpll_fout", | ||
231 | }, | ||
232 | .sources = &clk_src_mpll_fout, | ||
233 | .reg_src = { .reg = EXYNOS5_PLL_DIV2_SEL, .shift = 4, .size = 1 }, | ||
234 | }; | ||
235 | |||
236 | static struct clk *exynos5_clk_src_mpll_list[] = { | ||
237 | [0] = &clk_fin_mpll, | ||
238 | [1] = &exynos5_clk_mout_mpll_fout.clk, | ||
239 | }; | ||
240 | |||
241 | static struct clksrc_sources exynos5_clk_src_mpll = { | ||
242 | .sources = exynos5_clk_src_mpll_list, | ||
243 | .nr_sources = ARRAY_SIZE(exynos5_clk_src_mpll_list), | ||
244 | }; | ||
245 | |||
210 | struct clksrc_clk exynos5_clk_mout_mpll = { | 246 | struct clksrc_clk exynos5_clk_mout_mpll = { |
211 | .clk = { | 247 | .clk = { |
212 | .name = "mout_mpll", | 248 | .name = "mout_mpll", |
213 | }, | 249 | }, |
214 | .sources = &clk_src_mpll, | 250 | .sources = &exynos5_clk_src_mpll, |
215 | .reg_src = { .reg = EXYNOS5_CLKSRC_CORE1, .shift = 8, .size = 1 }, | 251 | .reg_src = { .reg = EXYNOS5_CLKSRC_CORE1, .shift = 8, .size = 1 }, |
216 | }; | 252 | }; |
217 | 253 | ||
@@ -474,6 +510,11 @@ static struct clk exynos5_init_clocks_off[] = { | |||
474 | .enable = exynos5_clk_ip_peris_ctrl, | 510 | .enable = exynos5_clk_ip_peris_ctrl, |
475 | .ctrlbit = (1 << 20), | 511 | .ctrlbit = (1 << 20), |
476 | }, { | 512 | }, { |
513 | .name = "watchdog", | ||
514 | .parent = &exynos5_clk_aclk_66.clk, | ||
515 | .enable = exynos5_clk_ip_peris_ctrl, | ||
516 | .ctrlbit = (1 << 19), | ||
517 | }, { | ||
477 | .name = "hsmmc", | 518 | .name = "hsmmc", |
478 | .devname = "exynos4-sdhci.0", | 519 | .devname = "exynos4-sdhci.0", |
479 | .parent = &exynos5_clk_aclk_200.clk, | 520 | .parent = &exynos5_clk_aclk_200.clk, |
@@ -1031,10 +1072,12 @@ static struct clksrc_clk *exynos5_sysclks[] = { | |||
1031 | &exynos5_clk_mout_apll, | 1072 | &exynos5_clk_mout_apll, |
1032 | &exynos5_clk_sclk_apll, | 1073 | &exynos5_clk_sclk_apll, |
1033 | &exynos5_clk_mout_bpll, | 1074 | &exynos5_clk_mout_bpll, |
1075 | &exynos5_clk_mout_bpll_fout, | ||
1034 | &exynos5_clk_mout_bpll_user, | 1076 | &exynos5_clk_mout_bpll_user, |
1035 | &exynos5_clk_mout_cpll, | 1077 | &exynos5_clk_mout_cpll, |
1036 | &exynos5_clk_mout_epll, | 1078 | &exynos5_clk_mout_epll, |
1037 | &exynos5_clk_mout_mpll, | 1079 | &exynos5_clk_mout_mpll, |
1080 | &exynos5_clk_mout_mpll_fout, | ||
1038 | &exynos5_clk_mout_mpll_user, | 1081 | &exynos5_clk_mout_mpll_user, |
1039 | &exynos5_clk_vpllsrc, | 1082 | &exynos5_clk_vpllsrc, |
1040 | &exynos5_clk_sclk_vpll, | 1083 | &exynos5_clk_sclk_vpll, |
@@ -1098,7 +1141,9 @@ static struct clk *exynos5_clks[] __initdata = { | |||
1098 | &exynos5_clk_sclk_hdmi27m, | 1141 | &exynos5_clk_sclk_hdmi27m, |
1099 | &exynos5_clk_sclk_hdmiphy, | 1142 | &exynos5_clk_sclk_hdmiphy, |
1100 | &clk_fout_bpll, | 1143 | &clk_fout_bpll, |
1144 | &clk_fout_bpll_div2, | ||
1101 | &clk_fout_cpll, | 1145 | &clk_fout_cpll, |
1146 | &clk_fout_mpll_div2, | ||
1102 | &exynos5_clk_armclk, | 1147 | &exynos5_clk_armclk, |
1103 | }; | 1148 | }; |
1104 | 1149 | ||
@@ -1263,8 +1308,10 @@ void __init_or_cpufreq exynos5_setup_clocks(void) | |||
1263 | 1308 | ||
1264 | clk_fout_apll.ops = &exynos5_fout_apll_ops; | 1309 | clk_fout_apll.ops = &exynos5_fout_apll_ops; |
1265 | clk_fout_bpll.rate = bpll; | 1310 | clk_fout_bpll.rate = bpll; |
1311 | clk_fout_bpll_div2.rate = bpll >> 1; | ||
1266 | clk_fout_cpll.rate = cpll; | 1312 | clk_fout_cpll.rate = cpll; |
1267 | clk_fout_mpll.rate = mpll; | 1313 | clk_fout_mpll.rate = mpll; |
1314 | clk_fout_mpll_div2.rate = mpll >> 1; | ||
1268 | clk_fout_epll.rate = epll; | 1315 | clk_fout_epll.rate = epll; |
1269 | clk_fout_vpll.rate = vpll; | 1316 | clk_fout_vpll.rate = vpll; |
1270 | 1317 | ||
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 5ccd6e80a607..49134711f4c6 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c | |||
@@ -19,6 +19,9 @@ | |||
19 | #include <linux/serial_core.h> | 19 | #include <linux/serial_core.h> |
20 | #include <linux/of.h> | 20 | #include <linux/of.h> |
21 | #include <linux/of_irq.h> | 21 | #include <linux/of_irq.h> |
22 | #include <linux/export.h> | ||
23 | #include <linux/irqdomain.h> | ||
24 | #include <linux/of_address.h> | ||
22 | 25 | ||
23 | #include <asm/proc-fns.h> | 26 | #include <asm/proc-fns.h> |
24 | #include <asm/exception.h> | 27 | #include <asm/exception.h> |
@@ -265,12 +268,12 @@ static struct map_desc exynos5_iodesc[] __initdata = { | |||
265 | }, { | 268 | }, { |
266 | .virtual = (unsigned long)S5P_VA_GIC_CPU, | 269 | .virtual = (unsigned long)S5P_VA_GIC_CPU, |
267 | .pfn = __phys_to_pfn(EXYNOS5_PA_GIC_CPU), | 270 | .pfn = __phys_to_pfn(EXYNOS5_PA_GIC_CPU), |
268 | .length = SZ_64K, | 271 | .length = SZ_8K, |
269 | .type = MT_DEVICE, | 272 | .type = MT_DEVICE, |
270 | }, { | 273 | }, { |
271 | .virtual = (unsigned long)S5P_VA_GIC_DIST, | 274 | .virtual = (unsigned long)S5P_VA_GIC_DIST, |
272 | .pfn = __phys_to_pfn(EXYNOS5_PA_GIC_DIST), | 275 | .pfn = __phys_to_pfn(EXYNOS5_PA_GIC_DIST), |
273 | .length = SZ_64K, | 276 | .length = SZ_4K, |
274 | .type = MT_DEVICE, | 277 | .type = MT_DEVICE, |
275 | }, | 278 | }, |
276 | }; | 279 | }; |
@@ -399,6 +402,7 @@ struct combiner_chip_data { | |||
399 | void __iomem *base; | 402 | void __iomem *base; |
400 | }; | 403 | }; |
401 | 404 | ||
405 | static struct irq_domain *combiner_irq_domain; | ||
402 | static struct combiner_chip_data combiner_data[MAX_COMBINER_NR]; | 406 | static struct combiner_chip_data combiner_data[MAX_COMBINER_NR]; |
403 | 407 | ||
404 | static inline void __iomem *combiner_base(struct irq_data *data) | 408 | static inline void __iomem *combiner_base(struct irq_data *data) |
@@ -411,14 +415,14 @@ static inline void __iomem *combiner_base(struct irq_data *data) | |||
411 | 415 | ||
412 | static void combiner_mask_irq(struct irq_data *data) | 416 | static void combiner_mask_irq(struct irq_data *data) |
413 | { | 417 | { |
414 | u32 mask = 1 << (data->irq % 32); | 418 | u32 mask = 1 << (data->hwirq % 32); |
415 | 419 | ||
416 | __raw_writel(mask, combiner_base(data) + COMBINER_ENABLE_CLEAR); | 420 | __raw_writel(mask, combiner_base(data) + COMBINER_ENABLE_CLEAR); |
417 | } | 421 | } |
418 | 422 | ||
419 | static void combiner_unmask_irq(struct irq_data *data) | 423 | static void combiner_unmask_irq(struct irq_data *data) |
420 | { | 424 | { |
421 | u32 mask = 1 << (data->irq % 32); | 425 | u32 mask = 1 << (data->hwirq % 32); |
422 | 426 | ||
423 | __raw_writel(mask, combiner_base(data) + COMBINER_ENABLE_SET); | 427 | __raw_writel(mask, combiner_base(data) + COMBINER_ENABLE_SET); |
424 | } | 428 | } |
@@ -474,49 +478,131 @@ static void __init combiner_cascade_irq(unsigned int combiner_nr, unsigned int i | |||
474 | irq_set_chained_handler(irq, combiner_handle_cascade_irq); | 478 | irq_set_chained_handler(irq, combiner_handle_cascade_irq); |
475 | } | 479 | } |
476 | 480 | ||
477 | static void __init combiner_init(unsigned int combiner_nr, void __iomem *base, | 481 | static void __init combiner_init_one(unsigned int combiner_nr, |
478 | unsigned int irq_start) | 482 | void __iomem *base) |
479 | { | 483 | { |
480 | unsigned int i; | ||
481 | unsigned int max_nr; | ||
482 | |||
483 | if (soc_is_exynos5250()) | ||
484 | max_nr = EXYNOS5_MAX_COMBINER_NR; | ||
485 | else | ||
486 | max_nr = EXYNOS4_MAX_COMBINER_NR; | ||
487 | |||
488 | if (combiner_nr >= max_nr) | ||
489 | BUG(); | ||
490 | |||
491 | combiner_data[combiner_nr].base = base; | 484 | combiner_data[combiner_nr].base = base; |
492 | combiner_data[combiner_nr].irq_offset = irq_start; | 485 | combiner_data[combiner_nr].irq_offset = irq_find_mapping( |
486 | combiner_irq_domain, combiner_nr * MAX_IRQ_IN_COMBINER); | ||
493 | combiner_data[combiner_nr].irq_mask = 0xff << ((combiner_nr % 4) << 3); | 487 | combiner_data[combiner_nr].irq_mask = 0xff << ((combiner_nr % 4) << 3); |
494 | 488 | ||
495 | /* Disable all interrupts */ | 489 | /* Disable all interrupts */ |
496 | |||
497 | __raw_writel(combiner_data[combiner_nr].irq_mask, | 490 | __raw_writel(combiner_data[combiner_nr].irq_mask, |
498 | base + COMBINER_ENABLE_CLEAR); | 491 | base + COMBINER_ENABLE_CLEAR); |
492 | } | ||
493 | |||
494 | #ifdef CONFIG_OF | ||
495 | static int combiner_irq_domain_xlate(struct irq_domain *d, | ||
496 | struct device_node *controller, | ||
497 | const u32 *intspec, unsigned int intsize, | ||
498 | unsigned long *out_hwirq, | ||
499 | unsigned int *out_type) | ||
500 | { | ||
501 | if (d->of_node != controller) | ||
502 | return -EINVAL; | ||
503 | |||
504 | if (intsize < 2) | ||
505 | return -EINVAL; | ||
506 | |||
507 | *out_hwirq = intspec[0] * MAX_IRQ_IN_COMBINER + intspec[1]; | ||
508 | *out_type = 0; | ||
509 | |||
510 | return 0; | ||
511 | } | ||
512 | #else | ||
513 | static int combiner_irq_domain_xlate(struct irq_domain *d, | ||
514 | struct device_node *controller, | ||
515 | const u32 *intspec, unsigned int intsize, | ||
516 | unsigned long *out_hwirq, | ||
517 | unsigned int *out_type) | ||
518 | { | ||
519 | return -EINVAL; | ||
520 | } | ||
521 | #endif | ||
522 | |||
523 | static int combiner_irq_domain_map(struct irq_domain *d, unsigned int irq, | ||
524 | irq_hw_number_t hw) | ||
525 | { | ||
526 | irq_set_chip_and_handler(irq, &combiner_chip, handle_level_irq); | ||
527 | irq_set_chip_data(irq, &combiner_data[hw >> 3]); | ||
528 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
499 | 529 | ||
500 | /* Setup the Linux IRQ subsystem */ | 530 | return 0; |
531 | } | ||
532 | |||
533 | static struct irq_domain_ops combiner_irq_domain_ops = { | ||
534 | .xlate = combiner_irq_domain_xlate, | ||
535 | .map = combiner_irq_domain_map, | ||
536 | }; | ||
501 | 537 | ||
502 | for (i = irq_start; i < combiner_data[combiner_nr].irq_offset | 538 | void __init combiner_init(void __iomem *combiner_base, struct device_node *np) |
503 | + MAX_IRQ_IN_COMBINER; i++) { | 539 | { |
504 | irq_set_chip_and_handler(i, &combiner_chip, handle_level_irq); | 540 | int i, irq, irq_base; |
505 | irq_set_chip_data(i, &combiner_data[combiner_nr]); | 541 | unsigned int max_nr, nr_irq; |
506 | set_irq_flags(i, IRQF_VALID | IRQF_PROBE); | 542 | |
543 | if (np) { | ||
544 | if (of_property_read_u32(np, "samsung,combiner-nr", &max_nr)) { | ||
545 | pr_warning("%s: number of combiners not specified, " | ||
546 | "setting default as %d.\n", | ||
547 | __func__, EXYNOS4_MAX_COMBINER_NR); | ||
548 | max_nr = EXYNOS4_MAX_COMBINER_NR; | ||
549 | } | ||
550 | } else { | ||
551 | max_nr = soc_is_exynos5250() ? EXYNOS5_MAX_COMBINER_NR : | ||
552 | EXYNOS4_MAX_COMBINER_NR; | ||
553 | } | ||
554 | nr_irq = max_nr * MAX_IRQ_IN_COMBINER; | ||
555 | |||
556 | irq_base = irq_alloc_descs(COMBINER_IRQ(0, 0), 1, nr_irq, 0); | ||
557 | if (IS_ERR_VALUE(irq_base)) { | ||
558 | irq_base = COMBINER_IRQ(0, 0); | ||
559 | pr_warning("%s: irq desc alloc failed. Continuing with %d as linux irq base\n", __func__, irq_base); | ||
560 | } | ||
561 | |||
562 | combiner_irq_domain = irq_domain_add_legacy(np, nr_irq, irq_base, 0, | ||
563 | &combiner_irq_domain_ops, &combiner_data); | ||
564 | if (WARN_ON(!combiner_irq_domain)) { | ||
565 | pr_warning("%s: irq domain init failed\n", __func__); | ||
566 | return; | ||
567 | } | ||
568 | |||
569 | for (i = 0; i < max_nr; i++) { | ||
570 | combiner_init_one(i, combiner_base + (i >> 2) * 0x10); | ||
571 | irq = IRQ_SPI(i); | ||
572 | #ifdef CONFIG_OF | ||
573 | if (np) | ||
574 | irq = irq_of_parse_and_map(np, i); | ||
575 | #endif | ||
576 | combiner_cascade_irq(i, irq); | ||
507 | } | 577 | } |
508 | } | 578 | } |
509 | 579 | ||
510 | #ifdef CONFIG_OF | 580 | #ifdef CONFIG_OF |
581 | int __init combiner_of_init(struct device_node *np, struct device_node *parent) | ||
582 | { | ||
583 | void __iomem *combiner_base; | ||
584 | |||
585 | combiner_base = of_iomap(np, 0); | ||
586 | if (!combiner_base) { | ||
587 | pr_err("%s: failed to map combiner registers\n", __func__); | ||
588 | return -ENXIO; | ||
589 | } | ||
590 | |||
591 | combiner_init(combiner_base, np); | ||
592 | |||
593 | return 0; | ||
594 | } | ||
595 | |||
511 | static const struct of_device_id exynos4_dt_irq_match[] = { | 596 | static const struct of_device_id exynos4_dt_irq_match[] = { |
512 | { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, | 597 | { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, |
598 | { .compatible = "samsung,exynos4210-combiner", | ||
599 | .data = combiner_of_init, }, | ||
513 | {}, | 600 | {}, |
514 | }; | 601 | }; |
515 | #endif | 602 | #endif |
516 | 603 | ||
517 | void __init exynos4_init_irq(void) | 604 | void __init exynos4_init_irq(void) |
518 | { | 605 | { |
519 | int irq; | ||
520 | unsigned int gic_bank_offset; | 606 | unsigned int gic_bank_offset; |
521 | 607 | ||
522 | gic_bank_offset = soc_is_exynos4412() ? 0x4000 : 0x8000; | 608 | gic_bank_offset = soc_is_exynos4412() ? 0x4000 : 0x8000; |
@@ -528,12 +614,8 @@ void __init exynos4_init_irq(void) | |||
528 | of_irq_init(exynos4_dt_irq_match); | 614 | of_irq_init(exynos4_dt_irq_match); |
529 | #endif | 615 | #endif |
530 | 616 | ||
531 | for (irq = 0; irq < EXYNOS4_MAX_COMBINER_NR; irq++) { | 617 | if (!of_have_populated_dt()) |
532 | 618 | combiner_init(S5P_VA_COMBINER_BASE, NULL); | |
533 | combiner_init(irq, (void __iomem *)S5P_VA_COMBINER(irq), | ||
534 | COMBINER_IRQ(irq, 0)); | ||
535 | combiner_cascade_irq(irq, IRQ_SPI(irq)); | ||
536 | } | ||
537 | 619 | ||
538 | /* | 620 | /* |
539 | * The parameters of s5p_init_irq() are for VIC init. | 621 | * The parameters of s5p_init_irq() are for VIC init. |
@@ -545,18 +627,9 @@ void __init exynos4_init_irq(void) | |||
545 | 627 | ||
546 | void __init exynos5_init_irq(void) | 628 | void __init exynos5_init_irq(void) |
547 | { | 629 | { |
548 | int irq; | ||
549 | |||
550 | #ifdef CONFIG_OF | 630 | #ifdef CONFIG_OF |
551 | of_irq_init(exynos4_dt_irq_match); | 631 | of_irq_init(exynos4_dt_irq_match); |
552 | #endif | 632 | #endif |
553 | |||
554 | for (irq = 0; irq < EXYNOS5_MAX_COMBINER_NR; irq++) { | ||
555 | combiner_init(irq, (void __iomem *)S5P_VA_COMBINER(irq), | ||
556 | COMBINER_IRQ(irq, 0)); | ||
557 | combiner_cascade_irq(irq, IRQ_SPI(irq)); | ||
558 | } | ||
559 | |||
560 | /* | 633 | /* |
561 | * The parameters of s5p_init_irq() are for VIC init. | 634 | * The parameters of s5p_init_irq() are for VIC init. |
562 | * Theses parameters should be NULL and 0 because EXYNOS4 | 635 | * Theses parameters should be NULL and 0 because EXYNOS4 |
@@ -565,30 +638,18 @@ void __init exynos5_init_irq(void) | |||
565 | s5p_init_irq(NULL, 0); | 638 | s5p_init_irq(NULL, 0); |
566 | } | 639 | } |
567 | 640 | ||
568 | struct bus_type exynos4_subsys = { | 641 | struct bus_type exynos_subsys = { |
569 | .name = "exynos4-core", | 642 | .name = "exynos-core", |
570 | .dev_name = "exynos4-core", | 643 | .dev_name = "exynos-core", |
571 | }; | ||
572 | |||
573 | struct bus_type exynos5_subsys = { | ||
574 | .name = "exynos5-core", | ||
575 | .dev_name = "exynos5-core", | ||
576 | }; | 644 | }; |
577 | 645 | ||
578 | static struct device exynos4_dev = { | 646 | static struct device exynos4_dev = { |
579 | .bus = &exynos4_subsys, | 647 | .bus = &exynos_subsys, |
580 | }; | ||
581 | |||
582 | static struct device exynos5_dev = { | ||
583 | .bus = &exynos5_subsys, | ||
584 | }; | 648 | }; |
585 | 649 | ||
586 | static int __init exynos_core_init(void) | 650 | static int __init exynos_core_init(void) |
587 | { | 651 | { |
588 | if (soc_is_exynos5250()) | 652 | return subsys_system_register(&exynos_subsys, NULL); |
589 | return subsys_system_register(&exynos5_subsys, NULL); | ||
590 | else | ||
591 | return subsys_system_register(&exynos4_subsys, NULL); | ||
592 | } | 653 | } |
593 | core_initcall(exynos_core_init); | 654 | core_initcall(exynos_core_init); |
594 | 655 | ||
@@ -675,10 +736,7 @@ static int __init exynos_init(void) | |||
675 | { | 736 | { |
676 | printk(KERN_INFO "EXYNOS: Initializing architecture\n"); | 737 | printk(KERN_INFO "EXYNOS: Initializing architecture\n"); |
677 | 738 | ||
678 | if (soc_is_exynos5250()) | 739 | return device_register(&exynos4_dev); |
679 | return device_register(&exynos5_dev); | ||
680 | else | ||
681 | return device_register(&exynos4_dev); | ||
682 | } | 740 | } |
683 | 741 | ||
684 | /* uart registration process */ | 742 | /* uart registration process */ |
diff --git a/arch/arm/mach-exynos/dev-drm.c b/arch/arm/mach-exynos/dev-drm.c new file mode 100644 index 000000000000..17c9c6ecc2e0 --- /dev/null +++ b/arch/arm/mach-exynos/dev-drm.c | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-exynos/dev-drm.c | ||
3 | * | ||
4 | * Copyright (c) 2012 Samsung Electronics Co., Ltd. | ||
5 | * http://www.samsung.com | ||
6 | * | ||
7 | * EXYNOS - core DRM device | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | */ | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/dma-mapping.h> | ||
17 | #include <linux/platform_device.h> | ||
18 | |||
19 | #include <plat/devs.h> | ||
20 | |||
21 | static u64 exynos_drm_dma_mask = DMA_BIT_MASK(32); | ||
22 | |||
23 | struct platform_device exynos_device_drm = { | ||
24 | .name = "exynos-drm", | ||
25 | .dev = { | ||
26 | .dma_mask = &exynos_drm_dma_mask, | ||
27 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
28 | } | ||
29 | }; | ||
diff --git a/arch/arm/mach-exynos/dma.c b/arch/arm/mach-exynos/dma.c index 69aaa4503205..f60b66dbcf84 100644 --- a/arch/arm/mach-exynos/dma.c +++ b/arch/arm/mach-exynos/dma.c | |||
@@ -103,10 +103,45 @@ static u8 exynos4212_pdma0_peri[] = { | |||
103 | DMACH_MIPI_HSI5, | 103 | DMACH_MIPI_HSI5, |
104 | }; | 104 | }; |
105 | 105 | ||
106 | struct dma_pl330_platdata exynos4_pdma0_pdata; | 106 | static u8 exynos5250_pdma0_peri[] = { |
107 | DMACH_PCM0_RX, | ||
108 | DMACH_PCM0_TX, | ||
109 | DMACH_PCM2_RX, | ||
110 | DMACH_PCM2_TX, | ||
111 | DMACH_SPI0_RX, | ||
112 | DMACH_SPI0_TX, | ||
113 | DMACH_SPI2_RX, | ||
114 | DMACH_SPI2_TX, | ||
115 | DMACH_I2S0S_TX, | ||
116 | DMACH_I2S0_RX, | ||
117 | DMACH_I2S0_TX, | ||
118 | DMACH_I2S2_RX, | ||
119 | DMACH_I2S2_TX, | ||
120 | DMACH_UART0_RX, | ||
121 | DMACH_UART0_TX, | ||
122 | DMACH_UART2_RX, | ||
123 | DMACH_UART2_TX, | ||
124 | DMACH_UART4_RX, | ||
125 | DMACH_UART4_TX, | ||
126 | DMACH_SLIMBUS0_RX, | ||
127 | DMACH_SLIMBUS0_TX, | ||
128 | DMACH_SLIMBUS2_RX, | ||
129 | DMACH_SLIMBUS2_TX, | ||
130 | DMACH_SLIMBUS4_RX, | ||
131 | DMACH_SLIMBUS4_TX, | ||
132 | DMACH_AC97_MICIN, | ||
133 | DMACH_AC97_PCMIN, | ||
134 | DMACH_AC97_PCMOUT, | ||
135 | DMACH_MIPI_HSI0, | ||
136 | DMACH_MIPI_HSI2, | ||
137 | DMACH_MIPI_HSI4, | ||
138 | DMACH_MIPI_HSI6, | ||
139 | }; | ||
140 | |||
141 | static struct dma_pl330_platdata exynos_pdma0_pdata; | ||
107 | 142 | ||
108 | static AMBA_AHB_DEVICE(exynos4_pdma0, "dma-pl330.0", 0x00041330, | 143 | static AMBA_AHB_DEVICE(exynos_pdma0, "dma-pl330.0", 0x00041330, |
109 | EXYNOS4_PA_PDMA0, {EXYNOS4_IRQ_PDMA0}, &exynos4_pdma0_pdata); | 144 | EXYNOS4_PA_PDMA0, {EXYNOS4_IRQ_PDMA0}, &exynos_pdma0_pdata); |
110 | 145 | ||
111 | static u8 exynos4210_pdma1_peri[] = { | 146 | static u8 exynos4210_pdma1_peri[] = { |
112 | DMACH_PCM0_RX, | 147 | DMACH_PCM0_RX, |
@@ -169,10 +204,45 @@ static u8 exynos4212_pdma1_peri[] = { | |||
169 | DMACH_MIPI_HSI7, | 204 | DMACH_MIPI_HSI7, |
170 | }; | 205 | }; |
171 | 206 | ||
172 | static struct dma_pl330_platdata exynos4_pdma1_pdata; | 207 | static u8 exynos5250_pdma1_peri[] = { |
208 | DMACH_PCM0_RX, | ||
209 | DMACH_PCM0_TX, | ||
210 | DMACH_PCM1_RX, | ||
211 | DMACH_PCM1_TX, | ||
212 | DMACH_SPI1_RX, | ||
213 | DMACH_SPI1_TX, | ||
214 | DMACH_PWM, | ||
215 | DMACH_SPDIF, | ||
216 | DMACH_I2S0S_TX, | ||
217 | DMACH_I2S0_RX, | ||
218 | DMACH_I2S0_TX, | ||
219 | DMACH_I2S1_RX, | ||
220 | DMACH_I2S1_TX, | ||
221 | DMACH_UART0_RX, | ||
222 | DMACH_UART0_TX, | ||
223 | DMACH_UART1_RX, | ||
224 | DMACH_UART1_TX, | ||
225 | DMACH_UART3_RX, | ||
226 | DMACH_UART3_TX, | ||
227 | DMACH_SLIMBUS1_RX, | ||
228 | DMACH_SLIMBUS1_TX, | ||
229 | DMACH_SLIMBUS3_RX, | ||
230 | DMACH_SLIMBUS3_TX, | ||
231 | DMACH_SLIMBUS5_RX, | ||
232 | DMACH_SLIMBUS5_TX, | ||
233 | DMACH_SLIMBUS0AUX_RX, | ||
234 | DMACH_SLIMBUS0AUX_TX, | ||
235 | DMACH_DISP1, | ||
236 | DMACH_MIPI_HSI1, | ||
237 | DMACH_MIPI_HSI3, | ||
238 | DMACH_MIPI_HSI5, | ||
239 | DMACH_MIPI_HSI7, | ||
240 | }; | ||
173 | 241 | ||
174 | static AMBA_AHB_DEVICE(exynos4_pdma1, "dma-pl330.1", 0x00041330, | 242 | static struct dma_pl330_platdata exynos_pdma1_pdata; |
175 | EXYNOS4_PA_PDMA1, {EXYNOS4_IRQ_PDMA1}, &exynos4_pdma1_pdata); | 243 | |
244 | static AMBA_AHB_DEVICE(exynos_pdma1, "dma-pl330.1", 0x00041330, | ||
245 | EXYNOS4_PA_PDMA1, {EXYNOS4_IRQ_PDMA1}, &exynos_pdma1_pdata); | ||
176 | 246 | ||
177 | static u8 mdma_peri[] = { | 247 | static u8 mdma_peri[] = { |
178 | DMACH_MTOM_0, | 248 | DMACH_MTOM_0, |
@@ -185,46 +255,63 @@ static u8 mdma_peri[] = { | |||
185 | DMACH_MTOM_7, | 255 | DMACH_MTOM_7, |
186 | }; | 256 | }; |
187 | 257 | ||
188 | static struct dma_pl330_platdata exynos4_mdma1_pdata = { | 258 | static struct dma_pl330_platdata exynos_mdma1_pdata = { |
189 | .nr_valid_peri = ARRAY_SIZE(mdma_peri), | 259 | .nr_valid_peri = ARRAY_SIZE(mdma_peri), |
190 | .peri_id = mdma_peri, | 260 | .peri_id = mdma_peri, |
191 | }; | 261 | }; |
192 | 262 | ||
193 | static AMBA_AHB_DEVICE(exynos4_mdma1, "dma-pl330.2", 0x00041330, | 263 | static AMBA_AHB_DEVICE(exynos_mdma1, "dma-pl330.2", 0x00041330, |
194 | EXYNOS4_PA_MDMA1, {EXYNOS4_IRQ_MDMA1}, &exynos4_mdma1_pdata); | 264 | EXYNOS4_PA_MDMA1, {EXYNOS4_IRQ_MDMA1}, &exynos_mdma1_pdata); |
195 | 265 | ||
196 | static int __init exynos4_dma_init(void) | 266 | static int __init exynos_dma_init(void) |
197 | { | 267 | { |
198 | if (of_have_populated_dt()) | 268 | if (of_have_populated_dt()) |
199 | return 0; | 269 | return 0; |
200 | 270 | ||
201 | if (soc_is_exynos4210()) { | 271 | if (soc_is_exynos4210()) { |
202 | exynos4_pdma0_pdata.nr_valid_peri = | 272 | exynos_pdma0_pdata.nr_valid_peri = |
203 | ARRAY_SIZE(exynos4210_pdma0_peri); | 273 | ARRAY_SIZE(exynos4210_pdma0_peri); |
204 | exynos4_pdma0_pdata.peri_id = exynos4210_pdma0_peri; | 274 | exynos_pdma0_pdata.peri_id = exynos4210_pdma0_peri; |
205 | exynos4_pdma1_pdata.nr_valid_peri = | 275 | exynos_pdma1_pdata.nr_valid_peri = |
206 | ARRAY_SIZE(exynos4210_pdma1_peri); | 276 | ARRAY_SIZE(exynos4210_pdma1_peri); |
207 | exynos4_pdma1_pdata.peri_id = exynos4210_pdma1_peri; | 277 | exynos_pdma1_pdata.peri_id = exynos4210_pdma1_peri; |
208 | } else if (soc_is_exynos4212() || soc_is_exynos4412()) { | 278 | } else if (soc_is_exynos4212() || soc_is_exynos4412()) { |
209 | exynos4_pdma0_pdata.nr_valid_peri = | 279 | exynos_pdma0_pdata.nr_valid_peri = |
210 | ARRAY_SIZE(exynos4212_pdma0_peri); | 280 | ARRAY_SIZE(exynos4212_pdma0_peri); |
211 | exynos4_pdma0_pdata.peri_id = exynos4212_pdma0_peri; | 281 | exynos_pdma0_pdata.peri_id = exynos4212_pdma0_peri; |
212 | exynos4_pdma1_pdata.nr_valid_peri = | 282 | exynos_pdma1_pdata.nr_valid_peri = |
213 | ARRAY_SIZE(exynos4212_pdma1_peri); | 283 | ARRAY_SIZE(exynos4212_pdma1_peri); |
214 | exynos4_pdma1_pdata.peri_id = exynos4212_pdma1_peri; | 284 | exynos_pdma1_pdata.peri_id = exynos4212_pdma1_peri; |
285 | } else if (soc_is_exynos5250()) { | ||
286 | exynos_pdma0_pdata.nr_valid_peri = | ||
287 | ARRAY_SIZE(exynos5250_pdma0_peri); | ||
288 | exynos_pdma0_pdata.peri_id = exynos5250_pdma0_peri; | ||
289 | exynos_pdma1_pdata.nr_valid_peri = | ||
290 | ARRAY_SIZE(exynos5250_pdma1_peri); | ||
291 | exynos_pdma1_pdata.peri_id = exynos5250_pdma1_peri; | ||
292 | |||
293 | exynos_pdma0_device.res.start = EXYNOS5_PA_PDMA0; | ||
294 | exynos_pdma0_device.res.end = EXYNOS5_PA_PDMA0 + SZ_4K; | ||
295 | exynos_pdma0_device.irq[0] = EXYNOS5_IRQ_PDMA0; | ||
296 | exynos_pdma1_device.res.start = EXYNOS5_PA_PDMA1; | ||
297 | exynos_pdma1_device.res.end = EXYNOS5_PA_PDMA1 + SZ_4K; | ||
298 | exynos_pdma0_device.irq[0] = EXYNOS5_IRQ_PDMA1; | ||
299 | exynos_mdma1_device.res.start = EXYNOS5_PA_MDMA1; | ||
300 | exynos_mdma1_device.res.end = EXYNOS5_PA_MDMA1 + SZ_4K; | ||
301 | exynos_pdma0_device.irq[0] = EXYNOS5_IRQ_MDMA1; | ||
215 | } | 302 | } |
216 | 303 | ||
217 | dma_cap_set(DMA_SLAVE, exynos4_pdma0_pdata.cap_mask); | 304 | dma_cap_set(DMA_SLAVE, exynos_pdma0_pdata.cap_mask); |
218 | dma_cap_set(DMA_CYCLIC, exynos4_pdma0_pdata.cap_mask); | 305 | dma_cap_set(DMA_CYCLIC, exynos_pdma0_pdata.cap_mask); |
219 | amba_device_register(&exynos4_pdma0_device, &iomem_resource); | 306 | amba_device_register(&exynos_pdma0_device, &iomem_resource); |
220 | 307 | ||
221 | dma_cap_set(DMA_SLAVE, exynos4_pdma1_pdata.cap_mask); | 308 | dma_cap_set(DMA_SLAVE, exynos_pdma1_pdata.cap_mask); |
222 | dma_cap_set(DMA_CYCLIC, exynos4_pdma1_pdata.cap_mask); | 309 | dma_cap_set(DMA_CYCLIC, exynos_pdma1_pdata.cap_mask); |
223 | amba_device_register(&exynos4_pdma1_device, &iomem_resource); | 310 | amba_device_register(&exynos_pdma1_device, &iomem_resource); |
224 | 311 | ||
225 | dma_cap_set(DMA_MEMCPY, exynos4_mdma1_pdata.cap_mask); | 312 | dma_cap_set(DMA_MEMCPY, exynos_mdma1_pdata.cap_mask); |
226 | amba_device_register(&exynos4_mdma1_device, &iomem_resource); | 313 | amba_device_register(&exynos_mdma1_device, &iomem_resource); |
227 | 314 | ||
228 | return 0; | 315 | return 0; |
229 | } | 316 | } |
230 | arch_initcall(exynos4_dma_init); | 317 | arch_initcall(exynos_dma_init); |
diff --git a/arch/arm/mach-exynos/include/mach/gpio.h b/arch/arm/mach-exynos/include/mach/gpio.h index d7498afe036a..eb24f1eb8e3b 100644 --- a/arch/arm/mach-exynos/include/mach/gpio.h +++ b/arch/arm/mach-exynos/include/mach/gpio.h | |||
@@ -153,10 +153,11 @@ enum exynos4_gpio_number { | |||
153 | #define EXYNOS5_GPIO_B2_NR (4) | 153 | #define EXYNOS5_GPIO_B2_NR (4) |
154 | #define EXYNOS5_GPIO_B3_NR (4) | 154 | #define EXYNOS5_GPIO_B3_NR (4) |
155 | #define EXYNOS5_GPIO_C0_NR (7) | 155 | #define EXYNOS5_GPIO_C0_NR (7) |
156 | #define EXYNOS5_GPIO_C1_NR (7) | 156 | #define EXYNOS5_GPIO_C1_NR (4) |
157 | #define EXYNOS5_GPIO_C2_NR (7) | 157 | #define EXYNOS5_GPIO_C2_NR (7) |
158 | #define EXYNOS5_GPIO_C3_NR (7) | 158 | #define EXYNOS5_GPIO_C3_NR (7) |
159 | #define EXYNOS5_GPIO_D0_NR (8) | 159 | #define EXYNOS5_GPIO_C4_NR (7) |
160 | #define EXYNOS5_GPIO_D0_NR (4) | ||
160 | #define EXYNOS5_GPIO_D1_NR (8) | 161 | #define EXYNOS5_GPIO_D1_NR (8) |
161 | #define EXYNOS5_GPIO_Y0_NR (6) | 162 | #define EXYNOS5_GPIO_Y0_NR (6) |
162 | #define EXYNOS5_GPIO_Y1_NR (4) | 163 | #define EXYNOS5_GPIO_Y1_NR (4) |
@@ -199,7 +200,8 @@ enum exynos5_gpio_number { | |||
199 | EXYNOS5_GPIO_C1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_C0), | 200 | EXYNOS5_GPIO_C1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_C0), |
200 | EXYNOS5_GPIO_C2_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_C1), | 201 | EXYNOS5_GPIO_C2_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_C1), |
201 | EXYNOS5_GPIO_C3_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_C2), | 202 | EXYNOS5_GPIO_C3_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_C2), |
202 | EXYNOS5_GPIO_D0_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_C3), | 203 | EXYNOS5_GPIO_C4_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_C3), |
204 | EXYNOS5_GPIO_D0_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_C4), | ||
203 | EXYNOS5_GPIO_D1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_D0), | 205 | EXYNOS5_GPIO_D1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_D0), |
204 | EXYNOS5_GPIO_Y0_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_D1), | 206 | EXYNOS5_GPIO_Y0_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_D1), |
205 | EXYNOS5_GPIO_Y1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_Y0), | 207 | EXYNOS5_GPIO_Y1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_Y0), |
@@ -242,6 +244,7 @@ enum exynos5_gpio_number { | |||
242 | #define EXYNOS5_GPC1(_nr) (EXYNOS5_GPIO_C1_START + (_nr)) | 244 | #define EXYNOS5_GPC1(_nr) (EXYNOS5_GPIO_C1_START + (_nr)) |
243 | #define EXYNOS5_GPC2(_nr) (EXYNOS5_GPIO_C2_START + (_nr)) | 245 | #define EXYNOS5_GPC2(_nr) (EXYNOS5_GPIO_C2_START + (_nr)) |
244 | #define EXYNOS5_GPC3(_nr) (EXYNOS5_GPIO_C3_START + (_nr)) | 246 | #define EXYNOS5_GPC3(_nr) (EXYNOS5_GPIO_C3_START + (_nr)) |
247 | #define EXYNOS5_GPC4(_nr) (EXYNOS5_GPIO_C4_START + (_nr)) | ||
245 | #define EXYNOS5_GPD0(_nr) (EXYNOS5_GPIO_D0_START + (_nr)) | 248 | #define EXYNOS5_GPD0(_nr) (EXYNOS5_GPIO_D0_START + (_nr)) |
246 | #define EXYNOS5_GPD1(_nr) (EXYNOS5_GPIO_D1_START + (_nr)) | 249 | #define EXYNOS5_GPD1(_nr) (EXYNOS5_GPIO_D1_START + (_nr)) |
247 | #define EXYNOS5_GPY0(_nr) (EXYNOS5_GPIO_Y0_START + (_nr)) | 250 | #define EXYNOS5_GPY0(_nr) (EXYNOS5_GPIO_Y0_START + (_nr)) |
diff --git a/arch/arm/mach-exynos/include/mach/irqs.h b/arch/arm/mach-exynos/include/mach/irqs.h index ddde8f3a24d4..7a4b4789eb72 100644 --- a/arch/arm/mach-exynos/include/mach/irqs.h +++ b/arch/arm/mach-exynos/include/mach/irqs.h | |||
@@ -287,6 +287,7 @@ | |||
287 | #define EXYNOS5_IRQ_MIPICSI1 IRQ_SPI(80) | 287 | #define EXYNOS5_IRQ_MIPICSI1 IRQ_SPI(80) |
288 | #define EXYNOS5_IRQ_EFNFCON_DMA_ABORT IRQ_SPI(81) | 288 | #define EXYNOS5_IRQ_EFNFCON_DMA_ABORT IRQ_SPI(81) |
289 | #define EXYNOS5_IRQ_MIPIDSI0 IRQ_SPI(82) | 289 | #define EXYNOS5_IRQ_MIPIDSI0 IRQ_SPI(82) |
290 | #define EXYNOS5_IRQ_WDT_IOP IRQ_SPI(83) | ||
290 | #define EXYNOS5_IRQ_ROTATOR IRQ_SPI(84) | 291 | #define EXYNOS5_IRQ_ROTATOR IRQ_SPI(84) |
291 | #define EXYNOS5_IRQ_GSC0 IRQ_SPI(85) | 292 | #define EXYNOS5_IRQ_GSC0 IRQ_SPI(85) |
292 | #define EXYNOS5_IRQ_GSC1 IRQ_SPI(86) | 293 | #define EXYNOS5_IRQ_GSC1 IRQ_SPI(86) |
@@ -295,8 +296,8 @@ | |||
295 | #define EXYNOS5_IRQ_JPEG IRQ_SPI(89) | 296 | #define EXYNOS5_IRQ_JPEG IRQ_SPI(89) |
296 | #define EXYNOS5_IRQ_EFNFCON_DMA IRQ_SPI(90) | 297 | #define EXYNOS5_IRQ_EFNFCON_DMA IRQ_SPI(90) |
297 | #define EXYNOS5_IRQ_2D IRQ_SPI(91) | 298 | #define EXYNOS5_IRQ_2D IRQ_SPI(91) |
298 | #define EXYNOS5_IRQ_SFMC0 IRQ_SPI(92) | 299 | #define EXYNOS5_IRQ_EFNFCON_0 IRQ_SPI(92) |
299 | #define EXYNOS5_IRQ_SFMC1 IRQ_SPI(93) | 300 | #define EXYNOS5_IRQ_EFNFCON_1 IRQ_SPI(93) |
300 | #define EXYNOS5_IRQ_MIXER IRQ_SPI(94) | 301 | #define EXYNOS5_IRQ_MIXER IRQ_SPI(94) |
301 | #define EXYNOS5_IRQ_HDMI IRQ_SPI(95) | 302 | #define EXYNOS5_IRQ_HDMI IRQ_SPI(95) |
302 | #define EXYNOS5_IRQ_MFC IRQ_SPI(96) | 303 | #define EXYNOS5_IRQ_MFC IRQ_SPI(96) |
@@ -310,7 +311,7 @@ | |||
310 | #define EXYNOS5_IRQ_PCM2 IRQ_SPI(104) | 311 | #define EXYNOS5_IRQ_PCM2 IRQ_SPI(104) |
311 | #define EXYNOS5_IRQ_SPDIF IRQ_SPI(105) | 312 | #define EXYNOS5_IRQ_SPDIF IRQ_SPI(105) |
312 | #define EXYNOS5_IRQ_ADC0 IRQ_SPI(106) | 313 | #define EXYNOS5_IRQ_ADC0 IRQ_SPI(106) |
313 | 314 | #define EXYNOS5_IRQ_ADC1 IRQ_SPI(107) | |
314 | #define EXYNOS5_IRQ_SATA_PHY IRQ_SPI(108) | 315 | #define EXYNOS5_IRQ_SATA_PHY IRQ_SPI(108) |
315 | #define EXYNOS5_IRQ_SATA_PMEMREQ IRQ_SPI(109) | 316 | #define EXYNOS5_IRQ_SATA_PMEMREQ IRQ_SPI(109) |
316 | #define EXYNOS5_IRQ_CAM_C IRQ_SPI(110) | 317 | #define EXYNOS5_IRQ_CAM_C IRQ_SPI(110) |
@@ -319,8 +320,9 @@ | |||
319 | #define EXYNOS5_IRQ_DP1_INTP1 IRQ_SPI(113) | 320 | #define EXYNOS5_IRQ_DP1_INTP1 IRQ_SPI(113) |
320 | #define EXYNOS5_IRQ_CEC IRQ_SPI(114) | 321 | #define EXYNOS5_IRQ_CEC IRQ_SPI(114) |
321 | #define EXYNOS5_IRQ_SATA IRQ_SPI(115) | 322 | #define EXYNOS5_IRQ_SATA IRQ_SPI(115) |
322 | #define EXYNOS5_IRQ_NFCON IRQ_SPI(116) | ||
323 | 323 | ||
324 | #define EXYNOS5_IRQ_MCT_L0 IRQ_SPI(120) | ||
325 | #define EXYNOS5_IRQ_MCT_L1 IRQ_SPI(121) | ||
324 | #define EXYNOS5_IRQ_MMC44 IRQ_SPI(123) | 326 | #define EXYNOS5_IRQ_MMC44 IRQ_SPI(123) |
325 | #define EXYNOS5_IRQ_MDMA1 IRQ_SPI(124) | 327 | #define EXYNOS5_IRQ_MDMA1 IRQ_SPI(124) |
326 | #define EXYNOS5_IRQ_FIMC_LITE0 IRQ_SPI(125) | 328 | #define EXYNOS5_IRQ_FIMC_LITE0 IRQ_SPI(125) |
@@ -328,7 +330,6 @@ | |||
328 | #define EXYNOS5_IRQ_RP_TIMER IRQ_SPI(127) | 330 | #define EXYNOS5_IRQ_RP_TIMER IRQ_SPI(127) |
329 | 331 | ||
330 | #define EXYNOS5_IRQ_PMU COMBINER_IRQ(1, 2) | 332 | #define EXYNOS5_IRQ_PMU COMBINER_IRQ(1, 2) |
331 | #define EXYNOS5_IRQ_PMU_CPU1 COMBINER_IRQ(1, 6) | ||
332 | 333 | ||
333 | #define EXYNOS5_IRQ_SYSMMU_GSC0_0 COMBINER_IRQ(2, 0) | 334 | #define EXYNOS5_IRQ_SYSMMU_GSC0_0 COMBINER_IRQ(2, 0) |
334 | #define EXYNOS5_IRQ_SYSMMU_GSC0_1 COMBINER_IRQ(2, 1) | 335 | #define EXYNOS5_IRQ_SYSMMU_GSC0_1 COMBINER_IRQ(2, 1) |
@@ -339,6 +340,8 @@ | |||
339 | #define EXYNOS5_IRQ_SYSMMU_GSC3_0 COMBINER_IRQ(2, 6) | 340 | #define EXYNOS5_IRQ_SYSMMU_GSC3_0 COMBINER_IRQ(2, 6) |
340 | #define EXYNOS5_IRQ_SYSMMU_GSC3_1 COMBINER_IRQ(2, 7) | 341 | #define EXYNOS5_IRQ_SYSMMU_GSC3_1 COMBINER_IRQ(2, 7) |
341 | 342 | ||
343 | #define EXYNOS5_IRQ_SYSMMU_LITE2_0 COMBINER_IRQ(3, 0) | ||
344 | #define EXYNOS5_IRQ_SYSMMU_LITE2_1 COMBINER_IRQ(3, 1) | ||
342 | #define EXYNOS5_IRQ_SYSMMU_FIMD1_0 COMBINER_IRQ(3, 2) | 345 | #define EXYNOS5_IRQ_SYSMMU_FIMD1_0 COMBINER_IRQ(3, 2) |
343 | #define EXYNOS5_IRQ_SYSMMU_FIMD1_1 COMBINER_IRQ(3, 3) | 346 | #define EXYNOS5_IRQ_SYSMMU_FIMD1_1 COMBINER_IRQ(3, 3) |
344 | #define EXYNOS5_IRQ_SYSMMU_LITE0_0 COMBINER_IRQ(3, 4) | 347 | #define EXYNOS5_IRQ_SYSMMU_LITE0_0 COMBINER_IRQ(3, 4) |
@@ -362,8 +365,8 @@ | |||
362 | 365 | ||
363 | #define EXYNOS5_IRQ_SYSMMU_ARM_0 COMBINER_IRQ(6, 0) | 366 | #define EXYNOS5_IRQ_SYSMMU_ARM_0 COMBINER_IRQ(6, 0) |
364 | #define EXYNOS5_IRQ_SYSMMU_ARM_1 COMBINER_IRQ(6, 1) | 367 | #define EXYNOS5_IRQ_SYSMMU_ARM_1 COMBINER_IRQ(6, 1) |
365 | #define EXYNOS5_IRQ_SYSMMU_MFC_L_0 COMBINER_IRQ(6, 2) | 368 | #define EXYNOS5_IRQ_SYSMMU_MFC_R_0 COMBINER_IRQ(6, 2) |
366 | #define EXYNOS5_IRQ_SYSMMU_MFC_L_1 COMBINER_IRQ(6, 3) | 369 | #define EXYNOS5_IRQ_SYSMMU_MFC_R_1 COMBINER_IRQ(6, 3) |
367 | #define EXYNOS5_IRQ_SYSMMU_RTIC_0 COMBINER_IRQ(6, 4) | 370 | #define EXYNOS5_IRQ_SYSMMU_RTIC_0 COMBINER_IRQ(6, 4) |
368 | #define EXYNOS5_IRQ_SYSMMU_RTIC_1 COMBINER_IRQ(6, 5) | 371 | #define EXYNOS5_IRQ_SYSMMU_RTIC_1 COMBINER_IRQ(6, 5) |
369 | #define EXYNOS5_IRQ_SYSMMU_SSS_0 COMBINER_IRQ(6, 6) | 372 | #define EXYNOS5_IRQ_SYSMMU_SSS_0 COMBINER_IRQ(6, 6) |
@@ -375,11 +378,9 @@ | |||
375 | #define EXYNOS5_IRQ_SYSMMU_MDMA1_1 COMBINER_IRQ(7, 3) | 378 | #define EXYNOS5_IRQ_SYSMMU_MDMA1_1 COMBINER_IRQ(7, 3) |
376 | #define EXYNOS5_IRQ_SYSMMU_TV_0 COMBINER_IRQ(7, 4) | 379 | #define EXYNOS5_IRQ_SYSMMU_TV_0 COMBINER_IRQ(7, 4) |
377 | #define EXYNOS5_IRQ_SYSMMU_TV_1 COMBINER_IRQ(7, 5) | 380 | #define EXYNOS5_IRQ_SYSMMU_TV_1 COMBINER_IRQ(7, 5) |
378 | #define EXYNOS5_IRQ_SYSMMU_GPSX_0 COMBINER_IRQ(7, 6) | ||
379 | #define EXYNOS5_IRQ_SYSMMU_GPSX_1 COMBINER_IRQ(7, 7) | ||
380 | 381 | ||
381 | #define EXYNOS5_IRQ_SYSMMU_MFC_R_0 COMBINER_IRQ(8, 5) | 382 | #define EXYNOS5_IRQ_SYSMMU_MFC_L_0 COMBINER_IRQ(8, 5) |
382 | #define EXYNOS5_IRQ_SYSMMU_MFC_R_1 COMBINER_IRQ(8, 6) | 383 | #define EXYNOS5_IRQ_SYSMMU_MFC_L_1 COMBINER_IRQ(8, 6) |
383 | 384 | ||
384 | #define EXYNOS5_IRQ_SYSMMU_DIS1_0 COMBINER_IRQ(9, 4) | 385 | #define EXYNOS5_IRQ_SYSMMU_DIS1_0 COMBINER_IRQ(9, 4) |
385 | #define EXYNOS5_IRQ_SYSMMU_DIS1_1 COMBINER_IRQ(9, 5) | 386 | #define EXYNOS5_IRQ_SYSMMU_DIS1_1 COMBINER_IRQ(9, 5) |
@@ -395,17 +396,24 @@ | |||
395 | #define EXYNOS5_IRQ_SYSMMU_DRC_0 COMBINER_IRQ(11, 6) | 396 | #define EXYNOS5_IRQ_SYSMMU_DRC_0 COMBINER_IRQ(11, 6) |
396 | #define EXYNOS5_IRQ_SYSMMU_DRC_1 COMBINER_IRQ(11, 7) | 397 | #define EXYNOS5_IRQ_SYSMMU_DRC_1 COMBINER_IRQ(11, 7) |
397 | 398 | ||
399 | #define EXYNOS5_IRQ_MDMA1_ABORT COMBINER_IRQ(13, 1) | ||
400 | |||
401 | #define EXYNOS5_IRQ_MDMA0_ABORT COMBINER_IRQ(15, 3) | ||
402 | |||
398 | #define EXYNOS5_IRQ_FIMD1_FIFO COMBINER_IRQ(18, 4) | 403 | #define EXYNOS5_IRQ_FIMD1_FIFO COMBINER_IRQ(18, 4) |
399 | #define EXYNOS5_IRQ_FIMD1_VSYNC COMBINER_IRQ(18, 5) | 404 | #define EXYNOS5_IRQ_FIMD1_VSYNC COMBINER_IRQ(18, 5) |
400 | #define EXYNOS5_IRQ_FIMD1_SYSTEM COMBINER_IRQ(18, 6) | 405 | #define EXYNOS5_IRQ_FIMD1_SYSTEM COMBINER_IRQ(18, 6) |
401 | 406 | ||
407 | #define EXYNOS5_IRQ_ARMIOP_GIC COMBINER_IRQ(19, 0) | ||
408 | #define EXYNOS5_IRQ_ARMISP_GIC COMBINER_IRQ(19, 1) | ||
409 | #define EXYNOS5_IRQ_IOP_GIC COMBINER_IRQ(19, 3) | ||
410 | #define EXYNOS5_IRQ_ISP_GIC COMBINER_IRQ(19, 4) | ||
411 | |||
412 | #define EXYNOS5_IRQ_PMU_CPU1 COMBINER_IRQ(22, 4) | ||
413 | |||
402 | #define EXYNOS5_IRQ_EINT0 COMBINER_IRQ(23, 0) | 414 | #define EXYNOS5_IRQ_EINT0 COMBINER_IRQ(23, 0) |
403 | #define EXYNOS5_IRQ_MCT_L0 COMBINER_IRQ(23, 1) | ||
404 | #define EXYNOS5_IRQ_MCT_L1 COMBINER_IRQ(23, 2) | ||
405 | #define EXYNOS5_IRQ_MCT_G0 COMBINER_IRQ(23, 3) | 415 | #define EXYNOS5_IRQ_MCT_G0 COMBINER_IRQ(23, 3) |
406 | #define EXYNOS5_IRQ_MCT_G1 COMBINER_IRQ(23, 4) | 416 | #define EXYNOS5_IRQ_MCT_G1 COMBINER_IRQ(23, 4) |
407 | #define EXYNOS5_IRQ_MCT_G2 COMBINER_IRQ(23, 5) | ||
408 | #define EXYNOS5_IRQ_MCT_G3 COMBINER_IRQ(23, 6) | ||
409 | 417 | ||
410 | #define EXYNOS5_IRQ_EINT1 COMBINER_IRQ(24, 0) | 418 | #define EXYNOS5_IRQ_EINT1 COMBINER_IRQ(24, 0) |
411 | #define EXYNOS5_IRQ_SYSMMU_LITE1_0 COMBINER_IRQ(24, 1) | 419 | #define EXYNOS5_IRQ_SYSMMU_LITE1_0 COMBINER_IRQ(24, 1) |
@@ -436,7 +444,7 @@ | |||
436 | 444 | ||
437 | #define EXYNOS5_MAX_COMBINER_NR 32 | 445 | #define EXYNOS5_MAX_COMBINER_NR 32 |
438 | 446 | ||
439 | #define EXYNOS5_IRQ_GPIO1_NR_GROUPS 13 | 447 | #define EXYNOS5_IRQ_GPIO1_NR_GROUPS 14 |
440 | #define EXYNOS5_IRQ_GPIO2_NR_GROUPS 9 | 448 | #define EXYNOS5_IRQ_GPIO2_NR_GROUPS 9 |
441 | #define EXYNOS5_IRQ_GPIO3_NR_GROUPS 5 | 449 | #define EXYNOS5_IRQ_GPIO3_NR_GROUPS 5 |
442 | #define EXYNOS5_IRQ_GPIO4_NR_GROUPS 1 | 450 | #define EXYNOS5_IRQ_GPIO4_NR_GROUPS 1 |
diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index 2196af2d8218..ca4aa89aa46b 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h | |||
@@ -34,6 +34,9 @@ | |||
34 | 34 | ||
35 | #define EXYNOS4_PA_JPEG 0x11840000 | 35 | #define EXYNOS4_PA_JPEG 0x11840000 |
36 | 36 | ||
37 | /* x = 0...1 */ | ||
38 | #define EXYNOS4_PA_FIMC_LITE(x) (0x12390000 + ((x) * 0x10000)) | ||
39 | |||
37 | #define EXYNOS4_PA_G2D 0x12800000 | 40 | #define EXYNOS4_PA_G2D 0x12800000 |
38 | 41 | ||
39 | #define EXYNOS4_PA_I2S0 0x03830000 | 42 | #define EXYNOS4_PA_I2S0 0x03830000 |
@@ -78,8 +81,8 @@ | |||
78 | 81 | ||
79 | #define EXYNOS4_PA_GIC_CPU 0x10480000 | 82 | #define EXYNOS4_PA_GIC_CPU 0x10480000 |
80 | #define EXYNOS4_PA_GIC_DIST 0x10490000 | 83 | #define EXYNOS4_PA_GIC_DIST 0x10490000 |
81 | #define EXYNOS5_PA_GIC_CPU 0x10480000 | 84 | #define EXYNOS5_PA_GIC_CPU 0x10482000 |
82 | #define EXYNOS5_PA_GIC_DIST 0x10490000 | 85 | #define EXYNOS5_PA_GIC_DIST 0x10481000 |
83 | 86 | ||
84 | #define EXYNOS4_PA_COREPERI 0x10500000 | 87 | #define EXYNOS4_PA_COREPERI 0x10500000 |
85 | #define EXYNOS4_PA_TWD 0x10500600 | 88 | #define EXYNOS4_PA_TWD 0x10500600 |
diff --git a/arch/arm/mach-exynos/include/mach/regs-clock.h b/arch/arm/mach-exynos/include/mach/regs-clock.h index dba83e91f0fd..b78b5f3ad9c0 100644 --- a/arch/arm/mach-exynos/include/mach/regs-clock.h +++ b/arch/arm/mach-exynos/include/mach/regs-clock.h | |||
@@ -322,6 +322,8 @@ | |||
322 | #define EXYNOS5_CLKSRC_CDREX EXYNOS_CLKREG(0x20200) | 322 | #define EXYNOS5_CLKSRC_CDREX EXYNOS_CLKREG(0x20200) |
323 | #define EXYNOS5_CLKDIV_CDREX EXYNOS_CLKREG(0x20500) | 323 | #define EXYNOS5_CLKDIV_CDREX EXYNOS_CLKREG(0x20500) |
324 | 324 | ||
325 | #define EXYNOS5_PLL_DIV2_SEL EXYNOS_CLKREG(0x20A24) | ||
326 | |||
325 | #define EXYNOS5_EPLL_LOCK EXYNOS_CLKREG(0x10030) | 327 | #define EXYNOS5_EPLL_LOCK EXYNOS_CLKREG(0x10030) |
326 | 328 | ||
327 | #define EXYNOS5_EPLLCON0_LOCKED_SHIFT (29) | 329 | #define EXYNOS5_EPLLCON0_LOCKED_SHIFT (29) |
diff --git a/arch/arm/mach-exynos/include/mach/regs-pmu.h b/arch/arm/mach-exynos/include/mach/regs-pmu.h index d457d052a420..4dbb8629b200 100644 --- a/arch/arm/mach-exynos/include/mach/regs-pmu.h +++ b/arch/arm/mach-exynos/include/mach/regs-pmu.h | |||
@@ -180,7 +180,7 @@ | |||
180 | 180 | ||
181 | #define S5P_PMU_LCD1_CONF S5P_PMUREG(0x3CA0) | 181 | #define S5P_PMU_LCD1_CONF S5P_PMUREG(0x3CA0) |
182 | 182 | ||
183 | /* Only for EXYNOS4212 */ | 183 | /* Only for EXYNOS4x12 */ |
184 | #define S5P_ISP_ARM_LOWPWR S5P_PMUREG(0x1050) | 184 | #define S5P_ISP_ARM_LOWPWR S5P_PMUREG(0x1050) |
185 | #define S5P_DIS_IRQ_ISP_ARM_LOCAL_LOWPWR S5P_PMUREG(0x1054) | 185 | #define S5P_DIS_IRQ_ISP_ARM_LOCAL_LOWPWR S5P_PMUREG(0x1054) |
186 | #define S5P_DIS_IRQ_ISP_ARM_CENTRAL_LOWPWR S5P_PMUREG(0x1058) | 186 | #define S5P_DIS_IRQ_ISP_ARM_CENTRAL_LOWPWR S5P_PMUREG(0x1058) |
@@ -221,4 +221,12 @@ | |||
221 | #define S5P_SECSS_MEM_OPTION S5P_PMUREG(0x2EC8) | 221 | #define S5P_SECSS_MEM_OPTION S5P_PMUREG(0x2EC8) |
222 | #define S5P_ROTATOR_MEM_OPTION S5P_PMUREG(0x2F48) | 222 | #define S5P_ROTATOR_MEM_OPTION S5P_PMUREG(0x2F48) |
223 | 223 | ||
224 | /* Only for EXYNOS4412 */ | ||
225 | #define S5P_ARM_CORE2_LOWPWR S5P_PMUREG(0x1020) | ||
226 | #define S5P_DIS_IRQ_CORE2 S5P_PMUREG(0x1024) | ||
227 | #define S5P_DIS_IRQ_CENTRAL2 S5P_PMUREG(0x1028) | ||
228 | #define S5P_ARM_CORE3_LOWPWR S5P_PMUREG(0x1030) | ||
229 | #define S5P_DIS_IRQ_CORE3 S5P_PMUREG(0x1034) | ||
230 | #define S5P_DIS_IRQ_CENTRAL3 S5P_PMUREG(0x1038) | ||
231 | |||
224 | #endif /* __ASM_ARCH_REGS_PMU_H */ | 232 | #endif /* __ASM_ARCH_REGS_PMU_H */ |
diff --git a/arch/arm/mach-exynos/include/mach/spi-clocks.h b/arch/arm/mach-exynos/include/mach/spi-clocks.h index 576efdf6d091..c71a5fba6a84 100644 --- a/arch/arm/mach-exynos/include/mach/spi-clocks.h +++ b/arch/arm/mach-exynos/include/mach/spi-clocks.h | |||
@@ -11,6 +11,6 @@ | |||
11 | #define __ASM_ARCH_SPI_CLKS_H __FILE__ | 11 | #define __ASM_ARCH_SPI_CLKS_H __FILE__ |
12 | 12 | ||
13 | /* Must source from SCLK_SPI */ | 13 | /* Must source from SCLK_SPI */ |
14 | #define EXYNOS4_SPI_SRCCLK_SCLK 0 | 14 | #define EXYNOS_SPI_SRCCLK_SCLK 0 |
15 | 15 | ||
16 | #endif /* __ASM_ARCH_SPI_CLKS_H */ | 16 | #endif /* __ASM_ARCH_SPI_CLKS_H */ |
diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index 4711c8920e37..cf5d2228e998 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c | |||
@@ -43,6 +43,10 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = { | |||
43 | "exynos4210-uart.2", NULL), | 43 | "exynos4210-uart.2", NULL), |
44 | OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS5_PA_UART3, | 44 | OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS5_PA_UART3, |
45 | "exynos4210-uart.3", NULL), | 45 | "exynos4210-uart.3", NULL), |
46 | OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS5_PA_IIC(0), | ||
47 | "s3c2440-i2c.0", NULL), | ||
48 | OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS5_PA_IIC(1), | ||
49 | "s3c2440-i2c.1", NULL), | ||
46 | OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_PDMA0, "dma-pl330.0", NULL), | 50 | OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_PDMA0, "dma-pl330.0", NULL), |
47 | OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_PDMA1, "dma-pl330.1", NULL), | 51 | OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_PDMA1, "dma-pl330.1", NULL), |
48 | OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_MDMA1, "dma-pl330.2", NULL), | 52 | OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_MDMA1, "dma-pl330.2", NULL), |
diff --git a/arch/arm/mach-exynos/mct.c b/arch/arm/mach-exynos/mct.c index 897d9a9cf226..b601fb8a408b 100644 --- a/arch/arm/mach-exynos/mct.c +++ b/arch/arm/mach-exynos/mct.c | |||
@@ -388,6 +388,7 @@ static int __cpuinit exynos4_local_timer_setup(struct clock_event_device *evt) | |||
388 | { | 388 | { |
389 | struct mct_clock_event_device *mevt; | 389 | struct mct_clock_event_device *mevt; |
390 | unsigned int cpu = smp_processor_id(); | 390 | unsigned int cpu = smp_processor_id(); |
391 | int mct_lx_irq; | ||
391 | 392 | ||
392 | mevt = this_cpu_ptr(&percpu_mct_tick); | 393 | mevt = this_cpu_ptr(&percpu_mct_tick); |
393 | mevt->evt = evt; | 394 | mevt->evt = evt; |
@@ -414,14 +415,18 @@ static int __cpuinit exynos4_local_timer_setup(struct clock_event_device *evt) | |||
414 | 415 | ||
415 | if (mct_int_type == MCT_INT_SPI) { | 416 | if (mct_int_type == MCT_INT_SPI) { |
416 | if (cpu == 0) { | 417 | if (cpu == 0) { |
418 | mct_lx_irq = soc_is_exynos4210() ? EXYNOS4_IRQ_MCT_L0 : | ||
419 | EXYNOS5_IRQ_MCT_L0; | ||
417 | mct_tick0_event_irq.dev_id = mevt; | 420 | mct_tick0_event_irq.dev_id = mevt; |
418 | evt->irq = EXYNOS4_IRQ_MCT_L0; | 421 | evt->irq = mct_lx_irq; |
419 | setup_irq(EXYNOS4_IRQ_MCT_L0, &mct_tick0_event_irq); | 422 | setup_irq(mct_lx_irq, &mct_tick0_event_irq); |
420 | } else { | 423 | } else { |
424 | mct_lx_irq = soc_is_exynos4210() ? EXYNOS4_IRQ_MCT_L1 : | ||
425 | EXYNOS5_IRQ_MCT_L1; | ||
421 | mct_tick1_event_irq.dev_id = mevt; | 426 | mct_tick1_event_irq.dev_id = mevt; |
422 | evt->irq = EXYNOS4_IRQ_MCT_L1; | 427 | evt->irq = mct_lx_irq; |
423 | setup_irq(EXYNOS4_IRQ_MCT_L1, &mct_tick1_event_irq); | 428 | setup_irq(mct_lx_irq, &mct_tick1_event_irq); |
424 | irq_set_affinity(EXYNOS4_IRQ_MCT_L1, cpumask_of(1)); | 429 | irq_set_affinity(mct_lx_irq, cpumask_of(1)); |
425 | } | 430 | } |
426 | } else { | 431 | } else { |
427 | enable_percpu_irq(EXYNOS_IRQ_MCT_LOCALTIMER, 0); | 432 | enable_percpu_irq(EXYNOS_IRQ_MCT_LOCALTIMER, 0); |
@@ -473,7 +478,7 @@ static void __init exynos4_timer_resources(void) | |||
473 | 478 | ||
474 | static void __init exynos4_timer_init(void) | 479 | static void __init exynos4_timer_init(void) |
475 | { | 480 | { |
476 | if (soc_is_exynos4210()) | 481 | if ((soc_is_exynos4210()) || (soc_is_exynos5250())) |
477 | mct_int_type = MCT_INT_SPI; | 482 | mct_int_type = MCT_INT_SPI; |
478 | else | 483 | else |
479 | mct_int_type = MCT_INT_PPI; | 484 | mct_int_type = MCT_INT_PPI; |
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index 428cfeb57724..563dea9a6dbb 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c | |||
@@ -275,7 +275,7 @@ static void exynos4_restore_pll(void) | |||
275 | 275 | ||
276 | static struct subsys_interface exynos4_pm_interface = { | 276 | static struct subsys_interface exynos4_pm_interface = { |
277 | .name = "exynos4_pm", | 277 | .name = "exynos4_pm", |
278 | .subsys = &exynos4_subsys, | 278 | .subsys = &exynos_subsys, |
279 | .add_dev = exynos4_pm_add, | 279 | .add_dev = exynos4_pm_add, |
280 | }; | 280 | }; |
281 | 281 | ||
@@ -313,7 +313,7 @@ static int exynos4_pm_suspend(void) | |||
313 | tmp &= ~S5P_CENTRAL_LOWPWR_CFG; | 313 | tmp &= ~S5P_CENTRAL_LOWPWR_CFG; |
314 | __raw_writel(tmp, S5P_CENTRAL_SEQ_CONFIGURATION); | 314 | __raw_writel(tmp, S5P_CENTRAL_SEQ_CONFIGURATION); |
315 | 315 | ||
316 | if (soc_is_exynos4212()) { | 316 | if (soc_is_exynos4212() || soc_is_exynos4412()) { |
317 | tmp = __raw_readl(S5P_CENTRAL_SEQ_OPTION); | 317 | tmp = __raw_readl(S5P_CENTRAL_SEQ_OPTION); |
318 | tmp &= ~(S5P_USE_STANDBYWFI_ISP_ARM | | 318 | tmp &= ~(S5P_USE_STANDBYWFI_ISP_ARM | |
319 | S5P_USE_STANDBYWFE_ISP_ARM); | 319 | S5P_USE_STANDBYWFE_ISP_ARM); |
diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c index bba48f5c3e8f..77c6815eebee 100644 --- a/arch/arm/mach-exynos/pmu.c +++ b/arch/arm/mach-exynos/pmu.c | |||
@@ -94,7 +94,7 @@ static struct exynos4_pmu_conf exynos4210_pmu_config[] = { | |||
94 | { PMU_TABLE_END,}, | 94 | { PMU_TABLE_END,}, |
95 | }; | 95 | }; |
96 | 96 | ||
97 | static struct exynos4_pmu_conf exynos4212_pmu_config[] = { | 97 | static struct exynos4_pmu_conf exynos4x12_pmu_config[] = { |
98 | { S5P_ARM_CORE0_LOWPWR, { 0x0, 0x0, 0x2 } }, | 98 | { S5P_ARM_CORE0_LOWPWR, { 0x0, 0x0, 0x2 } }, |
99 | { S5P_DIS_IRQ_CORE0, { 0x0, 0x0, 0x0 } }, | 99 | { S5P_DIS_IRQ_CORE0, { 0x0, 0x0, 0x0 } }, |
100 | { S5P_DIS_IRQ_CENTRAL0, { 0x0, 0x0, 0x0 } }, | 100 | { S5P_DIS_IRQ_CENTRAL0, { 0x0, 0x0, 0x0 } }, |
@@ -202,6 +202,16 @@ static struct exynos4_pmu_conf exynos4212_pmu_config[] = { | |||
202 | { PMU_TABLE_END,}, | 202 | { PMU_TABLE_END,}, |
203 | }; | 203 | }; |
204 | 204 | ||
205 | static struct exynos4_pmu_conf exynos4412_pmu_config[] = { | ||
206 | { S5P_ARM_CORE2_LOWPWR, { 0x0, 0x0, 0x2 } }, | ||
207 | { S5P_DIS_IRQ_CORE2, { 0x0, 0x0, 0x0 } }, | ||
208 | { S5P_DIS_IRQ_CENTRAL2, { 0x0, 0x0, 0x0 } }, | ||
209 | { S5P_ARM_CORE3_LOWPWR, { 0x0, 0x0, 0x2 } }, | ||
210 | { S5P_DIS_IRQ_CORE3, { 0x0, 0x0, 0x0 } }, | ||
211 | { S5P_DIS_IRQ_CENTRAL3, { 0x0, 0x0, 0x0 } }, | ||
212 | { PMU_TABLE_END,}, | ||
213 | }; | ||
214 | |||
205 | void exynos4_sys_powerdown_conf(enum sys_powerdown mode) | 215 | void exynos4_sys_powerdown_conf(enum sys_powerdown mode) |
206 | { | 216 | { |
207 | unsigned int i; | 217 | unsigned int i; |
@@ -209,6 +219,12 @@ void exynos4_sys_powerdown_conf(enum sys_powerdown mode) | |||
209 | for (i = 0; (exynos4_pmu_config[i].reg != PMU_TABLE_END) ; i++) | 219 | for (i = 0; (exynos4_pmu_config[i].reg != PMU_TABLE_END) ; i++) |
210 | __raw_writel(exynos4_pmu_config[i].val[mode], | 220 | __raw_writel(exynos4_pmu_config[i].val[mode], |
211 | exynos4_pmu_config[i].reg); | 221 | exynos4_pmu_config[i].reg); |
222 | |||
223 | if (soc_is_exynos4412()) { | ||
224 | for (i = 0; exynos4412_pmu_config[i].reg != PMU_TABLE_END ; i++) | ||
225 | __raw_writel(exynos4412_pmu_config[i].val[mode], | ||
226 | exynos4412_pmu_config[i].reg); | ||
227 | } | ||
212 | } | 228 | } |
213 | 229 | ||
214 | static int __init exynos4_pmu_init(void) | 230 | static int __init exynos4_pmu_init(void) |
@@ -218,9 +234,9 @@ static int __init exynos4_pmu_init(void) | |||
218 | if (soc_is_exynos4210()) { | 234 | if (soc_is_exynos4210()) { |
219 | exynos4_pmu_config = exynos4210_pmu_config; | 235 | exynos4_pmu_config = exynos4210_pmu_config; |
220 | pr_info("EXYNOS4210 PMU Initialize\n"); | 236 | pr_info("EXYNOS4210 PMU Initialize\n"); |
221 | } else if (soc_is_exynos4212()) { | 237 | } else if (soc_is_exynos4212() || soc_is_exynos4412()) { |
222 | exynos4_pmu_config = exynos4212_pmu_config; | 238 | exynos4_pmu_config = exynos4x12_pmu_config; |
223 | pr_info("EXYNOS4212 PMU Initialize\n"); | 239 | pr_info("EXYNOS4x12 PMU Initialize\n"); |
224 | } else { | 240 | } else { |
225 | pr_info("EXYNOS4: PMU not supported\n"); | 241 | pr_info("EXYNOS4: PMU not supported\n"); |
226 | } | 242 | } |