arm: exynos: realign the code to allow support for newer 64-bit platforms
authorThomas Abraham <thomas.ab@samsung.com>
Sat, 23 Apr 2016 16:48:12 +0000 (22:18 +0530)
committerMinkyu Kang <mk7.kang@samsung.com>
Wed, 25 May 2016 01:00:19 +0000 (10:00 +0900)
The existing Exynos 32-bit platform support needs to be realigned in
order to support newer 64-bit Exynos platforms. The driver model will
be utlized for drivers on the 64-bit Exynos platforms and so some of
the older platform support code would not be required for the newer
64-bit Exynos platforms.

Cc: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
20 files changed:
arch/arm/Kconfig
arch/arm/mach-exynos/Kconfig
arch/arm/mach-exynos/Makefile
arch/arm/mach-exynos/include/mach/cpu.h
arch/arm/mach-exynos/include/mach/gpio.h
arch/arm/mach-exynos/soc.c
configs/arndale_defconfig
configs/odroid-xu3_defconfig
configs/odroid_defconfig
configs/origen_defconfig
configs/peach-pi_defconfig
configs/peach-pit_defconfig
configs/s5pc210_universal_defconfig
configs/smdk5250_defconfig
configs/smdk5420_defconfig
configs/smdkv310_defconfig
configs/snow_defconfig
configs/spring_defconfig
configs/trats2_defconfig
configs/trats_defconfig

index 729b1816bf7ec4bfb87567d477860d189b3fc7c4..3eb6e5d601736d2555a490c7f7bb08093ac7a27e 100644 (file)
@@ -426,7 +426,6 @@ config TARGET_BCMNSP
 
 config ARCH_EXYNOS
        bool "Samsung EXYNOS"
-       select CPU_V7
        select DM
        select DM_SPI_FLASH
        select DM_SERIAL
index a6a75974d7321080c655ef7539e5556c9f554933..28a6a60f7c7d1c618a34fd7baaddd8b6c7fc69f5 100644 (file)
@@ -1,9 +1,32 @@
 if ARCH_EXYNOS
 
 choice
-       prompt "EXYNOS board select"
+       prompt "EXYNOS architecture type select"
        optional
 
+config ARCH_EXYNOS4
+       bool "Exynos4 SoC family"
+       select CPU_V7
+       help
+         Samsung Exynos4 SoC family are based on ARM Cortex-A9 CPU. There
+         are multiple SoCs in this family including Exynos4210, Exynos4412,
+         and Exynos4212.
+
+config ARCH_EXYNOS5
+       bool "Exynos5 SoC family"
+       select CPU_V7
+       help
+         Samsung Exynos5 SoC family are based on ARM Cortex-A15 CPU (and
+         Cortex-A7 CPU in big.LITTLE configuration). There are multiple SoCs
+         in this family including Exynos5250, Exynos5420 and Exynos5800.
+
+endchoice
+
+if ARCH_EXYNOS4
+
+choice
+       prompt "EXYNOS4 board select"
+
 config TARGET_SMDKV310
        select SUPPORT_SPL
        bool "Exynos4210 SMDKV310 board"
@@ -25,6 +48,14 @@ config TARGET_TRATS2
 config TARGET_ODROID
        bool "Exynos4412 Odroid board"
 
+endchoice
+endif
+
+if ARCH_EXYNOS5
+
+choice
+       prompt "EXYNOS5 board select"
+
 config TARGET_ODROID_XU3
        bool "Exynos5422 Odroid board"
        select OF_CONTROL
@@ -68,6 +99,7 @@ config TARGET_PEACH_PIT
        select OF_CONTROL
 
 endchoice
+endif
 
 config SYS_SOC
        default "exynos"
index 8542f896cfc9228f598781b376ba11e4f0da13d7..f3c07b76cec79034d01c9e0437bc98f27b44735b 100644 (file)
@@ -5,7 +5,8 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-y  += clock.o power.o soc.o system.o pinmux.o tzpc.o
+obj-y  += soc.o
+obj-$(CONFIG_CPU_V7) += clock.o pinmux.o power.o system.o
 
 obj-$(CONFIG_EXYNOS5420)       += sec_boot.o
 
@@ -13,6 +14,6 @@ ifdef CONFIG_SPL_BUILD
 obj-$(CONFIG_EXYNOS5)  += clock_init_exynos5.o
 obj-$(CONFIG_EXYNOS5)  += dmc_common.o dmc_init_ddr3.o
 obj-$(CONFIG_EXYNOS4210)+= dmc_init_exynos4.o clock_init_exynos4.o
-obj-y  += spl_boot.o
+obj-y  += spl_boot.o tzpc.o
 obj-y  += lowlevel_init.o
 endif
index 14a1692467de9a0a8c407b1019c2a4dd05ee5646..f12e3d610b3500a951d63de515e0894068233d9f 100644 (file)
@@ -270,7 +270,7 @@ IS_EXYNOS_TYPE(exynos5420, 0x5420)
 IS_EXYNOS_TYPE(exynos5422, 0x5422)
 
 #define SAMSUNG_BASE(device, base)                             \
-static inline unsigned int __attribute__((no_instrument_function)) \
+static inline unsigned long __attribute__((no_instrument_function)) \
        samsung_get_base_##device(void) \
 {                                                              \
        if (cpu_is_exynos4()) {                         \
index 7fc8e61f9ca8e9b070f2d120e1dd3960f1566600..81363bd947a1fb43d92d7a62b32ec541efb4dbd4 100644 (file)
@@ -1349,7 +1349,7 @@ enum exynos5420_gpio_pin {
 };
 
 struct gpio_info {
-       unsigned int reg_addr;  /* Address of register for this part */
+       unsigned long reg_addr; /* Address of register for this part */
        unsigned int max_gpio;  /* Maximum GPIO in this part */
 };
 
index 0f116b141a327ea66c8b63675ddb7d543a48bb0a..737a8ddbcf33cfeff519511ab4240758f934f517 100644 (file)
@@ -11,7 +11,9 @@
 
 void reset_cpu(ulong addr)
 {
+#ifdef CONFIG_CPU_V7
        writel(0x1, samsung_get_base_swreset());
+#endif
 }
 
 #ifndef CONFIG_SYS_DCACHE_OFF
index 0cd529ee8889e0f2290da6b481aa31ca6115666e..a026fd6104b23bb8d4b42b0b32b85cb0e22ff793 100644 (file)
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_EXYNOS=y
+CONFIG_ARCH_EXYNOS5=y
 CONFIG_TARGET_ARNDALE=y
 CONFIG_DM_I2C=y
 CONFIG_DEFAULT_DEVICE_TREE="exynos5250-arndale"
index 8995cc2f6bea6259c2563929491410a4493f41a7..c7708f15ea118a4f05485a3e98a3ad2e5e52c5d4 100644 (file)
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_EXYNOS=y
+CONFIG_ARCH_EXYNOS5=y
 CONFIG_TARGET_ODROID_XU3=y
 CONFIG_DM_I2C=y
 CONFIG_DEFAULT_DEVICE_TREE="exynos5422-odroidxu3"
index ff3b3390f66677f766985d1c3f74b5c7e12382c1..76ab144fbbb8dad74d0dcdf8e9cb7228ef8ff7e6 100644 (file)
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_EXYNOS=y
+CONFIG_ARCH_EXYNOS4=y
 CONFIG_TARGET_ODROID=y
 CONFIG_DM_I2C=y
 CONFIG_DEFAULT_DEVICE_TREE="exynos4412-odroid"
index b1740dcc3f91c50ec39ddb9efac3f23a81a2db9a..6ad01af520fdd9c90244cff39fe3d111a60104c3 100644 (file)
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_EXYNOS=y
+CONFIG_ARCH_EXYNOS4=y
 CONFIG_TARGET_ORIGEN=y
 CONFIG_DEFAULT_DEVICE_TREE="exynos4210-origen"
 CONFIG_SPL=y
index c8c74c030132b0180792fb25545cbe9e81f3a977..ce07052992cc97916e131440f04c45d2134ab2c2 100644 (file)
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_EXYNOS=y
+CONFIG_ARCH_EXYNOS5=y
 CONFIG_TARGET_PEACH_PI=y
 CONFIG_DM_I2C=y
 CONFIG_DEFAULT_DEVICE_TREE="exynos5800-peach-pi"
index c5fbf8c82257df519866bf961c9754800abfd3df..4479fe8c228f3b28a927f22a2a9d590ecad8fc2b 100644 (file)
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_EXYNOS=y
+CONFIG_ARCH_EXYNOS5=y
 CONFIG_TARGET_PEACH_PIT=y
 CONFIG_DM_I2C=y
 CONFIG_DEFAULT_DEVICE_TREE="exynos5420-peach-pit"
index 638b72896d0fd575ac8b73564cc983b6088f6fa1..5eb7a40e903c20cad73a85fc6745118eb4dc7122 100644 (file)
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_EXYNOS=y
+CONFIG_ARCH_EXYNOS4=y
 CONFIG_TARGET_S5PC210_UNIVERSAL=y
 CONFIG_DEFAULT_DEVICE_TREE="exynos4210-universal_c210"
 CONFIG_HUSH_PARSER=y
index 5d883918b1fd506edf6be4d84f23b57031d295d2..7fe410d7b3f88c3dba2c9a2d6cd1fecf8da0228e 100644 (file)
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_EXYNOS=y
+CONFIG_ARCH_EXYNOS5=y
 CONFIG_TARGET_SMDK5250=y
 CONFIG_DM_I2C=y
 CONFIG_DEFAULT_DEVICE_TREE="exynos5250-smdk5250"
index 40de7c149c14cbf171e82af2bd8cea299fc3f76f..23b9c1e5b7e9dba795c19fe536b54b41d3532e84 100644 (file)
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_EXYNOS=y
+CONFIG_ARCH_EXYNOS5=y
 CONFIG_TARGET_SMDK5420=y
 CONFIG_DM_I2C=y
 CONFIG_DEFAULT_DEVICE_TREE="exynos5420-smdk5420"
index b8638e2ce31b57411a4826ea4b46cca281efa056..5ba6523bdb32ae5438f38cdaee3f2f603b52cd32 100644 (file)
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_EXYNOS=y
+CONFIG_ARCH_EXYNOS4=y
 CONFIG_TARGET_SMDKV310=y
 CONFIG_DEFAULT_DEVICE_TREE="exynos4210-smdkv310"
 CONFIG_SPL=y
index 97133dfe680b6d89348e47088a2d8c79cf3c852c..77b97a3292306447a663380d37d5edaff160396a 100644 (file)
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_EXYNOS=y
+CONFIG_ARCH_EXYNOS5=y
 CONFIG_TARGET_SNOW=y
 CONFIG_DM_I2C=y
 CONFIG_DEFAULT_DEVICE_TREE="exynos5250-snow"
index b720e040d31e7f71f697c760b5e3d8610adb54be..d3b174a54820873ca1c2a1308ff9dc174b45cd1b 100644 (file)
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_EXYNOS=y
+CONFIG_ARCH_EXYNOS5=y
 CONFIG_TARGET_SPRING=y
 CONFIG_DM_I2C=y
 CONFIG_DEFAULT_DEVICE_TREE="exynos5250-spring"
index c2ed8c8adfae78d8c5f862225e5ac926c6bd9304..1362ffb7b881591f8ed0482245d5d692973c58f5 100644 (file)
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_EXYNOS=y
+CONFIG_ARCH_EXYNOS4=y
 CONFIG_TARGET_TRATS2=y
 CONFIG_DEFAULT_DEVICE_TREE="exynos4412-trats2"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
index 46bfc4e71ca90dd81ac56a6800c638adf3b51bc0..525bbefa141eceb7fffcef6c61c079736a582d45 100644 (file)
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_EXYNOS=y
+CONFIG_ARCH_EXYNOS4=y
 CONFIG_TARGET_TRATS=y
 CONFIG_DEFAULT_DEVICE_TREE="exynos4210-trats"
 CONFIG_FIT=y