
On Mon, 22 Feb 2021 15:23:08 +0100 Köry Maincent kory.maincent@bootlin.com wrote:
Hi Köry,
Thanks for your reviews.
On Fri, 19 Feb 2021 17:29:26 +0000 Andre Przywara andre.przywara@arm.com wrote:
And then based on my comment in the previous patch, similar to PINEPHONE_DT_SELECTION and other board-specific options, add a CHIP_DIP_SCAN option or similar.
Yes, indeed, thanks Tom.
The idea of making this extension scheme generic is great, it's just that sunxi is using a different approach to board specific code here. Normally we expect U-Boot-proper board specific code to be DT driven, and where this does not really work, use those symbols that Tom pointed to.
For my extension_board_scan board specific function, would you prefer if I move to callback like below instead of Kconfig?
if (of_machine_is_compatible("nextthing,chip")) extension_board_register_callback(chip_extension_board_scan);
Well, the CHIP Pro uses a different compatible string, so you would need to check for that too. I am not fully decided if checking for the machine compatible is the right approach. The more traditional U-Boot way would be to define a config symbol (as Tom already pointed out), that would also keep the code out of other board builds. We do this already with CONFIG_PINE64_DT_SELECTION and CONFIG_PINEPHONE_DT_SELECTION.
Cheers, Andre