[U-Boot] [PATCH 1/6][v3] armv8: lsch3: Add generic get_svr() in assembly
york sun
york.sun at nxp.com
Mon Nov 14 17:50:11 CET 2016
On 11/03/2016 04:12 AM, Priyanka Jain wrote:
> Signed-off-by: Priyanka Jain <priyanka.jain at nxp.com>
> ---
> arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 7 -------
> arch/arm/cpu/armv8/fsl-layerscape/lowlevel.S | 9 +++++++++
> .../include/asm/arch-fsl-layerscape/immap_lsch3.h | 6 +++---
> 3 files changed, 12 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
> index b7a2e0c..2863e18 100644
> --- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
> +++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
> @@ -305,13 +305,6 @@ u32 fsl_qoriq_core_to_type(unsigned int core)
> return -1; /* cannot identify the cluster */
> }
>
> -uint get_svr(void)
> -{
> - struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
> -
> - return gur_in32(&gur->svr);
> -}
> -
> #ifdef CONFIG_DISPLAY_CPUINFO
> int print_cpuinfo(void)
> {
> diff --git a/arch/arm/cpu/armv8/fsl-layerscape/lowlevel.S b/arch/arm/cpu/armv8/fsl-layerscape/lowlevel.S
> index 5d0b7a4..ee20c27 100644
> --- a/arch/arm/cpu/armv8/fsl-layerscape/lowlevel.S
> +++ b/arch/arm/cpu/armv8/fsl-layerscape/lowlevel.S
> @@ -13,6 +13,9 @@
> #ifdef CONFIG_MP
> #include <asm/arch/mp.h>
> #endif
> +#ifdef CONFIG_FSL_LSCH3
> +#include <asm/arch-fsl-layerscape/immap_lsch3.h>
> +#endif
>
> ENTRY(lowlevel_init)
> mov x29, lr /* Save LR */
> @@ -199,6 +202,12 @@ ENTRY(lowlevel_init)
> ENDPROC(lowlevel_init)
>
> #ifdef CONFIG_FSL_LSCH3
> + .globl get_svr
> +get_svr:
> + ldr x1, =FSL_LSCH3_SVR
> + ldr w0, [x1]
> + ret
> +
This has an issue with non_lsch3 SoCs. You will see compiling error on
them, for example ls1012afrdm_qspi.
York
More information about the U-Boot
mailing list