Commit 49ec9490918909c9694b8ee64789f1eed335df1b
Committed by
Tom Rini
1 parent
987ec5851c
Exists in
v2017.01-smarct4x
and in
37 other branches
ARM: OMAP3: Get rid of omap3_gp_romcode_call and replace with omap_smc1
omap_smc1 is now generic enough to remove duplicate omap3_gp_romcode_call logic that omap3 introduced. As part of this change, move to using the generic lowlevel_init.S for omap3 as well. Signed-off-by: Nishanth Menon <nm@ti.com> Tested-by: Matt Porter <mporter@konsulko.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Showing 5 changed files with 5 additions and 17 deletions Side-by-side Diff
arch/arm/cpu/armv7/omap-common/Makefile
arch/arm/cpu/armv7/omap-common/lowlevel_init.S
... | ... | @@ -16,11 +16,13 @@ |
16 | 16 | #include <asm/arch/spl.h> |
17 | 17 | #include <linux/linkage.h> |
18 | 18 | |
19 | +#ifndef CONFIG_OMAP34XX | |
19 | 20 | ENTRY(save_boot_params) |
20 | 21 | ldr r1, =OMAP_SRAM_SCRATCH_BOOT_PARAMS |
21 | 22 | str r0, [r1] |
22 | 23 | b save_boot_params_ret |
23 | 24 | ENDPROC(save_boot_params) |
25 | +#endif | |
24 | 26 | |
25 | 27 | ENTRY(omap_smc1) |
26 | 28 | PUSH {r4-r12, lr} @ save registers - ROM code may pollute |
arch/arm/cpu/armv7/omap3/board.c
... | ... | @@ -429,8 +429,7 @@ |
429 | 429 | acr |= set_bits; |
430 | 430 | |
431 | 431 | if (get_device_type() == GP_DEVICE) { |
432 | - omap3_gp_romcode_call(OMAP3_GP_ROMCODE_API_WRITE_ACR, | |
433 | - acr); | |
432 | + omap_smc1(OMAP3_GP_ROMCODE_API_WRITE_ACR, acr); | |
434 | 433 | } else { |
435 | 434 | struct emu_hal_params emu_romcode_params; |
436 | 435 | emu_romcode_params.num_params = 1; |
... | ... | @@ -470,8 +469,7 @@ |
470 | 469 | static void omap3_invalidate_l2_cache_secure(void) |
471 | 470 | { |
472 | 471 | if (get_device_type() == GP_DEVICE) { |
473 | - omap3_gp_romcode_call(OMAP3_GP_ROMCODE_API_L2_INVAL, | |
474 | - 0); | |
472 | + omap_smc1(OMAP3_GP_ROMCODE_API_L2_INVAL, 0); | |
475 | 473 | } else { |
476 | 474 | struct emu_hal_params emu_romcode_params; |
477 | 475 | emu_romcode_params.num_params = 1; |
arch/arm/cpu/armv7/omap3/lowlevel_init.S
... | ... | @@ -27,17 +27,6 @@ |
27 | 27 | ENDPROC(save_boot_params) |
28 | 28 | #endif |
29 | 29 | |
30 | -ENTRY(omap3_gp_romcode_call) | |
31 | - PUSH {r4-r12, lr} @ Save all registers from ROM code! | |
32 | - MOV r12, r0 @ Copy the Service ID in R12 | |
33 | - MOV r0, r1 @ Copy parameter to R0 | |
34 | - mcr p15, 0, r0, c7, c10, 4 @ DSB | |
35 | - mcr p15, 0, r0, c7, c10, 5 @ DMB | |
36 | - .word 0xe1600070 @ SMC #0 to enter monitor - hand assembled | |
37 | - @ because we use -march=armv5 | |
38 | - POP {r4-r12, pc} | |
39 | -ENDPROC(omap3_gp_romcode_call) | |
40 | - | |
41 | 30 | /* |
42 | 31 | * Funtion for making PPA HAL API calls in secure devices |
43 | 32 | * Input: |
arch/arm/include/asm/arch-omap3/sys_proto.h