Re: [PATCH V3 5/7] serial: earlycon: Set UPIO_MEM32BE based on DT properties

2015-04-08 Thread Peter Hurley
Hi Kevin, On 04/02/2015 11:36 AM, Peter Hurley wrote: > On 03/28/2015 03:28 PM, Kevin Cernekee wrote: >> Hi Peter, >> >> This is my latest work-in-progress, incorporating the feedback from >> you and Grant: >> >> https://github.com/cernekee/linux/commits/endian >> >> Not sure if this code plays ni

Re: [PATCH V3 5/7] serial: earlycon: Set UPIO_MEM32BE based on DT properties

2015-04-06 Thread Rob Herring
On Mon, Apr 6, 2015 at 12:36 PM, Peter Hurley wrote: > On 04/02/2015 11:35 AM, Peter Hurley wrote: >> On 04/02/2015 09:46 AM, Rob Herring wrote: >>> Sorry about that. I had thought about doing the same thing. At least >>> unifying the macros, but not necessarily the tables. If it is also >>> exten

Re: [PATCH V3 5/7] serial: earlycon: Set UPIO_MEM32BE based on DT properties

2015-04-06 Thread Peter Hurley
On 04/02/2015 11:35 AM, Peter Hurley wrote: > On 04/02/2015 09:46 AM, Rob Herring wrote: >> Sorry about that. I had thought about doing the same thing. At least >> unifying the macros, but not necessarily the tables. If it is also >> extendable to other firmware interfaces like ACPI perhaps that wo

Re: [PATCH V3 5/7] serial: earlycon: Set UPIO_MEM32BE based on DT properties

2015-04-02 Thread Peter Hurley
On 03/28/2015 03:28 PM, Kevin Cernekee wrote: > Side note: > > AFAIK we still have a problem if somebody wants to build serial8250 + > (any other tty driver that occupies major 4 / minor 64) into the same > kernel, and use DT to pick the correct driver at runtime. Yep, exactly. > serial8250_init

Re: [PATCH V3 5/7] serial: earlycon: Set UPIO_MEM32BE based on DT properties

2015-04-02 Thread Peter Hurley
Hi Kevin, On 03/28/2015 03:28 PM, Kevin Cernekee wrote: > On Sat, Mar 28, 2015 at 10:01 AM, Peter Hurley > wrote: I know these got ACKs already but as you point out in the commit log, earlycon _will_ need reg-io-width, reg-offset and reg-shift. Since the distinction between early_

Re: [PATCH V3 5/7] serial: earlycon: Set UPIO_MEM32BE based on DT properties

2015-04-02 Thread Peter Hurley
On 04/02/2015 09:46 AM, Rob Herring wrote: > Sorry about that. I had thought about doing the same thing. At least > unifying the macros, but not necessarily the tables. If it is also > extendable to other firmware interfaces like ACPI perhaps that would > be good. No need to apologize; I'll make t

Re: [PATCH V3 5/7] serial: earlycon: Set UPIO_MEM32BE based on DT properties

2015-04-02 Thread Peter Hurley
On 04/02/2015 09:32 AM, Grant Likely wrote: > On Sat, 28 Mar 2015 13:01:24 -0400 > , Peter Hurley > wrote: >> Hi Grant, >> >> On 03/27/2015 09:36 PM, Grant Likely wrote: >>> On Sun, 01 Mar 2015 17:23:11 -0500 >>> , Peter Hurley >>> wrote: Hi Kevin, On 11/24/2014 06:36 PM, Kevin C

Re: [PATCH V3 5/7] serial: earlycon: Set UPIO_MEM32BE based on DT properties

2015-04-02 Thread Grant Likely
On Sat, 28 Mar 2015 13:01:24 -0400 , Peter Hurley wrote: > Hi Grant, > > On 03/27/2015 09:36 PM, Grant Likely wrote: > > On Sun, 01 Mar 2015 17:23:11 -0500 > > , Peter Hurley > > wrote: > >> Hi Kevin, > >> > >> On 11/24/2014 06:36 PM, Kevin Cernekee wrote: > >>> If an earlycon (stdout-path) no

Re: [PATCH V3 5/7] serial: earlycon: Set UPIO_MEM32BE based on DT properties

2015-04-02 Thread Rob Herring
On Sat, Mar 28, 2015 at 12:01 PM, Peter Hurley wrote: > Hi Grant, > > On 03/27/2015 09:36 PM, Grant Likely wrote: >> On Sun, 01 Mar 2015 17:23:11 -0500 >> , Peter Hurley >> wrote: [...] >> Something like the following would do it and would be future-proof. We >> can add support for 16 or 64bit

Re: [PATCH V3 5/7] serial: earlycon: Set UPIO_MEM32BE based on DT properties

2015-03-28 Thread Kevin Cernekee
On Sat, Mar 28, 2015 at 10:01 AM, Peter Hurley wrote: >>> I know these got ACKs already but as you point out in the commit log, >>> earlycon _will_ need reg-io-width, reg-offset and reg-shift. Since the >>> distinction between early_init_dt_scan_chosen_serial() and >>> of_setup_earlycon() is arbit

Re: [PATCH V3 5/7] serial: earlycon: Set UPIO_MEM32BE based on DT properties

2015-03-28 Thread Peter Hurley
Hi Grant, On 03/27/2015 09:36 PM, Grant Likely wrote: > On Sun, 01 Mar 2015 17:23:11 -0500 > , Peter Hurley > wrote: >> Hi Kevin, >> >> On 11/24/2014 06:36 PM, Kevin Cernekee wrote: >>> If an earlycon (stdout-path) node is being used, check for "big-endian" >>> or "native-endian" properties and

Re: [PATCH V3 5/7] serial: earlycon: Set UPIO_MEM32BE based on DT properties

2015-03-28 Thread Grant Likely
On Sun, 01 Mar 2015 17:23:11 -0500 , Peter Hurley wrote: > Hi Kevin, > > On 11/24/2014 06:36 PM, Kevin Cernekee wrote: > > If an earlycon (stdout-path) node is being used, check for "big-endian" > > or "native-endian" properties and pass the appropriate iotype to the > > driver. > > > > Note th

Re: [PATCH V3 5/7] serial: earlycon: Set UPIO_MEM32BE based on DT properties

2015-03-01 Thread Peter Hurley
Hi Kevin, On 11/24/2014 06:36 PM, Kevin Cernekee wrote: > If an earlycon (stdout-path) node is being used, check for "big-endian" > or "native-endian" properties and pass the appropriate iotype to the > driver. > > Note that LE sets UPIO_MEM (8-bit) but BE sets UPIO_MEM32BE (32-bit). The > big-e

[PATCH V3 5/7] serial: earlycon: Set UPIO_MEM32BE based on DT properties

2014-11-24 Thread Kevin Cernekee
If an earlycon (stdout-path) node is being used, check for "big-endian" or "native-endian" properties and pass the appropriate iotype to the driver. Note that LE sets UPIO_MEM (8-bit) but BE sets UPIO_MEM32BE (32-bit). The big-endian property only really makes sense in the context of 32-bit regis