mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-19 03:08:31 +00:00
048899ba8c
Support EHCI host driver used on Panasonic UniPhier platform. Since Device Tree is not supported on UniPhier yet, the base address of USB cores are passed from board files (platdevice.c). TODO for me: Move the base address to device trees. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Marek Vasut <marex@denx.de>
39 lines
766 B
C
39 lines
766 B
C
/*
|
|
* Copyright (C) 2014 Panasonic Corporation
|
|
* Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <usb.h>
|
|
#include <asm/arch/ehci-uniphier.h>
|
|
#include "ehci.h"
|
|
|
|
/*
|
|
* Create the appropriate control structures to manage
|
|
* a new EHCI host controller.
|
|
*/
|
|
int ehci_hcd_init(int index, enum usb_init_type init, struct ehci_hccr **hccr,
|
|
struct ehci_hcor **hcor)
|
|
{
|
|
struct ehci_hccr *cr;
|
|
struct ehci_hcor *or;
|
|
|
|
uniphier_ehci_reset(index, 0);
|
|
|
|
cr = (struct ehci_hccr *)(uniphier_ehci_platdata[index].base);
|
|
or = (void *)cr + HC_LENGTH(ehci_readl(&cr->cr_capbase));
|
|
|
|
*hccr = cr;
|
|
*hcor = or;
|
|
|
|
return 0;
|
|
}
|
|
|
|
int ehci_hcd_stop(int index)
|
|
{
|
|
uniphier_ehci_reset(index, 1);
|
|
|
|
return 0;
|
|
}
|