Re: [RFC/PATCH v2] powerpc: add ioremap_early() function for mapping IO regions before MMU_init()

2008-08-14 Thread Grant Likely
On Thu, Aug 14, 2008 at 1:59 PM, Kumar Gala <[EMAIL PROTECTED]> wrote: > > On Aug 14, 2008, at 11:43 AM, Grant Likely wrote: > >> On Thu, Aug 14, 2008 at 10:24 AM, Kumar Gala <[EMAIL PROTECTED]> >> wrote: > > what happens if we run out of bats? Then it returns NULL and the caller

Re: [RFC/PATCH v2] powerpc: add ioremap_early() function for mapping IO regions before MMU_init()

2008-08-14 Thread Kumar Gala
On Aug 14, 2008, at 11:43 AM, Grant Likely wrote: On Thu, Aug 14, 2008 at 10:24 AM, Kumar Gala <[EMAIL PROTECTED] > wrote: what happens if we run out of bats? Then it returns NULL and the caller must handle it. The board port maintainer needs understand the board/CPU/SoC and not depend on m

Re: [RFC/PATCH v2] powerpc: add ioremap_early() function for mapping IO regions before MMU_init()

2008-08-14 Thread Grant Likely
On Thu, Aug 14, 2008 at 10:24 AM, Kumar Gala <[EMAIL PROTECTED]> wrote: >>> what happens if we run out of bats? >> >> Then it returns NULL and the caller must handle it. The board port >> maintainer needs understand the board/CPU/SoC and not depend on more >> BATs than are available. They also ne

Re: [RFC/PATCH v2] powerpc: add ioremap_early() function for mapping IO regions before MMU_init()

2008-08-14 Thread Kumar Gala
what happens if we run out of bats? Then it returns NULL and the caller must handle it. The board port maintainer needs understand the board/CPU/SoC and not depend on more BATs than are available. They also need to understand that there is a tradeoff between BATs for IO and BATs for RAM. If t

Re: [RFC/PATCH v2] powerpc: add ioremap_early() function for mapping IO regions before MMU_init()

2008-08-14 Thread Grant Likely
On Thu, Aug 14, 2008 at 7:00 AM, Kumar Gala <[EMAIL PROTECTED]> wrote: > > On Aug 12, 2008, at 10:03 PM, Grant Likely wrote: > >> +/** >> + * ioremap_early - Allow large persistant IO regions to be mapped early. >> + * @addr: physical address of region >> + * @size: size of region >> + * >> + * Thi

Re: [RFC/PATCH v2] powerpc: add ioremap_early() function for mapping IO regions before MMU_init()

2008-08-14 Thread Kumar Gala
On Aug 12, 2008, at 10:03 PM, Grant Likely wrote: +/** + * ioremap_early - Allow large persistant IO regions to be mapped early. + * @addr: physical address of region + * @size: size of region + * + * This routine uses setbat() to set up IO ranges before the MMU is + * fully configured. + *

[RFC/PATCH v2] powerpc: add ioremap_early() function for mapping IO regions before MMU_init()

2008-08-12 Thread Grant Likely
From: Grant Likely <[EMAIL PROTECTED]> ioremap_early() is useful for things like mapping SoC internally memory mapped register and early text because it allows mappings to devices to be setup early in the boot process where they are needed, and the mappings persist after the MMU is configured. Wi