public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: OMAP: Fix tlv320aic23.c
@ 2006-04-28 15:44 Dirk Behme
  2006-05-03 12:56 ` Tony Lindgren
  0 siblings, 1 reply; 14+ messages in thread
From: Dirk Behme @ 2006-04-28 15:44 UTC (permalink / raw)
  To: linux-omap-open-source

[-- Attachment #1: Type: text/plain, Size: 455 bytes --]


ARM: OMAP: Fix error from GCC 4.1.0:

drivers/i2c/chips/tlv320aic23.c:157: error: expected '='
before '{' token
drivers/i2c/chips/tlv320aic23.c:161: error: expected '}'
before '.' token

Signed-off-by: Dirk Behme <dirk.behme_at_gmail.com>

-- cut, comment not to go into git below --

Seems that the first part of

http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=commitdiff;h=51c0cddf5027bd4e5c1903845047d7d7e266c79b

was lost somewhere??

[-- Attachment #2: tlv320aic23_gcc_410_patch.txt --]
[-- Type: text/plain, Size: 362 bytes --]

--- ./drivers/i2c/chips/tlv320aic23.c_orig	2006-04-28 17:29:49.000000000 +0200
+++ ./drivers/i2c/chips/tlv320aic23.c	2006-04-28 17:30:55.000000000 +0200
@@ -154,7 +154,7 @@ static int aic23_attach_adapter(struct i
 }
 
 static struct i2c_driver aic23_driver = {
-	.driver {
+	.driver = {
 		.name	= "OMAP+TLV320AIC23 codec",
 		/*.flags	= I2C_DF_NOTIFY,*/
 	},


[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH] ARM: OMAP: Fix tlv320aic23.c
  2006-04-28 15:44 [PATCH] ARM: OMAP: Fix tlv320aic23.c Dirk Behme
@ 2006-05-03 12:56 ` Tony Lindgren
  2006-05-03 18:41   ` Dirk Behme
  2006-05-03 19:42   ` [PATCH] ARM: OMAP: Fix tlv320aic23.c lamikr
  0 siblings, 2 replies; 14+ messages in thread
From: Tony Lindgren @ 2006-05-03 12:56 UTC (permalink / raw)
  To: Dirk Behme; +Cc: linux-omap-open-source

* Dirk Behme <dirk.behme@googlemail.com> [060428 08:45]:
> 
> ARM: OMAP: Fix error from GCC 4.1.0:
> 
> drivers/i2c/chips/tlv320aic23.c:157: error: expected '='
> before '{' token
> drivers/i2c/chips/tlv320aic23.c:161: error: expected '}'
> before '.' token
> 
> Signed-off-by: Dirk Behme <dirk.behme_at_gmail.com>
> 
> -- cut, comment not to go into git below --
> 
> Seems that the first part of
> 
> http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=commitdiff;h=51c0cddf5027bd4e5c1903845047d7d7e266c79b
> 
> was lost somewhere??

> --- ./drivers/i2c/chips/tlv320aic23.c_orig	2006-04-28 17:29:49.000000000 +0200
> +++ ./drivers/i2c/chips/tlv320aic23.c	2006-04-28 17:30:55.000000000 +0200
> @@ -154,7 +154,7 @@ static int aic23_attach_adapter(struct i
>  }
>  
>  static struct i2c_driver aic23_driver = {
> -	.driver {
> +	.driver = {
>  		.name	= "OMAP+TLV320AIC23 codec",
>  		/*.flags	= I2C_DF_NOTIFY,*/
>  	},
> 

Thanks, pushed your patch.

I think the earlier patch chunk has gotten auto-hosed by git merge in
Juha's recent merge:

http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=commit;h=330c1eb9a689973326cdece277d0b4b409833bb9

Mika & Dirk, can you guys check if some of the other audio files got
hosed or some old audio files got added back?

Regards,

Tony

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

* Re: [PATCH] ARM: OMAP: Fix tlv320aic23.c
  2006-05-03 12:56 ` Tony Lindgren
@ 2006-05-03 18:41   ` Dirk Behme
  2006-05-04 14:51     ` David Brownell
  2006-05-03 19:42   ` [PATCH] ARM: OMAP: Fix tlv320aic23.c lamikr
  1 sibling, 1 reply; 14+ messages in thread
From: Dirk Behme @ 2006-05-03 18:41 UTC (permalink / raw)
  To: Tony Lindgren, linux-omap-open-source

Tony Lindgren wrote:
> * Dirk Behme <dirk.behme@googlemail.com> [060428 08:45]:
>>Seems that the first part of
>>
>>http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=commitdiff;h=51c0cddf5027bd4e5c1903845047d7d7e266c79b
>>
>>was lost somewhere??
...
> Thanks, pushed your patch.
> 
> I think the earlier patch chunk has gotten auto-hosed by git merge in
> Juha's recent merge:
> 
> http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=commit;h=330c1eb9a689973326cdece277d0b4b409833bb9
> 
> Mika & Dirk, can you guys check if some of the other audio files got
> hosed or some old audio files got added back?

Mmmh, seems that something is going on here I don't
understand completely ;(

While building modules with most recent git I get two
warnings (or better errors, modules are not build):

WARNING: "tlv320aic23_write_value"
[sound/arm/omap/snd-omap-alsa-aic23.ko] undefined!
WARNING: "usb_disconnect" [drivers/usb/host/ohci-hcd.ko]
undefined!

Not sure if USB is OMAP related, but aic is. Looking at

http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=blobdiff;h=fac8d6b7518032f54869cc309328e812e16892be;hp=7fdd1d3608b2c41141901acff4b79df27b0f53df;hb=51c0cddf5027bd4e5c1903845047d7d7e266c79b;f=drivers/i2c/chips/tlv320aic23.c

shows that from function names and variables 'tlv320' was
removed. However, commitdiff only shows the small (correct)
patch.

Patch in seperate mail.

Any ideas about USB? Seems that it comes from
drivers/usb/host/ohci-omap.c

Regards

Dirk

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

* Re: [PATCH] ARM: OMAP: Fix tlv320aic23.c
  2006-05-03 12:56 ` Tony Lindgren
  2006-05-03 18:41   ` Dirk Behme
@ 2006-05-03 19:42   ` lamikr
  1 sibling, 0 replies; 14+ messages in thread
From: lamikr @ 2006-05-03 19:42 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-omap-open-source


>Thanks, pushed your patch.
>
>I think the earlier patch chunk has gotten auto-hosed by git merge in
>Juha's recent merge:
>
>http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=commit;h=330c1eb9a689973326cdece277d0b4b409833bb9
>
>Mika & Dirk, can you guys check if some of the other audio files got
>hosed or some old audio files got added back?
>  
>
I think the sound/arm/omap-aic23.h has appeared as a resulf of that and
can be removed. The new version is nowadays in
sound/arm/omap/omap-alsa-aic23.h

Mika

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

* Re: [PATCH] ARM: OMAP: Fix tlv320aic23.c
  2006-05-03 18:41   ` Dirk Behme
@ 2006-05-04 14:51     ` David Brownell
  2006-05-04 16:08       ` Undefined usb_disconnect, was " Dirk Behme
  0 siblings, 1 reply; 14+ messages in thread
From: David Brownell @ 2006-05-04 14:51 UTC (permalink / raw)
  To: linux-omap-open-source

On Wednesday 03 May 2006 11:41 am, Dirk Behme wrote:

> WARNING: "usb_disconnect" [drivers/usb/host/ohci-hcd.ko]
> undefined!

Of course, it hasn't been exported for a while now.


> ...
> 
> Any ideas about USB? Seems that it comes from
> drivers/usb/host/ohci-omap.c

I see a curious and pointless routine, ohci_omap_host_enable(), which
isn't called from anywhere I can see, which wants usb_disconnect().

Try deleting that routine.

- Dave

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

* Undefined usb_disconnect, was [PATCH] ARM: OMAP: Fix tlv320aic23.c
  2006-05-04 14:51     ` David Brownell
@ 2006-05-04 16:08       ` Dirk Behme
  2006-05-04 16:32         ` David Brownell
  0 siblings, 1 reply; 14+ messages in thread
From: Dirk Behme @ 2006-05-04 16:08 UTC (permalink / raw)
  To: David Brownell; +Cc: linux-omap-open-source

David Brownell wrote:
> On Wednesday 03 May 2006 11:41 am, Dirk Behme wrote:
> 
>>WARNING: "usb_disconnect" [drivers/usb/host/ohci-hcd.ko]
>>undefined!
> 
> Of course, it hasn't been exported for a while now.
>>
>>Any ideas about USB? Seems that it comes from
>>drivers/usb/host/ohci-omap.c
> 
> I see a curious and pointless routine, ohci_omap_host_enable(), which
> isn't called from anywhere I can see, which wants usb_disconnect().
> 
> Try deleting that routine.

tahvo-usb.c uses ohci_omap_host_enable():

./drivers/cbus/tahvo-usb.c:88:extern int 
ohci_omap_host_enable(struct usb_bus *host, int enable);
./drivers/cbus/tahvo-usb.c:248: 
ohci_omap_host_enable(tu->otg.host, 1);
./drivers/cbus/tahvo-usb.c:266: 
ohci_omap_host_enable(tu->otg.host, 0);
./drivers/cbus/tahvo-usb.c:300: 
ohci_omap_host_enable(tu->otg.host, 0);
./drivers/cbus/tahvo-usb.c:338: 
ohci_omap_host_enable(tu->otg.host, 0);
./drivers/cbus/tahvo-usb.c:431: ohci_omap_host_enable(host, 0);

Regards

Dirk

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

* Re: Undefined usb_disconnect, was [PATCH] ARM: OMAP: Fix tlv320aic23.c
  2006-05-04 16:08       ` Undefined usb_disconnect, was " Dirk Behme
@ 2006-05-04 16:32         ` David Brownell
  2006-05-05  4:50           ` Undefined usb_disconnect Dirk Behme
  0 siblings, 1 reply; 14+ messages in thread
From: David Brownell @ 2006-05-04 16:32 UTC (permalink / raw)
  To: Dirk Behme; +Cc: linux-omap-open-source

On Thursday 04 May 2006 9:08 am, Dirk Behme wrote:
> David Brownell wrote:
> > On Wednesday 03 May 2006 11:41 am, Dirk Behme wrote:

> > I see a curious and pointless routine, ohci_omap_host_enable(), which
> > isn't called from anywhere I can see, which wants usb_disconnect().
> > 
> > Try deleting that routine.
> 
> tahvo-usb.c uses ohci_omap_host_enable():

And so it does.  That would be a bug in how the Tahvo transceiver is
trying to activate the USB host.  It should be able to just use
the normal power management suspend and resume calls... certainly
there's no benefit to creating transceiver-specific backdoors into
usbcore for runtime PM.

- Dave

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

* Re: Undefined usb_disconnect
  2006-05-04 16:32         ` David Brownell
@ 2006-05-05  4:50           ` Dirk Behme
  2006-05-05  8:08             ` Hiroshi DOYU
  0 siblings, 1 reply; 14+ messages in thread
From: Dirk Behme @ 2006-05-05  4:50 UTC (permalink / raw)
  To: linux-omap-open-source

David Brownell wrote:
> On Thursday 04 May 2006 9:08 am, Dirk Behme wrote:
>>David Brownell wrote:
>>>On Wednesday 03 May 2006 11:41 am, Dirk Behme wrote:
>>>I see a curious and pointless routine, ohci_omap_host_enable(), which
>>>isn't called from anywhere I can see, which wants usb_disconnect().
>>>
>>>Try deleting that routine.
>>
>>tahvo-usb.c uses ohci_omap_host_enable():
> 
> And so it does.  That would be a bug in how the Tahvo transceiver is
> trying to activate the USB host.  It should be able to just use
> the normal power management suspend and resume calls... certainly
> there's no benefit to creating transceiver-specific backdoors into
> usbcore for runtime PM.

Anybody like to fix and test tahvo-usb.c regarding this? 
Then we could remove ohci_omap_host_enable() from 
drivers/usb/host/ohci-omap.c .

Cheers

Dirk

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

* Re: Undefined usb_disconnect
  2006-05-05  4:50           ` Undefined usb_disconnect Dirk Behme
@ 2006-05-05  8:08             ` Hiroshi DOYU
  2006-05-27  6:38               ` Dirk Behme
  0 siblings, 1 reply; 14+ messages in thread
From: Hiroshi DOYU @ 2006-05-05  8:08 UTC (permalink / raw)
  To: ext Dirk Behme; +Cc: linux-omap-open-source

Hi all,

On Fri, 05 May 2006 06:50:11 +0200
"ext Dirk Behme" <dirk.behme@googlemail.com> wrote:

> David Brownell wrote:
> > On Thursday 04 May 2006 9:08 am, Dirk Behme wrote:
> >>David Brownell wrote:
> >>>On Wednesday 03 May 2006 11:41 am, Dirk Behme wrote:
> >>>I see a curious and pointless routine, ohci_omap_host_enable(), which
> >>>isn't called from anywhere I can see, which wants usb_disconnect().
> >>>
> >>>Try deleting that routine.
> >>
> >>tahvo-usb.c uses ohci_omap_host_enable():
> > 
> > And so it does.  That would be a bug in how the Tahvo transceiver is
> > trying to activate the USB host.  It should be able to just use
> > the normal power management suspend and resume calls... certainly
> > there's no benefit to creating transceiver-specific backdoors into
> > usbcore for runtime PM.
> 
> Anybody like to fix and test tahvo-usb.c regarding this? 
> Then we could remove ohci_omap_host_enable() from 
> drivers/usb/host/ohci-omap.c .

I will work on this, because we need this feature.

        Hiroshi DOYU

> 
> Cheers
> 
> Dirk
> _______________________________________________
> Linux-omap-open-source mailing list
> Linux-omap-open-source@linux.omap.com
> http://linux.omap.com/mailman/listinfo/linux-omap-open-source

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

* Re: Undefined usb_disconnect
  2006-05-05  8:08             ` Hiroshi DOYU
@ 2006-05-27  6:38               ` Dirk Behme
  2006-05-27 15:43                 ` David Brownell
  0 siblings, 1 reply; 14+ messages in thread
From: Dirk Behme @ 2006-05-27  6:38 UTC (permalink / raw)
  To: linux-omap-open-source; +Cc: Hiroshi DOYU

Hi,

with recent git I still get

WARNING: "usb_disconnect" [drivers/usb/host/ohci-hcd.ko] 
undefined!

What's about the patch

http://linux.omap.com/pipermail/linux-omap-open-source/2006-May/007071.html

to be able to remove this?

Best regards

Dirk

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

* Re: Undefined usb_disconnect
  2006-05-27  6:38               ` Dirk Behme
@ 2006-05-27 15:43                 ` David Brownell
  2006-05-28 13:21                   ` Dirk Behme
  2006-07-04  8:20                   ` tony
  0 siblings, 2 replies; 14+ messages in thread
From: David Brownell @ 2006-05-27 15:43 UTC (permalink / raw)
  To: linux-omap-open-source; +Cc: Hiroshi DOYU

[-- Attachment #1: Type: text/plain, Size: 282 bytes --]

On Friday 26 May 2006 11:38 pm, Dirk Behme wrote:
> Hi,
> 
> with recent git I still get
> 
> WARNING: "usb_disconnect" [drivers/usb/host/ohci-hcd.ko] 
> undefined!

Try the attached patch instead ... it fixes some other glitches
in the OMAP bus glue, as well as those.

- Dave





[-- Attachment #2: ohci-omap.patch --]
[-- Type: text/x-diff, Size: 8626 bytes --]

Various fixes for the OHCI OMAP glue:

 - Properly use the usbcore HCD lifecycle entry points

 - Remove calls to non-exported usbcore routines.

 - Stop inappropriate export of some bus glue calls

Plus remove some extra whitespace.

Index: osk/drivers/usb/host/ohci-omap.c
===================================================================
--- osk.orig/drivers/usb/host/ohci-omap.c	2006-05-12 17:53:41.000000000 -0700
+++ osk/drivers/usb/host/ohci-omap.c	2006-05-12 17:53:55.000000000 -0700
@@ -4,7 +4,7 @@
  * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
  * (C) Copyright 2000-2005 David Brownell
  * (C) Copyright 2002 Hewlett-Packard Company
- * 
+ *
  * OMAP Bus Glue
  *
  * Modified for OMAP by Tony Lindgren <tony@atomide.com>
@@ -92,14 +92,14 @@ static int omap_ohci_transceiver_power(i
 	if (on) {
 		if (machine_is_omap_innovator() && cpu_is_omap1510())
 			fpga_write(fpga_read(INNOVATOR_FPGA_CAM_USB_CONTROL)
-				| ((1 << 5/*usb1*/) | (1 << 3/*usb2*/)), 
+				| ((1 << 5/*usb1*/) | (1 << 3/*usb2*/)),
 			       INNOVATOR_FPGA_CAM_USB_CONTROL);
 		else if (machine_is_omap_osk())
 			tps65010_set_gpio_out_value(GPIO1, LOW);
 	} else {
 		if (machine_is_omap_innovator() && cpu_is_omap1510())
 			fpga_write(fpga_read(INNOVATOR_FPGA_CAM_USB_CONTROL)
-				& ~((1 << 5/*usb1*/) | (1 << 3/*usb2*/)), 
+				& ~((1 << 5/*usb1*/) | (1 << 3/*usb2*/)),
 			       INNOVATOR_FPGA_CAM_USB_CONTROL);
 		else if (machine_is_omap_osk())
 			tps65010_set_gpio_out_value(GPIO1, HIGH);
@@ -127,8 +127,8 @@ static int omap_1510_local_bus_power(int
 /*
  * OMAP-1510 specific Local Bus initialization
  * NOTE: This assumes 32MB memory size in OMAP1510LB_MEMSIZE.
- *       See also arch/mach-omap/memory.h for __virt_to_dma() and 
- *       __dma_to_virt() which need to match with the physical 
+ *       See also arch/mach-omap/memory.h for __virt_to_dma() and
+ *       __dma_to_virt() which need to match with the physical
  *       Local Bus address below.
  */
 static int omap_1510_local_bus_init(void)
@@ -136,7 +136,7 @@ static int omap_1510_local_bus_init(void
 	unsigned int tlb;
 	unsigned long lbaddr, physaddr;
 
-	omap_writel((omap_readl(OMAP1510_LB_CLOCK_DIV) & 0xfffffff8) | 0x4, 
+	omap_writel((omap_readl(OMAP1510_LB_CLOCK_DIV) & 0xfffffff8) | 0x4,
 	       OMAP1510_LB_CLOCK_DIV);
 
 	/* Configure the Local Bus MMU table */
@@ -144,7 +144,7 @@ static int omap_1510_local_bus_init(void
 		lbaddr = tlb * 0x00100000 + OMAP1510_LB_OFFSET;
 		physaddr = tlb * 0x00100000 + PHYS_OFFSET;
 		omap_writel((lbaddr & 0x0fffffff) >> 22, OMAP1510_LB_MMU_CAM_H);
-		omap_writel(((lbaddr & 0x003ffc00) >> 6) | 0xc, 
+		omap_writel(((lbaddr & 0x003ffc00) >> 6) | 0xc,
 		       OMAP1510_LB_MMU_CAM_L);
 		omap_writel(physaddr >> 16, OMAP1510_LB_MMU_RAM_H);
 		omap_writel((physaddr & 0x0000fc00) | 0x300, OMAP1510_LB_MMU_RAM_L);
@@ -183,13 +183,14 @@ static void start_hnp(struct ohci_hcd *o
 
 /*-------------------------------------------------------------------------*/
 
-static int omap_start_hc(struct ohci_hcd *ohci, struct platform_device *pdev)
+static int ohci_omap_init(struct usb_hcd *hcd)
 {
-	struct omap_usb_config	*config = pdev->dev.platform_data;
+	struct ohci_hcd		*ohci = hcd_to_ohci(hcd);
+	struct omap_usb_config	*config = hcd->self.controller->platform_data;
 	int			need_transceiver = (config->otg != 0);
 	int			ret;
 
-	dev_dbg(&pdev->dev, "starting USB Controller\n");
+	dev_dbg(hcd->self.controller, "starting USB Controller\n");
 
 	if (config->otg) {
 		ohci_to_hcd(ohci)->self.otg_port = config->otg;
@@ -210,7 +211,7 @@ static int omap_start_hc(struct ohci_hcd
 		if (ohci->transceiver) {
 			int	status = otg_set_host(ohci->transceiver,
 						&ohci_to_hcd(ohci)->self);
-			dev_dbg(&pdev->dev, "init %s transceiver, status %d\n",
+			dev_dbg(hcd->self.controller, "init %s transceiver, status %d\n",
 					ohci->transceiver->label, status);
 			if (status) {
 				if (ohci->transceiver)
@@ -218,7 +219,7 @@ static int omap_start_hc(struct ohci_hcd
 				return status;
 			}
 		} else {
-			dev_err(&pdev->dev, "can't find transceiver\n");
+			dev_err(hcd->self.controller, "can't find transceiver\n");
 			return -ENODEV;
 		}
 	}
@@ -270,58 +271,15 @@ static int omap_start_hc(struct ohci_hcd
 	return 0;
 }
 
-static void omap_stop_hc(struct platform_device *pdev)
+static void ohci_omap_stop(struct usb_hcd *hcd)
 {
-	dev_dbg(&pdev->dev, "stopping USB Controller\n");
+	dev_dbg(hcd->self.controller, "stopping USB Controller\n");
 	omap_ohci_clock_power(0);
 }
 
 
 /*-------------------------------------------------------------------------*/
 
-void usb_hcd_omap_remove (struct usb_hcd *, struct platform_device *);
-
-/* configure so an HC device and id are always provided */
-/* always called with process context; sleeping is OK */
-
-
-int ohci_omap_host_enable(struct usb_bus *host, int enable)
-{
-	struct usb_hcd *hcd;
-	struct ohci_hcd *ohci;
-	int retval;
-
-	if (host_enabled == enable)
-		return 0;
-
-	host_enabled = enable;
-
-	if (!host_initialized)
-		return 0;
-
-	hcd = (struct usb_hcd *)host->hcpriv;
-	ohci = hcd_to_ohci(hcd);
-	if (enable) {
-		omap_ohci_clock_power(1);
-		if ((retval = ohci_init(ohci)) < 0) {
-			dev_err(hcd->self.controller, "init error %d\n",
-				retval);
-			return retval;
-		}
-		if ((retval = hcd->driver->start(hcd)) < 0) {
-			dev_err(hcd->self.controller, "startup error %d\n",
-				retval);
-			return retval;
-		}
-	} else {
-		usb_disconnect(&hcd->self.root_hub);
-		hcd->driver->stop(hcd);
-		omap_ohci_clock_power(0);
-	}
-
-	return 0;
-}
-
 /**
  * usb_hcd_omap_probe - initialize OMAP-based HCDs
  * Context: !in_interrupt()
@@ -330,7 +288,7 @@ int ohci_omap_host_enable(struct usb_bus
  * then invokes the start() method for the HCD associated with it
  * through the hotplug entry's driver_data.
  */
-int usb_hcd_omap_probe (const struct hc_driver *driver,
+static int usb_hcd_omap_probe (const struct hc_driver *driver,
 			  struct platform_device *pdev)
 {
 	int retval, irq;
@@ -338,12 +296,12 @@ int usb_hcd_omap_probe (const struct hc_
 	struct ohci_hcd *ohci;
 
 	if (pdev->num_resources != 2) {
-		printk(KERN_ERR "hcd probe: invalid num_resources: %i\n", 
+		printk(KERN_ERR "hcd probe: invalid num_resources: %i\n",
 		       pdev->num_resources);
 		return -ENODEV;
 	}
 
-	if (pdev->resource[0].flags != IORESOURCE_MEM 
+	if (pdev->resource[0].flags != IORESOURCE_MEM
 			|| pdev->resource[1].flags != IORESOURCE_IRQ) {
 		printk(KERN_ERR "hcd probe: invalid resource type\n");
 		return -ENODEV;
@@ -386,10 +344,6 @@ int usb_hcd_omap_probe (const struct hc_
 	host_initialized = 0;
 	host_enabled = 1;
 
-	retval = omap_start_hc(ohci, pdev);
-	if (retval < 0)
-		goto err2;
-
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {
 		retval = -ENXIO;
@@ -397,7 +351,7 @@ int usb_hcd_omap_probe (const struct hc_
 	}
 	retval = usb_add_hcd(hcd, irq, SA_INTERRUPT);
 	if (retval)
-		goto err3;
+		goto err2;
 
 	host_initialized = 1;
 
@@ -405,8 +359,6 @@ int usb_hcd_omap_probe (const struct hc_
 		omap_ohci_clock_power(0);
 
 	return 0;
-err3:
-	omap_stop_hc(pdev);
 err2:
 	release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
 err1:
@@ -428,14 +380,19 @@ err0:
  * Reverses the effect of usb_hcd_omap_probe(), first invoking
  * the HCD's stop() method.  It is always called from a thread
  * context, normally "rmmod", "apmd", or something similar.
- *
  */
-void usb_hcd_omap_remove (struct usb_hcd *hcd, struct platform_device *pdev)
+static inline void
+usb_hcd_omap_remove (struct usb_hcd *hcd, struct platform_device *pdev)
 {
+	struct ohci_hcd		*ohci = hcd_to_ohci (hcd);
+
 	usb_remove_hcd(hcd);
+	if (ohci->transceiver) {
+		(void) otg_set_host(ohci->transceiver, 0);
+		put_device(ohci->transceiver->dev);
+	}
 	if (machine_is_omap_osk())
 		omap_free_gpio(9);
-	omap_stop_hc(pdev);
 	release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
 	usb_put_hcd(hcd);
 	clk_put(usb_dc_ck);
@@ -481,8 +438,9 @@ static const struct hc_driver ohci_omap_
 	/*
 	 * basic lifecycle operations
 	 */
+	.reset =		ohci_omap_init,
 	.start =		ohci_omap_start,
-	.stop =			ohci_stop,
+	.stop =			ohci_omap_stop,
 
 	/*
 	 * managing i/o requests and associated device resources
@@ -519,13 +477,8 @@ static int ohci_hcd_omap_drv_probe(struc
 static int ohci_hcd_omap_drv_remove(struct platform_device *dev)
 {
 	struct usb_hcd		*hcd = platform_get_drvdata(dev);
-	struct ohci_hcd		*ohci = hcd_to_ohci (hcd);
 
 	usb_hcd_omap_remove(hcd, dev);
-	if (ohci->transceiver) {
-		(void) otg_set_host(ohci->transceiver, 0);
-		put_device(ohci->transceiver->dev);
-	}
 	platform_set_drvdata(dev, NULL);
 
 	return 0;

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



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

* Re: Undefined usb_disconnect
  2006-05-27 15:43                 ` David Brownell
@ 2006-05-28 13:21                   ` Dirk Behme
  2006-05-28 16:17                     ` David Brownell
  2006-07-04  8:20                   ` tony
  1 sibling, 1 reply; 14+ messages in thread
From: Dirk Behme @ 2006-05-28 13:21 UTC (permalink / raw)
  To: David Brownell, linux-omap-open-source; +Cc: Hiroshi DOYU

David Brownell wrote:
> On Friday 26 May 2006 11:38 pm, Dirk Behme wrote:
> 
>>Hi,
>>
>>with recent git I still get
>>
>>WARNING: "usb_disconnect" [drivers/usb/host/ohci-hcd.ko] 
>>undefined!
> 
> 
> Try the attached patch instead ... it fixes some other glitches
> in the OMAP bus glue, as well as those.

Okay, hanks for the patch! I think we should apply it until

http://linux.omap.com/pipermail/linux-omap-open-source/2006-May/007071.html

is reworked and ready for inclusion.

Thanks

Dirk

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

* Re: Undefined usb_disconnect
  2006-05-28 13:21                   ` Dirk Behme
@ 2006-05-28 16:17                     ` David Brownell
  0 siblings, 0 replies; 14+ messages in thread
From: David Brownell @ 2006-05-28 16:17 UTC (permalink / raw)
  To: Dirk Behme; +Cc: Hiroshi DOYU, linux-omap-open-source

On Sunday 28 May 2006 6:21 am, Dirk Behme wrote:
> Okay, hanks for the patch! I think we should apply it until
> 
> http://linux.omap.com/pipermail/linux-omap-open-source/2006-May/007071.html
> 
> is reworked and ready for inclusion.

I think it should be applied, and some Tahvo-specific stuff applied
on top of it.  Notice how the OHCI-specific bits in my patch were a
superset of the patch from Hiroshi ...

- Dave

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

* Re: Undefined usb_disconnect
  2006-05-27 15:43                 ` David Brownell
  2006-05-28 13:21                   ` Dirk Behme
@ 2006-07-04  8:20                   ` tony
  1 sibling, 0 replies; 14+ messages in thread
From: tony @ 2006-07-04  8:20 UTC (permalink / raw)
  To: David Brownell; +Cc: Hiroshi DOYU, linux-omap-open-source

* David Brownell <david-b@pacbell.net> [060527 08:44]:
> On Friday 26 May 2006 11:38 pm, Dirk Behme wrote:
> > Hi,
> > 
> > with recent git I still get
> > 
> > WARNING: "usb_disconnect" [drivers/usb/host/ohci-hcd.ko] 
> > undefined!
> 
> Try the attached patch instead ... it fixes some other glitches
> in the OMAP bus glue, as well as those.
> 
> - Dave
> 
> 
> 
> 

> Various fixes for the OHCI OMAP glue:
> 
>  - Properly use the usbcore HCD lifecycle entry points
> 
>  - Remove calls to non-exported usbcore routines.
> 
>  - Stop inappropriate export of some bus glue calls
> 
> Plus remove some extra whitespace.

<snip>

I'll push this today slightly updated. Sorry, I should have pushed
this earlier.

Dave, I assume you will eventually send this upstream through your
USB channels so I did not tag this as a ARM: OMAP: patch.

Regards,

Tony

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

end of thread, other threads:[~2006-07-04  8:20 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-28 15:44 [PATCH] ARM: OMAP: Fix tlv320aic23.c Dirk Behme
2006-05-03 12:56 ` Tony Lindgren
2006-05-03 18:41   ` Dirk Behme
2006-05-04 14:51     ` David Brownell
2006-05-04 16:08       ` Undefined usb_disconnect, was " Dirk Behme
2006-05-04 16:32         ` David Brownell
2006-05-05  4:50           ` Undefined usb_disconnect Dirk Behme
2006-05-05  8:08             ` Hiroshi DOYU
2006-05-27  6:38               ` Dirk Behme
2006-05-27 15:43                 ` David Brownell
2006-05-28 13:21                   ` Dirk Behme
2006-05-28 16:17                     ` David Brownell
2006-07-04  8:20                   ` tony
2006-05-03 19:42   ` [PATCH] ARM: OMAP: Fix tlv320aic23.c lamikr

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