aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/Kconfig10
-rw-r--r--arch/arm/Kconfig.debug8
-rw-r--r--arch/arm/configs/exynos4_defconfig2
-rw-r--r--arch/arm/include/debug/exynos.S (renamed from arch/arm/mach-exynos/include/mach/debug-macro.S)12
-rw-r--r--arch/arm/include/debug/samsung.S (renamed from arch/arm/plat-samsung/include/plat/debug-macro.S)0
-rw-r--r--arch/arm/mach-exynos/Kconfig41
-rw-r--r--arch/arm/mach-exynos/Makefile5
-rw-r--r--arch/arm/mach-exynos/common.c6
-rw-r--r--arch/arm/mach-exynos/dev-uart.c1
-rw-r--r--arch/arm/mach-exynos/include/mach/irqs.h5
-rw-r--r--arch/arm/mach-exynos/mach-armlex4210.c1
-rw-r--r--arch/arm/mach-exynos/mach-nuri.c1
-rw-r--r--arch/arm/mach-exynos/mach-origen.c1
-rw-r--r--arch/arm/mach-exynos/mach-smdk4x12.c1
-rw-r--r--arch/arm/mach-exynos/mach-smdkv310.c1
-rw-r--r--arch/arm/mach-exynos/setup-sdhci-gpio.c2
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-s5p64x0/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-s5pc100/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-s5pc100/setup-sdhci-gpio.c1
-rw-r--r--arch/arm/mach-s5pv210/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-s5pv210/setup-sdhci-gpio.c1
-rw-r--r--arch/arm/plat-samsung/Kconfig7
-rw-r--r--arch/arm/plat-samsung/Makefile8
-rw-r--r--arch/arm/plat-samsung/devs.c45
-rw-r--r--arch/arm/plat-samsung/include/plat/pm.h5
-rw-r--r--arch/arm/plat-samsung/include/plat/sdhci.h56
-rw-r--r--arch/arm/plat-samsung/irq-vic-timer.c1
-rw-r--r--arch/arm/plat-samsung/pm.c1
-rw-r--r--arch/arm/plat-samsung/s5p-dev-mfc.c42
-rw-r--r--arch/arm/plat-samsung/s5p-irq.c1
-rw-r--r--drivers/gpio/Makefile2
-rw-r--r--drivers/mmc/host/Kconfig2
-rw-r--r--drivers/mmc/host/sdhci-s3c-regs.h (renamed from arch/arm/plat-samsung/include/plat/regs-sdhci.h)0
-rw-r--r--drivers/mmc/host/sdhci-s3c.c5
-rw-r--r--drivers/mtd/onenand/samsung.c4
-rw-r--r--drivers/mtd/onenand/samsung.h (renamed from arch/arm/plat-samsung/include/plat/regs-onenand.h)2
-rw-r--r--drivers/rtc/rtc-s3c.c3
-rw-r--r--drivers/rtc/rtc-s3c.h (renamed from arch/arm/plat-samsung/include/plat/regs-rtc.h)3
-rw-r--r--drivers/thermal/exynos_thermal.c2
-rw-r--r--include/linux/platform_data/mmc-sdhci-s3c.h56
42 files changed, 204 insertions, 150 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index ccb6c0c71521..f59b687dc325 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -860,19 +860,11 @@ config ARCH_S5PV210
860 help 860 help
861 Samsung S5PV210/S5PC110 series based systems 861 Samsung S5PV210/S5PC110 series based systems
862 862
863config ARCH_EXYNOS 863config ARCH_EXYNOS_SINGLE
864 bool "Samsung EXYNOS" 864 bool "Samsung EXYNOS"
865 select ARCH_HAS_CPUFREQ
866 select ARCH_HAS_HOLES_MEMORYMODEL 865 select ARCH_HAS_HOLES_MEMORYMODEL
867 select ARCH_SPARSEMEM_ENABLE 866 select ARCH_SPARSEMEM_ENABLE
868 select CLKDEV_LOOKUP
869 select COMMON_CLK
870 select CPU_V7
871 select GENERIC_CLOCKEVENTS
872 select HAVE_CLK
873 select HAVE_S3C2410_I2C if I2C
874 select HAVE_S3C2410_WATCHDOG if WATCHDOG 867 select HAVE_S3C2410_WATCHDOG if WATCHDOG
875 select HAVE_S3C_RTC if RTC_CLASS
876 select NEED_MACH_GPIO_H 868 select NEED_MACH_GPIO_H
877 select NEED_MACH_MEMORY_H 869 select NEED_MACH_MEMORY_H
878 help 870 help
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 9b31f4311ea2..59ce26afdcc5 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -330,6 +330,7 @@ choice
330 330
331 config DEBUG_S3C_UART0 331 config DEBUG_S3C_UART0
332 depends on PLAT_SAMSUNG 332 depends on PLAT_SAMSUNG
333 select DEBUG_EXYNOS_UART if ARCH_EXYNOS
333 bool "Use S3C UART 0 for low-level debug" 334 bool "Use S3C UART 0 for low-level debug"
334 help 335 help
335 Say Y here if you want the debug print routines to direct 336 Say Y here if you want the debug print routines to direct
@@ -341,6 +342,7 @@ choice
341 342
342 config DEBUG_S3C_UART1 343 config DEBUG_S3C_UART1
343 depends on PLAT_SAMSUNG 344 depends on PLAT_SAMSUNG
345 select DEBUG_EXYNOS_UART if ARCH_EXYNOS
344 bool "Use S3C UART 1 for low-level debug" 346 bool "Use S3C UART 1 for low-level debug"
345 help 347 help
346 Say Y here if you want the debug print routines to direct 348 Say Y here if you want the debug print routines to direct
@@ -352,6 +354,7 @@ choice
352 354
353 config DEBUG_S3C_UART2 355 config DEBUG_S3C_UART2
354 depends on PLAT_SAMSUNG 356 depends on PLAT_SAMSUNG
357 select DEBUG_EXYNOS_UART if ARCH_EXYNOS
355 bool "Use S3C UART 2 for low-level debug" 358 bool "Use S3C UART 2 for low-level debug"
356 help 359 help
357 Say Y here if you want the debug print routines to direct 360 Say Y here if you want the debug print routines to direct
@@ -363,6 +366,7 @@ choice
363 366
364 config DEBUG_S3C_UART3 367 config DEBUG_S3C_UART3
365 depends on PLAT_SAMSUNG && ARCH_EXYNOS 368 depends on PLAT_SAMSUNG && ARCH_EXYNOS
369 select DEBUG_EXYNOS_UART
366 bool "Use S3C UART 3 for low-level debug" 370 bool "Use S3C UART 3 for low-level debug"
367 help 371 help
368 Say Y here if you want the debug print routines to direct 372 Say Y here if you want the debug print routines to direct
@@ -485,6 +489,9 @@ choice
485 489
486endchoice 490endchoice
487 491
492config DEBUG_EXYNOS_UART
493 bool
494
488config DEBUG_IMX_UART_PORT 495config DEBUG_IMX_UART_PORT
489 int "i.MX Debug UART Port Selection" if DEBUG_IMX1_UART || \ 496 int "i.MX Debug UART Port Selection" if DEBUG_IMX1_UART || \
490 DEBUG_IMX25_UART || \ 497 DEBUG_IMX25_UART || \
@@ -580,6 +587,7 @@ endchoice
580 587
581config DEBUG_LL_INCLUDE 588config DEBUG_LL_INCLUDE
582 string 589 string
590 default "debug/exynos.S" if DEBUG_EXYNOS_UART
583 default "debug/icedcc.S" if DEBUG_ICEDCC 591 default "debug/icedcc.S" if DEBUG_ICEDCC
584 default "debug/imx.S" if DEBUG_IMX1_UART || \ 592 default "debug/imx.S" if DEBUG_IMX1_UART || \
585 DEBUG_IMX25_UART || \ 593 DEBUG_IMX25_UART || \
diff --git a/arch/arm/configs/exynos4_defconfig b/arch/arm/configs/exynos4_defconfig
index bffe68e190a3..ae90a0f7d53c 100644
--- a/arch/arm/configs/exynos4_defconfig
+++ b/arch/arm/configs/exynos4_defconfig
@@ -4,7 +4,7 @@ CONFIG_KALLSYMS_ALL=y
4CONFIG_MODULES=y 4CONFIG_MODULES=y
5CONFIG_MODULE_UNLOAD=y 5CONFIG_MODULE_UNLOAD=y
6# CONFIG_BLK_DEV_BSG is not set 6# CONFIG_BLK_DEV_BSG is not set
7CONFIG_ARCH_EXYNOS=y 7CONFIG_ARCH_EXYNOS_SINGLE=y
8CONFIG_S3C_LOWLEVEL_UART_PORT=1 8CONFIG_S3C_LOWLEVEL_UART_PORT=1
9CONFIG_MACH_SMDKC210=y 9CONFIG_MACH_SMDKC210=y
10CONFIG_MACH_ARMLEX4210=y 10CONFIG_MACH_ARMLEX4210=y
diff --git a/arch/arm/mach-exynos/include/mach/debug-macro.S b/arch/arm/include/debug/exynos.S
index e0c86ea475e7..b17fdb7fbd34 100644
--- a/arch/arm/mach-exynos/include/mach/debug-macro.S
+++ b/arch/arm/include/debug/exynos.S
@@ -1,10 +1,7 @@
1/* linux/arch/arm/mach-exynos4/include/mach/debug-macro.S 1/*
2 *
3 * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. 2 * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com 3 * http://www.samsung.com
5 * 4 *
6 * Based on arch/arm/mach-s3c6400/include/mach/debug-macro.S
7 *
8 * This program is free software; you can redistribute it and/or modify 5 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 6 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
@@ -12,7 +9,10 @@
12 9
13/* pull in the relevant register and map files. */ 10/* pull in the relevant register and map files. */
14 11
15#include <mach/map.h> 12#define S3C_ADDR_BASE 0xF6000000
13#define S3C_VA_UART S3C_ADDR_BASE + 0x01000000
14#define EXYNOS4_PA_UART 0x13800000
15#define EXYNOS5_PA_UART 0x12C00000
16 16
17 /* note, for the boot process to work we have to keep the UART 17 /* note, for the boot process to work we have to keep the UART
18 * virtual address aligned to an 1MiB boundary for the L1 18 * virtual address aligned to an 1MiB boundary for the L1
@@ -36,4 +36,4 @@
36#define fifo_full fifo_full_s5pv210 36#define fifo_full fifo_full_s5pv210
37#define fifo_level fifo_level_s5pv210 37#define fifo_level fifo_level_s5pv210
38 38
39#include <plat/debug-macro.S> 39#include <debug/samsung.S>
diff --git a/arch/arm/plat-samsung/include/plat/debug-macro.S b/arch/arm/include/debug/samsung.S
index f3a9cff6d5d4..f3a9cff6d5d4 100644
--- a/arch/arm/plat-samsung/include/plat/debug-macro.S
+++ b/arch/arm/include/debug/samsung.S
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index ef3b69a6277c..a77db362a888 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -7,6 +7,21 @@
7 7
8# Configuration options for the EXYNOS4 8# Configuration options for the EXYNOS4
9 9
10config ARCH_EXYNOS
11 # TODO: make this visible after all drivers are converted
12 bool "Samsung EXYNOS" if ARCH_MULTI_V7 && BROKEN
13 default ARCH_EXYNOS_SINGLE
14 select ARCH_HAS_CPUFREQ
15 select CLKDEV_LOOKUP
16 select COMMON_CLK
17 select CPU_V7
18 select GENERIC_CLOCKEVENTS
19 select HAVE_CLK
20 select HAVE_S3C2410_I2C if I2C
21 select HAVE_S3C_RTC if RTC_CLASS
22 help
23 Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5)
24
10if ARCH_EXYNOS 25if ARCH_EXYNOS
11 26
12menu "SAMSUNG EXYNOS SoCs Support" 27menu "SAMSUNG EXYNOS SoCs Support"
@@ -19,6 +34,9 @@ config ARCH_EXYNOS4
19 help 34 help
20 Samsung EXYNOS4 SoCs based systems 35 Samsung EXYNOS4 SoCs based systems
21 36
37config ARCH_EXYNOS4_SINGLE
38 def_bool ARCH_EXYNOS4 && ARCH_EXYNOS_SINGLE
39
22config ARCH_EXYNOS5 40config ARCH_EXYNOS5
23 bool "SAMSUNG EXYNOS5" 41 bool "SAMSUNG EXYNOS5"
24 select HAVE_SMP 42 select HAVE_SMP
@@ -35,7 +53,7 @@ config CPU_EXYNOS4210
35 select PM_GENERIC_DOMAINS 53 select PM_GENERIC_DOMAINS
36 select S5P_PM if PM 54 select S5P_PM if PM
37 select S5P_SLEEP if PM 55 select S5P_SLEEP if PM
38 select SAMSUNG_DMADEV 56 select SAMSUNG_DMADEV if ARCH_EXYNOS_SINGLE
39 help 57 help
40 Enable EXYNOS4210 CPU support 58 Enable EXYNOS4210 CPU support
41 59
@@ -45,7 +63,7 @@ config SOC_EXYNOS4212
45 depends on ARCH_EXYNOS4 63 depends on ARCH_EXYNOS4
46 select S5P_PM if PM 64 select S5P_PM if PM
47 select S5P_SLEEP if PM 65 select S5P_SLEEP if PM
48 select SAMSUNG_DMADEV 66 select SAMSUNG_DMADEV if ARCH_EXYNOS_SINGLE
49 help 67 help
50 Enable EXYNOS4212 SoC support 68 Enable EXYNOS4212 SoC support
51 69
@@ -53,7 +71,7 @@ config SOC_EXYNOS4412
53 bool "SAMSUNG EXYNOS4412" 71 bool "SAMSUNG EXYNOS4412"
54 default y 72 default y
55 depends on ARCH_EXYNOS4 73 depends on ARCH_EXYNOS4
56 select SAMSUNG_DMADEV 74 select SAMSUNG_DMADEV if ARCH_EXYNOS_SINGLE
57 help 75 help
58 Enable EXYNOS4412 SoC support 76 Enable EXYNOS4412 SoC support
59 77
@@ -65,7 +83,7 @@ config SOC_EXYNOS5250
65 select S5P_PM if PM 83 select S5P_PM if PM
66 select S5P_SLEEP if PM 84 select S5P_SLEEP if PM
67 select S5P_DEV_MFC 85 select S5P_DEV_MFC
68 select SAMSUNG_DMADEV 86 select SAMSUNG_DMADEV if ARCH_EXYNOS_SINGLE
69 help 87 help
70 Enable EXYNOS5250 SoC support 88 Enable EXYNOS5250 SoC support
71 89
@@ -80,6 +98,19 @@ config SOC_EXYNOS5440
80 help 98 help
81 Enable EXYNOS5440 SoC support 99 Enable EXYNOS5440 SoC support
82 100
101config EXYNOS_ATAGS
102 bool "ATAGS based boot for EXYNOS (deprecated)"
103 depends on !ARCH_MULTIPLATFORM
104 depends on ATAGS
105 default y
106 help
107 The EXYNOS platform is moving towards being completely probed
108 through device tree. This enables support for board files using
109 the traditional ATAGS boot format.
110 Note that this option is not available for multiplatform builds.
111
112if EXYNOS_ATAGS
113
83config EXYNOS_DEV_DMA 114config EXYNOS_DEV_DMA
84 bool 115 bool
85 help 116 help
@@ -395,6 +426,8 @@ config MACH_SMDK4412
395 Machine support for Samsung SMDK4412 426 Machine support for Samsung SMDK4412
396endif 427endif
397 428
429endif
430
398comment "Flattened Device Tree based board for EXYNOS SoCs" 431comment "Flattened Device Tree based board for EXYNOS SoCs"
399 432
400config MACH_EXYNOS4_DT 433config MACH_EXYNOS4_DT
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
index d2f6b362b6dd..e26d05c5249f 100644
--- a/arch/arm/mach-exynos/Makefile
+++ b/arch/arm/mach-exynos/Makefile
@@ -4,6 +4,7 @@
4# http://www.samsung.com/ 4# http://www.samsung.com/
5# 5#
6# Licensed under GPLv2 6# Licensed under GPLv2
7ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/$(src)/include -I$(srctree)/arch/arm/plat-samsung/include
7 8
8obj-y := 9obj-y :=
9obj-m := 10obj-m :=
@@ -42,12 +43,12 @@ obj-$(CONFIG_MACH_EXYNOS5_DT) += mach-exynos5-dt.o
42# device support 43# device support
43 44
44obj-y += dev-uart.o 45obj-y += dev-uart.o
45obj-$(CONFIG_ARCH_EXYNOS4) += dev-audio.o 46obj-$(CONFIG_ARCH_EXYNOS4_SINGLE) += dev-audio.o
46obj-$(CONFIG_EXYNOS4_DEV_AHCI) += dev-ahci.o 47obj-$(CONFIG_EXYNOS4_DEV_AHCI) += dev-ahci.o
47obj-$(CONFIG_EXYNOS_DEV_DMA) += dma.o 48obj-$(CONFIG_EXYNOS_DEV_DMA) += dma.o
48obj-$(CONFIG_EXYNOS4_DEV_USB_OHCI) += dev-ohci.o 49obj-$(CONFIG_EXYNOS4_DEV_USB_OHCI) += dev-ohci.o
49 50
50obj-$(CONFIG_ARCH_EXYNOS) += setup-i2c0.o 51obj-$(CONFIG_ARCH_EXYNOS_SINGLE) += setup-i2c0.o
51obj-$(CONFIG_EXYNOS4_SETUP_FIMC) += setup-fimc.o 52obj-$(CONFIG_EXYNOS4_SETUP_FIMC) += setup-fimc.o
52obj-$(CONFIG_EXYNOS4_SETUP_FIMD0) += setup-fimd0.o 53obj-$(CONFIG_EXYNOS4_SETUP_FIMD0) += setup-fimd0.o
53obj-$(CONFIG_EXYNOS4_SETUP_I2C1) += setup-i2c1.o 54obj-$(CONFIG_EXYNOS4_SETUP_I2C1) += setup-i2c1.o
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index 939bda77defa..a3ab0ecc7c6a 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -361,6 +361,9 @@ static void __init exynos4_map_io(void)
361 else 361 else
362 iotable_init(exynos4_iodesc1, ARRAY_SIZE(exynos4_iodesc1)); 362 iotable_init(exynos4_iodesc1, ARRAY_SIZE(exynos4_iodesc1));
363 363
364 if (!IS_ENABLED(CONFIG_EXYNOS_ATAGS))
365 return
366
364 /* initialize device information early */ 367 /* initialize device information early */
365 exynos4_default_sdhci0(); 368 exynos4_default_sdhci0();
366 exynos4_default_sdhci1(); 369 exynos4_default_sdhci1();
@@ -546,6 +549,8 @@ static void __init exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no)
546 s3c24xx_init_uartdevs("exynos4210-uart", exynos4_uart_resources, cfg, no); 549 s3c24xx_init_uartdevs("exynos4210-uart", exynos4_uart_resources, cfg, no);
547} 550}
548 551
552
553#ifdef CONFIG_EXYNOS_ATAGS
549static void __iomem *exynos_eint_base; 554static void __iomem *exynos_eint_base;
550 555
551static DEFINE_SPINLOCK(eint_lock); 556static DEFINE_SPINLOCK(eint_lock);
@@ -852,6 +857,7 @@ static int __init exynos_init_irq_eint(void)
852 return 0; 857 return 0;
853} 858}
854arch_initcall(exynos_init_irq_eint); 859arch_initcall(exynos_init_irq_eint);
860#endif
855 861
856static struct resource exynos4_pmu_resource[] = { 862static struct resource exynos4_pmu_resource[] = {
857 DEFINE_RES_IRQ(EXYNOS4_IRQ_PMU), 863 DEFINE_RES_IRQ(EXYNOS4_IRQ_PMU),
diff --git a/arch/arm/mach-exynos/dev-uart.c b/arch/arm/mach-exynos/dev-uart.c
index 7c42f4b7c8be..c48aff02c786 100644
--- a/arch/arm/mach-exynos/dev-uart.c
+++ b/arch/arm/mach-exynos/dev-uart.c
@@ -20,6 +20,7 @@
20#include <asm/mach/irq.h> 20#include <asm/mach/irq.h>
21#include <mach/hardware.h> 21#include <mach/hardware.h>
22#include <mach/map.h> 22#include <mach/map.h>
23#include <mach/irqs.h>
23 24
24#include <plat/devs.h> 25#include <plat/devs.h>
25 26
diff --git a/arch/arm/mach-exynos/include/mach/irqs.h b/arch/arm/mach-exynos/include/mach/irqs.h
index 35fe6d52d230..c72f59d91fce 100644
--- a/arch/arm/mach-exynos/include/mach/irqs.h
+++ b/arch/arm/mach-exynos/include/mach/irqs.h
@@ -467,7 +467,10 @@
467#define IRQ_TIMER_BASE (IRQ_GPIO_END + 64) 467#define IRQ_TIMER_BASE (IRQ_GPIO_END + 64)
468 468
469/* Set the default NR_IRQS */ 469/* Set the default NR_IRQS */
470#define EXYNOS_NR_IRQS (IRQ_TIMER_BASE + IRQ_TIMER_COUNT)
470 471
471#define NR_IRQS (IRQ_TIMER_BASE + IRQ_TIMER_COUNT) 472#ifndef CONFIG_SPARSE_IRQ
473#define NR_IRQS EXYNOS_NR_IRQS
474#endif
472 475
473#endif /* __ASM_ARCH_IRQS_H */ 476#endif /* __ASM_ARCH_IRQS_H */
diff --git a/arch/arm/mach-exynos/mach-armlex4210.c b/arch/arm/mach-exynos/mach-armlex4210.c
index 2c23b659ae3e..5f0f55701374 100644
--- a/arch/arm/mach-exynos/mach-armlex4210.c
+++ b/arch/arm/mach-exynos/mach-armlex4210.c
@@ -25,6 +25,7 @@
25#include <plat/regs-srom.h> 25#include <plat/regs-srom.h>
26#include <plat/sdhci.h> 26#include <plat/sdhci.h>
27 27
28#include <mach/irqs.h>
28#include <mach/map.h> 29#include <mach/map.h>
29 30
30#include "common.h" 31#include "common.h"
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
index 0c10852423c3..081a5baadd8b 100644
--- a/arch/arm/mach-exynos/mach-nuri.c
+++ b/arch/arm/mach-exynos/mach-nuri.c
@@ -53,6 +53,7 @@
53#include <plat/fimc-core.h> 53#include <plat/fimc-core.h>
54#include <plat/camport.h> 54#include <plat/camport.h>
55 55
56#include <mach/irqs.h>
56#include <mach/map.h> 57#include <mach/map.h>
57 58
58#include "common.h" 59#include "common.h"
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
index a9aa5c034b23..27ebe44785f0 100644
--- a/arch/arm/mach-exynos/mach-origen.c
+++ b/arch/arm/mach-exynos/mach-origen.c
@@ -46,6 +46,7 @@
46#include <plat/hdmi.h> 46#include <plat/hdmi.h>
47 47
48#include <mach/map.h> 48#include <mach/map.h>
49#include <mach/irqs.h>
49 50
50#include <drm/exynos_drm.h> 51#include <drm/exynos_drm.h>
51#include "common.h" 52#include "common.h"
diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c
index 184faa3bd93a..2c8af9617920 100644
--- a/arch/arm/mach-exynos/mach-smdk4x12.c
+++ b/arch/arm/mach-exynos/mach-smdk4x12.c
@@ -39,6 +39,7 @@
39#include <plat/regs-serial.h> 39#include <plat/regs-serial.h>
40#include <plat/sdhci.h> 40#include <plat/sdhci.h>
41 41
42#include <mach/irqs.h>
42#include <mach/map.h> 43#include <mach/map.h>
43 44
44#include <drm/exynos_drm.h> 45#include <drm/exynos_drm.h>
diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c
index 75eca7d4e128..ee312b676772 100644
--- a/arch/arm/mach-exynos/mach-smdkv310.c
+++ b/arch/arm/mach-exynos/mach-smdkv310.c
@@ -43,6 +43,7 @@
43#include <plat/clock.h> 43#include <plat/clock.h>
44#include <plat/hdmi.h> 44#include <plat/hdmi.h>
45 45
46#include <mach/irqs.h>
46#include <mach/map.h> 47#include <mach/map.h>
47 48
48#include <drm/exynos_drm.h> 49#include <drm/exynos_drm.h>
diff --git a/arch/arm/mach-exynos/setup-sdhci-gpio.c b/arch/arm/mach-exynos/setup-sdhci-gpio.c
index e8d08bf8965a..d5b98c866738 100644
--- a/arch/arm/mach-exynos/setup-sdhci-gpio.c
+++ b/arch/arm/mach-exynos/setup-sdhci-gpio.c
@@ -19,8 +19,8 @@
19#include <linux/mmc/host.h> 19#include <linux/mmc/host.h>
20#include <linux/mmc/card.h> 20#include <linux/mmc/card.h>
21 21
22#include <mach/gpio.h>
22#include <plat/gpio-cfg.h> 23#include <plat/gpio-cfg.h>
23#include <plat/regs-sdhci.h>
24#include <plat/sdhci.h> 24#include <plat/sdhci.h>
25 25
26void exynos4_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) 26void exynos4_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
diff --git a/arch/arm/mach-s3c24xx/include/mach/debug-macro.S b/arch/arm/mach-s3c24xx/include/mach/debug-macro.S
index 13ed33c69113..2558952e3147 100644
--- a/arch/arm/mach-s3c24xx/include/mach/debug-macro.S
+++ b/arch/arm/mach-s3c24xx/include/mach/debug-macro.S
@@ -98,4 +98,4 @@
98 98
99/* include the reset of the code which will do the work */ 99/* include the reset of the code which will do the work */
100 100
101#include <plat/debug-macro.S> 101#include <debug/samsung.S>
diff --git a/arch/arm/mach-s3c64xx/include/mach/debug-macro.S b/arch/arm/mach-s3c64xx/include/mach/debug-macro.S
index c0c076a90f27..dd9ccca5de1f 100644
--- a/arch/arm/mach-s3c64xx/include/mach/debug-macro.S
+++ b/arch/arm/mach-s3c64xx/include/mach/debug-macro.S
@@ -35,4 +35,4 @@
35 * will be fine with us. 35 * will be fine with us.
36 */ 36 */
37 37
38#include <plat/debug-macro.S> 38#include <debug/samsung.S>
diff --git a/arch/arm/mach-s5p64x0/include/mach/debug-macro.S b/arch/arm/mach-s5p64x0/include/mach/debug-macro.S
index e80ba3c69814..5e2916fb19a9 100644
--- a/arch/arm/mach-s5p64x0/include/mach/debug-macro.S
+++ b/arch/arm/mach-s5p64x0/include/mach/debug-macro.S
@@ -30,4 +30,4 @@
30#endif 30#endif
31 .endm 31 .endm
32 32
33#include <plat/debug-macro.S> 33#include <debug/samsung.S>
diff --git a/arch/arm/mach-s5pc100/include/mach/debug-macro.S b/arch/arm/mach-s5pc100/include/mach/debug-macro.S
index 694f75937000..66cb7f16bf2a 100644
--- a/arch/arm/mach-s5pc100/include/mach/debug-macro.S
+++ b/arch/arm/mach-s5pc100/include/mach/debug-macro.S
@@ -36,4 +36,4 @@
36 * will be fine with us. 36 * will be fine with us.
37 */ 37 */
38 38
39#include <plat/debug-macro.S> 39#include <debug/samsung.S>
diff --git a/arch/arm/mach-s5pc100/setup-sdhci-gpio.c b/arch/arm/mach-s5pc100/setup-sdhci-gpio.c
index 03c02d04c68c..6010c0310cb5 100644
--- a/arch/arm/mach-s5pc100/setup-sdhci-gpio.c
+++ b/arch/arm/mach-s5pc100/setup-sdhci-gpio.c
@@ -19,7 +19,6 @@
19#include <linux/mmc/card.h> 19#include <linux/mmc/card.h>
20 20
21#include <plat/gpio-cfg.h> 21#include <plat/gpio-cfg.h>
22#include <plat/regs-sdhci.h>
23#include <plat/sdhci.h> 22#include <plat/sdhci.h>
24 23
25void s5pc100_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) 24void s5pc100_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
diff --git a/arch/arm/mach-s5pv210/include/mach/debug-macro.S b/arch/arm/mach-s5pv210/include/mach/debug-macro.S
index 79e55597ab63..80c21996c943 100644
--- a/arch/arm/mach-s5pv210/include/mach/debug-macro.S
+++ b/arch/arm/mach-s5pv210/include/mach/debug-macro.S
@@ -38,4 +38,4 @@
38 * will be fine with us. 38 * will be fine with us.
39 */ 39 */
40 40
41#include <plat/debug-macro.S> 41#include <debug/samsung.S>
diff --git a/arch/arm/mach-s5pv210/setup-sdhci-gpio.c b/arch/arm/mach-s5pv210/setup-sdhci-gpio.c
index 3e3ac05bb7b1..0512ada00522 100644
--- a/arch/arm/mach-s5pv210/setup-sdhci-gpio.c
+++ b/arch/arm/mach-s5pv210/setup-sdhci-gpio.c
@@ -20,7 +20,6 @@
20#include <linux/mmc/card.h> 20#include <linux/mmc/card.h>
21 21
22#include <plat/gpio-cfg.h> 22#include <plat/gpio-cfg.h>
23#include <plat/regs-sdhci.h>
24#include <plat/sdhci.h> 23#include <plat/sdhci.h>
25 24
26void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) 25void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index 6cb19c6aa9d6..77dd30af32f5 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -13,6 +13,10 @@ config PLAT_SAMSUNG
13 help 13 help
14 Base platform code for all Samsung SoC based systems 14 Base platform code for all Samsung SoC based systems
15 15
16config PLAT_SAMSUNG_SINGLE
17 def_bool PLAT_SAMSUNG && !ARCH_MULTIPLATFORM
18
19
16config PLAT_S5P 20config PLAT_S5P
17 bool 21 bool
18 depends on (ARCH_S5P64X0 || ARCH_S5PC100 || ARCH_S5PV210 || ARCH_EXYNOS) 22 depends on (ARCH_S5P64X0 || ARCH_S5PC100 || ARCH_S5PV210 || ARCH_EXYNOS)
@@ -23,7 +27,7 @@ config PLAT_S5P
23 select GIC_NON_BANKED if ARCH_EXYNOS4 27 select GIC_NON_BANKED if ARCH_EXYNOS4
24 select NO_IOPORT 28 select NO_IOPORT
25 select PLAT_SAMSUNG 29 select PLAT_SAMSUNG
26 select S3C_GPIO_TRACK 30 select S3C_GPIO_TRACK if PLAT_SAMSUNG_SINGLE
27 select S5P_GPIO_DRVSTR 31 select S5P_GPIO_DRVSTR
28 select SAMSUNG_CLKSRC if !COMMON_CLK 32 select SAMSUNG_CLKSRC if !COMMON_CLK
29 select SAMSUNG_GPIOLIB_4BIT 33 select SAMSUNG_GPIOLIB_4BIT
@@ -178,6 +182,7 @@ config S5P_DEV_UART
178 182
179config S3C_ADC 183config S3C_ADC
180 bool "ADC common driver support" 184 bool "ADC common driver support"
185 depends on PLAT_SAMSUNG_SINGLE
181 help 186 help
182 Core support for the ADC block found in the Samsung SoC systems 187 Core support for the ADC block found in the Samsung SoC systems
183 for drivers such as the touchscreen and hwmon to use to share 188 for drivers such as the touchscreen and hwmon to use to share
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
index a23c460299a1..f38ce8489dfd 100644
--- a/arch/arm/plat-samsung/Makefile
+++ b/arch/arm/plat-samsung/Makefile
@@ -4,6 +4,9 @@
4# 4#
5# Licensed under GPLv2 5# Licensed under GPLv2
6 6
7ccflags-$(CONFIG_ARCH_MULTI_V7) += -I$(srctree)/$(src)/include
8ccflags-$(CONFIG_ARCH_EXYNOS) += -I$(srctree)/arch/arm/mach-exynos/include
9
7obj-y := 10obj-y :=
8obj-m := 11obj-m :=
9obj-n := dummy.o 12obj-n := dummy.o
@@ -33,7 +36,7 @@ obj-$(CONFIG_S3C_ADC) += adc.o
33 36
34obj-y += platformdata.o 37obj-y += platformdata.o
35 38
36obj-y += devs.o 39obj-$(CONFIG_PLAT_SAMSUNG_SINGLE) += devs.o
37obj-y += dev-uart.o 40obj-y += dev-uart.o
38obj-$(CONFIG_S5P_DEV_MFC) += s5p-dev-mfc.o 41obj-$(CONFIG_S5P_DEV_MFC) += s5p-dev-mfc.o
39obj-$(CONFIG_S5P_DEV_UART) += s5p-dev-uart.o 42obj-$(CONFIG_S5P_DEV_UART) += s5p-dev-uart.o
@@ -50,9 +53,10 @@ obj-$(CONFIG_S3C_DMA) += dma.o s3c-dma-ops.o
50obj-$(CONFIG_SAMSUNG_DMADEV) += dma-ops.o 53obj-$(CONFIG_SAMSUNG_DMADEV) += dma-ops.o
51 54
52# PM support 55# PM support
53
54obj-$(CONFIG_PM) += pm.o 56obj-$(CONFIG_PM) += pm.o
57ifdef CONFIG_PLAT_SAMSUNG_SINGLE
55obj-$(CONFIG_PM) += pm-gpio.o 58obj-$(CONFIG_PM) += pm-gpio.o
59endif
56obj-$(CONFIG_SAMSUNG_PM_CHECK) += pm-check.o 60obj-$(CONFIG_SAMSUNG_PM_CHECK) += pm-check.o
57 61
58obj-$(CONFIG_SAMSUNG_WAKEMASK) += wakeup-mask.o 62obj-$(CONFIG_SAMSUNG_WAKEMASK) += wakeup-mask.o
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index e1124d9fd2b0..4cf660e38182 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -878,51 +878,6 @@ void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd)
878} 878}
879#endif /* CONFIG_PLAT_S3C24XX */ 879#endif /* CONFIG_PLAT_S3C24XX */
880 880
881/* MFC */
882
883#ifdef CONFIG_S5P_DEV_MFC
884static struct resource s5p_mfc_resource[] = {
885 [0] = DEFINE_RES_MEM(S5P_PA_MFC, SZ_64K),
886 [1] = DEFINE_RES_IRQ(IRQ_MFC),
887};
888
889struct platform_device s5p_device_mfc = {
890 .name = "s5p-mfc",
891 .id = -1,
892 .num_resources = ARRAY_SIZE(s5p_mfc_resource),
893 .resource = s5p_mfc_resource,
894};
895
896/*
897 * MFC hardware has 2 memory interfaces which are modelled as two separate
898 * platform devices to let dma-mapping distinguish between them.
899 *
900 * MFC parent device (s5p_device_mfc) must be registered before memory
901 * interface specific devices (s5p_device_mfc_l and s5p_device_mfc_r).
902 */
903
904struct platform_device s5p_device_mfc_l = {
905 .name = "s5p-mfc-l",
906 .id = -1,
907 .dev = {
908 .parent = &s5p_device_mfc.dev,
909 .dma_mask = &samsung_device_dma_mask,
910 .coherent_dma_mask = DMA_BIT_MASK(32),
911 },
912};
913
914struct platform_device s5p_device_mfc_r = {
915 .name = "s5p-mfc-r",
916 .id = -1,
917 .dev = {
918 .parent = &s5p_device_mfc.dev,
919 .dma_mask = &samsung_device_dma_mask,
920 .coherent_dma_mask = DMA_BIT_MASK(32),
921 },
922};
923
924#endif /* CONFIG_S5P_DEV_MFC */
925
926/* MIPI CSIS */ 881/* MIPI CSIS */
927 882
928#ifdef CONFIG_S5P_DEV_CSIS0 883#ifdef CONFIG_S5P_DEV_CSIS0
diff --git a/arch/arm/plat-samsung/include/plat/pm.h b/arch/arm/plat-samsung/include/plat/pm.h
index f6fcadeee969..266a4e3e2458 100644
--- a/arch/arm/plat-samsung/include/plat/pm.h
+++ b/arch/arm/plat-samsung/include/plat/pm.h
@@ -166,6 +166,7 @@ extern void s3c_pm_check_store(void);
166 */ 166 */
167extern void s3c_pm_configure_extint(void); 167extern void s3c_pm_configure_extint(void);
168 168
169#ifdef CONFIG_PLAT_SAMSUNG_SINGLE
169/** 170/**
170 * samsung_pm_restore_gpios() - restore the state of the gpios after sleep. 171 * samsung_pm_restore_gpios() - restore the state of the gpios after sleep.
171 * 172 *
@@ -181,6 +182,10 @@ extern void samsung_pm_restore_gpios(void);
181 * Save the GPIO states for resotration on resume. See samsung_pm_restore_gpios(). 182 * Save the GPIO states for resotration on resume. See samsung_pm_restore_gpios().
182 */ 183 */
183extern void samsung_pm_save_gpios(void); 184extern void samsung_pm_save_gpios(void);
185#else
186#define samsung_pm_restore_gpios() do { } while(0)
187#define samsung_pm_save_gpios() do { } while(0)
188#endif
184 189
185extern void s3c_pm_save_core(void); 190extern void s3c_pm_save_core(void);
186extern void s3c_pm_restore_core(void); 191extern void s3c_pm_restore_core(void);
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h
index 9b87f38fc4f4..1e0aab08c13f 100644
--- a/arch/arm/plat-samsung/include/plat/sdhci.h
+++ b/arch/arm/plat-samsung/include/plat/sdhci.h
@@ -18,62 +18,9 @@
18#ifndef __PLAT_S3C_SDHCI_H 18#ifndef __PLAT_S3C_SDHCI_H
19#define __PLAT_S3C_SDHCI_H __FILE__ 19#define __PLAT_S3C_SDHCI_H __FILE__
20 20
21#include <linux/platform_data/mmc-sdhci-s3c.h>
21#include <plat/devs.h> 22#include <plat/devs.h>
22 23
23struct platform_device;
24struct mmc_host;
25struct mmc_card;
26struct mmc_ios;
27
28enum cd_types {
29 S3C_SDHCI_CD_INTERNAL, /* use mmc internal CD line */
30 S3C_SDHCI_CD_EXTERNAL, /* use external callback */
31 S3C_SDHCI_CD_GPIO, /* use external gpio pin for CD line */
32 S3C_SDHCI_CD_NONE, /* no CD line, use polling to detect card */
33 S3C_SDHCI_CD_PERMANENT, /* no CD line, card permanently wired to host */
34};
35
36/**
37 * struct s3c_sdhci_platdata() - Platform device data for Samsung SDHCI
38 * @max_width: The maximum number of data bits supported.
39 * @host_caps: Standard MMC host capabilities bit field.
40 * @host_caps2: The second standard MMC host capabilities bit field.
41 * @cd_type: Type of Card Detection method (see cd_types enum above)
42 * @ext_cd_init: Initialize external card detect subsystem. Called on
43 * sdhci-s3c driver probe when cd_type == S3C_SDHCI_CD_EXTERNAL.
44 * notify_func argument is a callback to the sdhci-s3c driver
45 * that triggers the card detection event. Callback arguments:
46 * dev is pointer to platform device of the host controller,
47 * state is new state of the card (0 - removed, 1 - inserted).
48 * @ext_cd_cleanup: Cleanup external card detect subsystem. Called on
49 * sdhci-s3c driver remove when cd_type == S3C_SDHCI_CD_EXTERNAL.
50 * notify_func argument is the same callback as for ext_cd_init.
51 * @ext_cd_gpio: gpio pin used for external CD line, valid only if
52 * cd_type == S3C_SDHCI_CD_GPIO
53 * @ext_cd_gpio_invert: invert values for external CD gpio line
54 * @cfg_gpio: Configure the GPIO for a specific card bit-width
55 *
56 * Initialisation data specific to either the machine or the platform
57 * for the device driver to use or call-back when configuring gpio or
58 * card speed information.
59*/
60struct s3c_sdhci_platdata {
61 unsigned int max_width;
62 unsigned int host_caps;
63 unsigned int host_caps2;
64 unsigned int pm_caps;
65 enum cd_types cd_type;
66
67 int ext_cd_gpio;
68 bool ext_cd_gpio_invert;
69 int (*ext_cd_init)(void (*notify_func)(struct platform_device *,
70 int state));
71 int (*ext_cd_cleanup)(void (*notify_func)(struct platform_device *,
72 int state));
73
74 void (*cfg_gpio)(struct platform_device *dev, int width);
75};
76
77/* s3c_sdhci_set_platdata() - common helper for setting SDHCI platform data 24/* s3c_sdhci_set_platdata() - common helper for setting SDHCI platform data
78 * @pd: The default platform data for this device. 25 * @pd: The default platform data for this device.
79 * @set: Pointer to the platform data to fill in. 26 * @set: Pointer to the platform data to fill in.
@@ -378,5 +325,4 @@ static inline void s3c_sdhci_setname(int id, char *name)
378 break; 325 break;
379 } 326 }
380} 327}
381
382#endif /* __PLAT_S3C_SDHCI_H */ 328#endif /* __PLAT_S3C_SDHCI_H */
diff --git a/arch/arm/plat-samsung/irq-vic-timer.c b/arch/arm/plat-samsung/irq-vic-timer.c
index f980cf3d2baa..1113066240cf 100644
--- a/arch/arm/plat-samsung/irq-vic-timer.c
+++ b/arch/arm/plat-samsung/irq-vic-timer.c
@@ -19,6 +19,7 @@
19#include <linux/io.h> 19#include <linux/io.h>
20 20
21#include <mach/map.h> 21#include <mach/map.h>
22#include <mach/irqs.h>
22#include <plat/cpu.h> 23#include <plat/cpu.h>
23#include <plat/irq-vic-timer.h> 24#include <plat/irq-vic-timer.h>
24#include <plat/regs-timer.h> 25#include <plat/regs-timer.h>
diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c
index 002b1472293b..53210ec4e8ec 100644
--- a/arch/arm/plat-samsung/pm.c
+++ b/arch/arm/plat-samsung/pm.c
@@ -27,6 +27,7 @@
27#include <plat/regs-serial.h> 27#include <plat/regs-serial.h>
28#include <mach/regs-clock.h> 28#include <mach/regs-clock.h>
29#include <mach/regs-irq.h> 29#include <mach/regs-irq.h>
30#include <mach/irqs.h>
30#include <asm/irq.h> 31#include <asm/irq.h>
31 32
32#include <plat/pm.h> 33#include <plat/pm.h>
diff --git a/arch/arm/plat-samsung/s5p-dev-mfc.c b/arch/arm/plat-samsung/s5p-dev-mfc.c
index 5ec104b5408b..a93fb6fb6606 100644
--- a/arch/arm/plat-samsung/s5p-dev-mfc.c
+++ b/arch/arm/plat-samsung/s5p-dev-mfc.c
@@ -18,10 +18,50 @@
18#include <linux/of.h> 18#include <linux/of.h>
19 19
20#include <mach/map.h> 20#include <mach/map.h>
21#include <mach/irqs.h>
21#include <plat/devs.h> 22#include <plat/devs.h>
22#include <plat/irqs.h>
23#include <plat/mfc.h> 23#include <plat/mfc.h>
24 24
25static struct resource s5p_mfc_resource[] = {
26 [0] = DEFINE_RES_MEM(S5P_PA_MFC, SZ_64K),
27 [1] = DEFINE_RES_IRQ(IRQ_MFC),
28};
29
30struct platform_device s5p_device_mfc = {
31 .name = "s5p-mfc",
32 .id = -1,
33 .num_resources = ARRAY_SIZE(s5p_mfc_resource),
34 .resource = s5p_mfc_resource,
35};
36
37/*
38 * MFC hardware has 2 memory interfaces which are modelled as two separate
39 * platform devices to let dma-mapping distinguish between them.
40 *
41 * MFC parent device (s5p_device_mfc) must be registered before memory
42 * interface specific devices (s5p_device_mfc_l and s5p_device_mfc_r).
43 */
44
45struct platform_device s5p_device_mfc_l = {
46 .name = "s5p-mfc-l",
47 .id = -1,
48 .dev = {
49 .parent = &s5p_device_mfc.dev,
50 .dma_mask = &s5p_device_mfc_l.dev.coherent_dma_mask,
51 .coherent_dma_mask = DMA_BIT_MASK(32),
52 },
53};
54
55struct platform_device s5p_device_mfc_r = {
56 .name = "s5p-mfc-r",
57 .id = -1,
58 .dev = {
59 .parent = &s5p_device_mfc.dev,
60 .dma_mask = &s5p_device_mfc_r.dev.coherent_dma_mask,
61 .coherent_dma_mask = DMA_BIT_MASK(32),
62 },
63};
64
25struct s5p_mfc_reserved_mem { 65struct s5p_mfc_reserved_mem {
26 phys_addr_t base; 66 phys_addr_t base;
27 unsigned long size; 67 unsigned long size;
diff --git a/arch/arm/plat-samsung/s5p-irq.c b/arch/arm/plat-samsung/s5p-irq.c
index 103e371f5e35..ff1a76011b1e 100644
--- a/arch/arm/plat-samsung/s5p-irq.c
+++ b/arch/arm/plat-samsung/s5p-irq.c
@@ -15,6 +15,7 @@
15#include <linux/io.h> 15#include <linux/io.h>
16#include <linux/irqchip/arm-vic.h> 16#include <linux/irqchip/arm-vic.h>
17 17
18#include <mach/irqs.h>
18#include <mach/map.h> 19#include <mach/map.h>
19#include <plat/regs-timer.h> 20#include <plat/regs-timer.h>
20#include <plat/cpu.h> 21#include <plat/cpu.h>
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index a274d7df3c8c..7b6f8105d352 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -57,7 +57,7 @@ obj-$(CONFIG_GPIO_PL061) += gpio-pl061.o
57obj-$(CONFIG_GPIO_PXA) += gpio-pxa.o 57obj-$(CONFIG_GPIO_PXA) += gpio-pxa.o
58obj-$(CONFIG_GPIO_RC5T583) += gpio-rc5t583.o 58obj-$(CONFIG_GPIO_RC5T583) += gpio-rc5t583.o
59obj-$(CONFIG_GPIO_RDC321X) += gpio-rdc321x.o 59obj-$(CONFIG_GPIO_RDC321X) += gpio-rdc321x.o
60obj-$(CONFIG_PLAT_SAMSUNG) += gpio-samsung.o 60obj-$(CONFIG_PLAT_SAMSUNG_SINGLE) += gpio-samsung.o
61obj-$(CONFIG_ARCH_SA1100) += gpio-sa1100.o 61obj-$(CONFIG_ARCH_SA1100) += gpio-sa1100.o
62obj-$(CONFIG_GPIO_SCH) += gpio-sch.o 62obj-$(CONFIG_GPIO_SCH) += gpio-sch.o
63obj-$(CONFIG_GPIO_SODAVILLE) += gpio-sodaville.o 63obj-$(CONFIG_GPIO_SODAVILLE) += gpio-sodaville.o
diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index d88219e1d86e..d0547448606d 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -180,7 +180,7 @@ config MMC_SDHCI_TEGRA
180 180
181config MMC_SDHCI_S3C 181config MMC_SDHCI_S3C
182 tristate "SDHCI support on Samsung S3C SoC" 182 tristate "SDHCI support on Samsung S3C SoC"
183 depends on MMC_SDHCI && PLAT_SAMSUNG 183 depends on MMC_SDHCI && PLAT_SAMSUNG_SINGLE
184 help 184 help
185 This selects the Secure Digital Host Controller Interface (SDHCI) 185 This selects the Secure Digital Host Controller Interface (SDHCI)
186 often referrered to as the HSMMC block in some of the Samsung S3C 186 often referrered to as the HSMMC block in some of the Samsung S3C
diff --git a/arch/arm/plat-samsung/include/plat/regs-sdhci.h b/drivers/mmc/host/sdhci-s3c-regs.h
index e34049ad44cc..e34049ad44cc 100644
--- a/arch/arm/plat-samsung/include/plat/regs-sdhci.h
+++ b/drivers/mmc/host/sdhci-s3c-regs.h
diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
index 7363efe72287..e4f52b5c2592 100644
--- a/drivers/mmc/host/sdhci-s3c.c
+++ b/drivers/mmc/host/sdhci-s3c.c
@@ -15,6 +15,7 @@
15#include <linux/delay.h> 15#include <linux/delay.h>
16#include <linux/dma-mapping.h> 16#include <linux/dma-mapping.h>
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <linux/platform_data/mmc-sdhci-s3c.h>
18#include <linux/slab.h> 19#include <linux/slab.h>
19#include <linux/clk.h> 20#include <linux/clk.h>
20#include <linux/io.h> 21#include <linux/io.h>
@@ -28,9 +29,7 @@
28 29
29#include <linux/mmc/host.h> 30#include <linux/mmc/host.h>
30 31
31#include <plat/sdhci.h> 32#include "sdhci-s3c-regs.h"
32#include <plat/regs-sdhci.h>
33
34#include "sdhci.h" 33#include "sdhci.h"
35 34
36#define MAX_BUS_CLK (4) 35#define MAX_BUS_CLK (4)
diff --git a/drivers/mtd/onenand/samsung.c b/drivers/mtd/onenand/samsung.c
index 33f2a8fb8df9..2cf74085f935 100644
--- a/drivers/mtd/onenand/samsung.c
+++ b/drivers/mtd/onenand/samsung.c
@@ -23,11 +23,11 @@
23#include <linux/mtd/partitions.h> 23#include <linux/mtd/partitions.h>
24#include <linux/dma-mapping.h> 24#include <linux/dma-mapping.h>
25#include <linux/interrupt.h> 25#include <linux/interrupt.h>
26#include <linux/io.h>
26 27
27#include <asm/mach/flash.h> 28#include <asm/mach/flash.h>
28#include <plat/regs-onenand.h>
29 29
30#include <linux/io.h> 30#include "samsung.h"
31 31
32enum soc_type { 32enum soc_type {
33 TYPE_S3C6400, 33 TYPE_S3C6400,
diff --git a/arch/arm/plat-samsung/include/plat/regs-onenand.h b/drivers/mtd/onenand/samsung.h
index 930ea8b88ed3..c4a80e67e438 100644
--- a/arch/arm/plat-samsung/include/plat/regs-onenand.h
+++ b/drivers/mtd/onenand/samsung.h
@@ -11,8 +11,6 @@
11#ifndef __SAMSUNG_ONENAND_H__ 11#ifndef __SAMSUNG_ONENAND_H__
12#define __SAMSUNG_ONENAND_H__ 12#define __SAMSUNG_ONENAND_H__
13 13
14#include <mach/hardware.h>
15
16/* 14/*
17 * OneNAND Controller 15 * OneNAND Controller
18 */ 16 */
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index fb994e9ddc15..7995f79d07e1 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -29,9 +29,8 @@
29#include <linux/uaccess.h> 29#include <linux/uaccess.h>
30#include <linux/io.h> 30#include <linux/io.h>
31 31
32#include <mach/hardware.h>
33#include <asm/irq.h> 32#include <asm/irq.h>
34#include <plat/regs-rtc.h> 33#include "rtc-s3c.h"
35 34
36enum s3c_cpu_type { 35enum s3c_cpu_type {
37 TYPE_S3C2410, 36 TYPE_S3C2410,
diff --git a/arch/arm/plat-samsung/include/plat/regs-rtc.h b/drivers/rtc/rtc-s3c.h
index 0f8263e93eea..004b61a8343f 100644
--- a/arch/arm/plat-samsung/include/plat/regs-rtc.h
+++ b/drivers/rtc/rtc-s3c.h
@@ -1,5 +1,4 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-rtc.h 1/*
2 *
3 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk> 2 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/ 3 * http://www.simtec.co.uk/products/SWLINUX/
5 * 4 *
diff --git a/drivers/thermal/exynos_thermal.c b/drivers/thermal/exynos_thermal.c
index 46568c078dee..b777ae6f0a8f 100644
--- a/drivers/thermal/exynos_thermal.c
+++ b/drivers/thermal/exynos_thermal.c
@@ -39,8 +39,6 @@
39#include <linux/cpu_cooling.h> 39#include <linux/cpu_cooling.h>
40#include <linux/of.h> 40#include <linux/of.h>
41 41
42#include <plat/cpu.h>
43
44/* Exynos generic registers */ 42/* Exynos generic registers */
45#define EXYNOS_TMU_REG_TRIMINFO 0x0 43#define EXYNOS_TMU_REG_TRIMINFO 0x0
46#define EXYNOS_TMU_REG_CONTROL 0x20 44#define EXYNOS_TMU_REG_CONTROL 0x20
diff --git a/include/linux/platform_data/mmc-sdhci-s3c.h b/include/linux/platform_data/mmc-sdhci-s3c.h
new file mode 100644
index 000000000000..249f02387a35
--- /dev/null
+++ b/include/linux/platform_data/mmc-sdhci-s3c.h
@@ -0,0 +1,56 @@
1#ifndef __PLATFORM_DATA_SDHCI_S3C_H
2#define __PLATFORM_DATA_SDHCI_S3C_H
3
4struct platform_device;
5
6enum cd_types {
7 S3C_SDHCI_CD_INTERNAL, /* use mmc internal CD line */
8 S3C_SDHCI_CD_EXTERNAL, /* use external callback */
9 S3C_SDHCI_CD_GPIO, /* use external gpio pin for CD line */
10 S3C_SDHCI_CD_NONE, /* no CD line, use polling to detect card */
11 S3C_SDHCI_CD_PERMANENT, /* no CD line, card permanently wired to host */
12};
13
14/**
15 * struct s3c_sdhci_platdata() - Platform device data for Samsung SDHCI
16 * @max_width: The maximum number of data bits supported.
17 * @host_caps: Standard MMC host capabilities bit field.
18 * @host_caps2: The second standard MMC host capabilities bit field.
19 * @cd_type: Type of Card Detection method (see cd_types enum above)
20 * @ext_cd_init: Initialize external card detect subsystem. Called on
21 * sdhci-s3c driver probe when cd_type == S3C_SDHCI_CD_EXTERNAL.
22 * notify_func argument is a callback to the sdhci-s3c driver
23 * that triggers the card detection event. Callback arguments:
24 * dev is pointer to platform device of the host controller,
25 * state is new state of the card (0 - removed, 1 - inserted).
26 * @ext_cd_cleanup: Cleanup external card detect subsystem. Called on
27 * sdhci-s3c driver remove when cd_type == S3C_SDHCI_CD_EXTERNAL.
28 * notify_func argument is the same callback as for ext_cd_init.
29 * @ext_cd_gpio: gpio pin used for external CD line, valid only if
30 * cd_type == S3C_SDHCI_CD_GPIO
31 * @ext_cd_gpio_invert: invert values for external CD gpio line
32 * @cfg_gpio: Configure the GPIO for a specific card bit-width
33 *
34 * Initialisation data specific to either the machine or the platform
35 * for the device driver to use or call-back when configuring gpio or
36 * card speed information.
37*/
38struct s3c_sdhci_platdata {
39 unsigned int max_width;
40 unsigned int host_caps;
41 unsigned int host_caps2;
42 unsigned int pm_caps;
43 enum cd_types cd_type;
44
45 int ext_cd_gpio;
46 bool ext_cd_gpio_invert;
47 int (*ext_cd_init)(void (*notify_func)(struct platform_device *,
48 int state));
49 int (*ext_cd_cleanup)(void (*notify_func)(struct platform_device *,
50 int state));
51
52 void (*cfg_gpio)(struct platform_device *dev, int width);
53};
54
55
56#endif /* __PLATFORM_DATA_SDHCI_S3C_H */