ehci-armada100.c 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * (C) Copyright 2012
  3. * eInfochips Ltd. <www.einfochips.com>
  4. * Written-by: Ajay Bhargav <contact@8051projects.net>
  5. *
  6. * This driver is based on Kirkwood echi driver
  7. * (C) Copyright 2009
  8. * Marvell Semiconductor <www.marvell.com>
  9. * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
  10. *
  11. * SPDX-License-Identifier: GPL-2.0+
  12. */
  13. #include <common.h>
  14. #include <asm/io.h>
  15. #include <usb.h>
  16. #include "ehci.h"
  17. #include <asm/arch/cpu.h>
  18. #include <asm/arch/armada100.h>
  19. #include <asm/arch/utmi-armada100.h>
  20. /*
  21. * EHCI host controller init
  22. */
  23. int ehci_hcd_init(int index, enum usb_init_type init,
  24. struct ehci_hccr **hccr, struct ehci_hcor **hcor)
  25. {
  26. if (utmi_init() < 0)
  27. return -1;
  28. *hccr = (struct ehci_hccr *)(ARMD1_USB_HOST_BASE + 0x100);
  29. *hcor = (struct ehci_hcor *)((uint32_t) *hccr
  30. + HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
  31. debug("armada100-ehci: init hccr %x and hcor %x hc_length %d\n",
  32. (uint32_t)*hccr, (uint32_t)*hcor,
  33. (uint32_t)HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
  34. return 0;
  35. }
  36. /*
  37. * EHCI host controller stop
  38. */
  39. int ehci_hcd_stop(int index)
  40. {
  41. return 0;
  42. }