summaryrefslogtreecommitdiff
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2012-07-09 23:59:00 +0200
committerWolfgang Denk <wd@denx.de>2012-07-09 23:59:00 +0200
commitba662f8998f67b31d88bf3a78970ad8375e5644a (patch)
treec57438e4ed2f2ffbae4776152cac03d658c1ef35 /drivers/usb/host
parent18277f7057c8e9b895aa4f8590969a57c4bce888 (diff)
parenta4dae631bfa848d8a0d1933583ed7e2f6a96cab3 (diff)
downloadu-boot-imx-ba662f8998f67b31d88bf3a78970ad8375e5644a.zip
u-boot-imx-ba662f8998f67b31d88bf3a78970ad8375e5644a.tar.gz
u-boot-imx-ba662f8998f67b31d88bf3a78970ad8375e5644a.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-usb
* 'master' of git://git.denx.de/u-boot-usb: CONFIG: EXYNOS5: USB: Enable USB 2.0 on smdk5250 EXYNOS5: USB: Fix incorrect USB base addresses EXYNOS: Add power Enable/Disable for USB-EHCI USB: EXYNOS: Set USB 2.0 HOST Link mode EXYNOS5: Add structure for PMU registers EXYNOS5: Fix system register structure USB: EXYNOS: Incorporate EHCI review comments Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/Makefile2
-rw-r--r--drivers/usb/host/ehci-exynos.c (renamed from drivers/usb/host/ehci-s5p.c)26
2 files changed, 18 insertions, 10 deletions
diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
index 4547f37..6de9164 100644
--- a/drivers/usb/host/Makefile
+++ b/drivers/usb/host/Makefile
@@ -42,6 +42,7 @@ COBJS-$(CONFIG_USB_EHCI_FSL) += ehci-mpc512x.o
else
COBJS-$(CONFIG_USB_EHCI_FSL) += ehci-fsl.o
endif
+COBJS-$(CONFIG_USB_EHCI_EXYNOS) += ehci-exynos.o
COBJS-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o
COBJS-$(CONFIG_USB_EHCI_MXS) += ehci-mxs.o
COBJS-$(CONFIG_USB_EHCI_MX5) += ehci-mx5.o
@@ -51,7 +52,6 @@ COBJS-$(CONFIG_USB_EHCI_PPC4XX) += ehci-ppc4xx.o
COBJS-$(CONFIG_USB_EHCI_IXP4XX) += ehci-ixp.o
COBJS-$(CONFIG_USB_EHCI_MARVELL) += ehci-marvell.o
COBJS-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o
-COBJS-$(CONFIG_USB_EHCI_S5P) += ehci-s5p.o
COBJS-$(CONFIG_USB_EHCI_TEGRA) += ehci-tegra.o
COBJS-$(CONFIG_USB_EHCI_VCT) += ehci-vct.o
diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-exynos.c
index 4dd4ec1..a71b397 100644
--- a/drivers/usb/host/ehci-s5p.c
+++ b/drivers/usb/host/ehci-exynos.c
@@ -1,5 +1,5 @@
/*
- * SAMSUNG S5P USB HOST EHCI Controller
+ * SAMSUNG EXYNOS USB HOST EHCI Controller
*
* Copyright (C) 2012 Samsung Electronics Co.Ltd
* Vivek Gautam <gautam.vivek@samsung.com>
@@ -23,13 +23,19 @@
#include <common.h>
#include <usb.h>
#include <asm/arch/cpu.h>
-#include <asm/arch/ehci-s5p.h>
+#include <asm/arch/ehci.h>
+#include <asm/arch/system.h>
+#include <asm/arch/power.h>
#include "ehci.h"
#include "ehci-core.h"
/* Setup the EHCI host controller. */
-static void setup_usb_phy(struct s5p_usb_phy *usb)
+static void setup_usb_phy(struct exynos_usb_phy *usb)
{
+ set_usbhost_mode(USB20_PHY_CFG_HOST_LINK_EN);
+
+ set_usbhost_phy_ctrl(POWER_USB_HOST_PHY_CTRL_EN);
+
clrbits_le32(&usb->usbphyctrl0,
HOST_CTRL0_FSEL_MASK |
HOST_CTRL0_COMMONON_N |
@@ -61,7 +67,7 @@ static void setup_usb_phy(struct s5p_usb_phy *usb)
}
/* Reset the EHCI host controller. */
-static void reset_usb_phy(struct s5p_usb_phy *usb)
+static void reset_usb_phy(struct exynos_usb_phy *usb)
{
/* HOST_PHY reset */
setbits_le32(&usb->usbphyctrl0,
@@ -70,6 +76,8 @@ static void reset_usb_phy(struct s5p_usb_phy *usb)
HOST_CTRL0_SIDDQ |
HOST_CTRL0_FORCESUSPEND |
HOST_CTRL0_FORCESLEEP);
+
+ set_usbhost_phy_ctrl(POWER_USB_HOST_PHY_CTRL_DISABLE);
}
/*
@@ -79,12 +87,12 @@ static void reset_usb_phy(struct s5p_usb_phy *usb)
*/
int ehci_hcd_init(void)
{
- struct s5p_usb_phy *usb;
+ struct exynos_usb_phy *usb;
- usb = (struct s5p_usb_phy *)samsung_get_base_usb_phy();
+ usb = (struct exynos_usb_phy *)samsung_get_base_usb_phy();
setup_usb_phy(usb);
- hccr = (struct ehci_hccr *)(EXYNOS5_USB_HOST_EHCI_BASE);
+ hccr = (struct ehci_hccr *)samsung_get_base_usb_ehci();
hcor = (struct ehci_hcor *)((uint32_t) hccr
+ HC_LENGTH(ehci_readl(&hccr->cr_capbase)));
@@ -101,9 +109,9 @@ int ehci_hcd_init(void)
*/
int ehci_hcd_stop()
{
- struct s5p_usb_phy *usb;
+ struct exynos_usb_phy *usb;
- usb = (struct s5p_usb_phy *)samsung_get_base_usb_phy();
+ usb = (struct exynos_usb_phy *)samsung_get_base_usb_phy();
reset_usb_phy(usb);
return 0;