[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070530214859.ec026ac8.akpm@linux-foundation.org>
Date: Wed, 30 May 2007 21:48:59 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: "Yinghai Lu" <yhlu.kernel@...il.com>
Cc: "Andi Kleen" <ak@...e.de>, "Russell King" <rmk@....linux.org.uk>,
"Bjorn Helgaas" <bjorn.helgaas@...com>,
"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/5] serial: convert early_uart to earlycon for 8250
On Wed, 30 May 2007 21:36:41 -0700 "Yinghai Lu" <yhlu.kernel@...il.com> wrote:
> On 5/30/07, Yinghai Lu <yhlu.kernel@...il.com> wrote:
> > On 5/30/07, Andrew Morton <akpm@...ux-foundation.org> wrote:
> > > On Tue, 29 May 2007 18:43:59 -0700 Yinghai Lu <Yinghai.Lu@....COM> wrote:
> > >
> > > > [PATCH 4/5] serial: convert early_uart to earlycon for 8250
> > >
> > > drivers/serial/8250_early.c: In function 'parse_options':
> > > drivers/serial/8250_early.c:143: error: 'FIX_EARLYCON_MEM_BASE' undeclared (first use in this function)
> > > drivers/serial/8250_early.c:143: error: (Each undeclared identifier is reported only once
> > >
> > > That was with http://userweb.kernel.org/~akpm/config-sony.txt, but this is
> > > going to break a whole pile of architectures (alpha, powerpc, others).
> >
> > alpha, powerpc, others may need sth like ia64, if they do not support fixmap.
> >
> >
>
> or create dummy fixmap.h that doesn't support fixmap.
>
You could require that the architecture implement some specific function
for mapping the early-uart. Say,
void __iomem *map_early_uart(unsigned long phys_addr, unsigned long len);
void unmap_early_uart(void * __iomem *addr);
then, in drivers/serial/8250_early.c, do
void __iomem * __attribute__((weak))
map_early_uart(unsigned long phys_addr, unsigned long len)
{
return ioremap(phys_addr, len);
}
void __attribute__((weak)) unmap_early_uart(void * __iomem *addr)
{
iounmap(addr);
}
and in arch/i386/mm/ioremap.c
#ifdef CONFIG_something
void __iomem *map_early_uart(unsigned long phys_addr, unsigned long len)
{
void __iomem * vaddr;
set_fixmap_nocache(idx, phys & PAGE_MASK);
vaddr = (void __iomem *)__fix_to_virt(idx);
vaddr += phys & ~PAGE_MASK;
return vaddr;
}
void unmap_early_uart(void * __iomem *addr)
{
/* nothing to do */
}
#endif
or such.
-
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