Re: [PATCH 4/5] serial: convert early_uart to earlycon for 8250

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 30 May 2007 21:36:41 -0700 "Yinghai Lu" <[email protected]> wrote:

> On 5/30/07, Yinghai Lu <[email protected]> wrote:
> > On 5/30/07, Andrew Morton <[email protected]> wrote:
> > > On Tue, 29 May 2007 18:43:59 -0700 Yinghai Lu <[email protected]> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux