Skip to content

Commit 8301457

Browse files
committed
ARM: EXYNOS: Add ARCH_EXYNOS and reorganize arch/arm/mach-exynos
The arch/arm/mach-exynos4 directory (CONFIG_ARCH_EXYNOS4) has made for plaforms based on EXYNOS4 SoCs. But since upcoming Samsung's SoCs such as EXYNOS5 (ARM Cortex A15) can reuse most codes in current mach-exynos4, one mach-exynos directory will be used for them. This patch changes to CONFIG_ARCH_EXYNOS (arch/arm/mach-exynos) but keeps original CONFIG_ARCH_EXYNOS4 in mach-exynos/Kconfig to avoid changing in driver side. Cc: Arnd Bergmann <arnd@arndb.de> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
1 parent e700e41 commit 8301457

76 files changed

Lines changed: 106 additions & 81 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎arch/arm/Kconfig‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -837,8 +837,8 @@ config ARCH_S5PV210
837837
help
838838
Samsung S5PV210/S5PC110 series based systems
839839

840-
config ARCH_EXYNOS4
841-
bool "Samsung EXYNOS4"
840+
config ARCH_EXYNOS
841+
bool "SAMSUNG EXYNOS"
842842
select CPU_V7
843843
select ARCH_SPARSEMEM_ENABLE
844844
select ARCH_HAS_HOLES_MEMORYMODEL
@@ -852,7 +852,7 @@ config ARCH_EXYNOS4
852852
select HAVE_S3C2410_WATCHDOG if WATCHDOG
853853
select NEED_MACH_MEMORY_H
854854
help
855-
Samsung EXYNOS4 series based systems
855+
Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5)
856856

857857
config ARCH_SHARK
858858
bool "Shark"
@@ -1079,7 +1079,7 @@ source "arch/arm/mach-s5pc100/Kconfig"
10791079

10801080
source "arch/arm/mach-s5pv210/Kconfig"
10811081

1082-
source "arch/arm/mach-exynos4/Kconfig"
1082+
source "arch/arm/mach-exynos/Kconfig"
10831083

10841084
source "arch/arm/mach-shmobile/Kconfig"
10851085

‎arch/arm/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ machine-$(CONFIG_ARCH_S3C64XX) := s3c64xx
180180
machine-$(CONFIG_ARCH_S5P64X0) := s5p64x0
181181
machine-$(CONFIG_ARCH_S5PC100) := s5pc100
182182
machine-$(CONFIG_ARCH_S5PV210) := s5pv210
183-
machine-$(CONFIG_ARCH_EXYNOS4) := exynos4
183+
machine-$(CONFIG_ARCH_EXYNOS4) := exynos
184184
machine-$(CONFIG_ARCH_SA1100) := sa1100
185185
machine-$(CONFIG_ARCH_SHARK) := shark
186186
machine-$(CONFIG_ARCH_SHMOBILE) := shmobile

‎arch/arm/configs/exynos4_defconfig‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,18 @@ CONFIG_KALLSYMS_ALL=y
44
CONFIG_MODULES=y
55
CONFIG_MODULE_UNLOAD=y
66
# CONFIG_BLK_DEV_BSG is not set
7-
CONFIG_ARCH_EXYNOS4=y
7+
CONFIG_ARCH_EXYNOS=y
88
CONFIG_S3C_LOWLEVEL_UART_PORT=1
99
CONFIG_MACH_SMDKC210=y
10-
CONFIG_MACH_SMDKV310=y
1110
CONFIG_MACH_ARMLEX4210=y
1211
CONFIG_MACH_UNIVERSAL_C210=y
1312
CONFIG_MACH_NURI=y
1413
CONFIG_MACH_ORIGEN=y
14+
CONFIG_MACH_SMDK4412=y
1515
CONFIG_NO_HZ=y
1616
CONFIG_HIGH_RES_TIMERS=y
1717
CONFIG_SMP=y
1818
CONFIG_NR_CPUS=2
19-
CONFIG_HOTPLUG_CPU=y
2019
CONFIG_PREEMPT=y
2120
CONFIG_AEABI=y
2221
CONFIG_CMDLINE="root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC1,115200 init=/linuxrc mem=256M"
@@ -61,13 +60,9 @@ CONFIG_DETECT_HUNG_TASK=y
6160
CONFIG_DEBUG_RT_MUTEXES=y
6261
CONFIG_DEBUG_SPINLOCK=y
6362
CONFIG_DEBUG_MUTEXES=y
64-
CONFIG_DEBUG_SPINLOCK_SLEEP=y
6563
CONFIG_DEBUG_INFO=y
66-
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
6764
CONFIG_SYSCTL_SYSCALL_CHECK=y
6865
CONFIG_DEBUG_USER=y
69-
CONFIG_DEBUG_ERRORS=y
7066
CONFIG_DEBUG_LL=y
7167
CONFIG_EARLY_PRINTK=y
72-
CONFIG_DEBUG_S3C_UART=1
7368
CONFIG_CRC_CCITT=y
Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# arch/arm/mach-exynos4/Kconfig
1+
# arch/arm/mach-exynos/Kconfig
22
#
33
# Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
44
# http://www.samsung.com/
@@ -7,10 +7,27 @@
77

88
# Configuration options for the EXYNOS4
99

10-
if ARCH_EXYNOS4
10+
if ARCH_EXYNOS
11+
12+
menu "SAMSUNG EXYNOS SoCs Support"
13+
14+
choice
15+
prompt "EXYNOS System Type"
16+
default ARCH_EXYNOS4
17+
18+
config ARCH_EXYNOS4
19+
bool "SAMSUNG EXYNOS4"
20+
help
21+
Samsung EXYNOS4 SoCs based systems
22+
23+
endchoice
24+
25+
comment "EXYNOS SoCs"
1126

1227
config CPU_EXYNOS4210
13-
bool
28+
bool "SAMSUNG EXYNOS4210"
29+
default y
30+
depends on ARCH_EXYNOS4
1431
select SAMSUNG_DMADEV
1532
select ARM_CPU_SUSPEND if PM
1633
select S5P_PM if PM
@@ -19,15 +36,18 @@ config CPU_EXYNOS4210
1936
Enable EXYNOS4210 CPU support
2037

2138
config SOC_EXYNOS4212
22-
bool
23-
select ARM_CPU_SUSPEND if PM
39+
bool "SAMSUNG EXYNOS4212"
40+
default y
41+
depends on ARCH_EXYNOS4
2442
select S5P_PM if PM
2543
select S5P_SLEEP if PM
2644
help
2745
Enable EXYNOS4212 SoC support
2846

2947
config SOC_EXYNOS4412
30-
bool
48+
bool "SAMSUNG EXYNOS4412"
49+
default y
50+
depends on ARCH_EXYNOS4
3151
help
3252
Enable EXYNOS4412 SoC support
3353

@@ -125,7 +145,7 @@ config EXYNOS4_SETUP_USB_PHY
125145

126146
# machine support
127147

128-
menu "EXYNOS4 Machines"
148+
if ARCH_EXYNOS4
129149

130150
comment "EXYNOS4210 Boards"
131151

@@ -305,12 +325,11 @@ config MACH_SMDK4412
305325
select MACH_SMDK4212
306326
help
307327
Machine support for Samsung SMDK4412
328+
endif
308329

309-
endmenu
310-
311-
comment "Configuration for HSMMC bus width"
330+
if ARCH_EXYNOS4
312331

313-
menu "Use 8-bit bus width"
332+
comment "Configuration for HSMMC 8-bit bus width"
314333

315334
config EXYNOS4_SDHCI_CH0_8BIT
316335
bool "Channel 0 with 8-bit bus"
@@ -323,6 +342,7 @@ config EXYNOS4_SDHCI_CH2_8BIT
323342
help
324343
Support HSMMC Channel 2 8-bit bus.
325344
If selected, Channel 3 is disabled.
345+
endif
326346

327347
endmenu
328348

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# arch/arm/mach-exynos4/Makefile
1+
# arch/arm/mach-exynos/Makefile
22
#
33
# Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
44
# http://www.samsung.com/
@@ -12,8 +12,8 @@ obj- :=
1212

1313
# Core support for EXYNOS4 system
1414

15-
obj-$(CONFIG_ARCH_EXYNOS4) += cpu.o init.o clock.o irq-combiner.o
16-
obj-$(CONFIG_ARCH_EXYNOS4) += setup-i2c0.o irq-eint.o dma.o pmu.o
15+
obj-$(CONFIG_ARCH_EXYNOS4) += cpu.o init.o clock.o irq-combiner.o setup-i2c0.o
16+
obj-$(CONFIG_ARCH_EXYNOS4) += irq-eint.o dma.o pmu.o
1717
obj-$(CONFIG_CPU_EXYNOS4210) += clock-exynos4210.o
1818
obj-$(CONFIG_SOC_EXYNOS4212) += clock-exynos4212.o
1919
obj-$(CONFIG_PM) += pm.o
@@ -39,11 +39,11 @@ obj-$(CONFIG_MACH_SMDK4412) += mach-smdk4x12.o
3939

4040
# device support
4141

42-
obj-y += dev-audio.o
42+
obj-$(CONFIG_ARCH_EXYNOS4) += dev-audio.o
4343
obj-$(CONFIG_EXYNOS4_DEV_AHCI) += dev-ahci.o
4444
obj-$(CONFIG_EXYNOS4_DEV_PD) += dev-pd.o
4545
obj-$(CONFIG_EXYNOS4_DEV_SYSMMU) += dev-sysmmu.o
46-
obj-$(CONFIG_EXYNOS4_DEV_DWMCI) += dev-dwmci.o
46+
obj-$(CONFIG_EXYNOS4_DEV_DWMCI) += dev-dwmci.o
4747

4848
obj-$(CONFIG_EXYNOS4_SETUP_FIMC) += setup-fimc.o
4949
obj-$(CONFIG_EXYNOS4_SETUP_FIMD0) += setup-fimd0.o
@@ -57,5 +57,4 @@ obj-$(CONFIG_EXYNOS4_SETUP_I2C7) += setup-i2c7.o
5757
obj-$(CONFIG_EXYNOS4_SETUP_KEYPAD) += setup-keypad.o
5858
obj-$(CONFIG_EXYNOS4_SETUP_SDHCI) += setup-sdhci.o
5959
obj-$(CONFIG_EXYNOS4_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o
60-
6160
obj-$(CONFIG_EXYNOS4_SETUP_USB_PHY) += setup-usb-phy.o
Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* linux/arch/arm/mach-exynos4/cpu.c
1+
/* linux/arch/arm/mach-exynos/cpu.c
22
*
33
* Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
44
* http://www.samsung.com
@@ -40,27 +40,46 @@ extern int combiner_init(unsigned int combiner_nr, void __iomem *base,
4040
extern void combiner_cascade_irq(unsigned int combiner_nr, unsigned int irq);
4141

4242
/* Initial IO mappings */
43-
static struct map_desc exynos4_iodesc[] __initdata = {
43+
static struct map_desc exynos_iodesc[] __initdata = {
4444
{
4545
.virtual = (unsigned long)S5P_VA_SYSTIMER,
46-
.pfn = __phys_to_pfn(EXYNOS4_PA_SYSTIMER),
46+
.pfn = __phys_to_pfn(EXYNOS_PA_SYSTIMER),
4747
.length = SZ_4K,
48-
.type = MT_DEVICE,
49-
}, {
50-
.virtual = (unsigned long)S5P_VA_CMU,
51-
.pfn = __phys_to_pfn(EXYNOS4_PA_CMU),
52-
.length = SZ_128K,
5348
.type = MT_DEVICE,
5449
}, {
5550
.virtual = (unsigned long)S5P_VA_PMU,
56-
.pfn = __phys_to_pfn(EXYNOS4_PA_PMU),
51+
.pfn = __phys_to_pfn(EXYNOS_PA_PMU),
5752
.length = SZ_64K,
5853
.type = MT_DEVICE,
5954
}, {
6055
.virtual = (unsigned long)S5P_VA_COMBINER_BASE,
61-
.pfn = __phys_to_pfn(EXYNOS4_PA_COMBINER),
56+
.pfn = __phys_to_pfn(EXYNOS_PA_COMBINER),
6257
.length = SZ_4K,
6358
.type = MT_DEVICE,
59+
}, {
60+
.virtual = (unsigned long)S5P_VA_GIC_CPU,
61+
.pfn = __phys_to_pfn(EXYNOS_PA_GIC_CPU),
62+
.length = SZ_64K,
63+
.type = MT_DEVICE,
64+
}, {
65+
.virtual = (unsigned long)S5P_VA_GIC_DIST,
66+
.pfn = __phys_to_pfn(EXYNOS_PA_GIC_DIST),
67+
.length = SZ_64K,
68+
.type = MT_DEVICE,
69+
}, {
70+
.virtual = (unsigned long)S3C_VA_UART,
71+
.pfn = __phys_to_pfn(S3C_PA_UART),
72+
.length = SZ_512K,
73+
.type = MT_DEVICE,
74+
},
75+
};
76+
77+
static struct map_desc exynos4_iodesc[] __initdata = {
78+
{
79+
.virtual = (unsigned long)S5P_VA_CMU,
80+
.pfn = __phys_to_pfn(EXYNOS4_PA_CMU),
81+
.length = SZ_128K,
82+
.type = MT_DEVICE,
6483
}, {
6584
.virtual = (unsigned long)S5P_VA_COREPERI_BASE,
6685
.pfn = __phys_to_pfn(EXYNOS4_PA_COREPERI),
@@ -91,11 +110,6 @@ static struct map_desc exynos4_iodesc[] __initdata = {
91110
.pfn = __phys_to_pfn(EXYNOS4_PA_DMC0),
92111
.length = SZ_4K,
93112
.type = MT_DEVICE,
94-
}, {
95-
.virtual = (unsigned long)S3C_VA_UART,
96-
.pfn = __phys_to_pfn(S3C_PA_UART),
97-
.length = SZ_512K,
98-
.type = MT_DEVICE,
99113
}, {
100114
.virtual = (unsigned long)S5P_VA_SROMC,
101115
.pfn = __phys_to_pfn(EXYNOS4_PA_SROMC),
@@ -106,16 +120,6 @@ static struct map_desc exynos4_iodesc[] __initdata = {
106120
.pfn = __phys_to_pfn(EXYNOS4_PA_HSPHY),
107121
.length = SZ_4K,
108122
.type = MT_DEVICE,
109-
}, {
110-
.virtual = (unsigned long)S5P_VA_GIC_CPU,
111-
.pfn = __phys_to_pfn(EXYNOS4_PA_GIC_CPU),
112-
.length = SZ_64K,
113-
.type = MT_DEVICE,
114-
}, {
115-
.virtual = (unsigned long)S5P_VA_GIC_DIST,
116-
.pfn = __phys_to_pfn(EXYNOS4_PA_GIC_DIST),
117-
.length = SZ_64K,
118-
.type = MT_DEVICE,
119123
},
120124
};
121125

@@ -137,7 +141,7 @@ static struct map_desc exynos4_iodesc1[] __initdata = {
137141
},
138142
};
139143

140-
static void exynos4_idle(void)
144+
static void exynos_idle(void)
141145
{
142146
if (!need_resched())
143147
cpu_do_idle();
@@ -151,12 +155,13 @@ static void exynos4_sw_reset(void)
151155
}
152156

153157
/*
154-
* exynos4_map_io
158+
* exynos_map_io
155159
*
156160
* register the standard cpu IO areas
157161
*/
158162
void __init exynos4_map_io(void)
159163
{
164+
iotable_init(exynos_iodesc, ARRAY_SIZE(exynos_iodesc));
160165
iotable_init(exynos4_iodesc, ARRAY_SIZE(exynos4_iodesc));
161166

162167
if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_0)
@@ -250,7 +255,6 @@ static int __init exynos4_core_init(void)
250255
{
251256
return sysdev_class_register(&exynos4_sysclass);
252257
}
253-
254258
core_initcall(exynos4_core_init);
255259

256260
#ifdef CONFIG_CACHE_L2X0
@@ -279,15 +283,16 @@ static int __init exynos4_l2x0_cache_init(void)
279283
early_initcall(exynos4_l2x0_cache_init);
280284
#endif
281285

282-
int __init exynos4_init(void)
286+
int __init exynos_init(void)
283287
{
284-
printk(KERN_INFO "EXYNOS4: Initializing architecture\n");
288+
printk(KERN_INFO "EXYNOS: Initializing architecture\n");
285289

286290
/* set idle function */
287-
pm_idle = exynos4_idle;
291+
pm_idle = exynos_idle;
288292

289293
/* set sw_reset function */
290-
s5p_reset_hook = exynos4_sw_reset;
294+
if (soc_is_exynos4210() || soc_is_exynos4212() || soc_is_exynos4412())
295+
s5p_reset_hook = exynos4_sw_reset;
291296

292297
return sysdev_register(&exynos4_sysdev);
293298
}

0 commit comments

Comments
 (0)