public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] musb: cleanup the nop registration for OMAP3EVM
@ 2009-07-03  9:00 Ajay Kumar Gupta
       [not found] ` <1246611626-28137-1-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Ajay Kumar Gupta @ 2009-07-03  9:00 UTC (permalink / raw)
  To: linux-usb-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA, david-b-yBeKhBN/0LDR7s880joybQ,
	felipe.balbi-xNZwKgViW5gAvxtiuMwx3w, tony-4v6yS6AI5VpBDgjK7y7TUQ,
	Ajay Kumar Gupta

OMAP3EVM uses ISP1504 phy which doesn't require any
programming and thus has to use NOP otg transceiver.

Cleanups being done:
	- Remove unwanted code in usb-musb.c file
	- Register nop in OMAP3EVM board file using
	  usb_nop_xceiv_register().
	- Select NOP_USB_XCEIV for OMAP3EVM boards.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta-l0cyMroinI0@public.gmane.org>
---
This patch is refreshed based on David's recommendations at
[1] and [2].

[1] http://marc.info/?l=linux-omap&m=123904265231360&w=2
[2] http://www.mail-archive.com/linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org/msg13891.html

 arch/arm/mach-omap2/board-omap3evm.c |    3 +++
 arch/arm/mach-omap2/usb-musb.c       |   21 ---------------------
 drivers/usb/musb/Kconfig             |    1 +
 3 files changed, 4 insertions(+), 21 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 595beac..ad3c78c 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -25,6 +25,7 @@
 #include <linux/spi/spi.h>
 #include <linux/spi/ads7846.h>
 #include <linux/i2c/twl4030.h>
+#include <linux/usb/otg.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -307,6 +308,8 @@ static void __init omap3_evm_init(void)
 				ARRAY_SIZE(omap3evm_spi_board_info));
 
 	omap_serial_init();
+	/* OMAP3EVM uses ISP1504 phy and thus has to register nop transceiver */
+	usb_nop_xceiv_register();
 	usb_musb_init();
 	usb_ehci_init(EHCI_HCD_OMAP_MODE_PHY, true, true, 57, 61);
 	ads7846_dev_init();
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
index d85296d..739e59e 100644
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -155,20 +155,6 @@ static struct platform_device musb_device = {
 	.resource	= musb_resources,
 };
 
-#ifdef CONFIG_NOP_USB_XCEIV
-static u64 nop_xceiv_dmamask = DMA_BIT_MASK(32);
-
-static struct platform_device nop_xceiv_device = {
-	.name		= "nop_usb_xceiv",
-	.id		= -1,
-	.dev = {
-		.dma_mask		= &nop_xceiv_dmamask,
-		.coherent_dma_mask	= DMA_BIT_MASK(32),
-		.platform_data		= NULL,
-	},
-};
-#endif
-
 void __init usb_musb_init(void)
 {
 	if (cpu_is_omap243x())
@@ -183,13 +169,6 @@ void __init usb_musb_init(void)
 	 */
 	musb_plat.clock = "ick";
 
-#ifdef CONFIG_NOP_USB_XCEIV
-	if (platform_device_register(&nop_xceiv_device) < 0) {
-		printk(KERN_ERR "Unable to register NOP-XCEIV device\n");
-		return;
-	}
-#endif

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] musb: cleanup the nop registration for OMAP3EVM
       [not found] ` <1246611626-28137-1-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
@ 2009-07-03 15:30   ` David Brownell
  2009-07-29  6:28     ` Gupta, Ajay Kumar
  0 siblings, 1 reply; 4+ messages in thread
From: David Brownell @ 2009-07-03 15:30 UTC (permalink / raw)
  To: Ajay Kumar Gupta
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	felipe.balbi-xNZwKgViW5gAvxtiuMwx3w, tony-4v6yS6AI5VpBDgjK7y7TUQ

On Friday 03 July 2009, Ajay Kumar Gupta wrote:
> OMAP3EVM uses ISP1504 phy which doesn't require any
> programming and thus has to use NOP otg transceiver.
> 
> Cleanups being done:
> 	- Remove unwanted code in usb-musb.c file
> 	- Register nop in OMAP3EVM board file using
> 	  usb_nop_xceiv_register().
> 	- Select NOP_USB_XCEIV for OMAP3EVM boards.
> 
> Signed-off-by: Ajay Kumar Gupta <ajay.gupta-l0cyMroinI0@public.gmane.org>

Acked-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>

... another for-2.6.31 bugfix.

> ---
> This patch is refreshed based on David's recommendations at
> [1] and [2].
> 
> [1] http://marc.info/?l=linux-omap&m=123904265231360&w=2
> [2] http://www.mail-archive.com/linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org/msg13891.html
> 
>  arch/arm/mach-omap2/board-omap3evm.c |    3 +++
>  arch/arm/mach-omap2/usb-musb.c       |   21 ---------------------
>  drivers/usb/musb/Kconfig             |    1 +
>  3 files changed, 4 insertions(+), 21 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
> index 595beac..ad3c78c 100644
> --- a/arch/arm/mach-omap2/board-omap3evm.c
> +++ b/arch/arm/mach-omap2/board-omap3evm.c
> @@ -25,6 +25,7 @@
>  #include <linux/spi/spi.h>
>  #include <linux/spi/ads7846.h>
>  #include <linux/i2c/twl4030.h>
> +#include <linux/usb/otg.h>
>  
>  #include <mach/hardware.h>
>  #include <asm/mach-types.h>
> @@ -307,6 +308,8 @@ static void __init omap3_evm_init(void)
>  				ARRAY_SIZE(omap3evm_spi_board_info));
>  
>  	omap_serial_init();
> +	/* OMAP3EVM uses ISP1504 phy and thus has to register nop transceiver */
> +	usb_nop_xceiv_register();
>  	usb_musb_init();
>  	usb_ehci_init(EHCI_HCD_OMAP_MODE_PHY, true, true, 57, 61);
>  	ads7846_dev_init();
> diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
> index d85296d..739e59e 100644
> --- a/arch/arm/mach-omap2/usb-musb.c
> +++ b/arch/arm/mach-omap2/usb-musb.c
> @@ -155,20 +155,6 @@ static struct platform_device musb_device = {
>  	.resource	= musb_resources,
>  };
>  
> -#ifdef CONFIG_NOP_USB_XCEIV
> -static u64 nop_xceiv_dmamask = DMA_BIT_MASK(32);
> -
> -static struct platform_device nop_xceiv_device = {
> -	.name		= "nop_usb_xceiv",
> -	.id		= -1,
> -	.dev = {
> -		.dma_mask		= &nop_xceiv_dmamask,
> -		.coherent_dma_mask	= DMA_BIT_MASK(32),
> -		.platform_data		= NULL,
> -	},
> -};
> -#endif
> -
>  void __init usb_musb_init(void)
>  {
>  	if (cpu_is_omap243x())
> @@ -183,13 +169,6 @@ void __init usb_musb_init(void)
>  	 */
>  	musb_plat.clock = "ick";
>  
> -#ifdef CONFIG_NOP_USB_XCEIV
> -	if (platform_device_register(&nop_xceiv_device) < 0) {
> -		printk(KERN_ERR "Unable to register NOP-XCEIV device\n");
> -		return;
> -	}
> -#endif
> -
>  	if (platform_device_register(&musb_device) < 0) {
>  		printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n");
>  		return;
> diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
> index 70073b1..f822fd5 100644
> --- a/drivers/usb/musb/Kconfig
> +++ b/drivers/usb/musb/Kconfig
> @@ -11,6 +11,7 @@ config USB_MUSB_HDRC
>  	depends on (USB || USB_GADGET) && HAVE_CLK
>  	depends on !SUPERH
>  	select NOP_USB_XCEIV if ARCH_DAVINCI
> +	select NOP_USB_XCEIV if MACH_OMAP3EVM
>  	select TWL4030_USB if MACH_OMAP_3430SDP
>  	select USB_OTG_UTILS
>  	tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)'
> -- 
> 1.6.2.4
> 
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] musb: cleanup the nop registration for OMAP3EVM
  2009-07-03 15:30   ` David Brownell
@ 2009-07-29  6:28     ` Gupta, Ajay Kumar
  2009-07-29 14:02       ` patch usb-musb-fix-the-nop-registration-for-omap3evm.patch added to gregkh-2.6 tree gregkh
  0 siblings, 1 reply; 4+ messages in thread
From: Gupta, Ajay Kumar @ 2009-07-29  6:28 UTC (permalink / raw)
  To: gregkh@suse.de, David Brownell
  Cc: linux-usb@vger.kernel.org, linux-omap@vger.kernel.org,
	felipe.balbi@nokia.com, tony@atomide.com, talvala@stanford.edu

> On Friday 03 July 2009, Ajay Kumar Gupta wrote:
> > OMAP3EVM uses ISP1504 phy which doesn't require any
> > programming and thus has to use NOP otg transceiver.
> >
> > Cleanups being done:
> > 	- Remove unwanted code in usb-musb.c file
> > 	- Register nop in OMAP3EVM board file using
> > 	  usb_nop_xceiv_register().
> > 	- Select NOP_USB_XCEIV for OMAP3EVM boards.
> >
> > Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
> 
> Acked-by: David Brownell <dbrownell@users.sourceforge.net>
> 
> ... another for-2.6.31 bugfix.

Greg,

	Here is the refreshed version of this patch.

Thanks,
Ajay
================ cut here =================================================
OMAP3EVM uses ISP1504 phy which doesn't require any programming and
thus has to use NOP otg transceiver.

Cleanups being done:
	- Remove unwanted code in usb-musb.c file
	- Register NOP in OMAP3EVM board file using
	  usb_nop_xceiv_register().
	- Select NOP_USB_XCEIV for OMAP3EVM boards.
	- Don't enable TWL4030_USB in omap3_evm_defconfig

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Eino-Ville Talvala <talvala@stanford.edu>
---
Resubmitting with below changes.
	- Refreshed against linus tree
	- Combining recent patch from Eino-Ville Talvala on
	  "Removing TWL4030_USB from omap3_evm_defconfig"
	- Register nop under #ifdef to avoid compilation warning when
	  USB itself it not selected in OMAP3EVM build.

 arch/arm/configs/omap3_evm_defconfig |    2 +-
 arch/arm/mach-omap2/board-omap3evm.c |    5 +++++
 arch/arm/mach-omap2/usb-musb.c       |   21 ---------------------
 drivers/usb/musb/Kconfig             |    1 +
 4 files changed, 7 insertions(+), 22 deletions(-)

diff --git a/arch/arm/configs/omap3_evm_defconfig b/arch/arm/configs/omap3_evm_defconfig
index 28be17f..d5ff477 100644
--- a/arch/arm/configs/omap3_evm_defconfig
+++ b/arch/arm/configs/omap3_evm_defconfig
@@ -1107,7 +1107,7 @@ CONFIG_USB_ZERO=m
 CONFIG_USB_OTG_UTILS=y
 # CONFIG_USB_GPIO_VBUS is not set
 # CONFIG_ISP1301_OMAP is not set
-CONFIG_TWL4030_USB=y
+# CONFIG_TWL4030_USB is not set
 # CONFIG_NOP_USB_XCEIV is not set
 CONFIG_MMC=y
 # CONFIG_MMC_DEBUG is not set
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index d3cc145..cf3dd77 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -25,6 +25,7 @@
 #include <linux/spi/spi.h>
 #include <linux/spi/ads7846.h>
 #include <linux/i2c/twl4030.h>
+#include <linux/usb/otg.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -307,6 +308,10 @@ static void __init omap3_evm_init(void)
 				ARRAY_SIZE(omap3evm_spi_board_info));
 
 	omap_serial_init();
+#ifdef CONFIG_NOP_USB_XCEIV
+	/* OMAP3EVM uses ISP1504 phy and so register nop transceiver */
+	usb_nop_xceiv_register();
+#endif
 	usb_musb_init();
 	ads7846_dev_init();
 }
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
index d85296d..739e59e 100644
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -155,20 +155,6 @@ static struct platform_device musb_device = {
 	.resource	= musb_resources,
 };
 
-#ifdef CONFIG_NOP_USB_XCEIV
-static u64 nop_xceiv_dmamask = DMA_BIT_MASK(32);
-
-static struct platform_device nop_xceiv_device = {
-	.name		= "nop_usb_xceiv",
-	.id		= -1,
-	.dev = {
-		.dma_mask		= &nop_xceiv_dmamask,
-		.coherent_dma_mask	= DMA_BIT_MASK(32),
-		.platform_data		= NULL,
-	},
-};
-#endif
-
 void __init usb_musb_init(void)
 {
 	if (cpu_is_omap243x())
@@ -183,13 +169,6 @@ void __init usb_musb_init(void)
 	 */
 	musb_plat.clock = "ick";
 
-#ifdef CONFIG_NOP_USB_XCEIV
-	if (platform_device_register(&nop_xceiv_device) < 0) {
-		printk(KERN_ERR "Unable to register NOP-XCEIV device\n");
-		return;
-	}
-#endif
-
 	if (platform_device_register(&musb_device) < 0) {
 		printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n");
 		return;
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index 70073b1..803adcb 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -12,6 +12,7 @@ config USB_MUSB_HDRC
 	depends on !SUPERH
 	select NOP_USB_XCEIV if ARCH_DAVINCI
 	select TWL4030_USB if MACH_OMAP_3430SDP
+	select NOP_USB_XCEIV if MACH_OMAP3EVM
 	select USB_OTG_UTILS
 	tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)'
 	help
-- 
1.6.2.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* patch usb-musb-fix-the-nop-registration-for-omap3evm.patch added to gregkh-2.6 tree
  2009-07-29  6:28     ` Gupta, Ajay Kumar
@ 2009-07-29 14:02       ` gregkh
  0 siblings, 0 replies; 4+ messages in thread
From: gregkh @ 2009-07-29 14:02 UTC (permalink / raw)
  To: ajay.gupta, david-b, dbrownell, felipe.balbi, gregkh, linux-omap,
	talvala, tony


This is a note to let you know that I've just added the patch titled

    Subject: USB: musb: fix the nop registration for OMAP3EVM

to my gregkh-2.6 tree.  Its filename is

    usb-musb-fix-the-nop-registration-for-omap3evm.patch

This tree can be found at 
    http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/


>From ajay.gupta@ti.com  Wed Jul 29 06:50:48 2009
From: "Gupta, Ajay Kumar" <ajay.gupta@ti.com>
Date: Wed, 29 Jul 2009 11:58:57 +0530
Subject: USB: musb: fix the nop registration for OMAP3EVM
To: "gregkh@suse.de" <gregkh@suse.de>, David Brownell <david-b@pacbell.net>
Cc: <linux-omap@vger.kernel.org>, "felipe.balbi@nokia.com" <felipe.balbi@nokia.com>, "tony@atomide.com" <tony@atomide.com>, "talvala@stanford.edu" <talvala@stanford.edu>
Message-ID: <19F8576C6E063C45BE387C64729E73940432A6E035@dbde02.ent.ti.com>

OMAP3EVM uses ISP1504 phy which doesn't require any programming and
thus has to use NOP otg transceiver.

Cleanups being done:
	- Remove unwanted code in usb-musb.c file
	- Register NOP in OMAP3EVM board file using
	  usb_nop_xceiv_register().
	- Select NOP_USB_XCEIV for OMAP3EVM boards.
	- Don't enable TWL4030_USB in omap3_evm_defconfig

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Eino-Ville Talvala <talvala@stanford.edu>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/arm/configs/omap3_evm_defconfig |    2 +-
 arch/arm/mach-omap2/board-omap3evm.c |    5 +++++
 arch/arm/mach-omap2/usb-musb.c       |   21 ---------------------
 drivers/usb/musb/Kconfig             |    1 +
 4 files changed, 7 insertions(+), 22 deletions(-)

--- a/arch/arm/configs/omap3_evm_defconfig
+++ b/arch/arm/configs/omap3_evm_defconfig
@@ -1107,7 +1107,7 @@ CONFIG_USB_ZERO=m
 CONFIG_USB_OTG_UTILS=y
 # CONFIG_USB_GPIO_VBUS is not set
 # CONFIG_ISP1301_OMAP is not set
-CONFIG_TWL4030_USB=y
+# CONFIG_TWL4030_USB is not set
 # CONFIG_NOP_USB_XCEIV is not set
 CONFIG_MMC=y
 # CONFIG_MMC_DEBUG is not set
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -25,6 +25,7 @@
 #include <linux/spi/spi.h>
 #include <linux/spi/ads7846.h>
 #include <linux/i2c/twl4030.h>
+#include <linux/usb/otg.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -307,6 +308,10 @@ static void __init omap3_evm_init(void)
 				ARRAY_SIZE(omap3evm_spi_board_info));
 
 	omap_serial_init();
+#ifdef CONFIG_NOP_USB_XCEIV
+	/* OMAP3EVM uses ISP1504 phy and so register nop transceiver */
+	usb_nop_xceiv_register();
+#endif
 	usb_musb_init();
 	ads7846_dev_init();
 }
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -155,20 +155,6 @@ static struct platform_device musb_devic
 	.resource	= musb_resources,
 };
 
-#ifdef CONFIG_NOP_USB_XCEIV
-static u64 nop_xceiv_dmamask = DMA_BIT_MASK(32);
-
-static struct platform_device nop_xceiv_device = {
-	.name		= "nop_usb_xceiv",
-	.id		= -1,
-	.dev = {
-		.dma_mask		= &nop_xceiv_dmamask,
-		.coherent_dma_mask	= DMA_BIT_MASK(32),
-		.platform_data		= NULL,
-	},
-};
-#endif
-
 void __init usb_musb_init(void)
 {
 	if (cpu_is_omap243x())
@@ -183,13 +169,6 @@ void __init usb_musb_init(void)
 	 */
 	musb_plat.clock = "ick";
 
-#ifdef CONFIG_NOP_USB_XCEIV
-	if (platform_device_register(&nop_xceiv_device) < 0) {
-		printk(KERN_ERR "Unable to register NOP-XCEIV device\n");
-		return;
-	}
-#endif
-
 	if (platform_device_register(&musb_device) < 0) {
 		printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n");
 		return;
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -12,6 +12,7 @@ config USB_MUSB_HDRC
 	depends on !SUPERH
 	select NOP_USB_XCEIV if ARCH_DAVINCI
 	select TWL4030_USB if MACH_OMAP_3430SDP
+	select NOP_USB_XCEIV if MACH_OMAP3EVM
 	select USB_OTG_UTILS
 	tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)'
 	help


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-29 14:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-03  9:00 [PATCH] musb: cleanup the nop registration for OMAP3EVM Ajay Kumar Gupta
     [not found] ` <1246611626-28137-1-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2009-07-03 15:30   ` David Brownell
2009-07-29  6:28     ` Gupta, Ajay Kumar
2009-07-29 14:02       ` patch usb-musb-fix-the-nop-registration-for-omap3evm.patch added to gregkh-2.6 tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox