Re: [PATCH 8/8] 8250: add Texas Instruments AR7 internal UART

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

 



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-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux