ehci-spear.c 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. * See file CREDITS for list of people who contributed to this
  10. * project.
  11. *
  12. * This program is free software; you can redistribute it and/or
  13. * modify it under the terms of the GNU General Public License as
  14. * published by the Free Software Foundation; either version 2 of
  15. * the License, or (at your option) any later version.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU General Public License
  23. * along with this program; if not, write to the Free Software
  24. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  25. * MA 02110-1301 USA
  26. */
  27. #include <common.h>
  28. #include <asm/io.h>
  29. #include <usb.h>
  30. #include "ehci.h"
  31. #include <asm/arch/hardware.h>
  32. /*
  33. * Create the appropriate control structures to manage
  34. * a new EHCI host controller.
  35. */
  36. int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor)
  37. {
  38. *hccr = (struct ehci_hccr *)(CONFIG_SYS_UHC0_EHCI_BASE + 0x100);
  39. *hcor = (struct ehci_hcor *)((uint32_t)*hccr
  40. + HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
  41. debug("SPEAr-ehci: init hccr %x and hcor %x hc_length %d\n",
  42. (uint32_t)*hccr, (uint32_t)*hcor,
  43. (uint32_t)HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
  44. return 0;
  45. }
  46. /*
  47. * Destroy the appropriate control structures corresponding
  48. * the the EHCI host controller.
  49. */
  50. int ehci_hcd_stop(int index)
  51. {
  52. return 0;
  53. }