
On Mon, Jul 27, 2015 at 10:44 AM, Wolfgang Denk wd@denx.de wrote:
Dear Yegor,
In message 1437979451-14060-1-git-send-email-yegorslists@googlemail.com you wrote:
Enable DTS support (CONFIG_OF_LIBFDT), create ft_board_setup() stub and select CONFIG_FIT in defconfig.
...
+int ft_board_setup(void *blob, bd_t *bd) +{
return 0;
+}
What is the purpose of such an empty implementation? Most boards have at least
ft_cpu_setup(blob, bd);
here. Many also include
#ifdef CONFIG_PCI ft_pci_setup(blob, bd); #endif
(or variants, like FT_FSL_PCI_SETUP or ft_board_pci_setup() or pci_of_setup())
Some architectures provide a "weak" default implementation to avoid repeating the same code everywhere, but apparently not all do that.
Q1: Would it make sense to call ft_cpu_setup() here?
Q2: Would it make sense to clean up the code and use a weak default implementation instead?
You're right. I was just looking at my Baltos setup, that really uses ft_board_setup() in order to place MAC address found in EEPROM into Device Tree. This stub is only needed, if you specify CONFIG_OF_BOARD_SETUP.
I've sent v2 with pure DTS and FIT support.
Yegor