]> git.sur5r.net Git - u-boot/commitdiff
armv8: lsch3: Add generic get_svr() in assembly
authorPriyanka Jain <priyanka.jain@nxp.com>
Thu, 17 Nov 2016 06:59:51 +0000 (12:29 +0530)
committerYork Sun <york.sun@nxp.com>
Tue, 22 Nov 2016 19:37:07 +0000 (11:37 -0800)
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
arch/arm/cpu/armv8/fsl-layerscape/cpu.c
arch/arm/cpu/armv8/fsl-layerscape/lowlevel.S
arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h

index 0b516e37d70c95abdf47cd96b8cf2140380d8068..e304870198b7ef9c59e124bcb4870d3f31470604 100644 (file)
@@ -306,12 +306,14 @@ u32 fsl_qoriq_core_to_type(unsigned int core)
        return -1;      /* cannot identify the cluster */
 }
 
+#ifndef CONFIG_FSL_LSCH3
 uint get_svr(void)
 {
        struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
 
        return gur_in32(&gur->svr);
 }
+#endif
 
 #ifdef CONFIG_DISPLAY_CPUINFO
 int print_cpuinfo(void)
index 5700b1fb654393a3f6f793643061e32455c4e8c2..6ff47b0e0600ad8b5681c689e290921d68f2cec8 100644 (file)
@@ -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
+
 hnf_pstate_poll:
        /* x0 has the desired status, return 0 for success, 1 for timeout
         * clobber x1, x2, x3, x4, x6, x7
index 7acba2730aac21e861161f14de9904c522fd759d..09c10335006067e7ed239a23685cc28101709699 100644 (file)
@@ -27,6 +27,7 @@
 #define CONFIG_SYS_FSL_PMU_CLTBENR             (CONFIG_SYS_FSL_PMU_ADDR + \
                                                 0x18A0)
 #define FSL_PMU_PCTBENR_OFFSET (CONFIG_SYS_FSL_PMU_ADDR + 0x8A0)
+#define FSL_LSCH3_SVR          (CONFIG_SYS_FSL_GUTS_ADDR + 0xA4)
 
 #define CONFIG_SYS_FSL_WRIOP1_ADDR             (CONFIG_SYS_IMMR + 0x7B80000)
 #define CONFIG_SYS_FSL_WRIOP1_MDIO1    (CONFIG_SYS_FSL_WRIOP1_ADDR + 0x16000)
 #define TP_CLUSTER_INIT_MASK   0x0000003f      /* initiator mask */
 #define TP_INIT_PER_CLUSTER     4
 /* This is chassis generation 3 */
-
+#ifndef __ASSEMBLY__
 struct sys_info {
        unsigned long freq_processor[CONFIG_MAX_CPUS];
        unsigned long freq_systembus;
@@ -317,6 +318,5 @@ struct ccsr_reset {
        u32 ip_rev2;                    /* 0xbfc */
 };
 
-uint get_svr(void);
-
+#endif /*__ASSEMBLY__*/
 #endif /* __ARCH_FSL_LSCH3_IMMAP_H_ */