aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-11-21 13:10:37 -0500
committerOlof Johansson <olof@lixom.net>2012-11-21 13:10:37 -0500
commit007108a2279123ad6639b6c653ad1a731febb60f (patch)
tree481e9c066e27d11c1aba12343362428f53b0b0d2
parent8f3c5ba7abaad7c0a7b5082f15c5983847f6e379 (diff)
parent2ee8e6f0e375c68d420c47ddab70485d8e587d95 (diff)
Merge branch 'next/cleanup-samsung-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/cleanup
From Kukjin Kim: * 'next/cleanup-samsung-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: ARM: SAMSUNG: use devm_ functions for ADC driver ARM: EXYNOS: no duplicate mask/unmask in eint0_15 ARM: S3C24XX: SPI clock channel setup is fixed for S3C2443 ARM: EXYNOS: Remove i2c0 resource information and setting of device names ARM: S3C64XX: Statically define parent clock of "camera" clock ARM: S3C64XX: Remove duplicated camera clock ARM: EXYNOS: Add missing static storage class specifiers in clock-exynos5.c ARM: EXYNOS: Make combiner_of_init function static ARM: EXYNOS: Make s3c_device_i2c0 always use id 0 ARM: EXYNOS: Remove wrongly placed usb2.0 PHY_CFG definition from PMU_REG ARM: EXYNOS: reorder inclusions of <linux/platform_data/xxx.h> ARM: EXYNOS: Remove unused static uart resource information ARM: EXYNOS: Remove static io-remapping for gic and combiner ARM: EXYNOS: Remove wrong I2S0 clock from peril clock ARM: EXYNOS: remove the MMC_CAP2_BROKEN_VOLTAGE
-rw-r--r--arch/arm/mach-exynos/clock-exynos4.c5
-rw-r--r--arch/arm/mach-exynos/clock-exynos5.c18
-rw-r--r--arch/arm/mach-exynos/common.c58
-rw-r--r--arch/arm/mach-exynos/dev-audio.c2
-rw-r--r--arch/arm/mach-exynos/dev-ohci.c2
-rw-r--r--arch/arm/mach-exynos/dev-uart.c24
-rw-r--r--arch/arm/mach-exynos/include/mach/irqs.h5
-rw-r--r--arch/arm/mach-exynos/include/mach/map.h1
-rw-r--r--arch/arm/mach-exynos/include/mach/regs-pmu.h2
-rw-r--r--arch/arm/mach-exynos/mach-nuri.c7
-rw-r--r--arch/arm/mach-exynos/mach-origen.c6
-rw-r--r--arch/arm/mach-exynos/mach-smdk4x12.c2
-rw-r--r--arch/arm/mach-exynos/mach-smdkv310.c6
-rw-r--r--arch/arm/mach-exynos/mach-universal_c210.c5
-rw-r--r--arch/arm/mach-s3c24xx/clock-s3c2443.c6
-rw-r--r--arch/arm/mach-s3c64xx/clock.c20
-rw-r--r--arch/arm/mach-s5pv210/mach-goni.c1
-rw-r--r--arch/arm/plat-samsung/adc.c48
-rw-r--r--arch/arm/plat-samsung/devs.c4
19 files changed, 45 insertions, 177 deletions
diff --git a/arch/arm/mach-exynos/clock-exynos4.c b/arch/arm/mach-exynos/clock-exynos4.c
index 6a45c9a9abe9..fa8a13405c94 100644
--- a/arch/arm/mach-exynos/clock-exynos4.c
+++ b/arch/arm/mach-exynos/clock-exynos4.c
@@ -613,11 +613,6 @@ static struct clk exynos4_init_clocks_off[] = {
613 .ctrlbit = (1 << 18), 613 .ctrlbit = (1 << 18),
614 }, { 614 }, {
615 .name = "iis", 615 .name = "iis",
616 .devname = "samsung-i2s.0",
617 .enable = exynos4_clk_ip_peril_ctrl,
618 .ctrlbit = (1 << 19),
619 }, {
620 .name = "iis",
621 .devname = "samsung-i2s.1", 616 .devname = "samsung-i2s.1",
622 .enable = exynos4_clk_ip_peril_ctrl, 617 .enable = exynos4_clk_ip_peril_ctrl,
623 .ctrlbit = (1 << 20), 618 .ctrlbit = (1 << 20),
diff --git a/arch/arm/mach-exynos/clock-exynos5.c b/arch/arm/mach-exynos/clock-exynos5.c
index c44ca1ee1b8d..4478757b9301 100644
--- a/arch/arm/mach-exynos/clock-exynos5.c
+++ b/arch/arm/mach-exynos/clock-exynos5.c
@@ -292,7 +292,7 @@ static struct clksrc_sources exynos5_clk_src_mpll = {
292 .nr_sources = ARRAY_SIZE(exynos5_clk_src_mpll_list), 292 .nr_sources = ARRAY_SIZE(exynos5_clk_src_mpll_list),
293}; 293};
294 294
295struct clksrc_clk exynos5_clk_mout_mpll = { 295static struct clksrc_clk exynos5_clk_mout_mpll = {
296 .clk = { 296 .clk = {
297 .name = "mout_mpll", 297 .name = "mout_mpll",
298 }, 298 },
@@ -467,12 +467,12 @@ static struct clksrc_clk exynos5_clk_pclk_acp = {
467 467
468/* Core list of CMU_TOP side */ 468/* Core list of CMU_TOP side */
469 469
470struct clk *exynos5_clkset_aclk_top_list[] = { 470static struct clk *exynos5_clkset_aclk_top_list[] = {
471 [0] = &exynos5_clk_mout_mpll_user.clk, 471 [0] = &exynos5_clk_mout_mpll_user.clk,
472 [1] = &exynos5_clk_mout_bpll_user.clk, 472 [1] = &exynos5_clk_mout_bpll_user.clk,
473}; 473};
474 474
475struct clksrc_sources exynos5_clkset_aclk = { 475static struct clksrc_sources exynos5_clkset_aclk = {
476 .sources = exynos5_clkset_aclk_top_list, 476 .sources = exynos5_clkset_aclk_top_list,
477 .nr_sources = ARRAY_SIZE(exynos5_clkset_aclk_top_list), 477 .nr_sources = ARRAY_SIZE(exynos5_clkset_aclk_top_list),
478}; 478};
@@ -486,12 +486,12 @@ static struct clksrc_clk exynos5_clk_aclk_400 = {
486 .reg_div = { .reg = EXYNOS5_CLKDIV_TOP0, .shift = 24, .size = 3 }, 486 .reg_div = { .reg = EXYNOS5_CLKDIV_TOP0, .shift = 24, .size = 3 },
487}; 487};
488 488
489struct clk *exynos5_clkset_aclk_333_166_list[] = { 489static struct clk *exynos5_clkset_aclk_333_166_list[] = {
490 [0] = &exynos5_clk_mout_cpll.clk, 490 [0] = &exynos5_clk_mout_cpll.clk,
491 [1] = &exynos5_clk_mout_mpll_user.clk, 491 [1] = &exynos5_clk_mout_mpll_user.clk,
492}; 492};
493 493
494struct clksrc_sources exynos5_clkset_aclk_333_166 = { 494static struct clksrc_sources exynos5_clkset_aclk_333_166 = {
495 .sources = exynos5_clkset_aclk_333_166_list, 495 .sources = exynos5_clkset_aclk_333_166_list,
496 .nr_sources = ARRAY_SIZE(exynos5_clkset_aclk_333_166_list), 496 .nr_sources = ARRAY_SIZE(exynos5_clkset_aclk_333_166_list),
497}; 497};
@@ -966,7 +966,7 @@ static struct clk exynos5_clk_fimd1 = {
966 .ctrlbit = (1 << 0), 966 .ctrlbit = (1 << 0),
967}; 967};
968 968
969struct clk *exynos5_clkset_group_list[] = { 969static struct clk *exynos5_clkset_group_list[] = {
970 [0] = &clk_ext_xtal_mux, 970 [0] = &clk_ext_xtal_mux,
971 [1] = NULL, 971 [1] = NULL,
972 [2] = &exynos5_clk_sclk_hdmi24m, 972 [2] = &exynos5_clk_sclk_hdmi24m,
@@ -979,7 +979,7 @@ struct clk *exynos5_clkset_group_list[] = {
979 [9] = &exynos5_clk_mout_cpll.clk, 979 [9] = &exynos5_clk_mout_cpll.clk,
980}; 980};
981 981
982struct clksrc_sources exynos5_clkset_group = { 982static struct clksrc_sources exynos5_clkset_group = {
983 .sources = exynos5_clkset_group_list, 983 .sources = exynos5_clkset_group_list,
984 .nr_sources = ARRAY_SIZE(exynos5_clkset_group_list), 984 .nr_sources = ARRAY_SIZE(exynos5_clkset_group_list),
985}; 985};
@@ -1195,7 +1195,7 @@ static struct clksrc_clk exynos5_clk_sclk_spi2 = {
1195 .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC2, .shift = 8, .size = 8 }, 1195 .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC2, .shift = 8, .size = 8 },
1196}; 1196};
1197 1197
1198struct clksrc_clk exynos5_clk_sclk_fimd1 = { 1198static struct clksrc_clk exynos5_clk_sclk_fimd1 = {
1199 .clk = { 1199 .clk = {
1200 .name = "sclk_fimd", 1200 .name = "sclk_fimd",
1201 .devname = "exynos5-fb.1", 1201 .devname = "exynos5-fb.1",
@@ -1476,7 +1476,7 @@ static void exynos5_clock_resume(void)
1476#define exynos5_clock_resume NULL 1476#define exynos5_clock_resume NULL
1477#endif 1477#endif
1478 1478
1479struct syscore_ops exynos5_clock_syscore_ops = { 1479static struct syscore_ops exynos5_clock_syscore_ops = {
1480 .suspend = exynos5_clock_suspend, 1480 .suspend = exynos5_clock_suspend,
1481 .resume = exynos5_clock_resume, 1481 .resume = exynos5_clock_resume,
1482}; 1482};
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index 1947be8e5f5b..0dbee7fef9bd 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -63,7 +63,7 @@ static void exynos4_map_io(void);
63static void exynos5_map_io(void); 63static void exynos5_map_io(void);
64static void exynos4_init_clocks(int xtal); 64static void exynos4_init_clocks(int xtal);
65static void exynos5_init_clocks(int xtal); 65static void exynos5_init_clocks(int xtal);
66static void exynos_init_uarts(struct s3c2410_uartcfg *cfg, int no); 66static void exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no);
67static int exynos_init(void); 67static int exynos_init(void);
68 68
69static struct cpu_table cpu_ids[] __initdata = { 69static struct cpu_table cpu_ids[] __initdata = {
@@ -72,7 +72,7 @@ static struct cpu_table cpu_ids[] __initdata = {
72 .idmask = EXYNOS4_CPU_MASK, 72 .idmask = EXYNOS4_CPU_MASK,
73 .map_io = exynos4_map_io, 73 .map_io = exynos4_map_io,
74 .init_clocks = exynos4_init_clocks, 74 .init_clocks = exynos4_init_clocks,
75 .init_uarts = exynos_init_uarts, 75 .init_uarts = exynos4_init_uarts,
76 .init = exynos_init, 76 .init = exynos_init,
77 .name = name_exynos4210, 77 .name = name_exynos4210,
78 }, { 78 }, {
@@ -80,7 +80,7 @@ static struct cpu_table cpu_ids[] __initdata = {
80 .idmask = EXYNOS4_CPU_MASK, 80 .idmask = EXYNOS4_CPU_MASK,
81 .map_io = exynos4_map_io, 81 .map_io = exynos4_map_io,
82 .init_clocks = exynos4_init_clocks, 82 .init_clocks = exynos4_init_clocks,
83 .init_uarts = exynos_init_uarts, 83 .init_uarts = exynos4_init_uarts,
84 .init = exynos_init, 84 .init = exynos_init,
85 .name = name_exynos4212, 85 .name = name_exynos4212,
86 }, { 86 }, {
@@ -88,7 +88,7 @@ static struct cpu_table cpu_ids[] __initdata = {
88 .idmask = EXYNOS4_CPU_MASK, 88 .idmask = EXYNOS4_CPU_MASK,
89 .map_io = exynos4_map_io, 89 .map_io = exynos4_map_io,
90 .init_clocks = exynos4_init_clocks, 90 .init_clocks = exynos4_init_clocks,
91 .init_uarts = exynos_init_uarts, 91 .init_uarts = exynos4_init_uarts,
92 .init = exynos_init, 92 .init = exynos_init,
93 .name = name_exynos4412, 93 .name = name_exynos4412,
94 }, { 94 }, {
@@ -96,7 +96,6 @@ static struct cpu_table cpu_ids[] __initdata = {
96 .idmask = EXYNOS5_SOC_MASK, 96 .idmask = EXYNOS5_SOC_MASK,
97 .map_io = exynos5_map_io, 97 .map_io = exynos5_map_io,
98 .init_clocks = exynos5_init_clocks, 98 .init_clocks = exynos5_init_clocks,
99 .init_uarts = exynos_init_uarts,
100 .init = exynos_init, 99 .init = exynos_init,
101 .name = name_exynos5250, 100 .name = name_exynos5250,
102 }, 101 },
@@ -257,25 +256,10 @@ static struct map_desc exynos5_iodesc[] __initdata = {
257 .length = SZ_64K, 256 .length = SZ_64K,
258 .type = MT_DEVICE, 257 .type = MT_DEVICE,
259 }, { 258 }, {
260 .virtual = (unsigned long)S5P_VA_COMBINER_BASE,
261 .pfn = __phys_to_pfn(EXYNOS5_PA_COMBINER),
262 .length = SZ_4K,
263 .type = MT_DEVICE,
264 }, {
265 .virtual = (unsigned long)S3C_VA_UART, 259 .virtual = (unsigned long)S3C_VA_UART,
266 .pfn = __phys_to_pfn(EXYNOS5_PA_UART), 260 .pfn = __phys_to_pfn(EXYNOS5_PA_UART),
267 .length = SZ_512K, 261 .length = SZ_512K,
268 .type = MT_DEVICE, 262 .type = MT_DEVICE,
269 }, {
270 .virtual = (unsigned long)S5P_VA_GIC_CPU,
271 .pfn = __phys_to_pfn(EXYNOS5_PA_GIC_CPU),
272 .length = SZ_8K,
273 .type = MT_DEVICE,
274 }, {
275 .virtual = (unsigned long)S5P_VA_GIC_DIST,
276 .pfn = __phys_to_pfn(EXYNOS5_PA_GIC_DIST),
277 .length = SZ_4K,
278 .type = MT_DEVICE,
279 }, 263 },
280}; 264};
281 265
@@ -354,23 +338,6 @@ static void __init exynos4_map_io(void)
354static void __init exynos5_map_io(void) 338static void __init exynos5_map_io(void)
355{ 339{
356 iotable_init(exynos5_iodesc, ARRAY_SIZE(exynos5_iodesc)); 340 iotable_init(exynos5_iodesc, ARRAY_SIZE(exynos5_iodesc));
357
358 s3c_device_i2c0.resource[0].start = EXYNOS5_PA_IIC(0);
359 s3c_device_i2c0.resource[0].end = EXYNOS5_PA_IIC(0) + SZ_4K - 1;
360 s3c_device_i2c0.resource[1].start = EXYNOS5_IRQ_IIC;
361 s3c_device_i2c0.resource[1].end = EXYNOS5_IRQ_IIC;
362
363 s3c_sdhci_setname(0, "exynos4-sdhci");
364 s3c_sdhci_setname(1, "exynos4-sdhci");
365 s3c_sdhci_setname(2, "exynos4-sdhci");
366 s3c_sdhci_setname(3, "exynos4-sdhci");
367
368 /* The I2C bus controllers are directly compatible with s3c2440 */
369 s3c_i2c0_setname("s3c2440-i2c");
370 s3c_i2c1_setname("s3c2440-i2c");
371 s3c_i2c2_setname("s3c2440-i2c");
372
373 s3c64xx_spi_setname("exynos4210-spi");
374} 341}
375 342
376static void __init exynos4_init_clocks(int xtal) 343static void __init exynos4_init_clocks(int xtal)
@@ -589,7 +556,8 @@ static void __init combiner_init(void __iomem *combiner_base,
589} 556}
590 557
591#ifdef CONFIG_OF 558#ifdef CONFIG_OF
592int __init combiner_of_init(struct device_node *np, struct device_node *parent) 559static int __init combiner_of_init(struct device_node *np,
560 struct device_node *parent)
593{ 561{
594 void __iomem *combiner_base; 562 void __iomem *combiner_base;
595 563
@@ -727,7 +695,7 @@ static int __init exynos_init(void)
727 695
728/* uart registration process */ 696/* uart registration process */
729 697
730static void __init exynos_init_uarts(struct s3c2410_uartcfg *cfg, int no) 698static void __init exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no)
731{ 699{
732 struct s3c2410_uartcfg *tcfg = cfg; 700 struct s3c2410_uartcfg *tcfg = cfg;
733 u32 ucnt; 701 u32 ucnt;
@@ -735,10 +703,7 @@ static void __init exynos_init_uarts(struct s3c2410_uartcfg *cfg, int no)
735 for (ucnt = 0; ucnt < no; ucnt++, tcfg++) 703 for (ucnt = 0; ucnt < no; ucnt++, tcfg++)
736 tcfg->has_fracval = 1; 704 tcfg->has_fracval = 1;
737 705
738 if (soc_is_exynos5250()) 706 s3c24xx_init_uartdevs("exynos4210-uart", exynos4_uart_resources, cfg, no);
739 s3c24xx_init_uartdevs("exynos4210-uart", exynos5_uart_resources, cfg, no);
740 else
741 s3c24xx_init_uartdevs("exynos4210-uart", exynos4_uart_resources, cfg, no);
742} 707}
743 708
744static void __iomem *exynos_eint_base; 709static void __iomem *exynos_eint_base;
@@ -970,14 +935,7 @@ static void exynos_irq_eint0_15(unsigned int irq, struct irq_desc *desc)
970 struct irq_chip *chip = irq_get_chip(irq); 935 struct irq_chip *chip = irq_get_chip(irq);
971 936
972 chained_irq_enter(chip, desc); 937 chained_irq_enter(chip, desc);
973 chip->irq_mask(&desc->irq_data);
974
975 if (chip->irq_ack)
976 chip->irq_ack(&desc->irq_data);
977
978 generic_handle_irq(*irq_data); 938 generic_handle_irq(*irq_data);
979
980 chip->irq_unmask(&desc->irq_data);
981 chained_irq_exit(chip, desc); 939 chained_irq_exit(chip, desc);
982} 940}
983 941
diff --git a/arch/arm/mach-exynos/dev-audio.c b/arch/arm/mach-exynos/dev-audio.c
index ae321c7cb15f..a1cb42c39590 100644
--- a/arch/arm/mach-exynos/dev-audio.c
+++ b/arch/arm/mach-exynos/dev-audio.c
@@ -14,9 +14,9 @@
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/dma-mapping.h> 15#include <linux/dma-mapping.h>
16#include <linux/gpio.h> 16#include <linux/gpio.h>
17#include <linux/platform_data/asoc-s3c.h>
17 18
18#include <plat/gpio-cfg.h> 19#include <plat/gpio-cfg.h>
19#include <linux/platform_data/asoc-s3c.h>
20 20
21#include <mach/map.h> 21#include <mach/map.h>
22#include <mach/dma.h> 22#include <mach/dma.h>
diff --git a/arch/arm/mach-exynos/dev-ohci.c b/arch/arm/mach-exynos/dev-ohci.c
index 14ed7951a2c6..4244d02dafbd 100644
--- a/arch/arm/mach-exynos/dev-ohci.c
+++ b/arch/arm/mach-exynos/dev-ohci.c
@@ -12,10 +12,10 @@
12 12
13#include <linux/dma-mapping.h> 13#include <linux/dma-mapping.h>
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/platform_data/usb-exynos.h>
15 16
16#include <mach/irqs.h> 17#include <mach/irqs.h>
17#include <mach/map.h> 18#include <mach/map.h>
18#include <linux/platform_data/usb-exynos.h>
19 19
20#include <plat/devs.h> 20#include <plat/devs.h>
21#include <plat/usb-phy.h> 21#include <plat/usb-phy.h>
diff --git a/arch/arm/mach-exynos/dev-uart.c b/arch/arm/mach-exynos/dev-uart.c
index 2e85c022fd16..7c42f4b7c8be 100644
--- a/arch/arm/mach-exynos/dev-uart.c
+++ b/arch/arm/mach-exynos/dev-uart.c
@@ -52,27 +52,3 @@ struct s3c24xx_uart_resources exynos4_uart_resources[] __initdata = {
52 .nr_resources = ARRAY_SIZE(exynos4_uart3_resource), 52 .nr_resources = ARRAY_SIZE(exynos4_uart3_resource),
53 }, 53 },
54}; 54};
55
56EXYNOS_UART_RESOURCE(5, 0)
57EXYNOS_UART_RESOURCE(5, 1)
58EXYNOS_UART_RESOURCE(5, 2)
59EXYNOS_UART_RESOURCE(5, 3)
60
61struct s3c24xx_uart_resources exynos5_uart_resources[] __initdata = {
62 [0] = {
63 .resources = exynos5_uart0_resource,
64 .nr_resources = ARRAY_SIZE(exynos5_uart0_resource),
65 },
66 [1] = {
67 .resources = exynos5_uart1_resource,
68 .nr_resources = ARRAY_SIZE(exynos5_uart0_resource),
69 },
70 [2] = {
71 .resources = exynos5_uart2_resource,
72 .nr_resources = ARRAY_SIZE(exynos5_uart2_resource),
73 },
74 [3] = {
75 .resources = exynos5_uart3_resource,
76 .nr_resources = ARRAY_SIZE(exynos5_uart3_resource),
77 },
78};
diff --git a/arch/arm/mach-exynos/include/mach/irqs.h b/arch/arm/mach-exynos/include/mach/irqs.h
index 35bced6f9092..6da31152de3a 100644
--- a/arch/arm/mach-exynos/include/mach/irqs.h
+++ b/arch/arm/mach-exynos/include/mach/irqs.h
@@ -259,11 +259,6 @@
259#define EXYNOS5_IRQ_IEM_IEC IRQ_SPI(48) 259#define EXYNOS5_IRQ_IEM_IEC IRQ_SPI(48)
260#define EXYNOS5_IRQ_IEM_APC IRQ_SPI(49) 260#define EXYNOS5_IRQ_IEM_APC IRQ_SPI(49)
261#define EXYNOS5_IRQ_GPIO_C2C IRQ_SPI(50) 261#define EXYNOS5_IRQ_GPIO_C2C IRQ_SPI(50)
262#define EXYNOS5_IRQ_UART0 IRQ_SPI(51)
263#define EXYNOS5_IRQ_UART1 IRQ_SPI(52)
264#define EXYNOS5_IRQ_UART2 IRQ_SPI(53)
265#define EXYNOS5_IRQ_UART3 IRQ_SPI(54)
266#define EXYNOS5_IRQ_UART4 IRQ_SPI(55)
267#define EXYNOS5_IRQ_IIC IRQ_SPI(56) 262#define EXYNOS5_IRQ_IIC IRQ_SPI(56)
268#define EXYNOS5_IRQ_IIC1 IRQ_SPI(57) 263#define EXYNOS5_IRQ_IIC1 IRQ_SPI(57)
269#define EXYNOS5_IRQ_IIC2 IRQ_SPI(58) 264#define EXYNOS5_IRQ_IIC2 IRQ_SPI(58)
diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h
index 8480849affb9..e7373311bfbc 100644
--- a/arch/arm/mach-exynos/include/mach/map.h
+++ b/arch/arm/mach-exynos/include/mach/map.h
@@ -279,7 +279,6 @@
279#define EXYNOS5_PA_UART1 0x12C10000 279#define EXYNOS5_PA_UART1 0x12C10000
280#define EXYNOS5_PA_UART2 0x12C20000 280#define EXYNOS5_PA_UART2 0x12C20000
281#define EXYNOS5_PA_UART3 0x12C30000 281#define EXYNOS5_PA_UART3 0x12C30000
282#define EXYNOS5_SZ_UART SZ_256
283 282
284#define S3C_VA_UARTx(x) (S3C_VA_UART + ((x) * S3C_UART_OFFSET)) 283#define S3C_VA_UARTx(x) (S3C_VA_UART + ((x) * S3C_UART_OFFSET))
285 284
diff --git a/arch/arm/mach-exynos/include/mach/regs-pmu.h b/arch/arm/mach-exynos/include/mach/regs-pmu.h
index d4e392b811a3..70b2795f5283 100644
--- a/arch/arm/mach-exynos/include/mach/regs-pmu.h
+++ b/arch/arm/mach-exynos/include/mach/regs-pmu.h
@@ -230,8 +230,6 @@
230 230
231/* For EXYNOS5 */ 231/* For EXYNOS5 */
232 232
233#define EXYNOS5_USB_CFG S5P_PMUREG(0x0230)
234
235#define EXYNOS5_AUTO_WDTRESET_DISABLE S5P_PMUREG(0x0408) 233#define EXYNOS5_AUTO_WDTRESET_DISABLE S5P_PMUREG(0x0408)
236#define EXYNOS5_MASK_WDTRESET_REQUEST S5P_PMUREG(0x040C) 234#define EXYNOS5_MASK_WDTRESET_REQUEST S5P_PMUREG(0x040C)
237 235
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
index c05d7aa84031..69359a0c8a1c 100644
--- a/arch/arm/mach-exynos/mach-nuri.c
+++ b/arch/arm/mach-exynos/mach-nuri.c
@@ -25,7 +25,10 @@
25#include <linux/mmc/host.h> 25#include <linux/mmc/host.h>
26#include <linux/fb.h> 26#include <linux/fb.h>
27#include <linux/pwm_backlight.h> 27#include <linux/pwm_backlight.h>
28#include <linux/platform_data/i2c-s3c2410.h>
29#include <linux/platform_data/mipi-csis.h>
28#include <linux/platform_data/s3c-hsotg.h> 30#include <linux/platform_data/s3c-hsotg.h>
31#include <linux/platform_data/usb-ehci-s5p.h>
29#include <drm/exynos_drm.h> 32#include <drm/exynos_drm.h>
30 33
31#include <video/platform_lcd.h> 34#include <video/platform_lcd.h>
@@ -45,14 +48,11 @@
45#include <plat/devs.h> 48#include <plat/devs.h>
46#include <plat/fb.h> 49#include <plat/fb.h>
47#include <plat/sdhci.h> 50#include <plat/sdhci.h>
48#include <linux/platform_data/usb-ehci-s5p.h>
49#include <plat/clock.h> 51#include <plat/clock.h>
50#include <plat/gpio-cfg.h> 52#include <plat/gpio-cfg.h>
51#include <linux/platform_data/i2c-s3c2410.h>
52#include <plat/mfc.h> 53#include <plat/mfc.h>
53#include <plat/fimc-core.h> 54#include <plat/fimc-core.h>
54#include <plat/camport.h> 55#include <plat/camport.h>
55#include <linux/platform_data/mipi-csis.h>
56 56
57#include <mach/map.h> 57#include <mach/map.h>
58 58
@@ -113,7 +113,6 @@ static struct s3c_sdhci_platdata nuri_hsmmc0_data __initdata = {
113 .host_caps = (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA | 113 .host_caps = (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA |
114 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED | 114 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED |
115 MMC_CAP_ERASE), 115 MMC_CAP_ERASE),
116 .host_caps2 = MMC_CAP2_BROKEN_VOLTAGE,
117 .cd_type = S3C_SDHCI_CD_PERMANENT, 116 .cd_type = S3C_SDHCI_CD_PERMANENT,
118}; 117};
119 118
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
index 9adf491674ea..485ce6c477f9 100644
--- a/arch/arm/mach-exynos/mach-origen.c
+++ b/arch/arm/mach-exynos/mach-origen.c
@@ -23,7 +23,10 @@
23#include <linux/mfd/max8997.h> 23#include <linux/mfd/max8997.h>
24#include <linux/lcd.h> 24#include <linux/lcd.h>
25#include <linux/rfkill-gpio.h> 25#include <linux/rfkill-gpio.h>
26#include <linux/platform_data/i2c-s3c2410.h>
26#include <linux/platform_data/s3c-hsotg.h> 27#include <linux/platform_data/s3c-hsotg.h>
28#include <linux/platform_data/usb-ehci-s5p.h>
29#include <linux/platform_data/usb-exynos.h>
27 30
28#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
29#include <asm/hardware/gic.h> 32#include <asm/hardware/gic.h>
@@ -36,8 +39,6 @@
36#include <plat/cpu.h> 39#include <plat/cpu.h>
37#include <plat/devs.h> 40#include <plat/devs.h>
38#include <plat/sdhci.h> 41#include <plat/sdhci.h>
39#include <linux/platform_data/i2c-s3c2410.h>
40#include <linux/platform_data/usb-ehci-s5p.h>
41#include <plat/clock.h> 42#include <plat/clock.h>
42#include <plat/gpio-cfg.h> 43#include <plat/gpio-cfg.h>
43#include <plat/backlight.h> 44#include <plat/backlight.h>
@@ -45,7 +46,6 @@
45#include <plat/mfc.h> 46#include <plat/mfc.h>
46#include <plat/hdmi.h> 47#include <plat/hdmi.h>
47 48
48#include <linux/platform_data/usb-exynos.h>
49#include <mach/map.h> 49#include <mach/map.h>
50 50
51#include <drm/exynos_drm.h> 51#include <drm/exynos_drm.h>
diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c
index 730f1ac65928..ddb92631252d 100644
--- a/arch/arm/mach-exynos/mach-smdk4x12.c
+++ b/arch/arm/mach-exynos/mach-smdk4x12.c
@@ -21,6 +21,7 @@
21#include <linux/pwm_backlight.h> 21#include <linux/pwm_backlight.h>
22#include <linux/regulator/machine.h> 22#include <linux/regulator/machine.h>
23#include <linux/serial_core.h> 23#include <linux/serial_core.h>
24#include <linux/platform_data/i2c-s3c2410.h>
24#include <linux/platform_data/s3c-hsotg.h> 25#include <linux/platform_data/s3c-hsotg.h>
25 26
26#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
@@ -34,7 +35,6 @@
34#include <plat/devs.h> 35#include <plat/devs.h>
35#include <plat/fb.h> 36#include <plat/fb.h>
36#include <plat/gpio-cfg.h> 37#include <plat/gpio-cfg.h>
37#include <linux/platform_data/i2c-s3c2410.h>
38#include <plat/keypad.h> 38#include <plat/keypad.h>
39#include <plat/mfc.h> 39#include <plat/mfc.h>
40#include <plat/regs-serial.h> 40#include <plat/regs-serial.h>
diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c
index ee4fb1a9cb72..8dd6a1e8030d 100644
--- a/arch/arm/mach-exynos/mach-smdkv310.c
+++ b/arch/arm/mach-exynos/mach-smdkv310.c
@@ -20,7 +20,10 @@
20#include <linux/input.h> 20#include <linux/input.h>
21#include <linux/pwm.h> 21#include <linux/pwm.h>
22#include <linux/pwm_backlight.h> 22#include <linux/pwm_backlight.h>
23#include <linux/platform_data/i2c-s3c2410.h>
23#include <linux/platform_data/s3c-hsotg.h> 24#include <linux/platform_data/s3c-hsotg.h>
25#include <linux/platform_data/usb-ehci-s5p.h>
26#include <linux/platform_data/usb-exynos.h>
24 27
25#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
26#include <asm/hardware/gic.h> 29#include <asm/hardware/gic.h>
@@ -35,16 +38,13 @@
35#include <plat/fb.h> 38#include <plat/fb.h>
36#include <plat/keypad.h> 39#include <plat/keypad.h>
37#include <plat/sdhci.h> 40#include <plat/sdhci.h>
38#include <linux/platform_data/i2c-s3c2410.h>
39#include <plat/gpio-cfg.h> 41#include <plat/gpio-cfg.h>
40#include <plat/backlight.h> 42#include <plat/backlight.h>
41#include <plat/mfc.h> 43#include <plat/mfc.h>
42#include <linux/platform_data/usb-ehci-s5p.h>
43#include <plat/clock.h> 44#include <plat/clock.h>
44#include <plat/hdmi.h> 45#include <plat/hdmi.h>
45 46
46#include <mach/map.h> 47#include <mach/map.h>
47#include <linux/platform_data/usb-exynos.h>
48 48
49#include <drm/exynos_drm.h> 49#include <drm/exynos_drm.h>
50#include "common.h" 50#include "common.h"
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c
index ebc9dd339a38..2d6bc83d5c99 100644
--- a/arch/arm/mach-exynos/mach-universal_c210.c
+++ b/arch/arm/mach-exynos/mach-universal_c210.c
@@ -23,6 +23,8 @@
23#include <linux/i2c-gpio.h> 23#include <linux/i2c-gpio.h>
24#include <linux/i2c/mcs.h> 24#include <linux/i2c/mcs.h>
25#include <linux/i2c/atmel_mxt_ts.h> 25#include <linux/i2c/atmel_mxt_ts.h>
26#include <linux/platform_data/i2c-s3c2410.h>
27#include <linux/platform_data/mipi-csis.h>
26#include <linux/platform_data/s3c-hsotg.h> 28#include <linux/platform_data/s3c-hsotg.h>
27#include <drm/exynos_drm.h> 29#include <drm/exynos_drm.h>
28 30
@@ -35,7 +37,6 @@
35#include <plat/clock.h> 37#include <plat/clock.h>
36#include <plat/cpu.h> 38#include <plat/cpu.h>
37#include <plat/devs.h> 39#include <plat/devs.h>
38#include <linux/platform_data/i2c-s3c2410.h>
39#include <plat/gpio-cfg.h> 40#include <plat/gpio-cfg.h>
40#include <plat/fb.h> 41#include <plat/fb.h>
41#include <plat/mfc.h> 42#include <plat/mfc.h>
@@ -43,7 +44,6 @@
43#include <plat/fimc-core.h> 44#include <plat/fimc-core.h>
44#include <plat/s5p-time.h> 45#include <plat/s5p-time.h>
45#include <plat/camport.h> 46#include <plat/camport.h>
46#include <linux/platform_data/mipi-csis.h>
47 47
48#include <mach/map.h> 48#include <mach/map.h>
49 49
@@ -754,7 +754,6 @@ static struct s3c_sdhci_platdata universal_hsmmc0_data __initdata = {
754 .max_width = 8, 754 .max_width = 8,
755 .host_caps = (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA | 755 .host_caps = (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA |
756 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), 756 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED),
757 .host_caps2 = MMC_CAP2_BROKEN_VOLTAGE,
758 .cd_type = S3C_SDHCI_CD_PERMANENT, 757 .cd_type = S3C_SDHCI_CD_PERMANENT,
759}; 758};
760 759
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2443.c b/arch/arm/mach-s3c24xx/clock-s3c2443.c
index 7f689ce1be61..bdaba59b42dc 100644
--- a/arch/arm/mach-s3c24xx/clock-s3c2443.c
+++ b/arch/arm/mach-s3c24xx/clock-s3c2443.c
@@ -158,12 +158,6 @@ static struct clk init_clocks_off[] = {
158 .devname = "s3c2410-spi.0", 158 .devname = "s3c2410-spi.0",
159 .parent = &clk_p, 159 .parent = &clk_p,
160 .enable = s3c2443_clkcon_enable_p, 160 .enable = s3c2443_clkcon_enable_p,
161 .ctrlbit = S3C2443_PCLKCON_SPI0,
162 }, {
163 .name = "spi",
164 .devname = "s3c2410-spi.1",
165 .parent = &clk_p,
166 .enable = s3c2443_clkcon_enable_p,
167 .ctrlbit = S3C2443_PCLKCON_SPI1, 161 .ctrlbit = S3C2443_PCLKCON_SPI1,
168 } 162 }
169}; 163};
diff --git a/arch/arm/mach-s3c64xx/clock.c b/arch/arm/mach-s3c64xx/clock.c
index 28041e83dc82..1a6f85777449 100644
--- a/arch/arm/mach-s3c64xx/clock.c
+++ b/arch/arm/mach-s3c64xx/clock.c
@@ -138,11 +138,7 @@ static struct clk init_clocks_off[] = {
138 .ctrlbit = S3C_CLKCON_PCLK_TSADC, 138 .ctrlbit = S3C_CLKCON_PCLK_TSADC,
139 }, { 139 }, {
140 .name = "i2c", 140 .name = "i2c",
141#ifdef CONFIG_S3C_DEV_I2C1
142 .devname = "s3c2440-i2c.0", 141 .devname = "s3c2440-i2c.0",
143#else
144 .devname = "s3c2440-i2c",
145#endif
146 .parent = &clk_p, 142 .parent = &clk_p,
147 .enable = s3c64xx_pclk_ctrl, 143 .enable = s3c64xx_pclk_ctrl,
148 .ctrlbit = S3C_CLKCON_PCLK_IIC, 144 .ctrlbit = S3C_CLKCON_PCLK_IIC,
@@ -319,10 +315,6 @@ static struct clk init_clocks_off[] = {
319 .enable = s3c64xx_sclk_ctrl, 315 .enable = s3c64xx_sclk_ctrl,
320 .ctrlbit = S3C_CLKCON_SCLK_MFC, 316 .ctrlbit = S3C_CLKCON_SCLK_MFC,
321 }, { 317 }, {
322 .name = "cam",
323 .enable = s3c64xx_sclk_ctrl,
324 .ctrlbit = S3C_CLKCON_SCLK_CAM,
325 }, {
326 .name = "sclk_jpeg", 318 .name = "sclk_jpeg",
327 .enable = s3c64xx_sclk_ctrl, 319 .enable = s3c64xx_sclk_ctrl,
328 .ctrlbit = S3C_CLKCON_SCLK_JPEG, 320 .ctrlbit = S3C_CLKCON_SCLK_JPEG,
@@ -681,15 +673,6 @@ static struct clksrc_sources clkset_audio2 = {
681 .nr_sources = ARRAY_SIZE(clkset_audio2_list), 673 .nr_sources = ARRAY_SIZE(clkset_audio2_list),
682}; 674};
683 675
684static struct clk *clkset_camif_list[] = {
685 &clk_h2,
686};
687
688static struct clksrc_sources clkset_camif = {
689 .sources = clkset_camif_list,
690 .nr_sources = ARRAY_SIZE(clkset_camif_list),
691};
692
693static struct clksrc_clk clksrcs[] = { 676static struct clksrc_clk clksrcs[] = {
694 { 677 {
695 .clk = { 678 .clk = {
@@ -744,10 +727,9 @@ static struct clksrc_clk clksrcs[] = {
744 .name = "camera", 727 .name = "camera",
745 .ctrlbit = S3C_CLKCON_SCLK_CAM, 728 .ctrlbit = S3C_CLKCON_SCLK_CAM,
746 .enable = s3c64xx_sclk_ctrl, 729 .enable = s3c64xx_sclk_ctrl,
730 .parent = &clk_h2,
747 }, 731 },
748 .reg_div = { .reg = S3C_CLK_DIV0, .shift = 20, .size = 4 }, 732 .reg_div = { .reg = S3C_CLK_DIV0, .shift = 20, .size = 4 },
749 .reg_src = { .reg = NULL, .shift = 0, .size = 0 },
750 .sources = &clkset_camif,
751 }, 733 },
752}; 734};
753 735
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index 55e1dba4ffde..c72b31078c99 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -774,7 +774,6 @@ static void __init goni_pmic_init(void)
774/* MoviNAND */ 774/* MoviNAND */
775static struct s3c_sdhci_platdata goni_hsmmc0_data __initdata = { 775static struct s3c_sdhci_platdata goni_hsmmc0_data __initdata = {
776 .max_width = 4, 776 .max_width = 4,
777 .host_caps2 = MMC_CAP2_BROKEN_VOLTAGE,
778 .cd_type = S3C_SDHCI_CD_PERMANENT, 777 .cd_type = S3C_SDHCI_CD_PERMANENT,
779}; 778};
780 779
diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c
index b1e05ccff3ac..37542c2689a2 100644
--- a/arch/arm/plat-samsung/adc.c
+++ b/arch/arm/plat-samsung/adc.c
@@ -344,7 +344,7 @@ static int s3c_adc_probe(struct platform_device *pdev)
344 int ret; 344 int ret;
345 unsigned tmp; 345 unsigned tmp;
346 346
347 adc = kzalloc(sizeof(struct adc_device), GFP_KERNEL); 347 adc = devm_kzalloc(dev, sizeof(struct adc_device), GFP_KERNEL);
348 if (adc == NULL) { 348 if (adc == NULL) {
349 dev_err(dev, "failed to allocate adc_device\n"); 349 dev_err(dev, "failed to allocate adc_device\n");
350 return -ENOMEM; 350 return -ENOMEM;
@@ -355,50 +355,46 @@ static int s3c_adc_probe(struct platform_device *pdev)
355 adc->pdev = pdev; 355 adc->pdev = pdev;
356 adc->prescale = S3C2410_ADCCON_PRSCVL(49); 356 adc->prescale = S3C2410_ADCCON_PRSCVL(49);
357 357
358 adc->vdd = regulator_get(dev, "vdd"); 358 adc->vdd = devm_regulator_get(dev, "vdd");
359 if (IS_ERR(adc->vdd)) { 359 if (IS_ERR(adc->vdd)) {
360 dev_err(dev, "operating without regulator \"vdd\" .\n"); 360 dev_err(dev, "operating without regulator \"vdd\" .\n");
361 ret = PTR_ERR(adc->vdd); 361 return PTR_ERR(adc->vdd);
362 goto err_alloc;
363 } 362 }
364 363
365 adc->irq = platform_get_irq(pdev, 1); 364 adc->irq = platform_get_irq(pdev, 1);
366 if (adc->irq <= 0) { 365 if (adc->irq <= 0) {
367 dev_err(dev, "failed to get adc irq\n"); 366 dev_err(dev, "failed to get adc irq\n");
368 ret = -ENOENT; 367 return -ENOENT;
369 goto err_reg;
370 } 368 }
371 369
372 ret = request_irq(adc->irq, s3c_adc_irq, 0, dev_name(dev), adc); 370 ret = devm_request_irq(dev, adc->irq, s3c_adc_irq, 0, dev_name(dev),
371 adc);
373 if (ret < 0) { 372 if (ret < 0) {
374 dev_err(dev, "failed to attach adc irq\n"); 373 dev_err(dev, "failed to attach adc irq\n");
375 goto err_reg; 374 return ret;
376 } 375 }
377 376
378 adc->clk = clk_get(dev, "adc"); 377 adc->clk = devm_clk_get(dev, "adc");
379 if (IS_ERR(adc->clk)) { 378 if (IS_ERR(adc->clk)) {
380 dev_err(dev, "failed to get adc clock\n"); 379 dev_err(dev, "failed to get adc clock\n");
381 ret = PTR_ERR(adc->clk); 380 return PTR_ERR(adc->clk);
382 goto err_irq;
383 } 381 }
384 382
385 regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); 383 regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
386 if (!regs) { 384 if (!regs) {
387 dev_err(dev, "failed to find registers\n"); 385 dev_err(dev, "failed to find registers\n");
388 ret = -ENXIO; 386 return -ENXIO;
389 goto err_clk;
390 } 387 }
391 388
392 adc->regs = ioremap(regs->start, resource_size(regs)); 389 adc->regs = devm_request_and_ioremap(dev, regs);
393 if (!adc->regs) { 390 if (!adc->regs) {
394 dev_err(dev, "failed to map registers\n"); 391 dev_err(dev, "failed to map registers\n");
395 ret = -ENXIO; 392 return -ENXIO;
396 goto err_clk;
397 } 393 }
398 394
399 ret = regulator_enable(adc->vdd); 395 ret = regulator_enable(adc->vdd);
400 if (ret) 396 if (ret)
401 goto err_ioremap; 397 return ret;
402 398
403 clk_enable(adc->clk); 399 clk_enable(adc->clk);
404 400
@@ -418,32 +414,14 @@ static int s3c_adc_probe(struct platform_device *pdev)
418 adc_dev = adc; 414 adc_dev = adc;
419 415
420 return 0; 416 return 0;
421
422 err_ioremap:
423 iounmap(adc->regs);
424 err_clk:
425 clk_put(adc->clk);
426
427 err_irq:
428 free_irq(adc->irq, adc);
429 err_reg:
430 regulator_put(adc->vdd);
431 err_alloc:
432 kfree(adc);
433 return ret;
434} 417}
435 418
436static int __devexit s3c_adc_remove(struct platform_device *pdev) 419static int __devexit s3c_adc_remove(struct platform_device *pdev)
437{ 420{
438 struct adc_device *adc = platform_get_drvdata(pdev); 421 struct adc_device *adc = platform_get_drvdata(pdev);
439 422
440 iounmap(adc->regs);
441 free_irq(adc->irq, adc);
442 clk_disable(adc->clk); 423 clk_disable(adc->clk);
443 regulator_disable(adc->vdd); 424 regulator_disable(adc->vdd);
444 regulator_put(adc->vdd);
445 clk_put(adc->clk);
446 kfree(adc);
447 425
448 return 0; 426 return 0;
449} 427}
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index 03f654d55eff..a17d7b3e3725 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -486,11 +486,7 @@ static struct resource s3c_i2c0_resource[] = {
486 486
487struct platform_device s3c_device_i2c0 = { 487struct platform_device s3c_device_i2c0 = {
488 .name = "s3c2410-i2c", 488 .name = "s3c2410-i2c",
489#ifdef CONFIG_S3C_DEV_I2C1
490 .id = 0, 489 .id = 0,
491#else
492 .id = -1,
493#endif
494 .num_resources = ARRAY_SIZE(s3c_i2c0_resource), 490 .num_resources = ARRAY_SIZE(s3c_i2c0_resource),
495 .resource = s3c_i2c0_resource, 491 .resource = s3c_i2c0_resource,
496}; 492};