summaryrefslogtreecommitdiff
path: root/arch/arm/mach-uniphier/sbc/sbc-boot.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-uniphier/sbc/sbc-boot.c')
-rw-r--r--arch/arm/mach-uniphier/sbc/sbc-boot.c13
1 files changed, 13 insertions, 0 deletions
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 0000000000..ec22b453e0
--- /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);
+}