All of lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] USB: Support for LPC32xx SoC
Date: Sun, 26 Feb 2012 10:01:49 +0000	[thread overview]
Message-ID: <201202261001.49937.arnd@arndb.de> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1202251033550.4173-100000@netrider.rowland.org>

On Saturday 25 February 2012, Alan Stern wrote:
> You are talking about two separate issues.  One is the way the various
> bus-glue files get built into the driver, and the other is the way it
> #includes .c files.
> 
> I don't view the second as a big deal.  A few people have complained
> about it, but I don't see the point.  Sure, it has the disadvantage
> that you have to recompile the entire driver any time one of the files
> is changed.
> I can live with that.  It has the advantage that symbols
> shared among the source files can be static; they don't have to get
> merged into the overall kernel namespace when the driver isn't build as
> a module.

Right, I don't really object that part (including .c files), with
conditional includes I was referring to the inclusion of hw-specific
glues into the driver.

> The first issue is more serious.  There are long-term plans to
> restructure both of those drivers so that the bus glue resides in a
> separate module from the main core of the driver.  However I have not
> started to work on that yet; there are other more pressing matters to
> do first.

Ok.

> It doesn't seem extremely urgent.  Things are working the way they are.  
> The main advantage to restructuring is that it would allow distributors
> to build bus glue for multiple platforms in a single distribution
> image.  Currently that's not possible (except that any one of the
> platform glues can be enabled along with the PCI glue).

We are doing a major rework of the ARM architecture tree right now
to allow building multiple SoC platforms together, which has not
been possible traditionally. The "PLATFORM_DRIVER" macro in ohci
and ehci is one of many things standing in the way still and will have
to be dealt with at some point.

> A little progress has been made already.  We just received a submission
> for a "generic" platform bus glue file that will be able to take over
> the jobs of several of the existiing files.  If anyone wants to take
> this further I won't object, but I don't plan to work on it myself
> soon.

Ok, good to know. The approach of a generic glue is exactly what I
was going to suggest. As we get to ARM platforms that are currently
using PLATFORM_DRIVER, I will then ask people to convert the ohci
glue to use that generic glue instead of adding another *_DRIVER
macro to ohci/ehci.

I'm not sure about what we should do for lpc32xx. Is that
generic glue going into v3.4? If so, we could convert the
pnx4008 driver to use that and abstract it in a way that works
nicely for pnx4008 and lpc32xx. OTOH, we might just let this
one go in as before and ask people to do it right for the next
one.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Wolfram Sang <w.sang@pengutronix.de>,
	linux-arm-kernel@lists.infradead.org,
	Roland Stigge <stigge@antcom.de>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	kevin.wells@nxp.com
Subject: Re: [PATCH v2] USB: Support for LPC32xx SoC
Date: Sun, 26 Feb 2012 10:01:49 +0000	[thread overview]
Message-ID: <201202261001.49937.arnd@arndb.de> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1202251033550.4173-100000@netrider.rowland.org>

On Saturday 25 February 2012, Alan Stern wrote:
> You are talking about two separate issues.  One is the way the various
> bus-glue files get built into the driver, and the other is the way it
> #includes .c files.
> 
> I don't view the second as a big deal.  A few people have complained
> about it, but I don't see the point.  Sure, it has the disadvantage
> that you have to recompile the entire driver any time one of the files
> is changed.
> I can live with that.  It has the advantage that symbols
> shared among the source files can be static; they don't have to get
> merged into the overall kernel namespace when the driver isn't build as
> a module.

Right, I don't really object that part (including .c files), with
conditional includes I was referring to the inclusion of hw-specific
glues into the driver.

> The first issue is more serious.  There are long-term plans to
> restructure both of those drivers so that the bus glue resides in a
> separate module from the main core of the driver.  However I have not
> started to work on that yet; there are other more pressing matters to
> do first.

Ok.

> It doesn't seem extremely urgent.  Things are working the way they are.  
> The main advantage to restructuring is that it would allow distributors
> to build bus glue for multiple platforms in a single distribution
> image.  Currently that's not possible (except that any one of the
> platform glues can be enabled along with the PCI glue).

We are doing a major rework of the ARM architecture tree right now
to allow building multiple SoC platforms together, which has not
been possible traditionally. The "PLATFORM_DRIVER" macro in ohci
and ehci is one of many things standing in the way still and will have
to be dealt with at some point.

> A little progress has been made already.  We just received a submission
> for a "generic" platform bus glue file that will be able to take over
> the jobs of several of the existiing files.  If anyone wants to take
> this further I won't object, but I don't plan to work on it myself
> soon.

Ok, good to know. The approach of a generic glue is exactly what I
was going to suggest. As we get to ARM platforms that are currently
using PLATFORM_DRIVER, I will then ask people to convert the ohci
glue to use that generic glue instead of adding another *_DRIVER
macro to ohci/ehci.

I'm not sure about what we should do for lpc32xx. Is that
generic glue going into v3.4? If so, we could convert the
pnx4008 driver to use that and abstract it in a way that works
nicely for pnx4008 and lpc32xx. OTOH, we might just let this
one go in as before and ask people to do it right for the next
one.

	Arnd

  reply	other threads:[~2012-02-26 10:01 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-23 20:57 [PATCH v2] USB: Support for LPC32xx SoC Roland Stigge
2012-02-23 20:57 ` Roland Stigge
2012-02-23 21:05 ` Roland Stigge
2012-02-23 21:05   ` Roland Stigge
2012-02-24  6:35   ` Wolfram Sang
2012-02-24  6:35     ` Wolfram Sang
2012-02-24 15:03     ` Arnd Bergmann
2012-02-24 15:03       ` Arnd Bergmann
2012-02-25  3:51       ` Wolfram Sang
2012-02-25  3:51         ` Wolfram Sang
2012-02-25  8:45         ` Arnd Bergmann
2012-02-25  8:45           ` Arnd Bergmann
2012-02-25 15:46           ` Alan Stern
2012-02-25 15:46             ` Alan Stern
2012-02-26 10:01             ` Arnd Bergmann [this message]
2012-02-26 10:01               ` Arnd Bergmann
2012-02-26 15:59               ` Alan Stern
2012-02-26 15:59                 ` Alan Stern
2012-02-27 14:03                 ` Arnd Bergmann
2012-02-27 14:03                   ` Arnd Bergmann
2012-02-27 16:42                   ` Alan Stern
2012-02-27 16:42                     ` Alan Stern
2012-02-27 22:01                     ` Arnd Bergmann
2012-02-27 22:01                       ` Arnd Bergmann
2012-02-28 15:01                       ` Alan Stern
2012-02-28 15:01                         ` Alan Stern
2012-02-28 15:53                         ` Arnd Bergmann
2012-02-28 15:53                           ` Arnd Bergmann
2012-02-28 16:51                           ` Alan Stern
2012-02-28 16:51                             ` Alan Stern
2012-02-25 14:03         ` Roland Stigge
2012-02-25 14:03           ` Roland Stigge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201202261001.49937.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.