[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-arm-kernel
Subject: Re: ioremap non-contiguous phys to contiguous virt?
From: Nicolas Pitre <nico () cam ! org>
Date: 2004-10-18 21:43:40
Message-ID: Pine.LNX.4.61.0410181740300.4038 () xanadu ! home
[Download RAW message or body]
On Mon, 18 Oct 2004, Marc Singer wrote:
> On Mon, Oct 18, 2004 at 10:11:26PM +0100, Russell King - ARM Linux wrote:
> > On Mon, Oct 18, 2004 at 12:34:45PM -0700, Marc Singer wrote:
> > > For the sake of the making it easy on the mtd drivers, I'd like to map
> > > discontiguous physical memory to a contiguous virtual address space.
> > > This hardware layout is an artifact of the design that allows a larger
> > > flash device to be used in later implementations.
> > >
> > > I think that my options are
> > >
> > > 1) ignore the problem and create a custom maps driver with NO_XIP set.
> > > 2) create a custom maps driver, but use the io_table_init mechanism
> > > to map the memory contiguously (eeww)
> > > 3) find a clever method to do something like this
> > >
> > > struct memvec mv = { { PHYS0, LEN0 }, {PHYS1, LEN1 } };
> > > void* virt = ioremapv (memvec, 2);
> >
> > 4) use the mtdconcat driver, just like the SA1100 map driver does.
>
> Looking at mtdconcat: that's a HUGE amount of code when the same can
> be solved with a linear memory mapping.
mtdconcat is meant to be generic.
Anyway, even if your combined flash chips are mapped contiguous, the MTD
code will still detect 2 different MTD devices anyway, right? So you
can't access both just as if they were one larger physical chip simply
by mapping them contiguously.
Nicolas
-------------------------------------------------------------------
Subscription options: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ: http://www.arm.linux.org.uk/armlinux/mlfaq.php
Etiquette: http://www.arm.linux.org.uk/armlinux/mletiquette.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic