Skip to contentSkip to conversation

usb: add EHCI and OHCI support for SH7757

PATCH In review Yoshihiro Shimoda 6 participants 11 messages Feb 24, 2011 – Feb 28, 2011

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: add EHCI and OHCI support for SH7757

---
 drivers/usb/host/ehci-hcd.c |    3 ++-
 drivers/usb/host/ohci-hcd.c |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)
drivers/usb/host/ehci-hcd.c +2 -1
index 4c77a81..b5aae43 100644
@@ -1184,7 +1184,8 @@ MODULE_LICENSE ("GPL");
 #define PLATFORM_DRIVER		ehci_mxc_driver
 #endif
 
-#ifdef CONFIG_CPU_SUBTYPE_SH7786
+#if defined(CONFIG_CPU_SUBTYPE_SH7757) || \
+    defined(CONFIG_CPU_SUBTYPE_SH7785)
 #include "ehci-sh.c"
 #define PLATFORM_DRIVER		ehci_hcd_sh_driver
 #endif
drivers/usb/host/ohci-hcd.c +1 -0
index 759a12f..257974e 100644
@@ -1070,6 +1070,7 @@ MODULE_LICENSE ("GPL");
 
 #if defined(CONFIG_CPU_SUBTYPE_SH7720) || \
     defined(CONFIG_CPU_SUBTYPE_SH7721) || \
+    defined(CONFIG_CPU_SUBTYPE_SH7757) || \
     defined(CONFIG_CPU_SUBTYPE_SH7763) || \
     defined(CONFIG_CPU_SUBTYPE_SH7786)
 #include "ohci-sh.c"
Signature · 1 line
1.7.1
#1 lore raw

Dear Shimoda san

drivers/usb/host/ehci-hcd.c MODULE_LICENSE ("GPL"); · line 1188

Quoted 3 lines
drivers/usb/host/ehci-hcd.c +2 -1
-#ifdef CONFIG_CPU_SUBTYPE_SH7786
+#if defined(CONFIG_CPU_SUBTYPE_SH7757) || \
+    defined(CONFIG_CPU_SUBTYPE_SH7785)

Is this miss ?
you remove 7786
and add 7785 ?

              ~

Best regards
--
Kuninori Morimoto

#2 lore raw
In reply to Yoshihiro Shimoda

Dear Morimoto-san,

Quoted 10 lines · Kuninori Morimoto

Dear Shimoda san

drivers/usb/host/ehci-hcd.c MODULE_LICENSE ("GPL"); · line 1188

Quoted 3 lines
drivers/usb/host/ehci-hcd.c +2 -1
-#ifdef CONFIG_CPU_SUBTYPE_SH7786
+#if defined(CONFIG_CPU_SUBTYPE_SH7757) || \
+    defined(CONFIG_CPU_SUBTYPE_SH7785)

Is this miss ?
you remove 7786
and add 7785 ?

Oh, Thank you very much! I mistook the code. I must keep the 7786 and I would like to add 7757. I will fix it.

Best regards,
Yoshihiro Shimoda

Quoted 7 lines
              ~

Best regards
--
Kuninori Morimoto

#3 lore raw

PATCH 1/1 usb: add EHCI and OHCI support for SH7757

In reply to Yoshihiro Shimoda

---
about v2:
- fix the condition for other CPU in ehci-hcd.c.

 drivers/usb/host/ehci-hcd.c |    3 ++-
 drivers/usb/host/ohci-hcd.c |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)
drivers/usb/host/ehci-hcd.c +2 -1
index 4c77a81..b396567 100644
@@ -1184,7 +1184,8 @@ MODULE_LICENSE ("GPL");
 #define PLATFORM_DRIVER		ehci_mxc_driver
 #endif
 
-#ifdef CONFIG_CPU_SUBTYPE_SH7786
+#if defined(CONFIG_CPU_SUBTYPE_SH7757) || \
+    defined(CONFIG_CPU_SUBTYPE_SH7786)
 #include "ehci-sh.c"
 #define PLATFORM_DRIVER		ehci_hcd_sh_driver
 #endif
drivers/usb/host/ohci-hcd.c +1 -0
index 759a12f..257974e 100644
@@ -1070,6 +1070,7 @@ MODULE_LICENSE ("GPL");
 
 #if defined(CONFIG_CPU_SUBTYPE_SH7720) || \
     defined(CONFIG_CPU_SUBTYPE_SH7721) || \
+    defined(CONFIG_CPU_SUBTYPE_SH7757) || \
     defined(CONFIG_CPU_SUBTYPE_SH7763) || \
     defined(CONFIG_CPU_SUBTYPE_SH7786)
 #include "ohci-sh.c"
Signature · 1 line
1.7.1
#4 lore raw
In reply to Yoshihiro Shimoda

Hello.

Quoted 1 line · Yoshihiro Shimoda

[...]

drivers/usb/host/ehci-hcd.c MODULE_LICENSE ("GPL"); · line 1188

Quoted 11 lines
drivers/usb/host/ehci-hcd.c +2 -1
index 4c77a81..b5aae43 100644
@@ -1184,7 +1184,8 @@ MODULE_LICENSE ("GPL");
  #define PLATFORM_DRIVER		ehci_mxc_driver
  #endif
 
-#ifdef CONFIG_CPU_SUBTYPE_SH7786
+#if defined(CONFIG_CPU_SUBTYPE_SH7757) || \
+    defined(CONFIG_CPU_SUBTYPE_SH7785)
    Not CONFIG_CPU_SUBTYPE_SH7786?

drivers/usb/host/ehci-hcd.c MODULE_LICENSE ("GPL"); · line 1191

Quoted 3 lines
drivers/usb/host/ehci-hcd.c +0 -0
  #include "ehci-sh.c"
  #define PLATFORM_DRIVER		ehci_hcd_sh_driver
  #endif

WBR, Sergei

#5 lore raw
In reply to Yoshihiro Shimoda

Hello Sergei,

Quoted 15 lines · Sergei Shtylyov

Hello.

Quoted 1 line · Yoshihiro Shimoda

[...]

Quoted 8 lines
drivers/usb/host/ehci-hcd.c +0 -0
index 4c77a81..b5aae43 100644
@@ -1184,7 +1184,8 @@ MODULE_LICENSE ("GPL");
  #define PLATFORM_DRIVER		ehci_mxc_driver
  #endif
 
Quoted 5 lines

drivers/usb/host/ehci-hcd.c MODULE_LICENSE ("GPL"); · line 1188

Quoted 3 lines
drivers/usb/host/ehci-hcd.c +2 -1
-#ifdef CONFIG_CPU_SUBTYPE_SH7786
+#if defined(CONFIG_CPU_SUBTYPE_SH7757) || \
+    defined(CONFIG_CPU_SUBTYPE_SH7785)
    Not CONFIG_CPU_SUBTYPE_SH7786?

Thank you very much for your point!
I re-submitted a fixed patch yesterday.

Best regards,
Yoshihiro Shimoda

Quoted 6 lines

drivers/usb/host/ehci-hcd.c MODULE_LICENSE ("GPL"); · line 1191

Quoted 3 lines
drivers/usb/host/ehci-hcd.c +0 -0
  #include "ehci-sh.c"
  #define PLATFORM_DRIVER		ehci_hcd_sh_driver
  #endif

WBR, Sergei

Signature · 1 line
Yoshihiro Shimoda <[email protected]>
#7 lore raw
In reply to Yoshihiro Shimoda

Hi Paul,

Quoted 9 lines · Paul Mundt
Quoted 5 lines · Yoshihiro Shimoda

---
about v2:
- fix the condition for other CPU in ehci-hcd.c.

And how exactly are you enabling this when the 7757 Kconfig entry doesn't select either of USB_ARCH_HAS_OHCI or USB_ARCH_HAS_EHCI?

I intended to submit a patch which modified Kconfig after this patch applied. But I should also have submitted the patch together.
I will submit it and other necessary patches to linux-sh ml.

Best regards,
Yoshihiro Shimoda

#8 lore raw
In reply to Yoshihiro Shimoda
Quoted 28 lines · Yoshihiro Shimoda

---
about v2:
- fix the condition for other CPU in ehci-hcd.c.

  drivers/usb/host/ehci-hcd.c |    3 ++-
  drivers/usb/host/ohci-hcd.c |    1 +
  2 files changed, 3 insertions(+), 1 deletions(-)
drivers/usb/host/ehci-hcd.c +2 -1
index 4c77a81..b396567 100644
@@ -1184,7 +1184,8 @@ MODULE_LICENSE ("GPL");
  #define PLATFORM_DRIVER		ehci_mxc_driver
  #endif
 
-#ifdef CONFIG_CPU_SUBTYPE_SH7786
+#if defined(CONFIG_CPU_SUBTYPE_SH7757) || \
+    defined(CONFIG_CPU_SUBTYPE_SH7786)
  #include "ehci-sh.c"
  #define PLATFORM_DRIVER		ehci_hcd_sh_driver
  #endif
drivers/usb/host/ohci-hcd.c +0 -0
index 759a12f..257974e 100644

drivers/usb/host/ohci-hcd.c MODULE_LICENSE ("GPL"); · line 1076

Quoted 7 lines
drivers/usb/host/ohci-hcd.c +1 -0
@@ -1070,6 +1070,7 @@ MODULE_LICENSE ("GPL");
 
  #if defined(CONFIG_CPU_SUBTYPE_SH7720) || \
      defined(CONFIG_CPU_SUBTYPE_SH7721) || \
+    defined(CONFIG_CPU_SUBTYPE_SH7757) || \
      defined(CONFIG_CPU_SUBTYPE_SH7763) || \
      defined(CONFIG_CPU_SUBTYPE_SH7786)
  #include "ohci-sh.c"

I wonder if all that #ifdefery could be moved into the arch/sh Kconfig.

Patching the core ehci/ohci code each time a new sh CPU variant is released seems like the wrong approach.

David Daney

#9 lore raw
In reply to Yoshihiro Shimoda
Quoted 9 lines · Yoshihiro Shimoda

Hi Paul,

Quoted 6 lines · Paul Mundt
Quoted 5 lines · Yoshihiro Shimoda

---
about v2:
- fix the condition for other CPU in ehci-hcd.c.

Quoted 6 lines
Quoted 3 lines

And how exactly are you enabling this when the 7757 Kconfig entry doesn't select either of USB_ARCH_HAS_OHCI or USB_ARCH_HAS_EHCI?

I intended to submit a patch which modified Kconfig after this patch applied. But I should also have submitted the patch together.
I will submit it and other necessary patches to linux-sh ml.

Ok, then I will drop this one from my queue.

For such simple config patches, they can go through the sh tree, no need to go through the usb one.

thanks,

greg k-h

#10 lore raw
In reply to Yoshihiro Shimoda

Hi David,

Quoted 15 lines · David Daney

drivers/usb/host/ohci-hcd.c MODULE_LICENSE ("GPL"); · line 1076

Quoted 12 lines
drivers/usb/host/ohci-hcd.c +1 -0
index 759a12f..257974e 100644
@@ -1070,6 +1070,7 @@ MODULE_LICENSE ("GPL");
 
  #if defined(CONFIG_CPU_SUBTYPE_SH7720) || \
      defined(CONFIG_CPU_SUBTYPE_SH7721) || \
+    defined(CONFIG_CPU_SUBTYPE_SH7757) || \
      defined(CONFIG_CPU_SUBTYPE_SH7763) || \
      defined(CONFIG_CPU_SUBTYPE_SH7786)
  #include "ohci-sh.c"

I wonder if all that #ifdefery could be moved into the arch/sh Kconfig.

Quoted 2 lines

Patching the core ehci/ohci code each time a new sh CPU variant is released seems like the wrong approach.

Thank you very much for your comment. I think so. So I will move it into the drivers/usb/host Kconfig because the Kconfig has some configs for architecture dependency.

Best regards,
Yoshihiro Shimoda

Quoted 2 lines

David Daney