Re: [RFC 1/1] powerpc: legacy serial port use device tree cell-index property

2015-12-30 Thread Curt Brune
On Sun Dec 20 09:02, Segher Boessenkool wrote: > On Wed, Nov 25, 2015 at 10:46:49AM -0800, Curt Brune wrote: > > + /* Check if the ports have an ordering, defined by 'cell-index' */ > > + if (((indexp = (u32*)of_get_property(np, "cell-index", )) != NULL) > > && > > + (len ==

Re: [RFC 1/1] powerpc: legacy serial port use device tree cell-index property

2015-12-30 Thread Curt Brune
On Mon Dec 21 21:42, Scott Wood wrote: > On Wed, 2015-11-25 at 10:46 -0800, Curt Brune wrote: > > Currently for PowerPC systems using device tree, the legacy serial > > ports are allocated in the order by which they are found in the device > > tree structure. > > > > This can cause problems in

Re: [RFC 1/1] powerpc: legacy serial port use device tree cell-index property

2015-12-30 Thread Segher Boessenkool
On Wed, Dec 30, 2015 at 08:36:01AM -0800, Curt Brune wrote: > > What does this do if the value in cell-index is a duplicate. or the port > > with that number is already created some other way? Are the numbers in > > cell-index global anyway, or relative to some parent device (I couldn't > > find

Re: [RFC 1/1] powerpc: legacy serial port use device tree cell-index property

2015-12-30 Thread Rob Herring
On Wed, Nov 25, 2015 at 12:46 PM, Curt Brune wrote: > Currently for PowerPC systems using device tree, the legacy serial > ports are allocated in the order by which they are found in the device > tree structure. > > This can cause problems in cases where the device tree

Re: [RFC 1/1] powerpc: legacy serial port use device tree cell-index property

2015-12-21 Thread Scott Wood
On Wed, 2015-11-25 at 10:46 -0800, Curt Brune wrote: > Currently for PowerPC systems using device tree, the legacy serial > ports are allocated in the order by which they are found in the device > tree structure. > > This can cause problems in cases where the device tree nodes are > sysnthesized

Re: [RFC 1/1] powerpc: legacy serial port use device tree cell-index property

2015-12-20 Thread Segher Boessenkool
On Wed, Nov 25, 2015 at 10:46:49AM -0800, Curt Brune wrote: > + /* Check if the ports have an ordering, defined by 'cell-index' */ > + if (((indexp = (u32*)of_get_property(np, "cell-index", )) != NULL) > && > + (len == sizeof(u32))) > + index = *indexp; > + > /*

[RFC 1/1] powerpc: legacy serial port use device tree cell-index property

2015-11-25 Thread Curt Brune
Currently for PowerPC systems using device tree, the legacy serial ports are allocated in the order by which they are found in the device tree structure. This can cause problems in cases where the device tree nodes are sysnthesized by an external program (kexec for example), which may not