mt8518_ap1.c 664 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (C) 2019 MediaTek Inc.
  4. */
  5. #include <common.h>
  6. #include <dm.h>
  7. #include <init.h>
  8. #include <log.h>
  9. #include <asm/global_data.h>
  10. DECLARE_GLOBAL_DATA_PTR;
  11. int board_init(void)
  12. {
  13. /* address of boot parameters */
  14. gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
  15. debug("gd->fdt_blob is %p\n", gd->fdt_blob);
  16. return 0;
  17. }
  18. int board_late_init(void)
  19. {
  20. #ifdef CONFIG_USB_GADGET
  21. struct udevice *dev;
  22. int ret;
  23. #endif
  24. #ifdef CONFIG_USB_GADGET
  25. ret = uclass_get_device(UCLASS_USB_GADGET_GENERIC, 0, &dev);
  26. if (ret) {
  27. pr_err("%s: Cannot find USB device\n", __func__);
  28. return ret;
  29. }
  30. #endif
  31. return 0;
  32. }