Re: [PATCH 8/8] 8250: add Texas Instruments AR7 internal UART
From: Alexander Clouter
Date: Thu Jun 11 2009 - 08:41:50 EST
Hi,
* Alexander Clouter <alex@xxxxxxxxxxxxx> [2009-06-11 12:27:19+0100]:
>
> > static struct plat_serial8250_port uart0_data = {
> > .mapbase = AR7_REGS_UART0,
> > .irq = AR7_IRQ_UART0,
> > .regshift = 2,
> > .iotype = UPIO_MEM,
> > .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP,
> > };
> >
> > uart_port[0].type = PORT_16550A;
> > uart_port[0].line = 0;
> > uart_port[0].irq = AR7_IRQ_UART0;
> > uart_port[0].uartclk = ar7_bus_freq() / 2;
> > uart_port[0].iotype = UPIO_MEM;
> > uart_port[0].mapbase = AR7_REGS_UART0 + 3;
> > uart_port[0].membase = ioremap(uart_port[0].mapbase, 256);
> > uart_port[0].regshift = 2;
> > res = early_serial_setup(&uart_port[0]);
> > if (res)
> > return res;
> >
> >
> > the +3 comes from the fact, that this machine is configured to run big
> > endian.
> >
> Alternatively you could not use the byte ordering macro/functions as per
> the 'Byte Order' section in:
>
> http://lwn.net/images/pdf/LDD3/ch11.pdf
>
> Makes the code portable, understandable and...well neater.
>
Maybe not, scrap that :)
Cheers
--
Alexander Clouter
.sigmonster says: "MOKE DAT YIGARETTE"
-- "The Last Coin", James P. Blaylock
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/