Re: [PATCH 3/3] USB: ohci-jz4740: Remove obsolete driver

2016-05-13 Thread Ralf Baechle
Maarten,

if you submit a USB change to the USB mailing list and maintainer the
probability for the maintainer to ack this patch will actuall rise
significantly ;-)

Greg, I assume this patch is ok to merge or do you want to funnel it
hrough your tree?  I think it would be good to take this through the
MIPS tree together with the remainder of the series.

  Ralf

On Mon, Apr 18, 2016 at 08:58:53PM +0200, Maarten ter Huurne wrote:

> The ohci-platform driver can control the clock, while usb-nop-xceiv
> as the PHY can control the vbus regulator. So this JZ4740-specific
> glue is not needed anymore.
> 
> Signed-off-by: Maarten ter Huurne 
> ---
>  drivers/usb/host/ohci-hcd.c|   5 -
>  drivers/usb/host/ohci-jz4740.c | 245 
> -
>  2 files changed, 250 deletions(-)
>  delete mode 100644 drivers/usb/host/ohci-jz4740.c
> 
> diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
> index 04dcedf..0449235 100644
> --- a/drivers/usb/host/ohci-hcd.c
> +++ b/drivers/usb/host/ohci-hcd.c
> @@ -1245,11 +1245,6 @@ MODULE_LICENSE ("GPL");
>  #define TMIO_OHCI_DRIVER ohci_hcd_tmio_driver
>  #endif
>  
> -#ifdef CONFIG_MACH_JZ4740
> -#include "ohci-jz4740.c"
> -#define PLATFORM_DRIVER  ohci_hcd_jz4740_driver
> -#endif
> -
>  #ifdef CONFIG_TILE_USB
>  #include "ohci-tilegx.c"
>  #define PLATFORM_DRIVER  ohci_hcd_tilegx_driver
> diff --git a/drivers/usb/host/ohci-jz4740.c b/drivers/usb/host/ohci-jz4740.c
> deleted file mode 100644
> index 4db78f1..000
> --- a/drivers/usb/host/ohci-jz4740.c
> +++ /dev/null
> @@ -1,245 +0,0 @@
> -/*
> - *  Copyright (C) 2010, Lars-Peter Clausen 
> - *
> - *  This program is free software; you can redistribute it and/or modify it
> - *  under  the terms of the GNU General  Public License as published by the
> - *  Free Software Foundation;  either version 2 of the License, or (at your
> - *  option) any later version.
> - *
> - *  You should have received a copy of the  GNU General Public License along
> - *  with this program; if not, write  to the Free Software Foundation, Inc.,
> - *  675 Mass Ave, Cambridge, MA 02139, USA.
> - *
> - */
> -
> -#include 
> -#include 
> -#include 
> -
> -struct jz4740_ohci_hcd {
> - struct ohci_hcd ohci_hcd;
> -
> - struct regulator *vbus;
> - bool vbus_enabled;
> - struct clk *clk;
> -};
> -
> -static inline struct jz4740_ohci_hcd *hcd_to_jz4740_hcd(struct usb_hcd *hcd)
> -{
> - return (struct jz4740_ohci_hcd *)(hcd->hcd_priv);
> -}
> -
> -static inline struct usb_hcd *jz4740_hcd_to_hcd(struct jz4740_ohci_hcd 
> *jz4740_ohci)
> -{
> - return container_of((void *)jz4740_ohci, struct usb_hcd, hcd_priv);
> -}
> -
> -static int ohci_jz4740_start(struct usb_hcd *hcd)
> -{
> - struct ohci_hcd *ohci = hcd_to_ohci(hcd);
> - int ret;
> -
> - ret = ohci_init(ohci);
> - if (ret < 0)
> - return ret;
> -
> - ohci->num_ports = 1;
> -
> - ret = ohci_run(ohci);
> - if (ret < 0) {
> - dev_err(hcd->self.controller, "Can not start %s",
> - hcd->self.bus_name);
> - ohci_stop(hcd);
> - return ret;
> - }
> - return 0;
> -}
> -
> -static int ohci_jz4740_set_vbus_power(struct jz4740_ohci_hcd *jz4740_ohci,
> - bool enabled)
> -{
> - int ret = 0;
> -
> - if (!jz4740_ohci->vbus)
> - return 0;
> -
> - if (enabled && !jz4740_ohci->vbus_enabled) {
> - ret = regulator_enable(jz4740_ohci->vbus);
> - if (ret)
> - dev_err(jz4740_hcd_to_hcd(jz4740_ohci)->self.controller,
> - "Could not power vbus\n");
> - } else if (!enabled && jz4740_ohci->vbus_enabled) {
> - ret = regulator_disable(jz4740_ohci->vbus);
> - }
> -
> - if (ret == 0)
> - jz4740_ohci->vbus_enabled = enabled;
> -
> - return ret;
> -}
> -
> -static int ohci_jz4740_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 
> wValue,
> - u16 wIndex, char *buf, u16 wLength)
> -{
> - struct jz4740_ohci_hcd *jz4740_ohci = hcd_to_jz4740_hcd(hcd);
> - int ret = 0;
> -
> - switch (typeReq) {
> - case SetPortFeature:
> - if (wValue == USB_PORT_FEAT_POWER)
> - ret = ohci_jz4740_set_vbus_power(jz4740_ohci, true);
> - break;
> - case ClearPortFeature:
> - if (wValue == USB_PORT_FEAT_POWER)
> - ret = ohci_jz4740_set_vbus_power(jz4740_ohci, false);
> - break;
> - }
> -
> - if (ret)
> - return ret;
> -
> - return ohci_hub_control(hcd, typeReq, wValue, wIndex, buf, wLength);
> -}
> -
> -
> -static const struct hc_driver ohci_jz4740_hc_driver = {
> - .description =  hcd_name,
> - .product_desc = "JZ4740 OHCI",
> - .hcd_priv_size =sizeof(struct jz4740_ohci_hcd),
> -
> - /*
> -  * generic hardware linkage
> -  */
> - .irq =  

Re: [PATCH 1/2 resend] USB: host: Remove hard-coded octeon platform information for ehci/ohci

2014-12-15 Thread Ralf Baechle
On Mon, Dec 15, 2014 at 02:28:41PM +0100, Andreas Herrmann wrote:

> Instead rely on device tree information for ehci and ohci.
> 
> This was suggested with
> http://www.linux-mips.org/archives/linux-mips/2014-05/msg00307.html

Please use the permanent link from that page:

  
http://www.linux-mips.org/cgi-bin/mesg.cgi?a=linux-mips&i=1401358203-60225-4-git-send-email-alex.smith%40imgtec.com

The non-permanent links might change.

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


Re: [PATCH 2/3] USB: host: Remove hard-coded octeon platform information for ehci/ohci

2014-11-14 Thread Ralf Baechle
On Thu, Nov 13, 2014 at 10:36:29PM +0100, Andreas Herrmann wrote:

> Instead rely on device tree information for ehci and ohci.
> 
> This was suggested with
> http://www.linux-mips.org/archives/linux-mips/2014-05/msg00307.html
> 
>   "The device tree will *always* have correct ehci/ohci clock
>   configuration, so use it.  This allows us to remove a big chunk of
>   platform configuration code from octeon-platform.c."
> 
> More or less I rebased that patch on Alan's work to remove ehci-octeon
> and ohci-octeon drivers.
> 
> Cc: David Daney 
> Cc: Alex Smith 
> Cc: Alan Stern 
> Signed-off-by: Andreas Herrmann 

For the MIPS bits:

Acked-by: Ralf Baechle 

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


Re: [PATCH 1/3] USB: host: Remove ehci-octeon and ohci-octeon drivers

2014-11-14 Thread Ralf Baechle
On Thu, Nov 13, 2014 at 10:36:28PM +0100, Andreas Herrmann wrote:

> From: Alan Stern 
> 
> From: Alan Stern 

Is there an echo?

Is there an echo?

> Remove special-purpose octeon drivers and instead use ehci-platform
> and ohci-platform as suggested with
> http://marc.info/?l=linux-mips&m=140139694721623&w=2
> 
> [andreas.herrmann:
>   fixed compile error]
> 
> Cc: David Daney 
> Cc: Alex Smith 
> Cc: Alan Stern 
> Signed-off-by: Alan Stern 
> Signed-off-by: Andreas Herrmann 
> ---
>  arch/mips/cavium-octeon/octeon-platform.c |  274 
> -
>  arch/mips/configs/cavium_octeon_defconfig |3 +
>  drivers/usb/host/Kconfig  |   18 +-
>  drivers/usb/host/Makefile |1 -
>  drivers/usb/host/ehci-hcd.c   |5 -
>  drivers/usb/host/ehci-octeon.c|  188 
>  drivers/usb/host/octeon2-common.c |  200 -
>  drivers/usb/host/ohci-hcd.c   |5 -
>  drivers/usb/host/ohci-octeon.c|  202 -
>  9 files changed, 285 insertions(+), 611 deletions(-)
>  delete mode 100644 drivers/usb/host/ehci-octeon.c
>  delete mode 100644 drivers/usb/host/octeon2-common.c
>  delete mode 100644 drivers/usb/host/ohci-octeon.c

For the MIPS bits:

For the MIPS bits:

Acked-by: Ralf Baechle 

Acked-by: Ralf Baechle 

  Ralf

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


Re: [PATCH] MIPS: MSP71xx: remove checks for two macros

2014-05-22 Thread Ralf Baechle
On Thu, May 22, 2014 at 11:34:51AM +0200, Paul Bolle wrote:

> Since v2.6.39 there are checks for CONFIG_MSP_HAS_DUAL_USB and checks
> for CONFIG_MSP_HAS_TSMAC in the code. The related Kconfig symbols have
> never been added. These checks have evaluated to false for three years
> now. Remove them and the code they have been hiding.

Queued for 3.16.

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


Re: [PATCH] MIPS: OCTEON: Rename Kconfig CAVIUM_OCTEON_REFERENCE_BOARD to CAVIUM_OCTEON_SOC

2013-05-22 Thread Ralf Baechle
On Wed, May 22, 2013 at 09:13:50AM -0700, David Daney wrote:

> Can you take v2 instead?  It has the missing watchdog adjustment
> that is not in v1.

Done.

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


Re: [PATCH] MIPS: OCTEON: Rename Kconfig CAVIUM_OCTEON_REFERENCE_BOARD to CAVIUM_OCTEON_SOC

2013-05-22 Thread Ralf Baechle
On Tue, May 21, 2013 at 03:07:23PM -0700, David Daney wrote:

> >>  config USB_OCTEON_OHCI
> >>bool "Octeon on-chip OHCI support"
> >>-   depends on CPU_CAVIUM_OCTEON
> >>+   depends on  CAVIUM_OCTEON_SOC
> >
> >Just a minor comment, here the extra whitespace after "depends on"
> >could be eliminated.
> >
> 
> Good point.  I will regenerate the patch to correct this.

I took care of that and queued the patch.

Thanks,

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