diff mbox

[v3,2/2] usb: ehci: exynos: Enable non-dt path

Message ID 1362549243-20587-3-git-send-email-gautam.vivek@samsung.com
State New
Headers show

Commit Message

Vivek Gautam March 6, 2013, 5:54 a.m. UTC
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(-)

Comments

Simon Glass March 6, 2013, 6:17 a.m. UTC | #1
On Tue, Mar 5, 2013 at 9:54 PM, Vivek Gautam <gautam.vivek@samsung.com> wrote:
> 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>

Change log aside:

Acked-by: Simon Glass <sjg@chromium.org>

> ---
>  drivers/usb/host/ehci-exynos.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c
> index c6b7a5e..6de23ec 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)
>  {
>         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,7 +153,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 = (struct ehci_hccr *)samsung_get_base_usb_ehci();
> +#endif
>
>         setup_usb_phy(ctx->usb);
>
> --
> 1.7.6.5
>
diff mbox

Patch

diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c
index c6b7a5e..6de23ec 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)
 {
 	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,7 +153,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 = (struct ehci_hccr *)samsung_get_base_usb_ehci();
+#endif
 
 	setup_usb_phy(ctx->usb);