[U-Boot] [PATCH] am3517_evm: add FIT support

Wolfgang Denk wd at denx.de
Mon Jul 27 10:44:46 CEST 2015


Dear Yegor,

In message <1437979451-14060-1-git-send-email-yegorslists at 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?


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If you don't have time to do it right, when will you have time to  do
it over?                                                - John Wooden


More information about the U-Boot mailing list