On Fri, Aug 15, 2008 at 01:31:48AM -0700, Andrew Morton wrote: > One possible implementation might be > > > --- a/include/linux/io.h~a > +++ a/include/linux/io.h > @@ -67,4 +67,41 @@ int check_signature(const volatile void > const unsigned char *signature, int length); > void devm_ioremap_release(struct device *dev, void *res); > > +#ifndef readsl > + > +/* > + * description goes here > + */ > +static inline void readsl(const void __iomem *addr, void *buf, int len) > +{ > + insl((unsigned long)addr, buf, len); > +} > + > +static inline void readsw(const void __iomem *addr, void *buf, int len) > +{ > + insw((unsigned long)addr, buf, len); > +} > + > +static inline void readsb(const void __iomem *addr, void *buf, int len) > +{ > + insb((unsigned long)addr, buf, len); > +} > + > +static inline void writesl(const void __iomem *addr, const void *buf, int len) > +{ > + outsl((unsigned long)addr, buf, len); > +} > + > +static inline void writesw(const void __iomem *addr, const void *buf, int len) > +{ > + outsw((unsigned long)addr, buf, len); > +} > + > +static inline void writesb(const void __iomem *addr, const void *buf, int len) > +{ > + outsb((unsigned long)addr, buf, len); > +} > + > +#endif /* readsl */ > + > #endif /* _LINUX_IO_H */ That's what I meant (or tried to). It should come from the kernel itself. Unfortunately we didn't have that at that time and we "hacked" it in the driver. > But just saying "oh look, the arch layer is all screwed up, let's hack > around it in our driver" is plain irresponsible. I'd be glad to change if include/linux/io.h can provide those stubs. > > > avr32 and powerpc might also have conflicts. Now, or in the future. > > Did you review these architectures? Yeah. ppc and avr32 provide them. Wonder if it's possible to have the above patch applied so I can get rid of those stubs in musb_io.h -- balbi -- To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html