board_info.c 493 B

1234567891011121314151617181920212223242526272829
  1. // SPDX-License-Identifier: GPL-2.0+
  2. #include <common.h>
  3. #include <linux/libfdt.h>
  4. #include <linux/compiler.h>
  5. int __weak checkboard(void)
  6. {
  7. return 0;
  8. }
  9. /*
  10. * If the root node of the DTB has a "model" property, show it.
  11. * Then call checkboard().
  12. */
  13. int __weak show_board_info(void)
  14. {
  15. #ifdef CONFIG_OF_CONTROL
  16. DECLARE_GLOBAL_DATA_PTR;
  17. const char *model;
  18. model = fdt_getprop(gd->fdt_blob, 0, "model", NULL);
  19. if (model)
  20. printf("Model: %s\n", model);
  21. #endif
  22. return checkboard();
  23. }