ARM: mx35: add WEIM register addresses
Subsystems (3)
PATCH 1/1 ARM: mx35: add WEIM register addresses
This patch adds WEIM register addresses to mx35 platform header file.
--- arch/arm/plat-mxc/include/mach/mx35.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
arch/arm/plat-mxc/include/mach/mx35.h +5 -0
@@ -111,6 +111,11 @@#define MX35_EMI_CTL_BASE_ADDR (MX35_X_MEMC_BASE_ADDR + 0x4000)#define MX35_PCMCIA_CTL_BASE_ADDR MX35_EMI_CTL_BASE_ADDR +#define MX35_WEIM_CSCRx_BASE_ADDR (cs) (MX35_WEIM_BASE_ADDR + (cs) * 0x10) +#define MX35_WEIM_CSCRxU (cs) (MX35_WEIM_CSCRx_BASE_ADDR(cs)) +#define MX35_WEIM_CSCRxL (cs) (MX35_WEIM_CSCRx_BASE_ADDR(cs) + 0x4) +#define MX35_WEIM_CSCRxA (cs) (MX35_WEIM_CSCRx_BASE_ADDR(cs) + 0x8) +#define MX35_NFC_BASE_ADDR 0xbb000000#define MX35_PCMCIA_MEM_BASE_ADDR 0xbc000000
Signature · 1 line
1.7.2.5
Quoted 14 lines · Christoph Fritz
This patch adds WEIM register addresses to mx35 platform header file.
Signed-off-by Christoph Fritz <[email protected]>Signed-off-by Christian Hemp <[email protected]>--- arch/arm/plat-mxc/include/mach/mx35.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)arch/arm/plat-mxc/include/mach/mx35.h +0
-0@@ -111,6 +111,11 @@#define MX35_EMI_CTL_BASE_ADDR (MX35_X_MEMC_BASE_ADDR + 0x4000)
arch/arm/plat-mxc/include/mach/mx35.h line 121
Quoted 10 lines
arch/arm/plat-mxc/include/mach/mx35.h +5
-0#define MX35_PCMCIA_CTL_BASE_ADDR MX35_EMI_CTL_BASE_ADDR +#define MX35_WEIM_CSCRx_BASE_ADDR (cs) (MX35_WEIM_BASE_ADDR + (cs) * 0x10) +#define MX35_WEIM_CSCRxU (cs) (MX35_WEIM_CSCRx_BASE_ADDR(cs)) +#define MX35_WEIM_CSCRxL (cs) (MX35_WEIM_CSCRx_BASE_ADDR(cs) + 0x4) +#define MX35_WEIM_CSCRxA (cs) (MX35_WEIM_CSCRx_BASE_ADDR(cs) + 0x8) +#define MX35_NFC_BASE_ADDR 0xbb000000#define MX35_PCMCIA_MEM_BASE_ADDR 0xbc000000
ping
Sascha Hauer
maintainerHi Christoph,
Quoted 14 lines · Christoph Fritz
This patch adds WEIM register addresses to mx35 platform header file.
Signed-off-by Christoph Fritz <[email protected]>Signed-off-by Christian Hemp <[email protected]>--- arch/arm/plat-mxc/include/mach/mx35.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)arch/arm/plat-mxc/include/mach/mx35.h +0
-0
arch/arm/plat-mxc/include/mach/mx35.h line 118
Quoted 8 lines
arch/arm/plat-mxc/include/mach/mx35.h +5
-0@@ -111,6 +111,11 @@#define MX35_EMI_CTL_BASE_ADDR (MX35_X_MEMC_BASE_ADDR + 0x4000)#define MX35_PCMCIA_CTL_BASE_ADDR MX35_EMI_CTL_BASE_ADDR +#define MX35_WEIM_CSCRx_BASE_ADDR (cs) (MX35_WEIM_BASE_ADDR + (cs) * 0x10) +#define MX35_WEIM_CSCRxU (cs) (MX35_WEIM_CSCRx_BASE_ADDR(cs)) +#define MX35_WEIM_CSCRxL (cs) (MX35_WEIM_CSCRx_BASE_ADDR(cs) + 0x4) +#define MX35_WEIM_CSCRxA (cs) (MX35_WEIM_CSCRx_BASE_ADDR(cs) + 0x8) +
Honestly I'm not in the mood of adding another instance of the same register defines. Currently we have:
#define MX31_WEIM_CSCRx_BASE_ADDR(cs) (MX31_WEIM_BASE_ADDR + (cs) * 0x10) #define MX31_WEIM_CSCRxU(cs) (MX31_WEIM_CSCRx_BASE_ADDR(cs)) #define MX31_WEIM_CSCRxL(cs) (MX31_WEIM_CSCRx_BASE_ADDR(cs) + 0x4) #define MX31_WEIM_CSCRxA(cs) (MX31_WEIM_CSCRx_BASE_ADDR(cs) + 0x8)
#define MX27_WEIM_CSCRx_BASE_ADDR(cs) (MX27_WEIM_BASE_ADDR + (cs) * 0x10) #define MX27_WEIM_CSCRxU(cs) (MX27_WEIM_CSCRx_BASE_ADDR(cs)) #define MX27_WEIM_CSCRxL(cs) (MX27_WEIM_CSCRx_BASE_ADDR(cs) + 0x4) #define MX27_WEIM_CSCRxA(cs) (MX27_WEIM_CSCRx_BASE_ADDR(cs) + 0x8)
The same could be used on i.MX25 aswell. I think we should clean this up before adding more SoCs.
Sascha
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Quoted 2 lines · Sascha Hauer
The same could be used on i.MX25 aswell. I think we should clean this up before adding more SoCs.
:) full ack. What would you suggest? A macro?
Thanks,
-- Christoph
Sascha Hauer
maintainerQuoted 6 lines · Christoph Fritz
Quoted 2 lines · Sascha Hauer
The same could be used on i.MX25 aswell. I think we should clean this up before adding more SoCs.
:) full ack. What would you suggest? A macro?
Something like the following should do. We still could do better, but at least we have all pieces together.
imx-weim.h:
#define IMX_WEIM_CSU_BITS ...
static inline void imx_weim_cs(void __iomem *base, int cs, u32 csu, u32 csl, u32 csa) {
do_it
}
static inline void mx27_weim_cs(int cs, u32 csu, u32 csl, u32 csa)
{
imx_weim_cs(MX27_IO_ADDRESS(MX27_WEIM_BASE), cs, csu, csl, csa));
}Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |