Patchwork [U-Boot,v2,2/2] usb: ehci: exynos: Enable non-dt path

login
register
mail settings
Submitter Vivek Gautam
Date Feb. 13, 2013, 6:26 a.m.
Message ID <1360736808-27209-3-git-send-email-gautam.vivek@samsung.com>
Download mbox | patch
Permalink /patch/220059/
State Changes Requested
Delegated to: Minkyu Kang
Headers show

Comments

Vivek Gautam - Feb. 13, 2013, 6:26 a.m.
Enabling the non-dt path for the driver so that
we don't get any build errors for non-dt configuration.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
---
 drivers/usb/host/ehci-exynos.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

Patch

diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c
index 68f12fc..8c75c07 100644
--- a/drivers/usb/host/ehci-exynos.c
+++ b/drivers/usb/host/ehci-exynos.c
@@ -47,6 +47,7 @@  struct exynos_ehci {
 
 static struct exynos_ehci exynos;
 
+#ifdef CONFIG_OF_CONTROL
 static int exynos_usb_parse_dt(const void *blob, struct exynos_ehci *exynos)
 {
 	unsigned int node;
@@ -87,6 +88,7 @@  static int exynos_usb_parse_dt(const void *blob, struct exynos_ehci *exynos)
 
 	return 0;
 }
+#endif
 
 /* Setup the EHCI host controller. */
 static void setup_usb_phy(struct exynos_usb_phy *usb)
@@ -148,7 +150,12 @@  int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor)
 {
 	struct exynos_ehci *ctx = &exynos;
 
+#ifdef CONFIG_OF_CONTROL
 	exynos_usb_parse_dt(gd->fdt_blob, ctx);
+#else
+	ctx->usb = (struct exynos_usb_phy *)samsung_get_base_usb_phy();
+	ctx->hcd = samsung_get_base_usb_ehci();
+#endif
 
 	setup_usb_phy(ctx->usb);