Sergei Shtylyov <[email protected]> writes: > 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. Preferably with a patch and a description. >> 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. 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. > moreover, it introduced a bug. :-/ Can you be even slightly more specific. >> diff --git a/arch/arm/mach-davinci/io.c b/arch/arm/mach-davinci/io.c >> index fdd51ea..b73e4e5 100644 >> --- a/arch/arm/mach-davinci/io.c >> +++ b/arch/arm/mach-davinci/io.c >> @@ -51,3 +51,27 @@ void __init davinci_map_common_io(void) >> */ >> davinci_check_revision(); >> } >> + >> +#define BETWEEN(p,st,sz) ((p) >= (st) && (p) < ((st) + (sz))) > > Not a good name for such macro. It's between what -- start and size? :-/ Agreed. But, this was copied from the OMAP version written by RMK, so I just left the names as he wrote them. >> 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. Your patches, fixes suggestions are more than welcome against the current HEAD. Kevin _______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
