Skip to contentSkip to conversation

IFC: Change IO accessor based on endianness

PATCH Superseded Jaiprakash Singh 1 participant 1 message Oct 20, 2014

Subsystems (4)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 IFC: Change IO accessor based on endianness

From: Jaiprakash Singh <[email protected]>

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

IFC IO accressor are set at run time based on IFC IP registers endianness.IFC node in DTS file contains information about endianness.

---
Changes for v2
- Moved IFC accessor function to fsl_ifc.h from fsl_ifc.c and make them inline static

.../bindings/memory-controllers/fsl/ifc.txt | 2 +

 drivers/memory/fsl_ifc.c                           |   72 ++++++----
 drivers/mtd/nand/fsl_ifc_nand.c                    |  151 +++++++++++---------
 include/linux/fsl_ifc.h                            |   42 ++++++
 4 files changed, 167 insertions(+), 100 deletions(-)
Documentation/devicetree/bindings/memory-controllers/fsl/ifc.txt +2 -0
index d5e3704..ee6226b 100644
@@ -18,6 +18,8 @@ Properties:
               interrupt (NAND_EVTER_STAT).  If there is only one,
               that interrupt reports both types of event.
 
+- little-endian : If this property is absent, the big-endian mode will
+                  be in use as default for registers.
 
 - ranges : Each range corresponds to a single chipselect, and covers
            the entire access window as configured.
drivers/memory/fsl_ifc.c +41 -31

120 lines not on this page · raw message

drivers/mtd/nand/fsl_ifc_nand.c +82 -69

406 lines not on this page · raw message

include/linux/fsl_ifc.h +42 -0

51 lines not on this page · raw message

Signature · 1 line
1.7.9.5