Skip to contentSkip to conversation

usb: ehci: exynos: Enable non-dt path

PATCH Superseded Vivek Gautam 5 participants 6 messages Jan 11, 2013 – Feb 12, 2013

Subsystems (3)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: ehci: exynos: Enable non-dt path

Enabling the non-dt path for the driver so that we don't get any build errors for non-dt configuration.

---

Earlier we had moved to fdt support for ehci-exynos driver, but missed out the non-dt path. Although this driver serves for exysno5 onward only but better to keep the non-dt path also available.

 drivers/usb/host/ehci-exynos.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
drivers/usb/host/ehci-exynos.c +10 -0
index 3ca4c5c..6f0c6c3 100644
@@ -153,7 +153,12 @@ int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor)
 		return -ENOMEM;
 	}
 
+#ifdef CONFIG_OF_CONTROL
 	exynos_usb_parse_dt(gd->fdt_blob, exynos);
+#else
+	exynos->usb = (struct exynos_usb_phy *)samsung_get_base_usb_phy();
+	exynos->hcd = samsung_get_base_usb_ehci();
+#endif
 
 	setup_usb_phy(exynos->usb);
 
@@ -185,7 +190,12 @@ int ehci_hcd_stop(int index)
 		return -ENOMEM;
 	}
 
+#ifdef CONFIG_OF_CONTROL
 	exynos_usb_parse_dt(gd->fdt_blob, exynos);
+#else
+	exynos->usb = (struct exynos_usb_phy *)samsung_get_base_usb_phy();
+	exynos->hcd = samsung_get_base_usb_ehci();
+#endif
 
 	reset_usb_phy(exynos->usb);
 
Signature · 1 line
1.7.6.5
#1 lore raw

PATCH 1/1 usb: ehci: exynos: Enable non-dt path

Dear Vivek Gautam,

Quoted 4 lines

Enabling the non-dt path for the driver so that we don't get any build errors for non-dt configuration.

Apply on the -samsung please

Best regards,
Marek Vasut

#2 lore raw

PATCH 1/1 usb: ehci: exynos: Enable non-dt path

Hi Marek,

CCing Simon Glass, Minkyu Kang.

Quoted 9 lines · Marek Vasut

Dear Vivek Gautam,

Quoted 4 lines

Enabling the non-dt path for the driver so that we don't get any build errors for non-dt configuration.

Apply on the -samsung please

Sorry !! missed to mention.
this patch is based and tested on u-boot-samsung.

Signature · 2 lines
Thanks & Regards
Vivek
#3 lore raw

PATCH 1/1 usb: ehci: exynos: Enable non-dt path

In reply to Vivek Gautam

Hi Vivek,

Quoted 4 lines · Vivek Gautam

Enabling the non-dt path for the driver so that we don't get any build errors for non-dt configuration.

But this has thrown up the issue that the FDT decode is done each time. Could you (in a future patch) change this so that the FDT decode happens once, and the values are put in a structure which is then used subsequently?

Regards,
Simon

Quoted 42 lines

---

Earlier we had moved to fdt support for ehci-exynos driver, but missed out the non-dt path. Although this driver serves for exysno5 onward only but better to keep the non-dt path also available.

 drivers/usb/host/ehci-exynos.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
drivers/usb/host/ehci-exynos.c +10 -1
index 3ca4c5c..6f0c6c3 100644
@@ -153,7 +153,12 @@ int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor)
                return -ENOMEM;
        }
 
+#ifdef CONFIG_OF_CONTROL
        exynos_usb_parse_dt(gd->fdt_blob, exynos);
+#else
+       exynos->usb = (struct exynos_usb_phy *)samsung_get_base_usb_phy();
+       exynos->hcd = samsung_get_base_usb_ehci();
+#endif
 
        setup_usb_phy(exynos->usb);
 
@@ -185,7 +190,12 @@ int ehci_hcd_stop(int index)
                return -ENOMEM;
        }
 
+#ifdef CONFIG_OF_CONTROL
        exynos_usb_parse_dt(gd->fdt_blob, exynos);
+#else
+       exynos->usb = (struct exynos_usb_phy *)samsung_get_base_usb_phy();
+       exynos->hcd = samsung_get_base_usb_ehci();
+#endif
 
        reset_usb_phy(exynos->usb);
 
--

1.7.6.5

#4 lore raw

PATCH 1/1 usb: ehci: exynos: Enable non-dt path

In reply to Vivek Gautam

Dear Vivek,

Quoted 34 lines · Vivek Gautam

Enabling the non-dt path for the driver so that we don't get any build errors for non-dt configuration.

---

Earlier we had moved to fdt support for ehci-exynos driver, but missed out the non-dt path. Although this driver serves for exysno5 onward only but better to keep the non-dt path also available.

 drivers/usb/host/ehci-exynos.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
drivers/usb/host/ehci-exynos.c +5 -0
index 3ca4c5c..6f0c6c3 100644
@@ -153,7 +153,12 @@ int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor)
 		return -ENOMEM;
 	}
 
+#ifdef CONFIG_OF_CONTROL
 	exynos_usb_parse_dt(gd->fdt_blob, exynos);
+#else
+	exynos->usb = (struct exynos_usb_phy *)samsung_get_base_usb_phy();
+	exynos->hcd = samsung_get_base_usb_ehci();
+#endif
 
 	setup_usb_phy(exynos->usb);
 
@@ -185,7 +190,12 @@ int ehci_hcd_stop(int index)
 		return -ENOMEM;
 	}

drivers/usb/host/ehci-exynos.c int ehci_hcd_stop(int index) · line 201

Quoted 10 lines
drivers/usb/host/ehci-exynos.c +5 -0
 
+#ifdef CONFIG_OF_CONTROL
 	exynos_usb_parse_dt(gd->fdt_blob, exynos);
+#else
+	exynos->usb = (struct exynos_usb_phy *)samsung_get_base_usb_phy();
+	exynos->hcd = samsung_get_base_usb_ehci();
+#endif
 
 	reset_usb_phy(exynos->usb);
 

Patch looks good.
But I've got compiler warnings and errors when I disabled CONFIG_OF_CONTROL.

exynos_spi.c:391:12: warning: 'process_nodes' defined but not used [-Wunused-function]
ehci-exynos.c: In function 'ehci_hcd_init':
ehci-exynos.c:160:14: warning: assignment makes pointer from integer without a cast [enabled by default]
ehci-exynos.c: In function 'ehci_hcd_stop':
ehci-exynos.c:197:14: warning: assignment makes pointer from integer without a cast [enabled by default]
ehci-exynos.c: At top level:
ehci-exynos.c:48:12: warning: 'exynos_usb_parse_dt' defined but not used [-Wunused-function] /opt/eldk-5.2/armv7a/sysroots/i686-eldk-linux/usr/bin/armv7a-vfp-neon-linux-gnueabi/arm-linux-gnueabi-ld.bfd:/home/share/Work/u-boot-samsung/spl/u-boot-spl.lds:1: ignoring invalid character `#' in expression /opt/eldk-5.2/armv7a/sysroots/i686-eldk-linux/usr/bin/armv7a-vfp-neon-linux-gnueabi/arm-linux-gnueabi-ld.bfd:/home/share/Work/u-boot-samsung/spl/u-boot-spl.lds:1: syntax error make[1]: *** [/home/share/Work/u-boot-samsung/spl/u-boot-spl] Error 1
make: *** [spl/u-boot-spl.bin] Error 2
make: *** Waiting for unfinished jobs....
smdk5250.c: In function 'board_eth_init':
smdk5250.c:152:6: warning: unused variable 'node' [-Wunused-variable]

Could you please check this issue also?

Thanks.
Minkyu Kang.

#5 lore raw

PATCH 1/1 usb: ehci: exynos: Enable non-dt path

Hi Minkyu,

Quoted 66 lines · Minkyu Kang

Dear Vivek,

Quoted 34 lines · Vivek Gautam

Enabling the non-dt path for the driver so that we don't get any build errors for non-dt configuration.

---

Earlier we had moved to fdt support for ehci-exynos driver, but missed out the non-dt path. Although this driver serves for exysno5 onward only but better to keep the non-dt path also available.

 drivers/usb/host/ehci-exynos.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
drivers/usb/host/ehci-exynos.c +5 -0
index 3ca4c5c..6f0c6c3 100644
@@ -153,7 +153,12 @@ int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor)
              return -ENOMEM;
      }
 
+#ifdef CONFIG_OF_CONTROL
      exynos_usb_parse_dt(gd->fdt_blob, exynos);
+#else
+     exynos->usb = (struct exynos_usb_phy *)samsung_get_base_usb_phy();
+     exynos->hcd = samsung_get_base_usb_ehci();
+#endif
 
      setup_usb_phy(exynos->usb);
 
@@ -185,7 +190,12 @@ int ehci_hcd_stop(int index)
              return -ENOMEM;
      }

drivers/usb/host/ehci-exynos.c int ehci_hcd_stop(int index) · line 201

Quoted 10 lines
drivers/usb/host/ehci-exynos.c +5 -0
 
+#ifdef CONFIG_OF_CONTROL
      exynos_usb_parse_dt(gd->fdt_blob, exynos);
+#else
+     exynos->usb = (struct exynos_usb_phy *)samsung_get_base_usb_phy();
+     exynos->hcd = samsung_get_base_usb_ehci();
+#endif
 
      reset_usb_phy(exynos->usb);
 

Patch looks good.
But I've got compiler warnings and errors when I disabled CONFIG_OF_CONTROL.

exynos_spi.c:391:12: warning: 'process_nodes' defined but not used [-Wunused-function]
ehci-exynos.c: In function 'ehci_hcd_init':
ehci-exynos.c:160:14: warning: assignment makes pointer from integer without a cast [enabled by default]
ehci-exynos.c: In function 'ehci_hcd_stop':
ehci-exynos.c:197:14: warning: assignment makes pointer from integer without a cast [enabled by default]
ehci-exynos.c: At top level:
ehci-exynos.c:48:12: warning: 'exynos_usb_parse_dt' defined but not used [-Wunused-function] /opt/eldk-5.2/armv7a/sysroots/i686-eldk-linux/usr/bin/armv7a-vfp-neon-linux-gnueabi/arm-linux-gnueabi-ld.bfd:/home/share/Work/u-boot-samsung/spl/u-boot-spl.lds:1: ignoring invalid character `#' in expression /opt/eldk-5.2/armv7a/sysroots/i686-eldk-linux/usr/bin/armv7a-vfp-neon-linux-gnueabi/arm-linux-gnueabi-ld.bfd:/home/share/Work/u-boot-samsung/spl/u-boot-spl.lds:1: syntax error make[1]: *** [/home/share/Work/u-boot-samsung/spl/u-boot-spl] Error 1
make: *** [spl/u-boot-spl.bin] Error 2
make: *** Waiting for unfinished jobs....
smdk5250.c: In function 'board_eth_init':
smdk5250.c:152:6: warning: unused variable 'node' [-Wunused-variable]

Quoted 2 lines

Could you please check this issue also?

Sure, will check this, and resolve the underlying issue.

Signature · 2 lines
Thanks & Regards
Vivek