[U-Boot] [Question] Any plan to refactor Generic Board Framework?
Masahiro Yamada
yamada.m at jp.panasonic.com
Mon Jul 7 12:37:34 CEST 2014
Hi.
The generic board code looks really dirty to me:
common/board_f.c is sprinkled with ARCH/CPU/BOARD configs
For example,
#if defined(CONFIG_405GP) || defined(CONFIG_405EP) || \
defined(CONFIG_440EP) || defined(CONFIG_440GR) || \
defined(CONFIG_440EPX) || defined(CONFIG_440GRX)
bd->bi_pci_busfreq = get_PCI_freq();
bd->bi_opbfreq = get_OPB_freq();
#elif defined(CONFIG_XILINX_405)
bd->bi_pci_busfreq = get_PCI_freq();
#endif
or
#if defined(CONFIG_8xx) || defined(CONFIG_MPC8260) || defined(CONFIG_5xx) || \
defined(CONFIG_E500) || defined(CONFIG_MPC86xx)
bd->bi_immr_base = CONFIG_SYS_IMMR; /* base of IMMR register */
#endif
#if defined(CONFIG_MPC5xxx)
bd->bi_mbar_base = CONFIG_SYS_MBAR; /* base of internal registers */
#endif
#if defined(CONFIG_MPC83xx)
bd->bi_immrbar = CONFIG_SYS_IMMR;
#endif
Is there any plan to fix them? When? By whom?
(They include some old platform macros such as CONFIG_8xx.
Is it worth refactoring? If so, who will do it? )
Besides, there are many 'TODO' marks.
But it seems nothing has happened so far...
Now generic board is suppored in ARM, PPC, MIPS, Sandbox, ARC, x86.
Accoding to doc/README.generic-board,
we are expecting the other architectures will support it before October.
I think we should start to do something now.
If we keep going without any clean-up, I guess it will be messed up.
Best Regards
Masahiro Yamada
More information about the U-Boot
mailing list