sunxi: Move cpu independent code to mach directory
authorAlexander Graf <agraf@suse.de>
Tue, 29 Mar 2016 15:29:06 +0000 (17:29 +0200)
committerHans de Goede <hdegoede@redhat.com>
Fri, 1 Apr 2016 07:52:28 +0000 (09:52 +0200)
Some of the code in arch/arm/cpu/armv7/sunxi is actually armv7 specific, while
most of it is just generic code that could as well be used on an AArch64 SoC.

Move all files that are not really tied to armv7 into a new mach-sunxi
directory.

Signed-off-by: Alexander Graf <agraf@suse.de>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
23 files changed:
arch/arm/Makefile
arch/arm/cpu/armv7/sunxi/Makefile
arch/arm/mach-sunxi/Makefile [new file with mode: 0644]
arch/arm/mach-sunxi/board.c [moved from arch/arm/cpu/armv7/sunxi/board.c with 100% similarity]
arch/arm/mach-sunxi/clock.c [moved from arch/arm/cpu/armv7/sunxi/clock.c with 100% similarity]
arch/arm/mach-sunxi/clock_sun4i.c [moved from arch/arm/cpu/armv7/sunxi/clock_sun4i.c with 100% similarity]
arch/arm/mach-sunxi/clock_sun6i.c [moved from arch/arm/cpu/armv7/sunxi/clock_sun6i.c with 100% similarity]
arch/arm/mach-sunxi/clock_sun8i_a83t.c [moved from arch/arm/cpu/armv7/sunxi/clock_sun8i_a83t.c with 100% similarity]
arch/arm/mach-sunxi/clock_sun9i.c [moved from arch/arm/cpu/armv7/sunxi/clock_sun9i.c with 100% similarity]
arch/arm/mach-sunxi/cpu_info.c [moved from arch/arm/cpu/armv7/sunxi/cpu_info.c with 100% similarity]
arch/arm/mach-sunxi/dram_helpers.c [moved from arch/arm/cpu/armv7/sunxi/dram_helpers.c with 100% similarity]
arch/arm/mach-sunxi/dram_sun4i.c [moved from arch/arm/cpu/armv7/sunxi/dram_sun4i.c with 100% similarity]
arch/arm/mach-sunxi/dram_sun6i.c [moved from arch/arm/cpu/armv7/sunxi/dram_sun6i.c with 100% similarity]
arch/arm/mach-sunxi/dram_sun8i_a23.c [moved from arch/arm/cpu/armv7/sunxi/dram_sun8i_a23.c with 100% similarity]
arch/arm/mach-sunxi/dram_sun8i_a33.c [moved from arch/arm/cpu/armv7/sunxi/dram_sun8i_a33.c with 100% similarity]
arch/arm/mach-sunxi/dram_sun8i_a83t.c [moved from arch/arm/cpu/armv7/sunxi/dram_sun8i_a83t.c with 100% similarity]
arch/arm/mach-sunxi/dram_sun8i_h3.c [moved from arch/arm/cpu/armv7/sunxi/dram_sun8i_h3.c with 100% similarity]
arch/arm/mach-sunxi/p2wi.c [moved from arch/arm/cpu/armv7/sunxi/p2wi.c with 100% similarity]
arch/arm/mach-sunxi/pinmux.c [moved from arch/arm/cpu/armv7/sunxi/pinmux.c with 100% similarity]
arch/arm/mach-sunxi/pmic_bus.c [moved from arch/arm/cpu/armv7/sunxi/pmic_bus.c with 100% similarity]
arch/arm/mach-sunxi/prcm.c [moved from arch/arm/cpu/armv7/sunxi/prcm.c with 100% similarity]
arch/arm/mach-sunxi/rsb.c [moved from arch/arm/cpu/armv7/sunxi/rsb.c with 100% similarity]
arch/arm/mach-sunxi/usb_phy.c [moved from arch/arm/cpu/armv7/sunxi/usb_phy.c with 100% similarity]

index 6defdfb..ce006ae 100644 (file)
@@ -54,6 +54,7 @@ machine-$(CONFIG_ARCH_MVEBU)          += mvebu
 # TODO: rename CONFIG_ORION5X -> CONFIG_ARCH_ORION5X
 machine-$(CONFIG_ORION5X)              += orion5x
 machine-$(CONFIG_ARCH_S5PC1XX)         += s5pc1xx
+machine-$(CONFIG_ARCH_SUNXI)           += sunxi
 machine-$(CONFIG_ARCH_SOCFPGA)         += socfpga
 machine-$(CONFIG_ARCH_ROCKCHIP)                += rockchip
 machine-$(CONFIG_STM32)                        += stm32
index ce8e571..4d2274a 100644 (file)
@@ -8,38 +8,10 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 obj-y  += timer.o
-obj-y  += board.o
-obj-y  += clock.o
-obj-y  += cpu_info.o
-obj-y  += dram_helpers.o
-obj-y  += pinmux.o
-ifndef CONFIG_MACH_SUN9I
-obj-y  += usb_phy.o
-endif
-obj-$(CONFIG_MACH_SUN6I)       += prcm.o
-obj-$(CONFIG_MACH_SUN8I)       += prcm.o
-obj-$(CONFIG_MACH_SUN9I)       += prcm.o
-obj-$(CONFIG_MACH_SUN6I)       += p2wi.o
-obj-$(CONFIG_MACH_SUN8I)       += rsb.o
-obj-$(CONFIG_MACH_SUN9I)       += rsb.o
-obj-$(CONFIG_MACH_SUN4I)       += clock_sun4i.o
-obj-$(CONFIG_MACH_SUN5I)       += clock_sun4i.o
-obj-$(CONFIG_MACH_SUN6I)       += clock_sun6i.o
-obj-$(CONFIG_MACH_SUN7I)       += clock_sun4i.o
-ifdef CONFIG_MACH_SUN8I_A83T
-obj-y                          += clock_sun8i_a83t.o
-else
-obj-$(CONFIG_MACH_SUN8I)       += clock_sun6i.o
-endif
-obj-$(CONFIG_MACH_SUN9I)       += clock_sun9i.o
+
 obj-$(CONFIG_MACH_SUN6I)       += tzpc.o
 obj-$(CONFIG_MACH_SUN8I_H3)    += tzpc.o
 
-obj-$(CONFIG_AXP152_POWER)     += pmic_bus.o
-obj-$(CONFIG_AXP209_POWER)     += pmic_bus.o
-obj-$(CONFIG_AXP221_POWER)     += pmic_bus.o
-obj-$(CONFIG_AXP818_POWER)     += pmic_bus.o
-
 ifndef CONFIG_SPL_BUILD
 ifdef CONFIG_ARMV7_PSCI
 obj-$(CONFIG_MACH_SUN6I)       += psci_sun6i.o
@@ -49,13 +21,5 @@ endif
 endif
 
 ifdef CONFIG_SPL_BUILD
-obj-$(CONFIG_MACH_SUN4I)       += dram_sun4i.o
-obj-$(CONFIG_MACH_SUN5I)       += dram_sun4i.o
-obj-$(CONFIG_MACH_SUN6I)       += dram_sun6i.o
-obj-$(CONFIG_MACH_SUN7I)       += dram_sun4i.o
-obj-$(CONFIG_MACH_SUN8I_A23)   += dram_sun8i_a23.o
-obj-$(CONFIG_MACH_SUN8I_A33)   += dram_sun8i_a33.o
-obj-$(CONFIG_MACH_SUN8I_A83T)  += dram_sun8i_a83t.o
-obj-$(CONFIG_MACH_SUN8I_H3)    += dram_sun8i_h3.o
 obj-y  += fel_utils.o
 endif
diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile
new file mode 100644 (file)
index 0000000..114cc03
--- /dev/null
@@ -0,0 +1,50 @@
+#
+# (C) Copyright 2012 Henrik Nordstrom <henrik@henriknordstrom.net>
+#
+# Based on some other Makefile
+# (C) Copyright 2000-2003
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+#
+# SPDX-License-Identifier:     GPL-2.0+
+#
+
+obj-y  += board.o
+obj-y  += clock.o
+obj-y  += cpu_info.o
+obj-y  += dram_helpers.o
+obj-y  += pinmux.o
+ifndef CONFIG_MACH_SUN9I
+obj-y  += usb_phy.o
+endif
+obj-$(CONFIG_MACH_SUN6I)       += prcm.o
+obj-$(CONFIG_MACH_SUN8I)       += prcm.o
+obj-$(CONFIG_MACH_SUN9I)       += prcm.o
+obj-$(CONFIG_MACH_SUN6I)       += p2wi.o
+obj-$(CONFIG_MACH_SUN8I)       += rsb.o
+obj-$(CONFIG_MACH_SUN9I)       += rsb.o
+obj-$(CONFIG_MACH_SUN4I)       += clock_sun4i.o
+obj-$(CONFIG_MACH_SUN5I)       += clock_sun4i.o
+obj-$(CONFIG_MACH_SUN6I)       += clock_sun6i.o
+obj-$(CONFIG_MACH_SUN7I)       += clock_sun4i.o
+ifdef CONFIG_MACH_SUN8I_A83T
+obj-y                          += clock_sun8i_a83t.o
+else
+obj-$(CONFIG_MACH_SUN8I)       += clock_sun6i.o
+endif
+obj-$(CONFIG_MACH_SUN9I)       += clock_sun9i.o
+
+obj-$(CONFIG_AXP152_POWER)     += pmic_bus.o
+obj-$(CONFIG_AXP209_POWER)     += pmic_bus.o
+obj-$(CONFIG_AXP221_POWER)     += pmic_bus.o
+obj-$(CONFIG_AXP818_POWER)     += pmic_bus.o
+
+ifdef CONFIG_SPL_BUILD
+obj-$(CONFIG_MACH_SUN4I)       += dram_sun4i.o
+obj-$(CONFIG_MACH_SUN5I)       += dram_sun4i.o
+obj-$(CONFIG_MACH_SUN6I)       += dram_sun6i.o
+obj-$(CONFIG_MACH_SUN7I)       += dram_sun4i.o
+obj-$(CONFIG_MACH_SUN8I_A23)   += dram_sun8i_a23.o
+obj-$(CONFIG_MACH_SUN8I_A33)   += dram_sun8i_a33.o
+obj-$(CONFIG_MACH_SUN8I_A83T)  += dram_sun8i_a83t.o
+obj-$(CONFIG_MACH_SUN8I_H3)    += dram_sun8i_h3.o
+endif