]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
usb: ehci: exynos: Enable non-dt path
authorVivek Gautam <gautam.vivek@samsung.com>
Wed, 6 Mar 2013 08:48:33 +0000 (14:18 +0530)
committerMarek Vasut <marex@denx.de>
Mon, 18 Mar 2013 17:58:54 +0000 (18:58 +0100)
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>
Acked-by: Simon Glass <sjg@chromium.org>
drivers/usb/host/ehci-exynos.c

index c4c90be67815ed7a9ff81aa22d278c63f6f2a250..0c797aa0420cd108d61684ef23538d143efe753e 100644 (file)
@@ -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)
 {
        fdt_addr_t addr;
@@ -90,6 +91,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)
@@ -151,10 +153,15 @@ int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor)
 {
        struct exynos_ehci *ctx = &exynos;
 
+#ifdef CONFIG_OF_CONTROL
        if (exynos_usb_parse_dt(gd->fdt_blob, ctx)) {
                debug("Unable to parse device tree for ehci-exynos\n");
                return -ENODEV;
        }
+#else
+       ctx->usb = (struct exynos_usb_phy *)samsung_get_base_usb_phy();
+       ctx->hcd = (struct ehci_hccr *)samsung_get_base_usb_ehci();
+#endif
 
        setup_usb_phy(ctx->usb);