socfpga.c 815 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Copyright (C) 2015 Marek Vasut <marex@denx.de>
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #include <common.h>
  7. #include <asm/arch/reset_manager.h>
  8. #include <asm/io.h>
  9. #include <usb.h>
  10. #include <usb/s3c_udc.h>
  11. #include <usb_mass_storage.h>
  12. DECLARE_GLOBAL_DATA_PTR;
  13. void s_init(void) {}
  14. /*
  15. * Miscellaneous platform dependent initialisations
  16. */
  17. int board_init(void)
  18. {
  19. /* Address of boot parameters for ATAG (if ATAG is used) */
  20. gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
  21. return 0;
  22. }
  23. #ifdef CONFIG_USB_GADGET
  24. struct s3c_plat_otg_data socfpga_otg_data = {
  25. .regs_otg = CONFIG_USB_DWC2_REG_ADDR,
  26. .usb_gusbcfg = 0x1417,
  27. };
  28. int board_usb_init(int index, enum usb_init_type init)
  29. {
  30. return s3c_udc_probe(&socfpga_otg_data);
  31. }
  32. int g_dnl_board_usb_cable_connected(void)
  33. {
  34. return 1;
  35. }
  36. #endif