Re: [PATCH 1/2] serial: 8250: Validate reg addr for Au1x00/RT288x i/o accessors

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

 



Mason <slash.tmp@xxxxxxx> writes:

> On 09/03/2015 10:34, Mason wrote:
>
>> On a tangential subject, as Mans stated, Au1x00 does not support
>> the scratch register; but Ralink and Tango do. These three
>> platforms share the weird register layout (requiring the LUTs),
>> but they differ in scratch support.
>>
>> Would it make any sense to differentiate them, to support scratch
>> where it is implemented? (Although adding offset 7 to au_io_out_map
>> would then make that table sparse!)
>
> A related issue in 8250_early.c
>
> probe_baud() and init_port() are using serial8250_early_in() and
> serial8250_early_out() to read/write the UART registers.
>
> unsigned int __weak __init serial8250_early_in(struct uart_port *port, int offset)
> {
> 	switch (port->iotype) {
> 	case UPIO_MEM:
> 		return readb(port->membase + offset);
> 	case UPIO_MEM32:
> 		return readl(port->membase + (offset << 2));
> 	case UPIO_PORT:
> 		return inb(port->iobase + offset);
> 	default:
> 		return 0;
> 	}
> }
>
> These are __weak but I didn't find any overriding implementation.
> In the UPIO_AU case, I think they are NOPs(?) so how can they work
> correctly on Ralink/Tango platforms? (Confused)

It doesn't work correctly.

> What is 8250_early.c used for?

As the name implies, it implements an early console that can be used
before the whole tty/console system has been brought up.  Apparently
nobody bothered adding support for UPIO_AU there.

-- 
Måns Rullgård
mans@xxxxxxxxx
--
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