blob: 646e815e71d1ba841346f6f5d1c0a6b6b0c626cd [file] [log] [blame]
Michael Trimarchi7b6e31e2008-12-31 10:33:56 +01001/*
2 * (C) Copyright 2008, Michael Trimarchi <trimarchimichael@yahoo.it>
3 *
4 * Author: Michael Trimarchi <trimarchimichael@yahoo.it>
5 * This code is based on ehci freescale driver
6 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
Michael Trimarchi7b6e31e2008-12-31 10:33:56 +01008 */
9#include <common.h>
10#include <usb.h>
Jean-Christophe PLAGNIOL-VILLARD2731b9a2009-04-03 12:46:58 +020011
12#include "ehci.h"
Michael Trimarchi7b6e31e2008-12-31 10:33:56 +010013/*
14 * Create the appropriate control structures to manage
15 * a new EHCI host controller.
16 */
Troy Kisky127efc42013-10-10 15:27:57 -070017int ehci_hcd_init(int index, enum usb_init_type init,
18 struct ehci_hccr **hccr, struct ehci_hcor **hcor)
Michael Trimarchi7b6e31e2008-12-31 10:33:56 +010019{
Lucas Stach676ae062012-09-26 00:14:35 +020020 *hccr = (struct ehci_hccr *)(0xcd000100);
21 *hcor = (struct ehci_hcor *)((uint32_t) *hccr
22 + HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
Michael Trimarchi7b6e31e2008-12-31 10:33:56 +010023
24 printf("IXP4XX init hccr %x and hcor %x hc_length %d\n",
Lucas Stach676ae062012-09-26 00:14:35 +020025 (uint32_t)*hccr, (uint32_t)*hcor,
26 (uint32_t)HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
Michael Trimarchi7b6e31e2008-12-31 10:33:56 +010027 return 0;
28}
29
30/*
31 * Destroy the appropriate control structures corresponding
32 * the the EHCI host controller.
33 */
Lucas Stach676ae062012-09-26 00:14:35 +020034int ehci_hcd_stop(int index)
Michael Trimarchi7b6e31e2008-12-31 10:33:56 +010035{
36 return 0;
37}