aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-04-19 07:35:57 -0400
committerArnd Bergmann <arnd@arndb.de>2013-04-19 08:33:09 -0400
commit56b690481c4baed815b9e4acf5ea89eadb58ba17 (patch)
treea543108af0789de129150ec4662230eeafeae877 /arch
parent408e713545ca0bebe6034935c65e7e95c70d253b (diff)
parentbd51de53e1be9896d815bbea30560262216d4616 (diff)
Merge branch 'samsung/exynos-multiplatform' into next/multiplatform
These patches get us closer to adding multiplatform support on the Exynos platform, they are part of a longer series of patches. This would get all the simple stuff out of the way, and I don't think there is a big risk of introducing regressions with these. A lot of the other patches have already been merged into subsystem trees. After this series in in arm-soc, what is left comes down to * The ASoC conversion to dmaengine won't make it unless someone who knows that code better steps up to do it right away. This means that we won't have audio in a 3.10 multiplatform kernel on Exynos, but it will still work for users that don't enable multiplatform. * The irqchip (combiner), clk and clksource patches are all based on top of other changesets we pulled in from your trees, so I would not make them part of the next/multiplatform branch. We can apply them on top of the next/drivers branch once they are tested successfully. * A trivial patch is needed in the end to actually make CONFIG_ARCH_EXYNOS visible in multiplatform configurations. We will do that as a separate patch once everything else is there. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/Kconfig9
-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/Kconfig40
-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/regs-onenand.h63
-rw-r--r--arch/arm/plat-samsung/include/plat/regs-rtc.h71
-rw-r--r--arch/arm/plat-samsung/include/plat/regs-sdhci.h87
-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
35 files changed, 139 insertions, 355 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 88b662d4618d..21a48d1bde43 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -776,18 +776,11 @@ config ARCH_S5PV210
776 help 776 help
777 Samsung S5PV210/S5PC110 series based systems 777 Samsung S5PV210/S5PC110 series based systems
778 778
779config ARCH_EXYNOS 779config ARCH_EXYNOS_SINGLE
780 bool "Samsung EXYNOS" 780 bool "Samsung EXYNOS"
781 select ARCH_HAS_CPUFREQ
782 select ARCH_HAS_HOLES_MEMORYMODEL 781 select ARCH_HAS_HOLES_MEMORYMODEL
783 select ARCH_SPARSEMEM_ENABLE 782 select ARCH_SPARSEMEM_ENABLE
784 select CLKDEV_LOOKUP
785 select CPU_V7
786 select GENERIC_CLOCKEVENTS
787 select HAVE_CLK
788 select HAVE_S3C2410_I2C if I2C
789 select HAVE_S3C2410_WATCHDOG if WATCHDOG 783 select HAVE_S3C2410_WATCHDOG if WATCHDOG
790 select HAVE_S3C_RTC if RTC_CLASS
791 select NEED_MACH_GPIO_H 784 select NEED_MACH_GPIO_H
792 select NEED_MACH_MEMORY_H 785 select NEED_MACH_MEMORY_H
793 help 786 help
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index e00bd4d4ab63..54d6fdc03e04 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -348,6 +348,7 @@ choice
348 348
349 config DEBUG_S3C_UART0 349 config DEBUG_S3C_UART0
350 depends on PLAT_SAMSUNG 350 depends on PLAT_SAMSUNG
351 select DEBUG_EXYNOS_UART if ARCH_EXYNOS
351 bool "Use S3C UART 0 for low-level debug" 352 bool "Use S3C UART 0 for low-level debug"
352 help 353 help
353 Say Y here if you want the debug print routines to direct 354 Say Y here if you want the debug print routines to direct
@@ -359,6 +360,7 @@ choice
359 360
360 config DEBUG_S3C_UART1 361 config DEBUG_S3C_UART1
361 depends on PLAT_SAMSUNG 362 depends on PLAT_SAMSUNG
363 select DEBUG_EXYNOS_UART if ARCH_EXYNOS
362 bool "Use S3C UART 1 for low-level debug" 364 bool "Use S3C UART 1 for low-level debug"
363 help 365 help
364 Say Y here if you want the debug print routines to direct 366 Say Y here if you want the debug print routines to direct
@@ -370,6 +372,7 @@ choice
370 372
371 config DEBUG_S3C_UART2 373 config DEBUG_S3C_UART2
372 depends on PLAT_SAMSUNG 374 depends on PLAT_SAMSUNG
375 select DEBUG_EXYNOS_UART if ARCH_EXYNOS
373 bool "Use S3C UART 2 for low-level debug" 376 bool "Use S3C UART 2 for low-level debug"
374 help 377 help
375 Say Y here if you want the debug print routines to direct 378 Say Y here if you want the debug print routines to direct
@@ -381,6 +384,7 @@ choice
381 384
382 config DEBUG_S3C_UART3 385 config DEBUG_S3C_UART3
383 depends on PLAT_SAMSUNG && ARCH_EXYNOS 386 depends on PLAT_SAMSUNG && ARCH_EXYNOS
387 select DEBUG_EXYNOS_UART
384 bool "Use S3C UART 3 for low-level debug" 388 bool "Use S3C UART 3 for low-level debug"
385 help 389 help
386 Say Y here if you want the debug print routines to direct 390 Say Y here if you want the debug print routines to direct
@@ -510,6 +514,9 @@ choice
510 514
511endchoice 515endchoice
512 516
517config DEBUG_EXYNOS_UART
518 bool
519
513config DEBUG_IMX_UART_PORT 520config DEBUG_IMX_UART_PORT
514 int "i.MX Debug UART Port Selection" if DEBUG_IMX1_UART || \ 521 int "i.MX Debug UART Port Selection" if DEBUG_IMX1_UART || \
515 DEBUG_IMX25_UART || \ 522 DEBUG_IMX25_UART || \
@@ -607,6 +614,7 @@ config DEBUG_LL_INCLUDE
607 string 614 string
608 default "debug/bcm2835.S" if DEBUG_BCM2835 615 default "debug/bcm2835.S" if DEBUG_BCM2835
609 default "debug/cns3xxx.S" if DEBUG_CNS3XXX 616 default "debug/cns3xxx.S" if DEBUG_CNS3XXX
617 default "debug/exynos.S" if DEBUG_EXYNOS_UART
610 default "debug/icedcc.S" if DEBUG_ICEDCC 618 default "debug/icedcc.S" if DEBUG_ICEDCC
611 default "debug/imx.S" if DEBUG_IMX1_UART || \ 619 default "debug/imx.S" if DEBUG_IMX1_UART || \
612 DEBUG_IMX25_UART || \ 620 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 54cf73e7a791..9cfbb33a9eea 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -7,6 +7,20 @@
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 CPU_V7
17 select GENERIC_CLOCKEVENTS
18 select HAVE_CLK
19 select HAVE_S3C2410_I2C if I2C
20 select HAVE_S3C_RTC if RTC_CLASS
21 help
22 Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5)
23
10if ARCH_EXYNOS 24if ARCH_EXYNOS
11 25
12menu "SAMSUNG EXYNOS SoCs Support" 26menu "SAMSUNG EXYNOS SoCs Support"
@@ -20,6 +34,9 @@ config ARCH_EXYNOS4
20 help 34 help
21 Samsung EXYNOS4 SoCs based systems 35 Samsung EXYNOS4 SoCs based systems
22 36
37config ARCH_EXYNOS4_SINGLE
38 def_bool ARCH_EXYNOS4 && ARCH_EXYNOS_SINGLE
39
23config ARCH_EXYNOS5 40config ARCH_EXYNOS5
24 bool "SAMSUNG EXYNOS5" 41 bool "SAMSUNG EXYNOS5"
25 select HAVE_ARM_SCU if SMP 42 select HAVE_ARM_SCU if SMP
@@ -37,7 +54,7 @@ config CPU_EXYNOS4210
37 select PM_GENERIC_DOMAINS 54 select PM_GENERIC_DOMAINS
38 select S5P_PM if PM 55 select S5P_PM if PM
39 select S5P_SLEEP if PM 56 select S5P_SLEEP if PM
40 select SAMSUNG_DMADEV 57 select SAMSUNG_DMADEV if ARCH_EXYNOS_SINGLE
41 help 58 help
42 Enable EXYNOS4210 CPU support 59 Enable EXYNOS4210 CPU support
43 60
@@ -47,7 +64,7 @@ config SOC_EXYNOS4212
47 depends on ARCH_EXYNOS4 64 depends on ARCH_EXYNOS4
48 select S5P_PM if PM 65 select S5P_PM if PM
49 select S5P_SLEEP if PM 66 select S5P_SLEEP if PM
50 select SAMSUNG_DMADEV 67 select SAMSUNG_DMADEV if ARCH_EXYNOS_SINGLE
51 help 68 help
52 Enable EXYNOS4212 SoC support 69 Enable EXYNOS4212 SoC support
53 70
@@ -55,7 +72,7 @@ config SOC_EXYNOS4412
55 bool "SAMSUNG EXYNOS4412" 72 bool "SAMSUNG EXYNOS4412"
56 default y 73 default y
57 depends on ARCH_EXYNOS4 74 depends on ARCH_EXYNOS4
58 select SAMSUNG_DMADEV 75 select SAMSUNG_DMADEV if ARCH_EXYNOS_SINGLE
59 help 76 help
60 Enable EXYNOS4412 SoC support 77 Enable EXYNOS4412 SoC support
61 78
@@ -66,7 +83,7 @@ config SOC_EXYNOS5250
66 select S5P_PM if PM 83 select S5P_PM if PM
67 select S5P_SLEEP if PM 84 select S5P_SLEEP if PM
68 select S5P_DEV_MFC 85 select S5P_DEV_MFC
69 select SAMSUNG_DMADEV 86 select SAMSUNG_DMADEV if ARCH_EXYNOS_SINGLE
70 help 87 help
71 Enable EXYNOS5250 SoC support 88 Enable EXYNOS5250 SoC support
72 89
@@ -87,6 +104,19 @@ config EXYNOS4_MCT
87 help 104 help
88 Use MCT (Multi Core Timer) as kernel timers 105 Use MCT (Multi Core Timer) as kernel timers
89 106
107config EXYNOS_ATAGS
108 bool "ATAGS based boot for EXYNOS (deprecated)"
109 depends on !ARCH_MULTIPLATFORM
110 depends on ATAGS
111 default y
112 help
113 The EXYNOS platform is moving towards being completely probed
114 through device tree. This enables support for board files using
115 the traditional ATAGS boot format.
116 Note that this option is not available for multiplatform builds.
117
118if EXYNOS_ATAGS
119
90config EXYNOS_DEV_DMA 120config EXYNOS_DEV_DMA
91 bool 121 bool
92 help 122 help
@@ -402,6 +432,8 @@ config MACH_SMDK4412
402 Machine support for Samsung SMDK4412 432 Machine support for Samsung SMDK4412
403endif 433endif
404 434
435endif
436
405comment "Flattened Device Tree based board for EXYNOS SoCs" 437comment "Flattened Device Tree based board for EXYNOS SoCs"
406 438
407config MACH_EXYNOS4_DT 439config MACH_EXYNOS4_DT
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
index 435757e57bb4..57e9124d95e0 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 :=
@@ -48,12 +49,12 @@ obj-$(CONFIG_MACH_EXYNOS5_DT) += mach-exynos5-dt.o
48# device support 49# device support
49 50
50obj-y += dev-uart.o 51obj-y += dev-uart.o
51obj-$(CONFIG_ARCH_EXYNOS4) += dev-audio.o 52obj-$(CONFIG_ARCH_EXYNOS4_SINGLE) += dev-audio.o
52obj-$(CONFIG_EXYNOS4_DEV_AHCI) += dev-ahci.o 53obj-$(CONFIG_EXYNOS4_DEV_AHCI) += dev-ahci.o
53obj-$(CONFIG_EXYNOS_DEV_DMA) += dma.o 54obj-$(CONFIG_EXYNOS_DEV_DMA) += dma.o
54obj-$(CONFIG_EXYNOS4_DEV_USB_OHCI) += dev-ohci.o 55obj-$(CONFIG_EXYNOS4_DEV_USB_OHCI) += dev-ohci.o
55 56
56obj-$(CONFIG_ARCH_EXYNOS) += setup-i2c0.o 57obj-$(CONFIG_ARCH_EXYNOS_SINGLE) += setup-i2c0.o
57obj-$(CONFIG_EXYNOS4_SETUP_FIMC) += setup-fimc.o 58obj-$(CONFIG_EXYNOS4_SETUP_FIMC) += setup-fimc.o
58obj-$(CONFIG_EXYNOS4_SETUP_FIMD0) += setup-fimd0.o 59obj-$(CONFIG_EXYNOS4_SETUP_FIMD0) += setup-fimd0.o
59obj-$(CONFIG_EXYNOS4_SETUP_I2C1) += setup-i2c1.o 60obj-$(CONFIG_EXYNOS4_SETUP_I2C1) += setup-i2c1.o
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index d63d399c7bae..83bd3f0e1519 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -368,6 +368,9 @@ static void __init exynos4_map_io(void)
368 else 368 else
369 iotable_init(exynos4_iodesc1, ARRAY_SIZE(exynos4_iodesc1)); 369 iotable_init(exynos4_iodesc1, ARRAY_SIZE(exynos4_iodesc1));
370 370
371 if (!IS_ENABLED(CONFIG_EXYNOS_ATAGS))
372 return
373
371 /* initialize device information early */ 374 /* initialize device information early */
372 exynos4_default_sdhci0(); 375 exynos4_default_sdhci0();
373 exynos4_default_sdhci1(); 376 exynos4_default_sdhci1();
@@ -570,6 +573,8 @@ static void __init exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no)
570 s3c24xx_init_uartdevs("exynos4210-uart", exynos4_uart_resources, cfg, no); 573 s3c24xx_init_uartdevs("exynos4210-uart", exynos4_uart_resources, cfg, no);
571} 574}
572 575
576
577#ifdef CONFIG_EXYNOS_ATAGS
573static void __iomem *exynos_eint_base; 578static void __iomem *exynos_eint_base;
574 579
575static DEFINE_SPINLOCK(eint_lock); 580static DEFINE_SPINLOCK(eint_lock);
@@ -875,3 +880,4 @@ static int __init exynos_init_irq_eint(void)
875 return 0; 880 return 0;
876} 881}
877arch_initcall(exynos_init_irq_eint); 882arch_initcall(exynos_init_irq_eint);
883#endif
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 1f4dc35cd4b9..8bd5dde5fc78 100644
--- a/arch/arm/mach-exynos/include/mach/irqs.h
+++ b/arch/arm/mach-exynos/include/mach/irqs.h
@@ -466,7 +466,10 @@
466#define IRQ_TIMER_BASE (IRQ_GPIO_END + 64) 466#define IRQ_TIMER_BASE (IRQ_GPIO_END + 64)
467 467
468/* Set the default NR_IRQS */ 468/* Set the default NR_IRQS */
469#define EXYNOS_NR_IRQS (IRQ_TIMER_BASE + IRQ_TIMER_COUNT)
469 470
470#define NR_IRQS (IRQ_TIMER_BASE + IRQ_TIMER_COUNT) 471#ifndef CONFIG_SPARSE_IRQ
472#define NR_IRQS EXYNOS_NR_IRQS
473#endif
471 474
472#endif /* __ASM_ARCH_IRQS_H */ 475#endif /* __ASM_ARCH_IRQS_H */
diff --git a/arch/arm/mach-exynos/mach-armlex4210.c b/arch/arm/mach-exynos/mach-armlex4210.c
index 685f29173afa..2126f3503a3f 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 1ea79730187f..ab920e34bd0a 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 579d2d171daa..f23ce40139c3 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 fe6149624b84..5df91236dbb4 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 d71672922b19..9a1d3596d4ca 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 a9d52167e16e..8aae6816ebc2 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 32 select SAMSUNG_CLKSRC
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 3a7c64d1814a..cf684b2eb6fc 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
@@ -34,7 +37,7 @@ obj-$(CONFIG_S3C_ADC) += adc.o
34 37
35obj-y += platformdata.o 38obj-y += platformdata.o
36 39
37obj-y += devs.o 40obj-$(CONFIG_PLAT_SAMSUNG_SINGLE) += devs.o
38obj-y += dev-uart.o 41obj-y += dev-uart.o
39obj-$(CONFIG_S5P_DEV_MFC) += s5p-dev-mfc.o 42obj-$(CONFIG_S5P_DEV_MFC) += s5p-dev-mfc.o
40obj-$(CONFIG_S5P_DEV_UART) += s5p-dev-uart.o 43obj-$(CONFIG_S5P_DEV_UART) += s5p-dev-uart.o
@@ -51,9 +54,10 @@ obj-$(CONFIG_S3C_DMA) += dma.o s3c-dma-ops.o
51obj-$(CONFIG_SAMSUNG_DMADEV) += dma-ops.o 54obj-$(CONFIG_SAMSUNG_DMADEV) += dma-ops.o
52 55
53# PM support 56# PM support
54
55obj-$(CONFIG_PM) += pm.o 57obj-$(CONFIG_PM) += pm.o
58ifdef CONFIG_PLAT_SAMSUNG_SINGLE
56obj-$(CONFIG_PM) += pm-gpio.o 59obj-$(CONFIG_PM) += pm-gpio.o
60endif
57obj-$(CONFIG_SAMSUNG_PM_CHECK) += pm-check.o 61obj-$(CONFIG_SAMSUNG_PM_CHECK) += pm-check.o
58 62
59obj-$(CONFIG_SAMSUNG_WAKEMASK) += wakeup-mask.o 63obj-$(CONFIG_SAMSUNG_WAKEMASK) += wakeup-mask.o
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index 51afedda9ab6..de9ad27495e7 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/regs-onenand.h b/arch/arm/plat-samsung/include/plat/regs-onenand.h
deleted file mode 100644
index 930ea8b88ed3..000000000000
--- a/arch/arm/plat-samsung/include/plat/regs-onenand.h
+++ /dev/null
@@ -1,63 +0,0 @@
1/*
2 * linux/arch/arm/plat-s3c/include/plat/regs-onenand.h
3 *
4 * Copyright (C) 2008-2010 Samsung Electronics
5 * Kyungmin Park <kyungmin.park@samsung.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#ifndef __SAMSUNG_ONENAND_H__
12#define __SAMSUNG_ONENAND_H__
13
14#include <mach/hardware.h>
15
16/*
17 * OneNAND Controller
18 */
19#define MEM_CFG_OFFSET 0x0000
20#define BURST_LEN_OFFSET 0x0010
21#define MEM_RESET_OFFSET 0x0020
22#define INT_ERR_STAT_OFFSET 0x0030
23#define INT_ERR_MASK_OFFSET 0x0040
24#define INT_ERR_ACK_OFFSET 0x0050
25#define ECC_ERR_STAT_OFFSET 0x0060
26#define MANUFACT_ID_OFFSET 0x0070
27#define DEVICE_ID_OFFSET 0x0080
28#define DATA_BUF_SIZE_OFFSET 0x0090
29#define BOOT_BUF_SIZE_OFFSET 0x00A0
30#define BUF_AMOUNT_OFFSET 0x00B0
31#define TECH_OFFSET 0x00C0
32#define FBA_WIDTH_OFFSET 0x00D0
33#define FPA_WIDTH_OFFSET 0x00E0
34#define FSA_WIDTH_OFFSET 0x00F0
35#define TRANS_SPARE_OFFSET 0x0140
36#define DBS_DFS_WIDTH_OFFSET 0x0160
37#define INT_PIN_ENABLE_OFFSET 0x01A0
38#define ACC_CLOCK_OFFSET 0x01C0
39#define FLASH_VER_ID_OFFSET 0x01F0
40#define FLASH_AUX_CNTRL_OFFSET 0x0300 /* s3c64xx only */
41
42#define ONENAND_MEM_RESET_HOT 0x3
43#define ONENAND_MEM_RESET_COLD 0x2
44#define ONENAND_MEM_RESET_WARM 0x1
45
46#define CACHE_OP_ERR (1 << 13)
47#define RST_CMP (1 << 12)
48#define RDY_ACT (1 << 11)
49#define INT_ACT (1 << 10)
50#define UNSUP_CMD (1 << 9)
51#define LOCKED_BLK (1 << 8)
52#define BLK_RW_CMP (1 << 7)
53#define ERS_CMP (1 << 6)
54#define PGM_CMP (1 << 5)
55#define LOAD_CMP (1 << 4)
56#define ERS_FAIL (1 << 3)
57#define PGM_FAIL (1 << 2)
58#define INT_TO (1 << 1)
59#define LD_FAIL_ECC_ERR (1 << 0)
60
61#define TSRF (1 << 0)
62
63#endif
diff --git a/arch/arm/plat-samsung/include/plat/regs-rtc.h b/arch/arm/plat-samsung/include/plat/regs-rtc.h
deleted file mode 100644
index 0f8263e93eea..000000000000
--- a/arch/arm/plat-samsung/include/plat/regs-rtc.h
+++ /dev/null
@@ -1,71 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-rtc.h
2 *
3 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C2410 Internal RTC register definition
11*/
12
13#ifndef __ASM_ARCH_REGS_RTC_H
14#define __ASM_ARCH_REGS_RTC_H __FILE__
15
16#define S3C2410_RTCREG(x) (x)
17#define S3C2410_INTP S3C2410_RTCREG(0x30)
18#define S3C2410_INTP_ALM (1 << 1)
19#define S3C2410_INTP_TIC (1 << 0)
20
21#define S3C2410_RTCCON S3C2410_RTCREG(0x40)
22#define S3C2410_RTCCON_RTCEN (1 << 0)
23#define S3C2410_RTCCON_CNTSEL (1 << 2)
24#define S3C2410_RTCCON_CLKRST (1 << 3)
25#define S3C2443_RTCCON_TICSEL (1 << 4)
26#define S3C64XX_RTCCON_TICEN (1 << 8)
27
28#define S3C2410_TICNT S3C2410_RTCREG(0x44)
29#define S3C2410_TICNT_ENABLE (1 << 7)
30
31/* S3C2443: tick count is 15 bit wide
32 * TICNT[6:0] contains upper 7 bits
33 * TICNT1[7:0] contains lower 8 bits
34 */
35#define S3C2443_TICNT_PART(x) ((x & 0x7f00) >> 8)
36#define S3C2443_TICNT1 S3C2410_RTCREG(0x4C)
37#define S3C2443_TICNT1_PART(x) (x & 0xff)
38
39/* S3C2416: tick count is 32 bit wide
40 * TICNT[6:0] contains bits [14:8]
41 * TICNT1[7:0] contains lower 8 bits
42 * TICNT2[16:0] contains upper 17 bits
43 */
44#define S3C2416_TICNT2 S3C2410_RTCREG(0x48)
45#define S3C2416_TICNT2_PART(x) ((x & 0xffff8000) >> 15)
46
47#define S3C2410_RTCALM S3C2410_RTCREG(0x50)
48#define S3C2410_RTCALM_ALMEN (1 << 6)
49#define S3C2410_RTCALM_YEAREN (1 << 5)
50#define S3C2410_RTCALM_MONEN (1 << 4)
51#define S3C2410_RTCALM_DAYEN (1 << 3)
52#define S3C2410_RTCALM_HOUREN (1 << 2)
53#define S3C2410_RTCALM_MINEN (1 << 1)
54#define S3C2410_RTCALM_SECEN (1 << 0)
55
56#define S3C2410_ALMSEC S3C2410_RTCREG(0x54)
57#define S3C2410_ALMMIN S3C2410_RTCREG(0x58)
58#define S3C2410_ALMHOUR S3C2410_RTCREG(0x5c)
59
60#define S3C2410_ALMDATE S3C2410_RTCREG(0x60)
61#define S3C2410_ALMMON S3C2410_RTCREG(0x64)
62#define S3C2410_ALMYEAR S3C2410_RTCREG(0x68)
63
64#define S3C2410_RTCSEC S3C2410_RTCREG(0x70)
65#define S3C2410_RTCMIN S3C2410_RTCREG(0x74)
66#define S3C2410_RTCHOUR S3C2410_RTCREG(0x78)
67#define S3C2410_RTCDATE S3C2410_RTCREG(0x7c)
68#define S3C2410_RTCMON S3C2410_RTCREG(0x84)
69#define S3C2410_RTCYEAR S3C2410_RTCREG(0x88)
70
71#endif /* __ASM_ARCH_REGS_RTC_H */
diff --git a/arch/arm/plat-samsung/include/plat/regs-sdhci.h b/arch/arm/plat-samsung/include/plat/regs-sdhci.h
deleted file mode 100644
index e34049ad44cc..000000000000
--- a/arch/arm/plat-samsung/include/plat/regs-sdhci.h
+++ /dev/null
@@ -1,87 +0,0 @@
1/* linux/arch/arm/plat-s3c/include/plat/regs-sdhci.h
2 *
3 * Copyright 2008 Openmoko, Inc.
4 * Copyright 2008 Simtec Electronics
5 * http://armlinux.simtec.co.uk/
6 * Ben Dooks <ben@simtec.co.uk>
7 *
8 * S3C Platform - SDHCI (HSMMC) register definitions
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13*/
14
15#ifndef __PLAT_S3C_SDHCI_REGS_H
16#define __PLAT_S3C_SDHCI_REGS_H __FILE__
17
18#define S3C_SDHCI_CONTROL2 (0x80)
19#define S3C_SDHCI_CONTROL3 (0x84)
20#define S3C64XX_SDHCI_CONTROL4 (0x8C)
21
22#define S3C64XX_SDHCI_CTRL2_ENSTAASYNCCLR (1 << 31)
23#define S3C64XX_SDHCI_CTRL2_ENCMDCNFMSK (1 << 30)
24#define S3C_SDHCI_CTRL2_CDINVRXD3 (1 << 29)
25#define S3C_SDHCI_CTRL2_SLCARDOUT (1 << 28)
26
27#define S3C_SDHCI_CTRL2_FLTCLKSEL_MASK (0xf << 24)
28#define S3C_SDHCI_CTRL2_FLTCLKSEL_SHIFT (24)
29#define S3C_SDHCI_CTRL2_FLTCLKSEL(_x) ((_x) << 24)
30
31#define S3C_SDHCI_CTRL2_LVLDAT_MASK (0xff << 16)
32#define S3C_SDHCI_CTRL2_LVLDAT_SHIFT (16)
33#define S3C_SDHCI_CTRL2_LVLDAT(_x) ((_x) << 16)
34
35#define S3C_SDHCI_CTRL2_ENFBCLKTX (1 << 15)
36#define S3C_SDHCI_CTRL2_ENFBCLKRX (1 << 14)
37#define S3C_SDHCI_CTRL2_SDCDSEL (1 << 13)
38#define S3C_SDHCI_CTRL2_SDSIGPC (1 << 12)
39#define S3C_SDHCI_CTRL2_ENBUSYCHKTXSTART (1 << 11)
40
41#define S3C_SDHCI_CTRL2_DFCNT_MASK (0x3 << 9)
42#define S3C_SDHCI_CTRL2_DFCNT_SHIFT (9)
43#define S3C_SDHCI_CTRL2_DFCNT_NONE (0x0 << 9)
44#define S3C_SDHCI_CTRL2_DFCNT_4SDCLK (0x1 << 9)
45#define S3C_SDHCI_CTRL2_DFCNT_16SDCLK (0x2 << 9)
46#define S3C_SDHCI_CTRL2_DFCNT_64SDCLK (0x3 << 9)
47
48#define S3C_SDHCI_CTRL2_ENCLKOUTHOLD (1 << 8)
49#define S3C_SDHCI_CTRL2_RWAITMODE (1 << 7)
50#define S3C_SDHCI_CTRL2_DISBUFRD (1 << 6)
51#define S3C_SDHCI_CTRL2_SELBASECLK_MASK (0x3 << 4)
52#define S3C_SDHCI_CTRL2_SELBASECLK_SHIFT (4)
53#define S3C_SDHCI_CTRL2_PWRSYNC (1 << 3)
54#define S3C_SDHCI_CTRL2_ENCLKOUTMSKCON (1 << 1)
55#define S3C_SDHCI_CTRL2_HWINITFIN (1 << 0)
56
57#define S3C_SDHCI_CTRL3_FCSEL3 (1 << 31)
58#define S3C_SDHCI_CTRL3_FCSEL2 (1 << 23)
59#define S3C_SDHCI_CTRL3_FCSEL1 (1 << 15)
60#define S3C_SDHCI_CTRL3_FCSEL0 (1 << 7)
61
62#define S3C_SDHCI_CTRL3_FIA3_MASK (0x7f << 24)
63#define S3C_SDHCI_CTRL3_FIA3_SHIFT (24)
64#define S3C_SDHCI_CTRL3_FIA3(_x) ((_x) << 24)
65
66#define S3C_SDHCI_CTRL3_FIA2_MASK (0x7f << 16)
67#define S3C_SDHCI_CTRL3_FIA2_SHIFT (16)
68#define S3C_SDHCI_CTRL3_FIA2(_x) ((_x) << 16)
69
70#define S3C_SDHCI_CTRL3_FIA1_MASK (0x7f << 8)
71#define S3C_SDHCI_CTRL3_FIA1_SHIFT (8)
72#define S3C_SDHCI_CTRL3_FIA1(_x) ((_x) << 8)
73
74#define S3C_SDHCI_CTRL3_FIA0_MASK (0x7f << 0)
75#define S3C_SDHCI_CTRL3_FIA0_SHIFT (0)
76#define S3C_SDHCI_CTRL3_FIA0(_x) ((_x) << 0)
77
78#define S3C64XX_SDHCI_CONTROL4_DRIVE_MASK (0x3 << 16)
79#define S3C64XX_SDHCI_CONTROL4_DRIVE_SHIFT (16)
80#define S3C64XX_SDHCI_CONTROL4_DRIVE_2mA (0x0 << 16)
81#define S3C64XX_SDHCI_CONTROL4_DRIVE_4mA (0x1 << 16)
82#define S3C64XX_SDHCI_CONTROL4_DRIVE_7mA (0x2 << 16)
83#define S3C64XX_SDHCI_CONTROL4_DRIVE_9mA (0x3 << 16)
84
85#define S3C64XX_SDHCI_CONTROL4_BUSY (1)
86
87#endif /* __PLAT_S3C_SDHCI_REGS_H */
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>