[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201301181555.43487.arnd@arndb.de>
Date: Fri, 18 Jan 2013 15:55:43 +0000
From: Arnd Bergmann <arnd@...db.de>
To: Vineet Gupta <Vineet.Gupta1@...opsys.com>
Cc: linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 28/76] ARC: I/O and DMA Mappings
On Friday 18 January 2013, Vineet Gupta wrote:
> TBD: Do we need early ioremap support like openrisc
>
> Signed-off-by: Vineet Gupta <vgupta@...opsys.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists