| From | Arnd Bergmann <> | Subject | Re: [PATCH v2 28/76] ARC: I/O and DMA Mappings | Date | Fri, 18 Jan 2013 15:55:43 +0000 |
| |
On Friday 18 January 2013, Vineet Gupta wrote: > TBD: Do we need early ioremap support like openrisc > > Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Can you explain why early ioremap is necessary for you?
I wasn't aware that openrisc has it. In a lot of cases, you can use fixmap as a replacement.
> + > +#ifndef _ASM_ARC_IO_H > +#define _ASM_ARC_IO_H > + > +#include <asm/byteorder.h> > +#include <asm/page.h> > + > +extern void __iomem *ioremap(unsigned long physaddr, unsigned long size); > +extern void iounmap(const void __iomem *addr); > + > +#define ioremap_nocache(phy, sz) ioremap(phy, sz) > +#define ioremap_wc(phy, sz) ioremap(phy, sz) > + > +/* Change struct page to physical address */ > +#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) > + > +#include <asm-generic/io.h>
I think I commented before that asm-generic/io.h has a number of problems and you should at least override the __raw_{read,write}{b,w,l,q} functions with your own ones using inline assembly.
You should also define a non-NULL PCI_IOBASE.
Arnd
|