Hello.
Kevin Hilman wrote:
Add arch-specific ioremap() which uses any existing static mappings
in place of doing a new mapping. From now on, drivers should always
use ioremap() instead of IO_ADDRESS().
In addition, remove the davinci_[read|write]* macros in favor of using
ioremap + io[read|write]*.
In case you didn't know, io[read|write]*() are *not* supposed to
couple with ioremap().
Please enlighten me.
OK. :-)
Preferably with a patch and a description.
What patch, what description? :-O
ioremap() is only supposed to couple well with read*()/write*(), while
ioread*()/iowrote*() require their own remapper, like pci_iomap() -- that's
due to a "cookie" into which I/O port addresse is converted to be usable for
ioread*()/iowrite() -- at least on x86. Look at the default implementation in
lib/iomap.c...
Though *on ARM* (and maybe other archs) ioread*()/iowrite*() seeem to be
defined via __raw_read*()/__raw_write*(), it doesn't mean that
ioread*()/iowrite*() and read*()/write*() are generally interchangeable.
Signed-off-by: Kevin Hilman <[email protected]>
diff --git a/arch/arm/mach-davinci/include/mach/mux.h
b/arch/arm/mach-davinci/include/mach/mux.h
index 497f540..41be141 100644
--- a/arch/arm/mach-davinci/include/mach/mux.h
+++ b/arch/arm/mach-davinci/include/mach/mux.h
@@ -22,19 +22,19 @@
#include <mach/dm644x.h>
/* System module registers */
-#define PINMUX0 (DAVINCI_SYSTEM_MODULE_BASE + 0x00)
-#define PINMUX1 (DAVINCI_SYSTEM_MODULE_BASE + 0x04)
+#define PINMUX0 0x00
+#define PINMUX1 0x04
/* dm355 only */
-#define PINMUX2 (DAVINCI_SYSTEM_MODULE_BASE + 0x08)
-#define PINMUX3 (DAVINCI_SYSTEM_MODULE_BASE + 0x0c)
-#define PINMUX4 (DAVINCI_SYSTEM_MODULE_BASE + 0x10)
-#define INTMUX (DAVINCI_SYSTEM_MODULE_BASE + 0x18)
-#define EVTMUX (DAVINCI_SYSTEM_MODULE_BASE + 0x1c)
+#define PINMUX2 0x08
+#define PINMUX3 0x0c
+#define PINMUX4 0x10
That wasn't really a good change from the point of view of
OMAP-L137...
I'm not sure how this simple rename isn't good for the OMAP-L137.
It's not at all a "simple rename". :-/
If anything, the goal is to make the code use 'base + offset' instead of
hard-coded physical
addresses which is more suitable for runtime configuring of base address.
Any device specific offsets that are different from these can be defined
as <device>_PINMUXN.
Well, they have to be in any case... anyway, it's already solved by Mark.
moreover, it introduced a bug. :-/
Can you be even slightly more specific.
Remember the recent patch changing cfg->reg to cfg->mask in
davinci_cfg_reg()? It was fixing a fallout of your "simple rename". :-)
diff --git a/arch/arm/mach-davinci/psc.c b/arch/arm/mach-davinci/psc.c
index 838b04e..c3bee22 100644
--- a/arch/arm/mach-davinci/psc.c
+++ b/arch/arm/mach-davinci/psc.c
@@ -74,14 +76,15 @@ static void dm6446_psc_mux(unsigned int id)
}
}
-#define DM355_ARM_PINMUX3 (DAVINCI_SYSTEM_MODULE_BASE + 0x0c)
-#define DM355_ARM_PINMUX4 (DAVINCI_SYSTEM_MODULE_BASE + 0x10)
-#define DM355_ARM_INTMUX (DAVINCI_SYSTEM_MODULE_BASE + 0x18)
-#define DM355_EDMA_EVTMUX (DAVINCI_SYSTEM_MODULE_BASE + 0x1c)
+#define DM355_ARM_PINMUX3 0x0c
+#define DM355_ARM_PINMUX4 0x10
+#define DM355_ARM_INTMUX 0x18
+#define DM355_EDMA_EVTMUX 0x1c
Err, aren't these duplicating PINMUX3/4, INTMUX, and EVTMUX?
Yes, but this patch is only renaming things. These are removed in a
subsequent patch and are no longer in the current tree.
Ah, good to know...
Your patches, fixes suggestions are more than welcome against the
current HEAD.
Kevin
WBR, Sergei
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source