[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090611124139.GI2014@woodchuck>
Date: Thu, 11 Jun 2009 13:41:39 +0100
From: Alexander Clouter <alex@...riz.org.uk>
To: linux-serial@...r.kernel.org
Cc: linux-mips@...ux-mips.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 8/8] 8250: add Texas Instruments AR7 internal UART
Hi,
* Alexander Clouter <alex@...riz.org.uk> [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@...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