public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Paul Kocialkowski <contact@paulk.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2 3/9] ARM: OMAP3: Get rid of omap3_gp_romcode_call and replace with omap_smc1
Date: Wed, 25 Feb 2015 12:06:41 +0100	[thread overview]
Message-ID: <1424862401.2460.9.camel@collins> (raw)
In-Reply-To: <1424818672-29501-4-git-send-email-nm@ti.com>

Le mardi 24 f?vrier 2015 ? 16:57 -0600, Nishanth Menon a ?crit :
> omap_smc1 is now generic enough to remove duplicate
> omap3_gp_romcode_call logic that omap3 introduced.

As far as I could see, this did not introduce any regression on my
omap3630 device (omap_smc1 is used from omap3_invalidate_l2_cache_secure
in my case). Looks good to me.

> 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>
> ---
>  arch/arm/cpu/armv7/omap-common/Makefile        |    2 +-
>  arch/arm/cpu/armv7/omap-common/lowlevel_init.S |    2 ++
>  arch/arm/cpu/armv7/omap3/board.c               |    6 ++----
>  arch/arm/cpu/armv7/omap3/lowlevel_init.S       |   11 -----------
>  arch/arm/include/asm/arch-omap3/sys_proto.h    |    2 +-
>  5 files changed, 6 insertions(+), 17 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/omap-common/Makefile b/arch/arm/cpu/armv7/omap-common/Makefile
> index 7695e16d36f5..f3725b267c99 100644
> --- a/arch/arm/cpu/armv7/omap-common/Makefile
> +++ b/arch/arm/cpu/armv7/omap-common/Makefile
> @@ -28,7 +28,7 @@ endif
>  
>  ifeq ($(CONFIG_OMAP34XX),)
>  obj-y	+= boot-common.o
> -obj-y	+= lowlevel_init.o
>  endif
> +obj-y	+= lowlevel_init.o
>  
>  obj-y	+= mem-common.o
> diff --git a/arch/arm/cpu/armv7/omap-common/lowlevel_init.S b/arch/arm/cpu/armv7/omap-common/lowlevel_init.S
> index 9b24369e4dc1..7d0f09496d85 100644
> --- a/arch/arm/cpu/armv7/omap-common/lowlevel_init.S
> +++ b/arch/arm/cpu/armv7/omap-common/lowlevel_init.S
> @@ -16,11 +16,13 @@
>  #include <asm/arch/spl.h>
>  #include <linux/linkage.h>
>  
> +#ifndef CONFIG_OMAP34XX
>  ENTRY(save_boot_params)
>  	ldr	r1, =OMAP_SRAM_SCRATCH_BOOT_PARAMS
>  	str	r0, [r1]
>  	bx	lr
>  ENDPROC(save_boot_params)
> +#endif
>  
>  ENTRY(omap_smc1)
>  	PUSH	{r4-r12, lr}	@ save registers - ROM code may pollute
> diff --git a/arch/arm/cpu/armv7/omap3/board.c b/arch/arm/cpu/armv7/omap3/board.c
> index 90d6ae7bb5f5..51abc4b09e36 100644
> --- a/arch/arm/cpu/armv7/omap3/board.c
> +++ b/arch/arm/cpu/armv7/omap3/board.c
> @@ -418,8 +418,7 @@ static void omap3_update_aux_cr_secure(u32 set_bits, u32 clear_bits)
>  	acr |= set_bits;
>  
>  	if (get_device_type() == GP_DEVICE) {
> -		omap3_gp_romcode_call(OMAP3_GP_ROMCODE_API_WRITE_ACR,
> -				       acr);
> +		omap_smc1(OMAP3_GP_ROMCODE_API_WRITE_ACR, acr);
>  	} else {
>  		struct emu_hal_params emu_romcode_params;
>  		emu_romcode_params.num_params = 1;
> @@ -459,8 +458,7 @@ static void omap3_update_aux_cr(u32 set_bits, u32 clear_bits)
>  static void omap3_invalidate_l2_cache_secure(void)
>  {
>  	if (get_device_type() == GP_DEVICE) {
> -		omap3_gp_romcode_call(OMAP3_GP_ROMCODE_API_L2_INVAL,
> -				      0);
> +		omap_smc1(OMAP3_GP_ROMCODE_API_L2_INVAL, 0);
>  	} else {
>  		struct emu_hal_params emu_romcode_params;
>  		emu_romcode_params.num_params = 1;
> diff --git a/arch/arm/cpu/armv7/omap3/lowlevel_init.S b/arch/arm/cpu/armv7/omap3/lowlevel_init.S
> index 78577b1d1c75..84591b8b5bab 100644
> --- a/arch/arm/cpu/armv7/omap3/lowlevel_init.S
> +++ b/arch/arm/cpu/armv7/omap3/lowlevel_init.S
> @@ -27,17 +27,6 @@ ENTRY(save_boot_params)
>  ENDPROC(save_boot_params)
>  #endif
>  
> -ENTRY(omap3_gp_romcode_call)
> -	PUSH {r4-r12, lr} @ Save all registers from ROM code!
> -	MOV r12, r0	@ Copy the Service ID in R12
> -	MOV r0, r1	@ Copy parameter to R0
> -	mcr     p15, 0, r0, c7, c10, 4	@ DSB
> -	mcr     p15, 0, r0, c7, c10, 5	@ DMB
> -	.word	0xe1600070	@ SMC #0 to enter monitor - hand assembled
> -				@ because we use -march=armv5
> -	POP {r4-r12, pc}
> -ENDPROC(omap3_gp_romcode_call)
> -
>  /*
>   * Funtion for making PPA HAL API calls in secure devices
>   * Input:
> diff --git a/arch/arm/include/asm/arch-omap3/sys_proto.h b/arch/arm/include/asm/arch-omap3/sys_proto.h
> index bcf92fbe658b..c06605d533d3 100644
> --- a/arch/arm/include/asm/arch-omap3/sys_proto.h
> +++ b/arch/arm/include/asm/arch-omap3/sys_proto.h
> @@ -73,6 +73,6 @@ void power_init_r(void);
>  void dieid_num_r(void);
>  void get_dieid(u32 *id);
>  void do_omap3_emu_romcode_call(u32 service_id, u32 parameters);
> -void omap3_gp_romcode_call(u32 service_id, u32 parameter);
> +void omap_smc1(u32 service, u32 val);
>  u32 warm_reset(void);
>  #endif

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150225/55198173/attachment.sig>

  reply	other threads:[~2015-02-25 11:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-24 22:57 [U-Boot] [PATCH V2 0/9] ARM: OMAP3-DRA7: CP15 erratum workarounds and improvements Nishanth Menon
2015-02-24 22:57 ` [U-Boot] [PATCH V2 1/9] ARM: OMAP: Change set_pl310_ctrl_reg to be generic Nishanth Menon
2015-02-24 22:57 ` [U-Boot] [PATCH V2 2/9] ARM: OMAP3: Rename omap3.h to omap.h to be generic as all SoCs Nishanth Menon
2015-02-25 11:02   ` Paul Kocialkowski
2015-02-25 17:53     ` Nishanth Menon
2015-02-24 22:57 ` [U-Boot] [PATCH V2 3/9] ARM: OMAP3: Get rid of omap3_gp_romcode_call and replace with omap_smc1 Nishanth Menon
2015-02-25 11:06   ` Paul Kocialkowski [this message]
2015-02-24 22:57 ` [U-Boot] [PATCH V2 4/9] ARM: Provide a mechanism to invoke SoC specific errata WA for CP15 Nishanth Menon
2015-02-24 22:57 ` [U-Boot] [PATCH V2 5/9] ARM: DRA7 / OMAP5: Add workaround for ARM errata 798870 Nishanth Menon
2015-02-24 22:57 ` [U-Boot] [PATCH V2 6/9] configs: ti_omap5_common: Enable " Nishanth Menon
2015-02-24 22:57 ` [U-Boot] [PATCH V2 7/9] ARM: OMAP3: Introduce OMAP3 Cortex-A8 revision specific errata Nishanth Menon
2015-02-25 11:15   ` Paul Kocialkowski
2015-02-25 19:49     ` Nishanth Menon
2015-03-03  7:30       ` Siarhei Siamashka
2015-02-24 22:57 ` [U-Boot] [PATCH V2 8/9] configs: ti_omap3_common: Enable workaround for ARM errata 454179, 430973, 621766 Nishanth Menon
2015-02-25 11:19   ` Paul Kocialkowski
2015-02-25 11:31     ` Igor Grinberg
2015-02-25 12:27       ` Paul Kocialkowski
2015-02-25 14:32         ` menon.nishanth at gmail.com
2015-02-25 21:23           ` Paul Kocialkowski
2015-02-26  5:11             ` Nishanth Menon
2015-02-27 19:27               ` Paul Kocialkowski
2015-02-24 22:57 ` [U-Boot] [PATCH V2 9/9] ARM: OMAP5 / DRA7: Setup L2 Aux Control Register with recommended configuration Nishanth Menon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1424862401.2460.9.camel@collins \
    --to=contact@paulk.fr \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox