From: Kyungmin Park Date: Thu, 10 Jul 2014 04:38:39 +0000 (+0900) Subject: ARM: EXYNOS: Add exynos_smc2 to read SFR X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e155cb6d2afb53866569b47e9279d0908dc69bec;p=platform%2Fkernel%2Flinux-3.10.git ARM: EXYNOS: Add exynos_smc2 to read SFR Some SFR is restricted to access from AP side. so use this smc call to access these SFRs. Signed-off-by: Kyungmin Park Signed-off-by: Chanwoo Choi --- diff --git a/arch/arm/mach-exynos/exynos-smc.S b/arch/arm/mach-exynos/exynos-smc.S index 2e27aa3..7376169 100644 --- a/arch/arm/mach-exynos/exynos-smc.S +++ b/arch/arm/mach-exynos/exynos-smc.S @@ -20,3 +20,16 @@ ENTRY(exynos_smc) smc #0 ldmfd sp!, {r4-r11, pc} ENDPROC(exynos_smc) + +/* + * Function signature: u32 exynos_smc2(u32 cmd, u32 arg1, u32 arg2, u32 arg3) + * return r2 + */ + +ENTRY(exynos_smc2) + stmfd sp!, {r4-r11, lr} + dsb + smc #0 + mov r0, r2 + ldmfd sp!, {r4-r11, pc} +ENDPROC(exynos_smc2) diff --git a/arch/arm/mach-exynos/smc.h b/arch/arm/mach-exynos/smc.h index cb458ac..af61e97 100644 --- a/arch/arm/mach-exynos/smc.h +++ b/arch/arm/mach-exynos/smc.h @@ -25,8 +25,13 @@ #define SMC_CMD_L2X0SETUP2 (-23) #define SMC_CMD_L2X0INVALL (-24) #define SMC_CMD_L2X0DEBUG (-25) +/* For Register Access */ +#define SMC_CMD_REG (-101) +#define SMC_REG_SFR_W(a) ((0x1 << 30) | ((a) >> 2)) +#define SMC_REG_SFR_R(a) ((0x3 << 30) | ((a) >> 2)) extern void exynos_smc(u32 cmd, u32 arg1, u32 arg2, u32 arg3); +extern u32 exynos_smc2(u32 cmd, u32 arg1, u32 arg2, u32 arg3); enum { EXYNOS_DO_IDLE_NORMAL,