Re: [PATCH (mmc-next) 2/3] mmc: split the sdhci.h to help platforms that uses shdci-pltfm d.d.

Wolfram Sang
2010-09-27T14:13:06Z

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

On Mon, Sep 27, 2010 at 02:57:50PM +0200, Peppe CAVALLARO wrote:
> Hi Wolfram,
>
> On 09/27/2010 12:43 PM, Wolfram Sang wrote:
> > On Thu, Sep 23, 2010 at 11:14:25AM +0200, Giuseppe CAVALLARO wrote:
> >> Some platforms based on the shdci-pltfm device driver need to
> >> set own quirks (that currently are in drivers/mmc/host/sdhci.h).
> >>
> >> This patch splits this header file in two parts:
> >>
> >> o drivers/mmc/host/sdhci.h
> >> it includes the HC registers
> >>
> >> o include/linux/mmc/sdhci.h
> >> it includes the private structures, callbacks, quirks etc.
> >>
> >> So, instead of including the shdci.h from devices/mmc/host, all
> >> the platforms based on shdci-pltfm will be able to only include:
> >> include/linux/mmc/sdhci.h and include/linux/sdhci-pltfm.h.
> >>
> >> This has been tested on STM targets (STx7106, STx7108, STx5206).
> >>
> >> Note: drivers/mmc/host/sdhci.h also includes the linux/mmc/sdhci.h
> >> and no modifications should be needed on other sdhci-<XXX> drivers.
> >>
> >> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> >
> > IMO this is too much exporting here. I can't see a reason to export the
> > sdhci_host-structure, for example. My idea would be to start with a
> > minimal approach and just copy over the stuff we need now (the quirks).
> > If we need more later, we add it seperately then.
>
> I had just started doing that but I decided to split the file to solve
> the issue for the .init call (we discussed in the thread
> http://marc.info/?l=linux-mmc&m=128523426925028&w=2).
> Indeed, this approach avoids to add other callbacks and reuses the
> existent code.

OK for the host-struct. What about the io-accessors? Do we really need
them?

--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]