Skip to contentSkip to conversation

driver/ifc:Change accessor function to take care of endianness

PATCH Superseded Prabhakar Kushwaha 1 participant 1 message Jan 18, 2014

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 driver/ifc:Change accessor function to take care of endianness

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 update acessor function with common IFC accessors to take care both type of endianness.

---
 README                                    |    6 +
 arch/powerpc/include/asm/config_mpc85xx.h |    3 +
 drivers/mtd/nand/fsl_ifc_nand.c           |  243 +++++++++++++++--------------
 drivers/mtd/nand/fsl_ifc_spl.c            |   60 +++----
 include/fsl_ifc.h                         |   42 +++--
 5 files changed, 190 insertions(+), 164 deletions(-)
README +6 -0
index aea82be..d948afa 100644
@@ -472,6 +472,12 @@ The following options need to be configured:
 		Board config to use DDR3. It can be enabled for SoCs with
 		Freescale DDR3 controllers.
 
+		CONFIG_SYS_FSL_IFC_BE
+		Define the IFC controller register space as Big Endian
+
+		CONFIG_SYS_FSL_IFC_LE
+		Define the IFC controller register space as Little Endian
+
 - Intel Monahans options:
 		CONFIG_SYS_MONAHANS_RUN_MODE_OSC_RATIO
 
arch/powerpc/include/asm/config_mpc85xx.h +3 -0
index 54ce2f0..32307c8 100644
@@ -22,6 +22,9 @@
 #define FSL_DDR_VER_4_7	47
 #define FSL_DDR_VER_5_0	50
 
+/* IP endianness */
+#define CONFIG_SYS_FSL_IFC_BE
+
 /* Number of TLB CAM entries we have on FSL Book-E chips */
 #if defined(CONFIG_E500MC)
 #define CONFIG_SYS_NUM_TLBCAMS		64
drivers/mtd/nand/fsl_ifc_nand.c +122 -121

421 lines not on this page · raw message

drivers/mtd/nand/fsl_ifc_spl.c +30 -30

100 lines not on this page · raw message

include/fsl_ifc.h +29 -13

55 lines not on this page · raw message

Signature · 1 line
1.7.9.5