mt8518_ap1.c 635 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. DECLARE_GLOBAL_DATA_PTR;
  10. int board_init(void)
  11. {
  12. /* address of boot parameters */
  13. gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
  14. debug("gd->fdt_blob is %p\n", gd->fdt_blob);
  15. return 0;
  16. }
  17. int board_late_init(void)
  18. {
  19. #ifdef CONFIG_USB_GADGET
  20. struct udevice *dev;
  21. int ret;
  22. #endif
  23. #ifdef CONFIG_USB_GADGET
  24. ret = uclass_get_device(UCLASS_USB_GADGET_GENERIC, 0, &dev);
  25. if (ret) {
  26. pr_err("%s: Cannot find USB device\n", __func__);
  27. return ret;
  28. }
  29. #endif
  30. return 0;
  31. }