Skip to contentSkip to conversation

arm, usb, davinci: make USBPHY_CTL register configurable

PATCH New Heiko Schocher 3 participants 7 messages Aug 2, 2011 – Oct 5, 2011

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

PATCH 1/1 arm, usb, davinci: make USBPHY_CTL register configurable

Define CONFIG_DV_USBPHY_CTL for setting the USB PHY control register.

cc Sandeep Paulraj <[email protected]>
cc Remy Bohmer <[email protected]>
---
 drivers/usb/musb/davinci.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
drivers/usb/musb/davinci.c +5 -1
index f56f2df..98c2c62 100644
@@ -26,6 +26,10 @@
 #include "davinci.h"
 #include <asm/arch/hardware.h>
 
+#if !defined(CONFIG_DV_USBPHY_CTL)
+#define CONFIG_DV_USBPHY_CTL (USBPHY_SESNDEN | USBPHY_VBDTCTEN)
+#endif
+
 /* MUSB platform configuration */
 struct musb_config musb_cfg = {
 	.regs		= (struct musb_regs *)MENTOR_USB0_BASE,
@@ -50,7 +54,7 @@ static u8 phy_on(void)
 	writel(USBPHY_PHY24MHZ | USBPHY_SESNDEN |
 			USBPHY_VBDTCTEN, USBPHY_CTL_PADDR);
 #else
-	writel(USBPHY_SESNDEN | USBPHY_VBDTCTEN, USBPHY_CTL_PADDR);
+	writel(CONFIG_DV_USBPHY_CTL, USBPHY_CTL_PADDR);
 #endif
 	timeout = musb_cfg.timeout;
 
Signature · 1 line
1.7.6
#1 lore raw

PATCH 1/1 arm, usb, davinci: make USBPHY_CTL register configurable

Hi,

2011/8/2 Heiko Schocher <[email protected]>:

Quoted 25 lines

Define CONFIG_DV_USBPHY_CTL for setting the USB PHY control register.

cc Sandeep Paulraj <[email protected]>
cc Remy Bohmer <[email protected]>

---
?drivers/usb/musb/davinci.c | ? ?6 +++++-
?1 files changed, 5 insertions(+), 1 deletions(-)

drivers/usb/musb/davinci.c +0 -0
index f56f2df..98c2c62 100644
@@ -26,6 +26,10 @@

?#include "davinci.h"
?#include <asm/arch/hardware.h>

drivers/usb/musb/davinci.c +4 -0
+#if !defined(CONFIG_DV_USBPHY_CTL)
+#define CONFIG_DV_USBPHY_CTL (USBPHY_SESNDEN | USBPHY_VBDTCTEN)
+#endif
+

?/* MUSB platform configuration */
?struct musb_config musb_cfg = {
? ? ? ?.regs ? ? ? ? ? = (struct musb_regs *)MENTOR_USB0_BASE,

drivers/usb/musb/davinci.c +0 -0
@@ -50,7 +54,7 @@ static u8 phy_on(void)
Quoted 7 lines

? ? ? ?writel(USBPHY_PHY24MHZ | USBPHY_SESNDEN |
? ? ? ? ? ? ? ? ? ? ? ?USBPHY_VBDTCTEN, USBPHY_CTL_PADDR); ?#else
- ? ? ? writel(USBPHY_SESNDEN | USBPHY_VBDTCTEN, USBPHY_CTL_PADDR);
+ ? ? ? writel(CONFIG_DV_USBPHY_CTL, USBPHY_CTL_PADDR); ?#endif
? ? ? ?timeout = musb_cfg.timeout;

What does it fix, why do you want this?

Kind regards,

Remy

#2 lore raw

PATCH 1/1 arm, usb, davinci: make USBPHY_CTL register configurable

Hello Remy,

Quoted 29 lines · Remy Bohmer

Hi,

2011/8/2 Heiko Schocher <[email protected]>:

Quoted 26 lines

Define CONFIG_DV_USBPHY_CTL for setting the USB PHY control register.

cc Sandeep Paulraj <[email protected]>
cc Remy Bohmer <[email protected]>
---
 drivers/usb/musb/davinci.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
drivers/usb/musb/davinci.c +4 -0
index f56f2df..98c2c62 100644
@@ -26,6 +26,10 @@
 #include "davinci.h"
 #include <asm/arch/hardware.h>
 
+#if !defined(CONFIG_DV_USBPHY_CTL)
+#define CONFIG_DV_USBPHY_CTL (USBPHY_SESNDEN | USBPHY_VBDTCTEN)
+#endif
+
 /* MUSB platform configuration */
 struct musb_config musb_cfg = {
       .regs           = (struct musb_regs *)MENTOR_USB0_BASE,
@@ -50,7 +54,7 @@ static u8 phy_on(void)
       writel(USBPHY_PHY24MHZ | USBPHY_SESNDEN |
Quoted 8 lines

drivers/usb/musb/davinci.c static u8 phy_on(void) · line 59

Quoted 6 lines
drivers/usb/musb/davinci.c +1 -1
                       USBPHY_VBDTCTEN, USBPHY_CTL_PADDR);
 #else
-       writel(USBPHY_SESNDEN | USBPHY_VBDTCTEN, USBPHY_CTL_PADDR);
+       writel(CONFIG_DV_USBPHY_CTL, USBPHY_CTL_PADDR);
 #endif
       timeout = musb_cfg.timeout;

What does it fix, why do you want this?

I posted the cam_enc_4xx board support. Now adding USB support, and I have to configure this register as:

#define CONFIG_DV_USBPHY_CTL (USBPHY_SESNDEN | USBPHY_VBDTCTEN | \
USBPHY_PHY24MHZ)

so I need a possibility to configure this register ... and I could not use DAVINCI_DM365EVM! (BTW: This define (so it seems to me) hides board specific code, which should be cleaned up ... Sandeep?)

bye,
Heiko

Signature · 2 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#3 lore raw

PATCH 1/1 arm, usb, davinci: make USBPHY_CTL register configurable

Hi all,

Le 09/08/2011 07:05, Heiko Schocher a ?crit :

Quoted 47 lines

Hello Remy,

Quoted 29 lines · Remy Bohmer

Hi,

2011/8/2 Heiko Schocher<[email protected]>:

Quoted 26 lines

Define CONFIG_DV_USBPHY_CTL for setting the USB PHY control register.

cc Sandeep Paulraj<[email protected]>
cc Remy Bohmer<[email protected]>
---
  drivers/usb/musb/davinci.c |    6 +++++-
  1 files changed, 5 insertions(+), 1 deletions(-)
drivers/usb/musb/davinci.c +4 -0
index f56f2df..98c2c62 100644
@@ -26,6 +26,10 @@
  #include "davinci.h"
  #include<asm/arch/hardware.h>
 
+#if !defined(CONFIG_DV_USBPHY_CTL)
+#define CONFIG_DV_USBPHY_CTL (USBPHY_SESNDEN | USBPHY_VBDTCTEN)
+#endif
+
  /* MUSB platform configuration */
  struct musb_config musb_cfg = {
        .regs           = (struct musb_regs *)MENTOR_USB0_BASE,
@@ -50,7 +54,7 @@ static u8 phy_on(void)
        writel(USBPHY_PHY24MHZ | USBPHY_SESNDEN |
Quoted 8 lines

drivers/usb/musb/davinci.c static u8 phy_on(void) · line 59

Quoted 6 lines
drivers/usb/musb/davinci.c +1 -1
                        USBPHY_VBDTCTEN, USBPHY_CTL_PADDR);
  #else
-       writel(USBPHY_SESNDEN | USBPHY_VBDTCTEN, USBPHY_CTL_PADDR);
+       writel(CONFIG_DV_USBPHY_CTL, USBPHY_CTL_PADDR);
  #endif
        timeout = musb_cfg.timeout;

What does it fix, why do you want this?

I posted the cam_enc_4xx board support. Now adding USB support, and I have to configure this register as:

#define CONFIG_DV_USBPHY_CTL (USBPHY_SESNDEN | USBPHY_VBDTCTEN | \
USBPHY_PHY24MHZ)

Quoted 6 lines

so I need a possibility to configure this register ... and I could not use DAVINCI_DM365EVM! (BTW: This define (so it seems to me) hides board specific code, which should be cleaned up ... Sandeep?)

bye,
Heiko

No new reply on this since early august... Personally, I'd rather this patch came in a patchset where some other patch uses it.

Amicalement,

Signature · 1 line
Albert.
#4 lore raw

PATCH 1/1 arm, usb, davinci: make USBPHY_CTL register configurable

Hello Albert,

Quoted 54 lines · Albert ARIBAUD

Hi all,

Le 09/08/2011 07:05, Heiko Schocher a ?crit :

Quoted 51 lines

Hello Remy,

Quoted 29 lines · Remy Bohmer

Hi,

2011/8/2 Heiko Schocher<[email protected]>:

Quoted 26 lines

Define CONFIG_DV_USBPHY_CTL for setting the USB PHY control register.

cc Sandeep Paulraj<[email protected]>
cc Remy Bohmer<[email protected]>
---
  drivers/usb/musb/davinci.c |    6 +++++-
  1 files changed, 5 insertions(+), 1 deletions(-)
drivers/usb/musb/davinci.c +4 -0
index f56f2df..98c2c62 100644
@@ -26,6 +26,10 @@
  #include "davinci.h"
  #include<asm/arch/hardware.h>
 
+#if !defined(CONFIG_DV_USBPHY_CTL)
+#define CONFIG_DV_USBPHY_CTL (USBPHY_SESNDEN | USBPHY_VBDTCTEN)
+#endif
+
  /* MUSB platform configuration */
  struct musb_config musb_cfg = {
        .regs           = (struct musb_regs *)MENTOR_USB0_BASE,
@@ -50,7 +54,7 @@ static u8 phy_on(void)
        writel(USBPHY_PHY24MHZ | USBPHY_SESNDEN |
Quoted 8 lines

drivers/usb/musb/davinci.c static u8 phy_on(void) · line 59

Quoted 6 lines
drivers/usb/musb/davinci.c +1 -1
                        USBPHY_VBDTCTEN, USBPHY_CTL_PADDR);
  #else
-       writel(USBPHY_SESNDEN | USBPHY_VBDTCTEN, USBPHY_CTL_PADDR);
+       writel(CONFIG_DV_USBPHY_CTL, USBPHY_CTL_PADDR);
  #endif
        timeout = musb_cfg.timeout;

What does it fix, why do you want this?

I posted the cam_enc_4xx board support. Now adding USB support, and I have to configure this register as:

#define CONFIG_DV_USBPHY_CTL (USBPHY_SESNDEN | USBPHY_VBDTCTEN | \
USBPHY_PHY24MHZ)

so I need a possibility to configure this register ... and I could not use DAVINCI_DM365EVM! (BTW: This define (so it seems to me) hides board specific code, which should be cleaned up ... Sandeep?)

Quoted 5 lines
Quoted 2 lines

bye,
Heiko

No new reply on this since early august... Personally, I'd rather this patch came in a patchset where some other patch uses it.

Hmm.. Anyway I have to resend the cam_enc_4xx board port, as now the new SPL Framework is in mainline, and my post used the old one. Also I added in the meantime USB support for it, for which I needed this patch. But actually I am wating for a new HW, so I can't test it ... and then I post this patchset again with this patch in it! Can I add then your "Acked-by" for this patch?

Thanks
Heiko

Signature · 2 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#5 lore raw

PATCH 1/1 arm, usb, davinci: make USBPHY_CTL register configurable

Hi,

Quoted 6 lines

Hmm.. Anyway I have to resend the cam_enc_4xx board port, as now the new SPL Framework is in mainline, and my post used the old one. Also I added in the meantime USB support for it, for which I needed this patch. But actually I am wating for a new HW, so I can't test it ... and then I post this patchset again with this patch in it! Can I add then your "Acked-by" for this patch?

Kind regards,

Remy

#6 lore raw

PATCH v2 1/10 arm, usb, davinci: make USBPHY_CTL register configurable

In reply to Heiko Schocher

Define CONFIG_DV_USBPHY_CTL for setting the USB PHY control register.

---
 drivers/usb/musb/davinci.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
drivers/usb/musb/davinci.c +5 -1
index f56f2df..98c2c62 100644
@@ -26,6 +26,10 @@
 #include "davinci.h"
 #include <asm/arch/hardware.h>
 
+#if !defined(CONFIG_DV_USBPHY_CTL)
+#define CONFIG_DV_USBPHY_CTL (USBPHY_SESNDEN | USBPHY_VBDTCTEN)
+#endif
+
 /* MUSB platform configuration */
 struct musb_config musb_cfg = {
 	.regs		= (struct musb_regs *)MENTOR_USB0_BASE,
@@ -50,7 +54,7 @@ static u8 phy_on(void)
 	writel(USBPHY_PHY24MHZ | USBPHY_SESNDEN |
 			USBPHY_VBDTCTEN, USBPHY_CTL_PADDR);
 #else
-	writel(USBPHY_SESNDEN | USBPHY_VBDTCTEN, USBPHY_CTL_PADDR);
+	writel(CONFIG_DV_USBPHY_CTL, USBPHY_CTL_PADDR);
 #endif
 	timeout = musb_cfg.timeout;
 
Signature · 1 line
1.7.6.2