summaryrefslogtreecommitdiff
path: root/arch/arm/mach-bcm/bcm_kona_smc.h
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2014-04-21 16:53:04 -0500
committerMatt Porter <mporter@linaro.org>2014-04-25 08:51:32 -0400
commitc64756cca2fb4da96fcc71e376d712297aedc4a2 (patch)
tree14d8e483b7e6e2b27f406bceeffb050a903eb442 /arch/arm/mach-bcm/bcm_kona_smc.h
parent5c4cee2fe8de7c14e60502b02e7c3bc7acba0530 (diff)
ARM: bcm: clean up SMC code
This patch just does some simple cleanup in "bcm_kona_smc.c": - Get rid of the secure_bridge_data structure. Instead, just define two globals that record the physical and virtual addresses of the SMC arguments buffer. Use "buffer" instead of "bounce" in their names. Drop of the erroneous __iomem annotation for the physical address. - Get rid of the initialized flag and just use a non-null buffer address to indicate that. - Get the size of the memory region when fetching the SMC arguments buffer location from the device tree. Use it to call ioremap() directly rather than requiring of_iomap() to go look it up again. - Do some additional validation on that memory region size. - Flush caches unconditionally in __bcm_kona_smc(); nothing supplies SSAPI_BRCM_START_VC_CORE as a service id. - Drop a needless initialization of "rc" in __bcm_kona_smc(). It also deletes most of the content of "bcm_kona_smc.h" because it's never actually used and is of questionable value anyway. Signed-off-by: Alex Elder <elder@linaro.org> Reviewed-by: Tim Kryger <tim.kryger@linaro.org> Reviewed-by: Markus Mayer <markus.mayer@linaro.org> Reviewed-by: Matt Porter <mporter@linaro.org> Signed-off-by: Matt Porter <mporter@linaro.org>
Diffstat (limited to 'arch/arm/mach-bcm/bcm_kona_smc.h')
-rw-r--r--arch/arm/mach-bcm/bcm_kona_smc.h46
1 files changed, 2 insertions, 44 deletions
diff --git a/arch/arm/mach-bcm/bcm_kona_smc.h b/arch/arm/mach-bcm/bcm_kona_smc.h
index d098a7e76744..629e64a89982 100644
--- a/arch/arm/mach-bcm/bcm_kona_smc.h
+++ b/arch/arm/mach-bcm/bcm_kona_smc.h
@@ -15,54 +15,12 @@
#define BCM_KONA_SMC_H
#include <linux/types.h>
-#define FLAGS (SEC_ROM_ICACHE_ENABLE_MASK | SEC_ROM_DCACHE_ENABLE_MASK | \
- SEC_ROM_IRQ_ENABLE_MASK | SEC_ROM_FIQ_ENABLE_MASK)
-/*!
- * Definitions for IRQ & FIQ Mask for ARM
- */
-
-#define FIQ_IRQ_MASK 0xC0
-#define FIQ_MASK 0x40
-#define IRQ_MASK 0x80
-
-/*!
- * Secure Mode FLAGs
- */
-
-/* When set, enables ICache within the secure mode */
-#define SEC_ROM_ICACHE_ENABLE_MASK 0x00000001
-
-/* When set, enables DCache within the secure mode */
-#define SEC_ROM_DCACHE_ENABLE_MASK 0x00000002
-
-/* When set, enables IRQ within the secure mode */
-#define SEC_ROM_IRQ_ENABLE_MASK 0x00000004
-
-/* When set, enables FIQ within the secure mode */
-#define SEC_ROM_FIQ_ENABLE_MASK 0x00000008
-
-/* When set, enables Unified L2 cache within the secure mode */
-#define SEC_ROM_UL2_CACHE_ENABLE_MASK 0x00000010
-
-/* Broadcom Secure Service API Service IDs */
-#define SSAPI_DORMANT_ENTRY_SERV 0x01000000
-#define SSAPI_PUBLIC_OTP_SERV 0x01000001
-#define SSAPI_ENABLE_L2_CACHE 0x01000002
-#define SSAPI_DISABLE_L2_CACHE 0x01000003
-#define SSAPI_WRITE_SCU_STATUS 0x01000004
-#define SSAPI_WRITE_PWR_GATE 0x01000005
-
-/* Broadcom Secure Service API Return Codes */
+/* Broadcom Secure Service API service IDs, return codes, and exit codes */
+#define SSAPI_ENABLE_L2_CACHE 0x01000002
#define SEC_ROM_RET_OK 0x00000001
-#define SEC_ROM_RET_FAIL 0x00000009
-
-#define SSAPI_RET_FROM_INT_SERV 0x4
#define SEC_EXIT_NORMAL 0x1
-#define SSAPI_ROW_AES 0x0E000006
-#define SSAPI_BRCM_START_VC_CORE 0x0E000008
-
#ifndef __ASSEMBLY__
extern int __init bcm_kona_smc_init(void);