blob: 9d235776428e878cb45c3af315dc20931fce9004 [file] [log] [blame]
Chris Zhang52d17612010-01-06 13:34:05 -08001/*
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 Denkd79de1d2013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
Chris Zhang52d17612010-01-06 13:34:05 -08008 */
9#include <common.h>
10#include <usb.h>
Alexey Brodkin8ef50892017-04-17 19:13:17 +030011#include <asm/io.h>
Chris Zhang52d17612010-01-06 13:34:05 -080012
13#include "ehci.h"
Chris Zhang52d17612010-01-06 13:34:05 -080014
15/*
16 * Create the appropriate control structures to manage
17 * a new EHCI host controller.
18 */
Troy Kisky7d6bbb92013-10-10 15:27:57 -070019int ehci_hcd_init(int index, enum usb_init_type init,
20 struct ehci_hccr **hccr, struct ehci_hcor **hcor)
Chris Zhang52d17612010-01-06 13:34:05 -080021{
Lucas Stach3494a4c2012-09-26 00:14:35 +020022 *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 Zhang52d17612010-01-06 13:34:05 -080025 return 0;
26}
27
28/*
29 * Destroy the appropriate control structures corresponding
30 * the the EHCI host controller.
31 */
Lucas Stach3494a4c2012-09-26 00:14:35 +020032int ehci_hcd_stop(int index)
Chris Zhang52d17612010-01-06 13:34:05 -080033{
34 return 0;
35}