summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Langlais <philippe.langlais@linaro.org>2011-04-05 13:53:10 +0200
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:04:35 +0200
commit630355b7a64d4c4d42d217b643382ea95135d7a5 (patch)
tree6266be397832c6205dccd8ca3e343b2162d720a5
parent4c93613a4a5f25b739fa32f86ae67bfe033ee0d3 (diff)
ux500: add u5500 specific macros
This patch is based on similar patch from Rickard Evertsson <rickard.evertsson@stericsson.com> Although this patch is fixing fewer files. Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com> Conflicts: arch/arm/mach-ux500/clock.c
-rw-r--r--arch/arm/mach-ux500/tee_ux500.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/arch/arm/mach-ux500/tee_ux500.c b/arch/arm/mach-ux500/tee_ux500.c
index c009afe26ae..2e6a2e89f0d 100644
--- a/arch/arm/mach-ux500/tee_ux500.c
+++ b/arch/arm/mach-ux500/tee_ux500.c
@@ -8,11 +8,10 @@
#include <linux/kernel.h>
#include <linux/tee.h>
#include <linux/io.h>
+#include <linux/errno.h>
#include <mach/hardware.h>
-#define BOOT_BRIDGE_FUNC (U8500_BOOT_ROM_BASE + 0x18300)
-
#define ISSWAPI_EXECUTE_TA 0x11000001
#define ISSWAPI_CLOSE_TA 0x11000002
@@ -25,8 +24,16 @@ static u32 call_sec_rom_bridge(u32 service_id, u32 cfg, ...)
va_list ap;
u32 ret;
- hw_sec_rom_pub_bridge =
- (bridge_func)((u32)IO_ADDRESS(BOOT_BRIDGE_FUNC));
+ if (cpu_is_u8500())
+ hw_sec_rom_pub_bridge = (bridge_func)
+ ((u32)IO_ADDRESS(U8500_BOOT_ROM_BASE + 0x18300));
+ else if (cpu_is_u5500())
+ hw_sec_rom_pub_bridge = (bridge_func)
+ ((u32)IO_ADDRESS(U5500_BOOT_ROM_BASE + 0x18300));
+ else {
+ pr_err("tee-ux500: Unknown DB Asic!\n");
+ return -EIO;
+ }
va_start(ap, cfg);
ret = hw_sec_rom_pub_bridge(service_id, cfg, ap);