
Hi Andre,
On 3 March 2017 at 04:09, Andre Przywara andre.przywara@arm.com wrote:
Hi Simon,
On 03/03/17 04:53, Simon Glass wrote:
Hi Andre,
On 28 February 2017 at 19:25, Andre Przywara andre.przywara@arm.com wrote:
Currently the SPL FIT loader uses the spl_fit_select_fdt() function to find the offset to the right DTB within the FIT image. For this it iterates over all subnodes of the /configuration node in the FIT tree and compares all "description" strings therein using a board specific matching function. If that finds a match, it uses the string in the "fdt" property of that subnode to locate the matching subnode in the /images node, which points to the DTB data. Now this works very well, but is quite specific to cover this particular use case. To open up the door for a more generic usage, let's split this function into:
- a function that just returns the node offset for the matching configuration node (spl_fit_find_config_node())
- a function that returns the image data any given property in a given configuration node points to, additionally using a given index into a possbile list of strings (spl_fit_select_index())
This allows us to replace the specific function above by asking for the image the _first string of the "fdt" property_ in the matching configuration subnode points to.
This patch introduces no functional changes, it just refactors the code to allow reusing it later.
(diff is overly clever here and produces a hard-to-read patch, so I recommend to throw a look at the result instead).
First I want to commend you on your excellent commit messages. For example this one explains the current situation, the change your commit performs and the motivation for that change. With these more complicated / core pieces, it is very valuable and you are an example to us all :-)
Thank you very much, you made my day. That is a welcome departure from the usual Linux ML communication style ;-)
And yes, will fix those things you mentioned below, though have to wrap my mind about pytest first.
Now back into the rough waters of the Linux mailing lists ...
Godspeed - perhaps keep a beer by the computer to use in emergencies :-)
Regards, Simon