ARM: uniphier: make boot_is_swapped() code optional

The planned new SoC does not have SBC (System Bus Controller) block.
Make boot_is_swapped() an optional hook.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
diff --git a/arch/arm/mach-uniphier/sbc/Makefile b/arch/arm/mach-uniphier/sbc/Makefile
index 4efdd41..6c698a3 100644
--- a/arch/arm/mach-uniphier/sbc/Makefile
+++ b/arch/arm/mach-uniphier/sbc/Makefile
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0+
 
-obj-					+= dummy.o
+obj-y					+= sbc-boot.o
 
 ifndef CONFIG_SPL_BUILD
 obj-y					+= sbc.o
diff --git a/arch/arm/mach-uniphier/sbc/sbc-boot.c b/arch/arm/mach-uniphier/sbc/sbc-boot.c
new file mode 100644
index 0000000..ec22b45
--- /dev/null
+++ b/arch/arm/mach-uniphier/sbc/sbc-boot.c
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0+
+//
+// Copyright (C) 2011-2014 Panasonic Corporation
+// Copyright (C) 2015-2019 Socionext Inc.
+
+#include <linux/io.h>
+
+#include "sbc-regs.h"
+
+int uniphier_sbc_boot_is_swapped(void)
+{
+	return !(readl(SBBASE0) & SBBASE_BANK_ENABLE);
+}
diff --git a/arch/arm/mach-uniphier/sbc/sbc-regs.h b/arch/arm/mach-uniphier/sbc/sbc-regs.h
index e866816..1e96186 100644
--- a/arch/arm/mach-uniphier/sbc/sbc-regs.h
+++ b/arch/arm/mach-uniphier/sbc/sbc-regs.h
@@ -76,14 +76,7 @@
 
 #define PC0CTRL				0x598000c0
 
-#ifndef __ASSEMBLY__
-#include <linux/io.h>
-static inline int boot_is_swapped(void)
-{
-	return !(readl(SBBASE0) & SBBASE_BANK_ENABLE);
-}
-#endif
-
+int uniphier_sbc_boot_is_swapped(void);
 int uniphier_sbc_is_enabled(void);
 
 #endif	/* ARCH_SBC_REGS_H */
diff --git a/arch/arm/mach-uniphier/sbc/sbc.c b/arch/arm/mach-uniphier/sbc/sbc.c
index 6cf8cf2..af8d6f4 100644
--- a/arch/arm/mach-uniphier/sbc/sbc.c
+++ b/arch/arm/mach-uniphier/sbc/sbc.c
@@ -64,7 +64,7 @@
 		writel(SBCTRL2_ADMULTIPLX_MEM_VALUE, SBCTRL12);
 	}
 
-	if (boot_is_swapped()) {
+	if (uniphier_sbc_boot_is_swapped()) {
 		/*
 		 * Boot Swap On: boot from external NOR/SRAM
 		 * 0x42000000-0x43ffffff is a mirror of 0x40000000-0x41ffffff.