Re: [PATCH] of: fix reproducible node name for legacy vs. new partition binding

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

 



Hi Gavin,

On Wed, Oct 17, 2018 at 11:07:45AM +0000, Schenk, Gavin wrote:
> Hi,
> 
> On Wed, 2018-10-17 at 10:47 +0200, Sascha Hauer wrote:
> > the of_reproducible_name mechanism is used to find a partition node
> > from the barebox devicetree in the Linux devicetree. Unfortunately
> > we have two different partition bindings. In the legacy one the partition
> > nodes are directly under the hardware devicenode whereas in the new
> > binding the partitions are under an additional partitions subnode.
> > This means we get two different (not so) reproducible names when
> > the barebox devicetree uses the legacy binding and the Linux devicetree
> > uses the new binding (or the other way round). To get the same
> > name then for these cases we drop the partitions subnode from the
> > reproducible name.
> > 
> > This makes the partition fixup in barebox-state work when the barebox
> > devicetree uses another binding than the Linux devicetree.
> > 
> > Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
> > Tested-by: Ulrich Ölmann <u.oelmann@xxxxxxxxxxxxxx>
> Tested-by: Gavin Schenk <g.schenk@xxxxxxxxxxxx>
> 
> What I did to test it:
> 
> 1. [x] of_partition_binding=new in barebox and barebox-state in Linux is working.
> 2. [ ] set of_partition_binding=legacy in barebox and barebox-state in Linux fails.
> 3. [x] apply the patch and rebuild and install barebox
> 4. [x] set of_partition_binding=legacy and barebox-state in Linux is working again \o/.
> 
> Is this test sufficient?
> If not what are other usefull testcases?

Thanks for testing.

Another test would be if you use the legacy binding in your barebox
devicetree and then set of_partition_binding=new. Without this patch it
should fail in Linux and with it it should work. That's the less
important case though.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux