ehci-armada100.c 1.1 KB

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