lkml.org 
[lkml]   [2013]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2 28/76] ARC: I/O and DMA Mappings
Date
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


\
 
 \ /
  Last update: 2013-01-18 17:41    [W:0.701 / U:0.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site