From: Shawn Guo <shawn.guo@freescale.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: Shawn Guo <shawn.guo@linaro.org>, <linaro-dev@lists.linaro.org>,
<sameo@linux.intel.com>, <patches@linaro.org>,
<devicetree-discuss@lists.ozlabs.org>,
<linux-mmc@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 4/5] mmc: sdhci: consolidate sdhci-of-esdhc and sdhci-esdhc-imx
Date: Fri, 1 Apr 2011 14:18:36 +0800 [thread overview]
Message-ID: <20110401061835.GG25866@S2100-06.ap.freescale.net> (raw)
In-Reply-To: <20110331155312.GC26709@ponder.secretlab.ca>
On Thu, Mar 31, 2011 at 09:53:12AM -0600, Grant Likely wrote:
> On Fri, Mar 25, 2011 at 04:48:50PM +0800, Shawn Guo wrote:
> > This patch is to consolidate SDHCI driver for Freescale eSDHC
> > controller found on both MPCxxx and i.MX platforms. It turns
> > sdhci-of-esdhc.c and sdhci-esdhc-imx.c into one sdhci-esdhc.c,
> > which gets the same pair of .probe and .remove serving two cases.
> >
> > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > ---
> > drivers/mmc/host/Kconfig | 38 ++--
> > drivers/mmc/host/Makefile | 3 +-
> > drivers/mmc/host/sdhci-esdhc-imx.c | 210 ------------------
> > drivers/mmc/host/sdhci-esdhc.c | 413 ++++++++++++++++++++++++++++++++++++
> > drivers/mmc/host/sdhci-of-esdhc.c | 162 --------------
>
> This patch would be easier to review if it was split into two patches;
> first rename sdhci-esdhc-imx.c to sdhci-esdhc.c without any changes to
> the .c code, and then a second patch to merge the ppc bits into the
> imx version.
>
OK.
> > +#if defined(CONFIG_OF)
> > +#include <linux/of_device.h>
> > +static const struct of_device_id sdhci_esdhc_dt_ids[] = {
> > +#ifdef CONFIG_MMC_SDHCI_ESDHC_IMX
> > + { .compatible = "fsl,imx-esdhc", .data = &sdhci_esdhc_imx_pdata },
> > +#endif
> > +#ifdef CONFIG_MMC_SDHCI_ESDHC_MPC
> > + { .compatible = "fsl,mpc8379-esdhc", .data = &sdhci_esdhc_mpc_pdata },
> > + { .compatible = "fsl,mpc8536-esdhc", .data = &sdhci_esdhc_mpc_pdata },
> > + { .compatible = "fsl,esdhc", .data = &sdhci_esdhc_mpc_pdata },
> > +#endif
> > + { }
> > +};
> > +MODULE_DEVICE_TABLE(platform, sdhci_esdhc_dt_ids);
> > +
> > +static const struct of_device_id *
> > +sdhci_esdhc_get_of_device_id(struct platform_device *pdev)
> > +{
> > + return of_match_device(sdhci_esdhc_dt_ids, &pdev->dev);
>
> You can add an empty implementation of of_match_device() to
> linux/of_device.h. That would eliminate the need for this function.
>
Will follow what you suggested later to use .of_match pointer newly
added into struct device.
--
Regards,
Shawn
next prev parent reply other threads:[~2011-04-01 6:17 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-25 8:48 [PATCH 0/5] consolidate sdhci pltfm & OF drivers and get them self registered Shawn Guo
2011-03-25 8:48 ` [PATCH 1/5] mmc: sdhci: make sdhci-pltfm device drivers " Shawn Guo
2011-03-31 15:33 ` Grant Likely
2011-04-01 6:10 ` Shawn Guo
2011-04-19 10:20 ` Wolfram Sang
2011-04-21 8:03 ` Shawn Guo
2011-04-21 9:57 ` Wolfram Sang
2011-03-25 8:48 ` [PATCH 2/5] mmc: sdhci: eliminate sdhci_of_host and sdhci_of_data Shawn Guo
2011-03-31 15:34 ` Grant Likely
2011-04-19 10:20 ` Wolfram Sang
2011-04-21 8:10 ` Shawn Guo
2011-03-25 8:48 ` [PATCH 3/5] mmc: sdhci: make sdhci-of device drivers self registered Shawn Guo
2011-03-31 15:38 ` Grant Likely
2011-04-19 10:21 ` Wolfram Sang
2011-04-21 8:17 ` Shawn Guo
2011-03-25 8:48 ` [PATCH 4/5] mmc: sdhci: consolidate sdhci-of-esdhc and sdhci-esdhc-imx Shawn Guo
2011-03-31 15:53 ` Grant Likely
2011-04-01 6:18 ` Shawn Guo [this message]
2011-04-19 10:21 ` Wolfram Sang
2011-04-21 8:53 ` Shawn Guo
2011-03-25 8:48 ` [PATCH 5/5] mmc: sdhci: merge two sdhci-pltfm.h into one Shawn Guo
2011-03-31 15:54 ` Grant Likely
2011-04-19 10:21 ` Wolfram Sang
2011-03-31 4:25 ` [PATCH 0/5] consolidate sdhci pltfm & OF drivers and get them self registered Shawn Guo
2011-03-31 16:36 ` Chris Ball
2011-04-13 6:26 ` Shawn Guo
2011-04-19 10:20 ` Wolfram Sang
2011-04-19 12:47 ` Kyungmin Park
2011-04-19 17:47 ` Wolfram Sang
2011-04-20 4:23 ` Kyungmin Park
2011-04-21 7:48 ` Shawn Guo
2011-04-26 13:20 ` Wolfram Sang
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=20110401061835.GG25866@S2100-06.ap.freescale.net \
--to=shawn.guo@freescale.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=linaro-dev@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=patches@linaro.org \
--cc=sameo@linux.intel.com \
--cc=shawn.guo@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®