ehci-spear.c 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * (C) Copyright 2010
  3. * Armando Visconti, ST Micoelectronics, <armando.visconti@st.com>.
  4. *
  5. * (C) Copyright 2009
  6. * Marvell Semiconductor <www.marvell.com>
  7. * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
  8. *
  9. * SPDX-License-Identifier: GPL-2.0+
  10. */
  11. #include <common.h>
  12. #include <asm/io.h>
  13. #include <usb.h>
  14. #include "ehci.h"
  15. #include <asm/arch/hardware.h>
  16. /*
  17. * Create the appropriate control structures to manage
  18. * a new EHCI host controller.
  19. */
  20. int ehci_hcd_init(int index, enum usb_init_type init,
  21. struct ehci_hccr **hccr, struct ehci_hcor **hcor)
  22. {
  23. *hccr = (struct ehci_hccr *)(CONFIG_SYS_UHC0_EHCI_BASE + 0x100);
  24. *hcor = (struct ehci_hcor *)((uint32_t)*hccr
  25. + HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
  26. debug("SPEAr-ehci: init hccr %x and hcor %x hc_length %d\n",
  27. (uint32_t)*hccr, (uint32_t)*hcor,
  28. (uint32_t)HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
  29. return 0;
  30. }
  31. /*
  32. * Destroy the appropriate control structures corresponding
  33. * the the EHCI host controller.
  34. */
  35. int ehci_hcd_stop(int index)
  36. {
  37. return 0;
  38. }