Chris Zhang | 5f82887 | 2010-01-06 13:34:05 -0800 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2010, Chris Zhang <chris@seamicro.com> |
| 3 | * |
| 4 | * Author: Chris Zhang <chris@seamicro.com> |
| 5 | * This code is based on ehci freescale driver |
| 6 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 7 | * SPDX-License-Identifier: GPL-2.0+ |
Chris Zhang | 5f82887 | 2010-01-06 13:34:05 -0800 | [diff] [blame] | 8 | */ |
| 9 | #include <common.h> |
| 10 | #include <usb.h> |
Alexey Brodkin | 83cb46c | 2017-04-17 19:13:17 +0300 | [diff] [blame] | 11 | #include <asm/io.h> |
Chris Zhang | 5f82887 | 2010-01-06 13:34:05 -0800 | [diff] [blame] | 12 | |
| 13 | #include "ehci.h" |
Chris Zhang | 5f82887 | 2010-01-06 13:34:05 -0800 | [diff] [blame] | 14 | |
| 15 | /* |
| 16 | * Create the appropriate control structures to manage |
| 17 | * a new EHCI host controller. |
| 18 | */ |
Troy Kisky | 127efc4 | 2013-10-10 15:27:57 -0700 | [diff] [blame] | 19 | int ehci_hcd_init(int index, enum usb_init_type init, |
| 20 | struct ehci_hccr **hccr, struct ehci_hcor **hcor) |
Chris Zhang | 5f82887 | 2010-01-06 13:34:05 -0800 | [diff] [blame] | 21 | { |
Lucas Stach | 676ae06 | 2012-09-26 00:14:35 +0200 | [diff] [blame] | 22 | *hccr = (struct ehci_hccr *)(CONFIG_SYS_PPC4XX_USB_ADDR); |
| 23 | *hcor = (struct ehci_hcor *)((uint32_t) *hccr + |
| 24 | HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase))); |
Chris Zhang | 5f82887 | 2010-01-06 13:34:05 -0800 | [diff] [blame] | 25 | return 0; |
| 26 | } |
| 27 | |
| 28 | /* |
| 29 | * Destroy the appropriate control structures corresponding |
| 30 | * the the EHCI host controller. |
| 31 | */ |
Lucas Stach | 676ae06 | 2012-09-26 00:14:35 +0200 | [diff] [blame] | 32 | int ehci_hcd_stop(int index) |
Chris Zhang | 5f82887 | 2010-01-06 13:34:05 -0800 | [diff] [blame] | 33 | { |
| 34 | return 0; |
| 35 | } |