powerpc/mpc85xx: Use IFC accessor function
authorPrabhakar Kushwaha <prabhakar@freescale.com>
Tue, 23 Sep 2014 05:27:12 +0000 (10:57 +0530)
committerYork Sun <yorksun@freescale.com>
Fri, 14 Nov 2014 19:12:14 +0000 (11:12 -0800)
IFC registers can be of type Little Endian or big Endian depending upon
Freescale SoC. Here SoC defines the register type of IFC IP.

So use IFC acessor functions instead of in_be32().

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
arch/powerpc/cpu/mpc85xx/cpu_init_early.c
arch/powerpc/cpu/mpc85xx/speed.c

index 072387a87ef638313dca953d51453911d0ea48e2..5ca9bf5ff98f53adac99d04c7a6c26fa57fb679f 100644 (file)
@@ -70,9 +70,9 @@ void setup_ifc(void)
 #endif
 
        /* Change flash's physical address */
-       out_be32(&(ifc_regs->cspr_cs[0].cspr), CONFIG_SYS_CSPR0);
-       out_be32(&(ifc_regs->csor_cs[0].csor), CONFIG_SYS_CSOR0);
-       out_be32(&(ifc_regs->amask_cs[0].amask), CONFIG_SYS_AMASK0);
+       ifc_out32(&(ifc_regs->cspr_cs[0].cspr), CONFIG_SYS_CSPR0);
+       ifc_out32(&(ifc_regs->csor_cs[0].csor), CONFIG_SYS_CSOR0);
+       ifc_out32(&(ifc_regs->amask_cs[0].amask), CONFIG_SYS_AMASK0);
 
        return ;
 }
index 3236f6a5da6b577af94441996a89127e1ddeac81..8426b1a5c2d85d9fde0c268e07ad6408505113a8 100644 (file)
@@ -430,7 +430,7 @@ void get_sys_info(sys_info_t *sys_info)
 #endif
 
 #if defined(CONFIG_FSL_IFC)
-       ccr = in_be32(&ifc_regs->ifc_ccr);
+       ccr = ifc_in32(&ifc_regs->ifc_ccr);
        ccr = ((ccr & IFC_CCR_CLK_DIV_MASK) >> IFC_CCR_CLK_DIV_SHIFT) + 1;
 
        sys_info->freq_localbus = sys_info->freq_systembus / ccr;