blob: f99bd1f69324d293360e2ff4031d84ed0292d4ec [file] [log] [blame]
Vipin Kumare076f282012-12-17 14:18:55 +05301/*
2 * (C) Copyright 2010
3 * Armando Visconti, ST Micoelectronics, <armando.visconti@st.com>.
4 *
5 * (C) Copyright 2009
6 * Marvell Semiconductor <www.marvell.com>
7 * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
8 *
9 * See file CREDITS for list of people who contributed to this
10 * project.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License as
14 * published by the Free Software Foundation; either version 2 of
15 * the License, or (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
25 * MA 02110-1301 USA
26 */
27
28#include <common.h>
29#include <asm/io.h>
30#include <usb.h>
31#include "ehci.h"
32#include <asm/arch/hardware.h>
33
34
35/*
36 * Create the appropriate control structures to manage
37 * a new EHCI host controller.
38 */
39int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor)
40{
41 *hccr = (struct ehci_hccr *)(CONFIG_SYS_UHC0_EHCI_BASE + 0x100);
42 *hcor = (struct ehci_hcor *)((uint32_t)*hccr
43 + HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
44
45 debug("SPEAr-ehci: init hccr %x and hcor %x hc_length %d\n",
46 (uint32_t)*hccr, (uint32_t)*hcor,
47 (uint32_t)HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
48
49 return 0;
50}
51
52/*
53 * Destroy the appropriate control structures corresponding
54 * the the EHCI host controller.
55 */
56int ehci_hcd_stop(int index)
57{
58 return 0;
59}