All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] usb: ohci-sa1111: remove machine_has_neponset()
@ 2016-08-26 16:41 Russell King
  2016-08-26 17:18 ` Alan Stern
  0 siblings, 1 reply; 5+ messages in thread
From: Russell King @ 2016-08-26 16:41 UTC (permalink / raw)
  To: linux-arm-kernel

The neponset is a daughter board for the Assabet platform, which has a
SA1111 chip on it.  If we're initialising the SA1111 OHCI, and we're
part of a neponset, the host platform must be an Assabet.

This allows us to eliminate machine_has_neponset() from this driver,
replacing it instead with machine_is_assabet(), and killing the
mach/assabet.h include.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/usb/host/ohci-sa1111.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/usb/host/ohci-sa1111.c b/drivers/usb/host/ohci-sa1111.c
index 2ac266d692a2..6dc5eaed8551 100644
--- a/drivers/usb/host/ohci-sa1111.c
+++ b/drivers/usb/host/ohci-sa1111.c
@@ -15,7 +15,6 @@
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
-#include <mach/assabet.h>
 #include <asm/hardware/sa1111.h>
 
 #ifndef CONFIG_SA1111
@@ -127,7 +126,7 @@ static int sa1111_start_hc(struct sa1111_dev *dev)
 	dev_dbg(&dev->dev, "starting SA-1111 OHCI USB Controller\n");
 
 	if (machine_is_xp860() ||
-	    machine_has_neponset() ||
+	    machine_is_assabet() ||
 	    machine_is_pfs168() ||
 	    machine_is_badge4())
 		usb_rst = USB_RESET_PWRSENSELOW | USB_RESET_PWRCTRLLOW;
-- 
2.1.0

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

* [PATCH 1/2] usb: ohci-sa1111: remove machine_has_neponset()
  2016-08-26 16:41 [PATCH 1/2] usb: ohci-sa1111: remove machine_has_neponset() Russell King
@ 2016-08-26 17:18 ` Alan Stern
  2016-08-26 18:03   ` Russell King - ARM Linux
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Stern @ 2016-08-26 17:18 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 26 Aug 2016, Russell King wrote:

> The neponset is a daughter board for the Assabet platform, which has a
> SA1111 chip on it.  If we're initialising the SA1111 OHCI, and we're
> part of a neponset, the host platform must be an Assabet.
> 
> This allows us to eliminate machine_has_neponset() from this driver,
> replacing it instead with machine_is_assabet(), and killing the
> mach/assabet.h include.

Silly question: What happens when there's an SA1111 OHCI controller on
an Assabet platform, but contained in something other than a neponset
daughterboard?

If that's a possible configuration, the test in the original driver 
would fail whereas the test in the patched driver would succeed.

Alan Stern

> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
> ---
>  drivers/usb/host/ohci-sa1111.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/host/ohci-sa1111.c b/drivers/usb/host/ohci-sa1111.c
> index 2ac266d692a2..6dc5eaed8551 100644
> --- a/drivers/usb/host/ohci-sa1111.c
> +++ b/drivers/usb/host/ohci-sa1111.c
> @@ -15,7 +15,6 @@
>  
>  #include <mach/hardware.h>
>  #include <asm/mach-types.h>
> -#include <mach/assabet.h>
>  #include <asm/hardware/sa1111.h>
>  
>  #ifndef CONFIG_SA1111
> @@ -127,7 +126,7 @@ static int sa1111_start_hc(struct sa1111_dev *dev)
>  	dev_dbg(&dev->dev, "starting SA-1111 OHCI USB Controller\n");
>  
>  	if (machine_is_xp860() ||
> -	    machine_has_neponset() ||
> +	    machine_is_assabet() ||
>  	    machine_is_pfs168() ||
>  	    machine_is_badge4())
>  		usb_rst = USB_RESET_PWRSENSELOW | USB_RESET_PWRCTRLLOW;
> 

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

* [PATCH 1/2] usb: ohci-sa1111: remove machine_has_neponset()
  2016-08-26 17:18 ` Alan Stern
@ 2016-08-26 18:03   ` Russell King - ARM Linux
  2016-08-26 18:20     ` Alan Stern
  0 siblings, 1 reply; 5+ messages in thread
From: Russell King - ARM Linux @ 2016-08-26 18:03 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Aug 26, 2016 at 01:18:25PM -0400, Alan Stern wrote:
> On Fri, 26 Aug 2016, Russell King wrote:
> 
> > The neponset is a daughter board for the Assabet platform, which has a
> > SA1111 chip on it.  If we're initialising the SA1111 OHCI, and we're
> > part of a neponset, the host platform must be an Assabet.
> > 
> > This allows us to eliminate machine_has_neponset() from this driver,
> > replacing it instead with machine_is_assabet(), and killing the
> > mach/assabet.h include.
> 
> Silly question: What happens when there's an SA1111 OHCI controller on
> an Assabet platform, but contained in something other than a neponset
> daughterboard?

It's possible that there is such a thing, but unlikely - and we have
no code in mainline to support such a configuration.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

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

* [PATCH 1/2] usb: ohci-sa1111: remove machine_has_neponset()
  2016-08-26 18:03   ` Russell King - ARM Linux
@ 2016-08-26 18:20     ` Alan Stern
  2016-08-26 18:21       ` Russell King - ARM Linux
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Stern @ 2016-08-26 18:20 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 26 Aug 2016, Russell King - ARM Linux wrote:

> On Fri, Aug 26, 2016 at 01:18:25PM -0400, Alan Stern wrote:
> > On Fri, 26 Aug 2016, Russell King wrote:
> > 
> > > The neponset is a daughter board for the Assabet platform, which has a
> > > SA1111 chip on it.  If we're initialising the SA1111 OHCI, and we're
> > > part of a neponset, the host platform must be an Assabet.
> > > 
> > > This allows us to eliminate machine_has_neponset() from this driver,
> > > replacing it instead with machine_is_assabet(), and killing the
> > > mach/assabet.h include.
> > 
> > Silly question: What happens when there's an SA1111 OHCI controller on
> > an Assabet platform, but contained in something other than a neponset
> > daughterboard?
> 
> It's possible that there is such a thing, but unlikely - and we have
> no code in mainline to support such a configuration.

In that case you can add:

Acked-by: Alan Stern <stern@rowland.harvard.edu>

to this and the 2/2 patch.

Alan Stern

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

* [PATCH 1/2] usb: ohci-sa1111: remove machine_has_neponset()
  2016-08-26 18:20     ` Alan Stern
@ 2016-08-26 18:21       ` Russell King - ARM Linux
  0 siblings, 0 replies; 5+ messages in thread
From: Russell King - ARM Linux @ 2016-08-26 18:21 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Aug 26, 2016 at 02:20:50PM -0400, Alan Stern wrote:
> On Fri, 26 Aug 2016, Russell King - ARM Linux wrote:
> 
> > On Fri, Aug 26, 2016 at 01:18:25PM -0400, Alan Stern wrote:
> > > On Fri, 26 Aug 2016, Russell King wrote:
> > > 
> > > > The neponset is a daughter board for the Assabet platform, which has a
> > > > SA1111 chip on it.  If we're initialising the SA1111 OHCI, and we're
> > > > part of a neponset, the host platform must be an Assabet.
> > > > 
> > > > This allows us to eliminate machine_has_neponset() from this driver,
> > > > replacing it instead with machine_is_assabet(), and killing the
> > > > mach/assabet.h include.
> > > 
> > > Silly question: What happens when there's an SA1111 OHCI controller on
> > > an Assabet platform, but contained in something other than a neponset
> > > daughterboard?
> > 
> > It's possible that there is such a thing, but unlikely - and we have
> > no code in mainline to support such a configuration.
> 
> In that case you can add:
> 
> Acked-by: Alan Stern <stern@rowland.harvard.edu>
> 
> to this and the 2/2 patch.

Thanks!

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

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

end of thread, other threads:[~2016-08-26 18:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-26 16:41 [PATCH 1/2] usb: ohci-sa1111: remove machine_has_neponset() Russell King
2016-08-26 17:18 ` Alan Stern
2016-08-26 18:03   ` Russell King - ARM Linux
2016-08-26 18:20     ` Alan Stern
2016-08-26 18:21       ` Russell King - ARM Linux

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.