summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-07-12 07:10:19 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-07-12 07:10:19 +0200
commitf9dfe479ebacbb3efacef4525682546713b11597 (patch)
tree64b26ae51c86b9b1419d8a62baf5d2f5948f3f51 /arch/arm/cpu
parentac5e1f63aafb73a6ea2356822029ef391b6234d2 (diff)
parent9f30aa3f143eda22ba3cf9e36c05213239a2fe83 (diff)
downloadbarebox-f9dfe479ebacbb3efacef4525682546713b11597.tar.gz
barebox-f9dfe479ebacbb3efacef4525682546713b11597.tar.xz
Merge branch 'for-next/stm32'
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r--arch/arm/cpu/psci.c6
-rw-r--r--arch/arm/cpu/sm.c29
2 files changed, 4 insertions, 31 deletions
diff --git a/arch/arm/cpu/psci.c b/arch/arm/cpu/psci.c
index 5c662cd0b9..a976ddbb5c 100644
--- a/arch/arm/cpu/psci.c
+++ b/arch/arm/cpu/psci.c
@@ -138,8 +138,8 @@ static unsigned long psci_system_off(void)
{
psci_printf("%s\n", __func__);
- if (psci_ops->system_reset)
- psci_ops->system_reset();
+ if (psci_ops->system_off)
+ psci_ops->system_off();
while(1);
@@ -293,4 +293,4 @@ BAREBOX_CMD_START(smc)
BAREBOX_CMD_DESC("secure monitor test command")
BAREBOX_CMD_GROUP(CMD_GRP_MISC)
BAREBOX_CMD_END
-#endif \ No newline at end of file
+#endif
diff --git a/arch/arm/cpu/sm.c b/arch/arm/cpu/sm.c
index d9d62fbd9d..b7a9eae89b 100644
--- a/arch/arm/cpu/sm.c
+++ b/arch/arm/cpu/sm.c
@@ -22,9 +22,6 @@
#include "mmu.h"
-/* valid bits in CBAR register / PERIPHBASE value */
-#define CBAR_MASK 0xFFFF8000
-
static unsigned int read_id_pfr1(void)
{
unsigned int reg;
@@ -51,30 +48,6 @@ static void write_mvbar(u32 val)
asm("mcr p15, 0, %0, c12, c0, 1" : : "r"(val));
}
-static unsigned long get_cbar(void)
-{
- unsigned periphbase;
-
- /* get the GIC base address from the CBAR register */
- asm("mrc p15, 4, %0, c15, c0, 0\n" : "=r" (periphbase));
-
- /* the PERIPHBASE can be mapped above 4 GB (lower 8 bits used to
- * encode this). Bail out here since we cannot access this without
- * enabling paging.
- */
- if ((periphbase & 0xff) != 0) {
- pr_err("PERIPHBASE is above 4 GB, no access.\n");
- return -1;
- }
-
- return periphbase & CBAR_MASK;
-}
-
-static unsigned long get_gicd_base_address(void)
-{
- return get_cbar() + GIC_DIST_OFFSET;
-}
-
static int cpu_is_virt_capable(void)
{
return read_id_pfr1() & (1 << 12);
@@ -267,4 +240,4 @@ static int sm_init(void)
return 0;
}
-device_initcall(sm_init); \ No newline at end of file
+device_initcall(sm_init);