Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966776AbcCPOuO (ORCPT ); Wed, 16 Mar 2016 10:50:14 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:50298 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S966662AbcCPOuM (ORCPT ); Wed, 16 Mar 2016 10:50:12 -0400 Date: Wed, 16 Mar 2016 10:50:11 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: David Lechner cc: Sekhar Nori , Kevin Hilman , Bin Liu , Petr Kulhavy , Russell King , Greg Kroah-Hartman , Sergei Shtylyov , Felipe Balbi , , , Subject: Re: [PATCH 4/5] usb: ohci-da8xx: Remove clock code that references mach In-Reply-To: <1458081473-8223-4-git-send-email-david@lechnology.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1457 Lines: 46 On Tue, 15 Mar 2016, David Lechner wrote: > Including mach/* is frowned upon in device drivers, so get rid of it. > > This replaces usb20_clk with usb11_phy_clk that represents the 48MHz usb > phy clock. The interaction with the usb20 (musb) subsystem does no belong > here and has been implemented in da830.c/da850.c with the rest of the > da8xx clock code. > > Signed-off-by: David Lechner > --- > drivers/usb/host/ohci-da8xx.c | 81 ++++++++++++++++++++----------------------- > 1 file changed, 38 insertions(+), 43 deletions(-) > > diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c > index e5c33bc..37fa3fb 100644 > --- a/drivers/usb/host/ohci-da8xx.c > +++ b/drivers/usb/host/ohci-da8xx.c > @@ -16,57 +16,43 @@ > #include > #include > > -#include > #include > > #ifndef CONFIG_ARCH_DAVINCI_DA8XX > #error "This file is DA8xx bus glue. Define CONFIG_ARCH_DAVINCI_DA8XX." > #endif > > -#define CFGCHIP2 DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG) > +#define USB1SUSPENDM (1 << 7) > > static struct clk *usb11_clk; > -static struct clk *usb20_clk; > +static struct clk *usb11_phy_clk; > +static __iomem u32 *cfgchip2; Is it theoretically impossible for a da8xx platform to have more than one OHCI controller? If it isn't, you better not use static variables to hold per-device data. Alan Stern