aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/firmware/trusted_foundations.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-05 17:19:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-05 17:19:54 -0400
commitff050ad12c551233e546506409c89eb2f640d9f3 (patch)
tree8ae29fece122a91cbd6160fb2ca34c0ea82c3df9 /arch/arm/firmware/trusted_foundations.c
parentdfc25e4503aef6b82a1de4a0fbe19aafa8648fbe (diff)
parent9233087dc468f75bdeb7830c694c09dc74be88c4 (diff)
Merge tag 'soc-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC specific changes from Arnd Bergmann: "Lots of changes specific to one of the SoC families. Some that stick out are: - mach-qcom gains new features, most importantly SMP support for the newer chips (Stephen Boyd, Rohit Vaswani) - mvebu gains support for three new SoCs: Armada 375, 380 and 385 (Thomas Petazzoni and Free-electrons team) - SMP support for Rockchips (Heiko Stübner) - Lots of i.MX changes (Shawn Guo) - Added support for BCM5301x SoC (Hauke Mehrtens) - Multiplatform support for Marvell Kirkwood and Dove (Andrew Lunn and Sebastian Hesselbarth doing the final part of a long journey) - Unify davinci platforms and remove obsolete ones (Sekhar Nori, Arnd Bergmann)" * tag 'soc-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (126 commits) ARM: sunxi: Select HAVE_ARM_ARCH_TIMER ARM: cache-tauros2: remove ARMv6 code ARM: mvebu: don't select CONFIG_NEON ARM: davinci: fix DT booting with default defconfig ARM: configs: bcm_defconfig: enable bcm590xx regulator support ARM: davinci: remove tnetv107x support MAINTAINERS: Update ARM STi maintainers ARM: restrict BCM_KONA_UART to ARCH_BCM_MOBILE ARM: bcm21664: Add board support. ARM: sunxi: Add the new watchog compatibles to the reboot code ARM: enable ARM_HAS_SG_CHAIN for multiplatform ARM: davinci: remove da8xx_omapl_defconfig ARM: davinci: da8xx: fix multiple watchdog device registration ARM: davinci: add da8xx specific configs to davinci_all_defconfig ARM: davinci: enable da8xx build concurrently with older devices ARM: BCM5301X: workaround suppress fault ARM: BCM5301X: add early debugging support ARM: BCM5301X: initial support for the BCM5301X/BCM470X SoCs with ARM CPU ARM: mach-bcm: Remove GENERIC_TIME ARM: shmobile: APMU: Fix warnings due to improper printk formats ...
Diffstat (limited to 'arch/arm/firmware/trusted_foundations.c')
-rw-r--r--arch/arm/firmware/trusted_foundations.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/arch/arm/firmware/trusted_foundations.c b/arch/arm/firmware/trusted_foundations.c
index ef1e3d8f4af0..3fb1b5a1dce9 100644
--- a/arch/arm/firmware/trusted_foundations.c
+++ b/arch/arm/firmware/trusted_foundations.c
@@ -22,6 +22,15 @@
22 22
23#define TF_SET_CPU_BOOT_ADDR_SMC 0xfffff200 23#define TF_SET_CPU_BOOT_ADDR_SMC 0xfffff200
24 24
25#define TF_CPU_PM 0xfffffffc
26#define TF_CPU_PM_S3 0xffffffe3
27#define TF_CPU_PM_S2 0xffffffe6
28#define TF_CPU_PM_S2_NO_MC_CLK 0xffffffe5
29#define TF_CPU_PM_S1 0xffffffe4
30#define TF_CPU_PM_S1_NOFLUSH_L2 0xffffffe7
31
32static unsigned long cpu_boot_addr;
33
25static void __naked tf_generic_smc(u32 type, u32 arg1, u32 arg2) 34static void __naked tf_generic_smc(u32 type, u32 arg1, u32 arg2)
26{ 35{
27 asm volatile( 36 asm volatile(
@@ -41,13 +50,22 @@ static void __naked tf_generic_smc(u32 type, u32 arg1, u32 arg2)
41 50
42static int tf_set_cpu_boot_addr(int cpu, unsigned long boot_addr) 51static int tf_set_cpu_boot_addr(int cpu, unsigned long boot_addr)
43{ 52{
44 tf_generic_smc(TF_SET_CPU_BOOT_ADDR_SMC, boot_addr, 0); 53 cpu_boot_addr = boot_addr;
54 tf_generic_smc(TF_SET_CPU_BOOT_ADDR_SMC, cpu_boot_addr, 0);
55
56 return 0;
57}
58
59static int tf_prepare_idle(void)
60{
61 tf_generic_smc(TF_CPU_PM, TF_CPU_PM_S1_NOFLUSH_L2, cpu_boot_addr);
45 62
46 return 0; 63 return 0;
47} 64}
48 65
49static const struct firmware_ops trusted_foundations_ops = { 66static const struct firmware_ops trusted_foundations_ops = {
50 .set_cpu_boot_addr = tf_set_cpu_boot_addr, 67 .set_cpu_boot_addr = tf_set_cpu_boot_addr,
68 .prepare_idle = tf_prepare_idle,
51}; 69};
52 70
53void register_trusted_foundations(struct trusted_foundations_platform_data *pd) 71void register_trusted_foundations(struct trusted_foundations_platform_data *pd)