ehci-pci.c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*-
  2. * Copyright (c) 2007-2008, Juniper Networks, Inc.
  3. * All rights reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation version 2 of
  8. * the License.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  18. * MA 02111-1307 USA
  19. */
  20. #include <common.h>
  21. #include <pci.h>
  22. #include <usb.h>
  23. #include "ehci.h"
  24. #include "ehci-core.h"
  25. #ifdef CONFIG_PCI_EHCI_DEVICE
  26. static struct pci_device_id ehci_pci_ids[] = {
  27. /* Please add supported PCI EHCI controller ids here */
  28. {0x1033, 0x00E0},
  29. {0, 0}
  30. };
  31. #endif
  32. /*
  33. * Create the appropriate control structures to manage
  34. * a new EHCI host controller.
  35. */
  36. int ehci_hcd_init(void)
  37. {
  38. pci_dev_t pdev;
  39. uint32_t addr;
  40. pdev = pci_find_devices(ehci_pci_ids, CONFIG_PCI_EHCI_DEVICE);
  41. if (pdev == -1) {
  42. printf("EHCI host controller not found\n");
  43. return -1;
  44. }
  45. pci_read_config_dword(pdev, PCI_BASE_ADDRESS_0, &addr);
  46. hccr = (struct ehci_hccr *)addr;
  47. hcor = (struct ehci_hcor *)((uint32_t) hccr +
  48. HC_LENGTH(ehci_readl(&hccr->cr_capbase)));
  49. return 0;
  50. }
  51. /*
  52. * Destroy the appropriate control structures corresponding
  53. * the the EHCI host controller.
  54. */
  55. int ehci_hcd_stop(void)
  56. {
  57. return 0;
  58. }