(GTA02, u-boot) determine board revision at run time

Werner Almesberger werner at openmoko.org
Tue Apr 1 03:53:52 CEST 2008

These changes complete the transition of u-boot to no longer need to be
configured for specific hardware revisions, but to detect them at run

Note that this only applies for GTA02 board revisions >= 2. GTA01 and
older GTA02 revisions need to be configured like they always did.

If u-boot is configured for gta02v5_config or gta02v6_config, it will
auto-detect whether it's running on a GTA02v5 or GTA02v6.

NOTE: when you update to this u-boot, you have to run "make xxx_config"
for your board, since a new item was added to the configuration data.

All this is in revision 4282. Andy, didn't change the pcb_rev code, so
if you have anything in user space that depends on this, it should still
work. Since this just duplicate the "standard" revision tag mechanism,
we should phase this out soonish, though.

- Werner

----------------------------------- Changes -----------------------------------

This set of changes makes u-boot detect hardware revisions >= GTA02v5 at run
time instead of build time. The revision tag and the boot prompt are adjusted

Note that new code should use gta02_revision for feature tests, not

For backward-compatibility, "make gta02v6_config" is still supported (and
yields exactly the same result as "make gta02v5_config".

- Makefile: gta02v6_config choice was missing
- board/neo1973/gta02/split_by_variant.sh: gta02v6_config is identical to
- board/neo1973/gta02/gta02.c (board_late_init): removed revision handing to
  new function set_revision
- include/configs/neo1973_gta02.h, board/neo1973/gta02/gta02.c (CFG_PROMPT):
  CFG_PROMPT now points to a variable set in set_revision
- board/neo1973/gta02/gta02.c (gta02_revision): new global variable to replace
- board/neo1973/gta02/gta02.c (get_board_rev): use gta02_revision instead of
- board/neo1973/gta02/gta02.c (gta02_get_pcb_revision): GTA02v6 code is 0x01,
  not 0x101
- drivers/usb/usbdfu.c (dfu_trailer_matching): use the compile-time revision
  CONFIG_USB_DFU_REVISION instead of the run-time revision get_board_rev()
- board/neo1973/gta01/split_by_variant.sh,
  board/neo1973/gta02/split_by_variant.sh: add definitions in $CFGTMP also to

gpb-shadow.patch, wait-for-power.patch: updated for context changes

More information about the openmoko-kernel mailing list