blob: 56ef7e6c138691c58b05dec33af28a6affc29c06 [file] [log] [blame]
Michael Trimarchif503a6b2008-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 Denkd79de1d2013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
Michael Trimarchif503a6b2008-12-31 10:33:56 +01008 */
9#include <common.h>
10#include <usb.h>
Jean-Christophe PLAGNIOL-VILLARD8f6bcf42009-04-03 12:46:58 +020011
12#include "ehci.h"
Michael Trimarchif503a6b2008-12-31 10:33:56 +010013/*
14 * Create the appropriate control structures to manage
15 * a new EHCI host controller.
16 */
Lucas Stach3494a4c2012-09-26 00:14:35 +020017int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor)
Michael Trimarchif503a6b2008-12-31 10:33:56 +010018{
Lucas Stach3494a4c2012-09-26 00:14:35 +020019 *hccr = (struct ehci_hccr *)(0xcd000100);
20 *hcor = (struct ehci_hcor *)((uint32_t) *hccr
21 + HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
Michael Trimarchif503a6b2008-12-31 10:33:56 +010022
23 printf("IXP4XX init hccr %x and hcor %x hc_length %d\n",
Lucas Stach3494a4c2012-09-26 00:14:35 +020024 (uint32_t)*hccr, (uint32_t)*hcor,
25 (uint32_t)HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
Michael Trimarchif503a6b2008-12-31 10:33:56 +010026 return 0;
27}
28
29/*
30 * Destroy the appropriate control structures corresponding
31 * the the EHCI host controller.
32 */
Lucas Stach3494a4c2012-09-26 00:14:35 +020033int ehci_hcd_stop(int index)
Michael Trimarchif503a6b2008-12-31 10:33:56 +010034{
35 return 0;
36}