summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAmit Singh Tomar <amittomer25@gmail.com>2020-04-19 19:28:25 +0530
committerTom Rini <trini@konsulko.com>2020-04-24 16:40:09 -0400
commitb1a6bb3b5998f0f2e84f0a6d255e936be3eb17f5 (patch)
treefe4c51474dd35475bb3edcac1bfa949f7df4cf01 /arch
parentc11f0d88ba462976335a4990a30a99d1d0b49195 (diff)
arm: actions: Add common framework for Actions Owl Semi SoCs
This commit adds common arch support for Actions Semi Owl series SoCs and removes the Bubblegum96 board files. Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/Kconfig3
-rw-r--r--arch/arm/mach-owl/Kconfig29
-rw-r--r--arch/arm/mach-owl/Makefile1
-rw-r--r--arch/arm/mach-owl/soc.c57
4 files changed, 71 insertions, 19 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 33b484753c..e85506a51a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -874,9 +874,9 @@ config ARCH_MX5
config ARCH_OWL
bool "Actions Semi OWL SoCs"
- select ARM64
select DM
select DM_SERIAL
+ select OWL_SERIAL
select OF_CONTROL
imply CMD_DM
@@ -1870,7 +1870,6 @@ source "board/spear/spear600/Kconfig"
source "board/spear/x600/Kconfig"
source "board/st/stv0991/Kconfig"
source "board/tcl/sl50/Kconfig"
-source "board/ucRobotics/bubblegum_96/Kconfig"
source "board/birdland/bav335x/Kconfig"
source "board/toradex/colibri_pxa270/Kconfig"
source "board/variscite/dart_6ul/Kconfig"
diff --git a/arch/arm/mach-owl/Kconfig b/arch/arm/mach-owl/Kconfig
index 199e772988..28984c1b08 100644
--- a/arch/arm/mach-owl/Kconfig
+++ b/arch/arm/mach-owl/Kconfig
@@ -1,27 +1,22 @@
if ARCH_OWL
-config SYS_SOC
- default "owl"
-
choice
- prompt "Actions Semi OWL SoCs board select"
+ prompt "Actions Semi Owl SoC Variant"
optional
-config TARGET_BUBBLEGUM_96
- bool "96Boards Bubblegum-96"
- help
- Support for 96Boards Bubblegum-96. This board complies with
- 96Board Consumer Edition Specification. Features:
- - Actions Semi S900 SoC (4xCortex A53, Power VR G6230 GPU)
- - 2GiB RAM
- - 8GiB eMMC, uSD slot
- - WiFi, Bluetooth and GPS module
- - 2x Host, 1x Device USB port
- - HDMI
- - 20-pin low speed and 40-pin high speed expanders, 6 LED, 3 buttons
+config MACH_S900
+ bool "Actions Semi S900 SoC"
+ select ARM64
endchoice
-source "board/ucRobotics/bubblegum_96/Kconfig"
+config SYS_TEXT_BASE
+ default 0x11000000
+
+config SYS_CONFIG_NAME
+ default "owl-common"
+
+config SYS_SOC
+ default "s900" if MACH_S900
endif
diff --git a/arch/arm/mach-owl/Makefile b/arch/arm/mach-owl/Makefile
index 1b43dc2921..0b181c62d6 100644
--- a/arch/arm/mach-owl/Makefile
+++ b/arch/arm/mach-owl/Makefile
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-2.0+
+obj-y += soc.o
obj-y += sysmap-s900.o
diff --git a/arch/arm/mach-owl/soc.c b/arch/arm/mach-owl/soc.c
new file mode 100644
index 0000000000..409cbd319f
--- /dev/null
+++ b/arch/arm/mach-owl/soc.c
@@ -0,0 +1,57 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Actions Semi Owl SoCs platform support.
+ *
+ * Copyright (C) 2018 Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
+ */
+
+#include <cpu_func.h>
+#include <linux/arm-smccc.h>
+#include <linux/psci.h>
+#include <common.h>
+#include <asm/io.h>
+#include <asm/mach-types.h>
+#include <asm/psci.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/*
+ * dram_init - sets uboots idea of sdram size
+ */
+int dram_init(void)
+{
+ gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
+ return 0;
+}
+
+/* This is called after dram_init() so use get_ram_size result */
+int dram_init_banksize(void)
+{
+ gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
+ gd->bd->bi_dram[0].size = gd->ram_size;
+
+ return 0;
+}
+
+static void show_psci_version(void)
+{
+ struct arm_smccc_res res;
+
+ arm_smccc_smc(ARM_PSCI_0_2_FN_PSCI_VERSION, 0, 0, 0, 0, 0, 0, 0, &res);
+
+ printf("PSCI: v%ld.%ld\n",
+ PSCI_VERSION_MAJOR(res.a0),
+ PSCI_VERSION_MINOR(res.a0));
+}
+
+int board_init(void)
+{
+ show_psci_version();
+
+ return 0;
+}
+
+void reset_cpu(ulong addr)
+{
+ psci_system_reset();
+}