diff options
author | Philippe Langlais <philippe.langlais@linaro.org> | 2011-04-05 13:53:10 +0200 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@stericsson.com> | 2011-09-19 15:14:46 +0200 |
commit | 5570ee4e1a3d7eb490e74dc3bb5442af65ebb691 (patch) | |
tree | 64650a3dc75346e4c6fc53f2146ed6b861457a83 /arch/arm/mach-ux500/tee_ux500.c | |
parent | 7ab48aa055417ee9acd435684314e032cd1d9226 (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
Diffstat (limited to 'arch/arm/mach-ux500/tee_ux500.c')
-rw-r--r-- | arch/arm/mach-ux500/tee_ux500.c | 15 |
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); |