From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V3 05/11] ARM: OMAP: Change set_pl310_ctrl_reg to be generic
Date: Tue, 3 Mar 2015 12:08:50 -0500 [thread overview]
Message-ID: <20150303170850.GI25373@bill-the-cat> (raw)
In-Reply-To: <1424897719-12666-6-git-send-email-nm@ti.com>
On Wed, Feb 25, 2015 at 02:55:13PM -0600, Nishanth Menon wrote:
> set_pl310_ctrl_reg does use the Secure Monitor Call (SMC) to setup
> PL310 control register, however, that is something that is generic
> enough to be used for OMAP5 generation of processors as well. The
> only difference being the service being invoked for the function.
>
> So, convert the service to a macro and use a generic name (same as
> that used in Linux for some consistency). While at that, also add
> a data barrier which is necessary as per recommendation.
>
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
> arch/arm/cpu/armv7/omap-common/lowlevel_init.S | 13 ++++++++-----
> arch/arm/cpu/armv7/omap4/hwinit.c | 4 ++--
> arch/arm/include/asm/arch-omap4/sys_proto.h | 5 ++++-
> 3 files changed, 14 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm/cpu/armv7/omap-common/lowlevel_init.S b/arch/arm/cpu/armv7/omap-common/lowlevel_init.S
> index 86c0e4217478..9b24369e4dc1 100644
> --- a/arch/arm/cpu/armv7/omap-common/lowlevel_init.S
> +++ b/arch/arm/cpu/armv7/omap-common/lowlevel_init.S
> @@ -22,11 +22,14 @@ ENTRY(save_boot_params)
> bx lr
> ENDPROC(save_boot_params)
>
> -ENTRY(set_pl310_ctrl_reg)
> - PUSH {r4-r11, lr} @ save registers - ROM code may pollute
> +ENTRY(omap_smc1)
> + PUSH {r4-r12, lr} @ save registers - ROM code may pollute
> @ our registers
> - LDR r12, =0x102 @ Set PL310 control register - value in R0
> + MOV r12, r0 @ Service
> + MOV r0, r1 @ Argument
> + DSB
> + DMB
> .word 0xe1600070 @ SMC #0 - hand assembled because -march=armv5
> @ call ROM Code API to set control register
Lets stop hand-crafting that call, we just call smc #0 elsewhere in the
code base these days.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150303/8168b71a/attachment.sig>
next prev parent reply other threads:[~2015-03-03 17:08 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-25 20:55 [U-Boot] [PATCH V3 0/11] ARM: OMAP3-DRA7: CP15 erratum workarounds and improvements Nishanth Menon
2015-02-25 20:55 ` [U-Boot] [PATCH V3 01/11] ARM: Introduce erratum workaround for 798870 Nishanth Menon
2015-03-03 16:29 ` Nishanth Menon
2015-02-25 20:55 ` [U-Boot] [PATCH V3 02/11] ARM: Introduce erratum workaround for 454179 Nishanth Menon
2015-02-25 20:55 ` [U-Boot] [PATCH V3 03/11] ARM: Introduce erratum workaround for 430973 Nishanth Menon
2015-02-25 20:55 ` [U-Boot] [PATCH V3 04/11] ARM: Introduce erratum workaround for 621766 Nishanth Menon
2015-02-25 20:55 ` [U-Boot] [PATCH V3 05/11] ARM: OMAP: Change set_pl310_ctrl_reg to be generic Nishanth Menon
2015-03-03 17:08 ` Tom Rini [this message]
2015-03-03 17:12 ` Nishanth Menon
2015-03-03 17:54 ` Nishanth Menon
2015-03-03 17:55 ` Tom Rini
2015-02-25 20:55 ` [U-Boot] [PATCH V3 06/11] ARM: OMAP3: Rename omap3.h to omap.h to be generic as all SoCs Nishanth Menon
2015-02-25 20:55 ` [U-Boot] [PATCH V3 07/11] ARM: OMAP3: Get rid of omap3_gp_romcode_call and replace with omap_smc1 Nishanth Menon
2015-02-25 20:55 ` [U-Boot] [PATCH V3 08/11] ARM: DRA7 / OMAP5: Add workaround for ARM errata 798870 Nishanth Menon
2015-02-25 20:55 ` [U-Boot] [PATCH V3 09/11] ARM: OMAP5 / DRA7: Setup L2 Aux Control Register with recommended configuration Nishanth Menon
2015-02-25 20:55 ` [U-Boot] [PATCH V3 10/11] ARM: OMAP3: Enable workaround for ARM errata 454179, 430973, 621766 Nishanth Menon
2015-02-25 20:55 ` [U-Boot] [PATCH V3 11/11] ARM: OMAP3: rx51: " Nishanth Menon
2015-02-26 7:40 ` [U-Boot] [PATCH V3 0/11] ARM: OMAP3-DRA7: CP15 erratum workarounds and improvements Siarhei Siamashka
2015-02-26 14:50 ` Nishanth Menon
2015-02-26 16:14 ` Siarhei Siamashka
2015-03-02 21:16 ` Tom Rini
2015-03-03 6:45 ` Siarhei Siamashka
2015-03-03 16:25 ` 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=20150303170850.GI25373@bill-the-cat \
--to=trini@konsulko.com \
--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