sama5d4_devices.c 875 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (C) 2014 Atmel
  4. * Bo Shen <voice.shen@atmel.com>
  5. */
  6. #include <common.h>
  7. #include <asm/io.h>
  8. #include <asm/arch/at91_common.h>
  9. #include <asm/arch/clk.h>
  10. #include <asm/arch/sama5_sfr.h>
  11. #include <asm/arch/sama5d4.h>
  12. char *get_cpu_name()
  13. {
  14. unsigned int extension_id = get_extension_chip_id();
  15. if (cpu_is_sama5d4())
  16. switch (extension_id) {
  17. case ARCH_EXID_SAMA5D41:
  18. return "SAMA5D41";
  19. case ARCH_EXID_SAMA5D42:
  20. return "SAMA5D42";
  21. case ARCH_EXID_SAMA5D43:
  22. return "SAMA5D43";
  23. case ARCH_EXID_SAMA5D44:
  24. return "SAMA5D44";
  25. default:
  26. return "Unknown CPU type";
  27. }
  28. else
  29. return "Unknown CPU type";
  30. }
  31. #ifdef CONFIG_USB_GADGET_ATMEL_USBA
  32. void at91_udp_hw_init(void)
  33. {
  34. /* Enable UPLL clock */
  35. at91_upll_clk_enable();
  36. /* Enable UDPHS clock */
  37. at91_periph_clk_enable(ATMEL_ID_UDPHS);
  38. }
  39. #endif