Skip to contentSkip to conversation

introducing internal_phy_reset()

PATCH In review David Lanzendörfer 3 participants 3 messages Jul 16, 2010 – Jul 22, 2010

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

PATCH 1/1 introducing internal_phy_reset()

Hi, the following function should work for hsusb.
I only need to know now, where it should be added to platform data exactly. Best regards
leviathan

---
 arch/arm/mach-msm/board-trout.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/mach-msm/board-trout.c +6 -0
index bc0afa4..59d7640 100644
@@ -29,6 +29,7 @@
 
 #include "devices.h"
 #include "board-trout.h"
+#include "proc_comm.h"
 
 extern int trout_init_mmc(unsigned int);
 
@@ -63,6 +64,11 @@ static void __init trout_init_irq(void)
 	msm_init_irq();
 }
 
+static void internal_phy_reset(void)
+{
+	msm_proc_comm(PCOM_MSM_HSUSB_PHY_RESET,NULL,NULL);
+}
+
 static void __init trout_fixup(struct machine_desc *desc, struct tag *tags,
 				char **cmdline, struct meminfo *mi)
 {
Signature · 1 line
1.6.4.4
#1 lore raw
Quoted 21 lines · David Lanzendörfer

Hi, the following function should work for hsusb.
I only need to know now, where it should be added to platform data exactly. Best regards
leviathan

---
 arch/arm/mach-msm/board-trout.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/mach-msm/board-trout.c +1 -0
index bc0afa4..59d7640 100644
@@ -29,6 +29,7 @@
 
 #include "devices.h"
 #include "board-trout.h"
+#include "proc_comm.h"
 
 extern int trout_init_mmc(unsigned int);
 

arch/arm/mach-msm/board-trout.c static void __init trout_init_irq(void) · line 70

Quoted 7 lines
arch/arm/mach-msm/board-trout.c +4 -0
@@ -63,6 +64,11 @@ static void __init trout_init_irq(void)
 	msm_init_irq();
 }
 
+static void internal_phy_reset(void)
+{
+	msm_proc_comm(PCOM_MSM_HSUSB_PHY_RESET,NULL,NULL);
+}

I think it's a good topic to discuss .. We could put the proc_comm function into a header under mach-msm/include/mach/ then you can includes that header into a driver like this,

#include <mach/mmc.h>

please be sure to look at how other drivers are doing this for hints on how to move forward.

Daniel

Signature · 2 lines
Sent by an consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#2 lore raw
Quoted 34 lines · Daniel Walker
Quoted 21 lines · David Lanzendörfer

Hi, the following function should work for hsusb.
I only need to know now, where it should be added to platform data exactly. Best regards
      leviathan
---
 arch/arm/mach-msm/board-trout.c |    6 ++++++

 1 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/mach-msm/board-trout.c +1 -0
index bc0afa4..59d7640 100644
@@ -29,6 +29,7 @@
 
  #include "devices.h"
  #include "board-trout.h"
+#include "proc_comm.h"
 
  extern int trout_init_mmc(unsigned int);
 

arch/arm/mach-msm/board-trout.c static void __init trout_init_irq(void) · line 70

Quoted 7 lines
arch/arm/mach-msm/board-trout.c +4 -0
@@ -63,6 +64,11 @@ static void __init trout_init_irq(void)
       msm_init_irq();
  }
 
+static void internal_phy_reset(void)
+{
+     msm_proc_comm(PCOM_MSM_HSUSB_PHY_RESET,NULL,NULL);
+}

I think it's a good topic to discuss .. We could put the proc_comm function into a header under mach-msm/include/mach/ then you can includes that header into a driver like this,

Quoted 7 lines

#include <mach/mmc.h>

please be sure to look at how other drivers are doing this for hints on how to move forward.

Daniel

Is there some reason not to use a full transceiver PHY driver like PXA does? The proc_comm calls are board/amss specific, assuming you are exporting a function from the board you break multidevice kernels.

include/linux/usb/otg.h:extern struct otg_transceiver *otg_get_transceiver(void);

Also, there is some hacked up code floating around to enable switch the usb device from client to host? Is there a better and more sane way to do this that fits in better with upstream?

Thanks,
Timothy Meade
tmzt #htc-linux (facebook.com/HTCLinux)