* [PATCH] mmc: add SDHCI driver for STM platforms.
@ 2010-07-29 8:31 Giuseppe CAVALLARO
2010-07-30 14:04 ` Peppe CAVALLARO
0 siblings, 1 reply; 10+ messages in thread
From: Giuseppe CAVALLARO @ 2010-07-29 8:31 UTC (permalink / raw)
To: linux-mmc; +Cc: Giuseppe Cavallaro
This patch adds the Arasan MMC/SD/SDIO driver
for the STM ST40 platforms. It is based on the
SDHCI driver.
It has been tested on the STx7106/STx7108/STx5289
platforms.
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
drivers/mmc/host/Kconfig | 12 +++
drivers/mmc/host/Makefile | 1 +
drivers/mmc/host/sdhci-stm.c | 184 +++++++++++++++++++++++++++++++++++++++++
include/linux/mmc/sdhci-stm.h | 40 +++++++++
4 files changed, 237 insertions(+), 0 deletions(-)
create mode 100644 drivers/mmc/host/sdhci-stm.c
create mode 100644 include/linux/mmc/sdhci-stm.h
diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index f06d06e..a5a3313 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -148,6 +148,18 @@ config MMC_SDHCI_SPEAR
If unsure, say N.
+config MMC_SDHCI_STM
+ tristate "SDHCI support on STM platforms"
+ depends on MMC_SDHCI && CPU_SUBTYPE_ST40
+ help
+ This selects the Secure Digital Host Controller Interface (SDHCI)
+ often referrered to as the HSMMC block in some of the STM range
+ of SoC (e.g. STx7106/STx7108/STx5289).
+
+ If you have a controller with this interface, say Y or M here.
+
+ If unsure, say N.
+
config MMC_SDHCI_S3C_DMA
bool "DMA support on S3C SDHCI"
depends on MMC_SDHCI_S3C && EXPERIMENTAL
diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile
index e30c2ee..7b47e8d 100644
--- a/drivers/mmc/host/Makefile
+++ b/drivers/mmc/host/Makefile
@@ -15,6 +15,7 @@ obj-$(CONFIG_MMC_SDHCI_PCI) += sdhci-pci.o
obj-$(CONFIG_MMC_SDHCI_PLTFM) += sdhci-pltfm.o
obj-$(CONFIG_MMC_SDHCI_S3C) += sdhci-s3c.o
obj-$(CONFIG_MMC_SDHCI_SPEAR) += sdhci-spear.o
+obj-$(CONFIG_MMC_SDHCI_STM) += sdhci-stm.o
obj-$(CONFIG_MMC_WBSD) += wbsd.o
obj-$(CONFIG_MMC_AU1X) += au1xmmc.o
obj-$(CONFIG_MMC_OMAP) += omap.o
diff --git a/drivers/mmc/host/sdhci-stm.c b/drivers/mmc/host/sdhci-stm.c
new file mode 100644
index 0000000..397ecf7
--- /dev/null
+++ b/drivers/mmc/host/sdhci-stm.c
@@ -0,0 +1,184 @@
+/* linux/drivers/mmc/host/sdhci-stm.c
+ *
+ * Copyright (C) 2010 STMicroelectronics Ltd
+ * Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
+ *
+ * SDHCI support for STM platforms
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/platform_device.h>
+#include <linux/slab.h>
+#include <linux/mmc/host.h>
+#include <linux/io.h>
+
+#include <linux/mmc/sdhci-stm.h>
+
+#include "sdhci.h"
+
+static struct sdhci_ops sdhci_pltfm_ops = {
+ /* Nothing to do for now. */
+};
+
+struct sdhci_stm {
+ struct sdhci_host *host;
+ struct platform_device *pdev;
+ struct resource *ioarea;
+ struct sdhci_platform_data *pdata;
+};
+
+static int __devinit sdhci_probe(struct platform_device *pdev)
+{
+ struct sdhci_platform_data *pdata;
+ struct device *dev = &pdev->dev;
+ struct sdhci_host *host;
+ struct sdhci_stm *sc;
+ struct resource *res;
+ int ret, irq;
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res) {
+ dev_err(dev, "no memory specified\n");
+ return -ENOENT;
+ }
+
+ irq = platform_get_irq_byname(pdev, "mmcirq");
+ if (irq < 0) {
+ dev_err(dev, "no irq specified\n");
+ return irq;
+ }
+
+ pdata = pdev->dev.platform_data;
+ if (!pdata) {
+ dev_err(dev, "no device data specified\n");
+ return -ENOENT;
+ }
+
+ host = sdhci_alloc_host(&pdev->dev, 0);
+ if (IS_ERR(host)) {
+ ret = PTR_ERR(host);
+ dev_dbg(&pdev->dev, "error allocating host\n");
+ return PTR_ERR(host);
+ }
+
+ sc = sdhci_priv(host);
+ sc->host = host;
+ sc->pdev = pdev;
+ sc->pdata = pdata;
+
+ platform_set_drvdata(pdev, host);
+
+ sc->ioarea = request_mem_region(res->start, resource_size(res),
+ pdev->name);
+ if (!sc->ioarea) {
+ dev_err(dev, "failed to reserve register area\n");
+ ret = -ENXIO;
+ goto out;
+ }
+
+ ret = sdhci_claim_resource(pdev);
+ if (ret < 0)
+ goto out;
+
+ host->hw_name = "sdhci-stm";
+ host->ops = &sdhci_pltfm_ops;
+ host->irq = irq;
+ host->quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC;
+
+ host->ioaddr = ioremap(res->start, resource_size(res));
+ if (!host->ioaddr) {
+ dev_err(dev, "failed to map registers\n");
+ ret = -ENOMEM;
+ goto out;
+ }
+
+ ret = sdhci_add_host(host);
+ if (ret) {
+ dev_dbg(&pdev->dev, "error adding host\n");
+ goto out;
+ }
+
+ return 0;
+
+out:
+ if (host->ioaddr)
+ iounmap(host->ioaddr);
+
+ if (sc->ioarea) {
+ release_resource(sc->ioarea);
+ kfree(sc->ioarea);
+ }
+
+ sdhci_free_host(host);
+
+ return ret;
+}
+
+static int __devexit sdhci_remove(struct platform_device *pdev)
+{
+ struct sdhci_host *host = platform_get_drvdata(pdev);
+ struct sdhci_stm *sc = sdhci_priv(host);
+
+ sdhci_remove_host(host, 1);
+
+ iounmap(host->ioaddr);
+ release_resource(sc->ioarea);
+ kfree(sc->ioarea);
+
+ sdhci_free_host(host);
+ platform_set_drvdata(pdev, NULL);
+
+ return 0;
+}
+
+#ifdef CONFIG_PM
+static int sdhci_stm_suspend(struct platform_device *dev, pm_message_t pm)
+{
+ struct sdhci_host *host = platform_get_drvdata(dev);
+
+ sdhci_suspend_host(host, pm);
+ return 0;
+}
+
+static int sdhci_stm_resume(struct platform_device *dev)
+{
+ struct sdhci_host *host = platform_get_drvdata(dev);
+
+ sdhci_resume_host(host);
+ return 0;
+}
+#endif
+
+static struct platform_driver sdhci_driver = {
+ .driver = {
+ .name = "sdhci-stm",
+ .owner = THIS_MODULE,
+ },
+ .probe = sdhci_probe,
+ .remove = __devexit_p(sdhci_remove),
+#ifdef CONFIG_PM
+ .suspend = sdhci_stm_suspend,
+ .resume = sdhci_stm_resume,
+#endif
+};
+
+static int __init sdhci_stm_init(void)
+{
+ return platform_driver_register(&sdhci_driver);
+}
+
+module_init(sdhci_stm_init);
+
+static void __exit sdhci_stm_exit(void)
+{
+ platform_driver_unregister(&sdhci_driver);
+}
+
+module_exit(sdhci_stm_exit);
+
+MODULE_DESCRIPTION("STM Secure Digital Host Controller Interface driver");
+MODULE_AUTHOR("Giuseppe Cavallaro <peppe.cavallaro@st.com>");
+MODULE_LICENSE("GPL v2");
diff --git a/include/linux/mmc/sdhci-stm.h b/include/linux/mmc/sdhci-stm.h
new file mode 100644
index 0000000..4e6ad14
--- /dev/null
+++ b/include/linux/mmc/sdhci-stm.h
@@ -0,0 +1,40 @@
+/*
+ * Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
+ *
+ * include/linux/mmc/sdhci-stm.h
+ *
+ * platform data for the sdhci stm driver.
+ *
+ * Copyright (C) 2010 STMicroelectronics Ltd
+ *
+ * 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.
+ *
+ */
+
+#ifndef __SDHCI_STM_PLAT_H__
+#define __SDHCI_STM_PLAT_H__
+
+#include <linux/stm/platform.h>
+#include <linux/stm/pad.h>
+
+struct sdhci_platform_data {
+ struct stm_pad_config *pad_config;
+};
+
+/* SDHCI_STM Resource configuration */
+static inline int sdhci_claim_resource(struct platform_device *pdev)
+{
+ int ret = 0;
+ struct sdhci_platform_data *plat_dat = pdev->dev.platform_data;
+
+ /* Pad routing setup required on STM platforms */
+ if (!devm_stm_pad_claim(&pdev->dev, plat_dat->pad_config,
+ dev_name(&pdev->dev))) {
+ pr_err("%s: Failed to request pads!\n", __func__);
+ ret = -ENODEV;
+ }
+ return ret;
+}
+#endif /* __SDHCI_STM_PLAT_H__ */
--
1.5.5.6
^ permalink raw reply related [flat|nested] 10+ messages in thread
* RE: [PATCH] mmc: add SDHCI driver for STM platforms.
2010-07-29 8:31 [PATCH] mmc: add SDHCI driver for STM platforms Giuseppe CAVALLARO
@ 2010-07-30 14:04 ` Peppe CAVALLARO
[not found] ` <20100802134050.GA7944@console-pimps.org>
0 siblings, 1 reply; 10+ messages in thread
From: Peppe CAVALLARO @ 2010-07-30 14:04 UTC (permalink / raw)
To: linux-mmc@vger.kernel.org
Hello!
I wonder if somebody's had some spare moment to review this patch.
Welcome advice and feedback as usual
Many thanks in advance.
Best Regards,
Giuseppe
> -----Original Message-----
> From: Giuseppe CAVALLARO [mailto:peppe.cavallaro@st.com]
> Sent: Thursday, July 29, 2010 10:31 AM
> To: linux-mmc@vger.kernel.org
> Cc: Peppe CAVALLARO
> Subject: [PATCH] mmc: add SDHCI driver for STM platforms.
>
> This patch adds the Arasan MMC/SD/SDIO driver
> for the STM ST40 platforms. It is based on the
> SDHCI driver.
> It has been tested on the STx7106/STx7108/STx5289
> platforms.
>
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> ---
> drivers/mmc/host/Kconfig | 12 +++
> drivers/mmc/host/Makefile | 1 +
> drivers/mmc/host/sdhci-stm.c | 184
> +++++++++++++++++++++++++++++++++++++++++
> include/linux/mmc/sdhci-stm.h | 40 +++++++++
> 4 files changed, 237 insertions(+), 0 deletions(-)
> create mode 100644 drivers/mmc/host/sdhci-stm.c
> create mode 100644 include/linux/mmc/sdhci-stm.h
>
> diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
> index f06d06e..a5a3313 100644
> --- a/drivers/mmc/host/Kconfig
> +++ b/drivers/mmc/host/Kconfig
> @@ -148,6 +148,18 @@ config MMC_SDHCI_SPEAR
>
> If unsure, say N.
>
> +config MMC_SDHCI_STM
> + tristate "SDHCI support on STM platforms"
> + depends on MMC_SDHCI && CPU_SUBTYPE_ST40
> + help
> + This selects the Secure Digital Host Controller Interface (SDHCI)
> + often referrered to as the HSMMC block in some of the STM range
> + of SoC (e.g. STx7106/STx7108/STx5289).
> +
> + If you have a controller with this interface, say Y or M here.
> +
> + If unsure, say N.
> +
> config MMC_SDHCI_S3C_DMA
> bool "DMA support on S3C SDHCI"
> depends on MMC_SDHCI_S3C && EXPERIMENTAL
> diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile
> index e30c2ee..7b47e8d 100644
> --- a/drivers/mmc/host/Makefile
> +++ b/drivers/mmc/host/Makefile
> @@ -15,6 +15,7 @@ obj-$(CONFIG_MMC_SDHCI_PCI) += sdhci-pci.o
> obj-$(CONFIG_MMC_SDHCI_PLTFM) += sdhci-pltfm.o
> obj-$(CONFIG_MMC_SDHCI_S3C) += sdhci-s3c.o
> obj-$(CONFIG_MMC_SDHCI_SPEAR) += sdhci-spear.o
> +obj-$(CONFIG_MMC_SDHCI_STM) += sdhci-stm.o
> obj-$(CONFIG_MMC_WBSD) += wbsd.o
> obj-$(CONFIG_MMC_AU1X) += au1xmmc.o
> obj-$(CONFIG_MMC_OMAP) += omap.o
> diff --git a/drivers/mmc/host/sdhci-stm.c b/drivers/mmc/host/sdhci-stm.c
> new file mode 100644
> index 0000000..397ecf7
> --- /dev/null
> +++ b/drivers/mmc/host/sdhci-stm.c
> @@ -0,0 +1,184 @@
> +/* linux/drivers/mmc/host/sdhci-stm.c
> + *
> + * Copyright (C) 2010 STMicroelectronics Ltd
> + * Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> + *
> + * SDHCI support for STM platforms
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +#include <linux/platform_device.h>
> +#include <linux/slab.h>
> +#include <linux/mmc/host.h>
> +#include <linux/io.h>
> +
> +#include <linux/mmc/sdhci-stm.h>
> +
> +#include "sdhci.h"
> +
> +static struct sdhci_ops sdhci_pltfm_ops = {
> + /* Nothing to do for now. */
> +};
> +
> +struct sdhci_stm {
> + struct sdhci_host *host;
> + struct platform_device *pdev;
> + struct resource *ioarea;
> + struct sdhci_platform_data *pdata;
> +};
> +
> +static int __devinit sdhci_probe(struct platform_device *pdev)
> +{
> + struct sdhci_platform_data *pdata;
> + struct device *dev = &pdev->dev;
> + struct sdhci_host *host;
> + struct sdhci_stm *sc;
> + struct resource *res;
> + int ret, irq;
> +
> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + if (!res) {
> + dev_err(dev, "no memory specified\n");
> + return -ENOENT;
> + }
> +
> + irq = platform_get_irq_byname(pdev, "mmcirq");
> + if (irq < 0) {
> + dev_err(dev, "no irq specified\n");
> + return irq;
> + }
> +
> + pdata = pdev->dev.platform_data;
> + if (!pdata) {
> + dev_err(dev, "no device data specified\n");
> + return -ENOENT;
> + }
> +
> + host = sdhci_alloc_host(&pdev->dev, 0);
> + if (IS_ERR(host)) {
> + ret = PTR_ERR(host);
> + dev_dbg(&pdev->dev, "error allocating host\n");
> + return PTR_ERR(host);
> + }
> +
> + sc = sdhci_priv(host);
> + sc->host = host;
> + sc->pdev = pdev;
> + sc->pdata = pdata;
> +
> + platform_set_drvdata(pdev, host);
> +
> + sc->ioarea = request_mem_region(res->start, resource_size(res),
> + pdev->name);
> + if (!sc->ioarea) {
> + dev_err(dev, "failed to reserve register area\n");
> + ret = -ENXIO;
> + goto out;
> + }
> +
> + ret = sdhci_claim_resource(pdev);
> + if (ret < 0)
> + goto out;
> +
> + host->hw_name = "sdhci-stm";
> + host->ops = &sdhci_pltfm_ops;
> + host->irq = irq;
> + host->quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC;
> +
> + host->ioaddr = ioremap(res->start, resource_size(res));
> + if (!host->ioaddr) {
> + dev_err(dev, "failed to map registers\n");
> + ret = -ENOMEM;
> + goto out;
> + }
> +
> + ret = sdhci_add_host(host);
> + if (ret) {
> + dev_dbg(&pdev->dev, "error adding host\n");
> + goto out;
> + }
> +
> + return 0;
> +
> +out:
> + if (host->ioaddr)
> + iounmap(host->ioaddr);
> +
> + if (sc->ioarea) {
> + release_resource(sc->ioarea);
> + kfree(sc->ioarea);
> + }
> +
> + sdhci_free_host(host);
> +
> + return ret;
> +}
> +
> +static int __devexit sdhci_remove(struct platform_device *pdev)
> +{
> + struct sdhci_host *host = platform_get_drvdata(pdev);
> + struct sdhci_stm *sc = sdhci_priv(host);
> +
> + sdhci_remove_host(host, 1);
> +
> + iounmap(host->ioaddr);
> + release_resource(sc->ioarea);
> + kfree(sc->ioarea);
> +
> + sdhci_free_host(host);
> + platform_set_drvdata(pdev, NULL);
> +
> + return 0;
> +}
> +
> +#ifdef CONFIG_PM
> +static int sdhci_stm_suspend(struct platform_device *dev, pm_message_t pm)
> +{
> + struct sdhci_host *host = platform_get_drvdata(dev);
> +
> + sdhci_suspend_host(host, pm);
> + return 0;
> +}
> +
> +static int sdhci_stm_resume(struct platform_device *dev)
> +{
> + struct sdhci_host *host = platform_get_drvdata(dev);
> +
> + sdhci_resume_host(host);
> + return 0;
> +}
> +#endif
> +
> +static struct platform_driver sdhci_driver = {
> + .driver = {
> + .name = "sdhci-stm",
> + .owner = THIS_MODULE,
> + },
> + .probe = sdhci_probe,
> + .remove = __devexit_p(sdhci_remove),
> +#ifdef CONFIG_PM
> + .suspend = sdhci_stm_suspend,
> + .resume = sdhci_stm_resume,
> +#endif
> +};
> +
> +static int __init sdhci_stm_init(void)
> +{
> + return platform_driver_register(&sdhci_driver);
> +}
> +
> +module_init(sdhci_stm_init);
> +
> +static void __exit sdhci_stm_exit(void)
> +{
> + platform_driver_unregister(&sdhci_driver);
> +}
> +
> +module_exit(sdhci_stm_exit);
> +
> +MODULE_DESCRIPTION("STM Secure Digital Host Controller Interface driver");
> +MODULE_AUTHOR("Giuseppe Cavallaro <peppe.cavallaro@st.com>");
> +MODULE_LICENSE("GPL v2");
> diff --git a/include/linux/mmc/sdhci-stm.h b/include/linux/mmc/sdhci-stm.h
> new file mode 100644
> index 0000000..4e6ad14
> --- /dev/null
> +++ b/include/linux/mmc/sdhci-stm.h
> @@ -0,0 +1,40 @@
> +/*
> + * Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> + *
> + * include/linux/mmc/sdhci-stm.h
> + *
> + * platform data for the sdhci stm driver.
> + *
> + * Copyright (C) 2010 STMicroelectronics Ltd
> + *
> + * 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.
> + *
> + */
> +
> +#ifndef __SDHCI_STM_PLAT_H__
> +#define __SDHCI_STM_PLAT_H__
> +
> +#include <linux/stm/platform.h>
> +#include <linux/stm/pad.h>
> +
> +struct sdhci_platform_data {
> + struct stm_pad_config *pad_config;
> +};
> +
> +/* SDHCI_STM Resource configuration */
> +static inline int sdhci_claim_resource(struct platform_device *pdev)
> +{
> + int ret = 0;
> + struct sdhci_platform_data *plat_dat = pdev->dev.platform_data;
> +
> + /* Pad routing setup required on STM platforms */
> + if (!devm_stm_pad_claim(&pdev->dev, plat_dat->pad_config,
> + dev_name(&pdev->dev))) {
> + pr_err("%s: Failed to request pads!\n", __func__);
> + ret = -ENODEV;
> + }
> + return ret;
> +}
> +#endif /* __SDHCI_STM_PLAT_H__ */
> --
> 1.5.5.6
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mmc: add SDHCI driver for STM platforms.
[not found] ` <107012446AC13D4C90B85672EAF5FB0E9C2E08E20E@SAFEX1MAIL3.st.com>
@ 2010-08-02 14:36 ` Matt Fleming
2010-08-02 15:00 ` Peppe CAVALLARO
2010-08-03 22:21 ` Andrew Morton
0 siblings, 2 replies; 10+ messages in thread
From: Matt Fleming @ 2010-08-02 14:36 UTC (permalink / raw)
To: Peppe CAVALLARO; +Cc: Andrew Morton, linux-mmc
On Mon, Aug 02, 2010 at 04:03:30PM +0200, Peppe CAVALLARO wrote:
> Hi Matt,
>
> > -----Original Message-----
> > From: Matt Fleming [mailto:matt@console-pimps.org]
> > Sent: Monday, August 02, 2010 3:41 PM
> > To: Peppe CAVALLARO
> > Cc: Andrew Morton
> > Subject: Re: [PATCH] mmc: add SDHCI driver for STM platforms.
> >
> > On Fri, Jul 30, 2010 at 04:04:16PM +0200, Peppe CAVALLARO wrote:
> > > Hello!
> > > I wonder if somebody's had some spare moment to review this patch.
> > > Welcome advice and feedback as usual
> > >
> > > Many thanks in advance.
> > >
> > > Best Regards,
> > > Giuseppe
> >
> > You're best bet is to CC Andrew on mmc patches (which I've now done).
>
> Thanks for your feedback and sorry if I didn't put Andrew on CC before.
> I'm newer in this mailing list.
I'm sorry, I dropped the linux-mmc mailing list when I replied to your
mail! My bad.
> > What is devm_stm_pad_claim()? I can't find this function in linus'
> > tree, or in -next, or in Andrew's -mm series. Where is this function
> > from?
>
> This comes from our STMicroelectronics platform pad management
> infrastructure; code available from:
> http://git.stlinux.com/?p=stm/linux-sh4-2.6.32.y.git;a=summary It's
> used to claim/manage various resources i.e. PIO and clock lines.
That's interesting. So, this driver won't build with linus' tree? I
didn't think that the kernel catered for external interfaces like this
- it causes all sorts of issues, not least of which is the fact that
the driver can't be built or tested with the mainline kernel.
Andrew, what do you make of this?
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] mmc: add SDHCI driver for STM platforms.
2010-08-02 14:36 ` Matt Fleming
@ 2010-08-02 15:00 ` Peppe CAVALLARO
2010-08-03 22:21 ` Andrew Morton
1 sibling, 0 replies; 10+ messages in thread
From: Peppe CAVALLARO @ 2010-08-02 15:00 UTC (permalink / raw)
To: Matt Fleming; +Cc: Andrew Morton, linux-mmc@vger.kernel.org
Hi Matt,
> -----Original Message-----
> From: Matt Fleming [mailto:matt@console-pimps.org]
> Sent: Monday, August 02, 2010 4:37 PM
> To: Peppe CAVALLARO
> Cc: Andrew Morton; linux-mmc@vger.kernel.org
> Subject: Re: [PATCH] mmc: add SDHCI driver for STM platforms.
>
> On Mon, Aug 02, 2010 at 04:03:30PM +0200, Peppe CAVALLARO wrote:
> > Hi Matt,
> >
> > > -----Original Message-----
> > > From: Matt Fleming [mailto:matt@console-pimps.org]
> > > Sent: Monday, August 02, 2010 3:41 PM
> > > To: Peppe CAVALLARO
> > > Cc: Andrew Morton
> > > Subject: Re: [PATCH] mmc: add SDHCI driver for STM platforms.
> > >
> > > On Fri, Jul 30, 2010 at 04:04:16PM +0200, Peppe CAVALLARO wrote:
> > > > Hello!
> > > > I wonder if somebody's had some spare moment to review this patch.
> > > > Welcome advice and feedback as usual
> > > >
> > > > Many thanks in advance.
> > > >
> > > > Best Regards,
> > > > Giuseppe
> > >
> > > You're best bet is to CC Andrew on mmc patches (which I've now done).
> >
> > Thanks for your feedback and sorry if I didn't put Andrew on CC before.
> > I'm newer in this mailing list.
>
> I'm sorry, I dropped the linux-mmc mailing list when I replied to your
> mail! My bad.
No problem! Thanks!
>
> > > What is devm_stm_pad_claim()? I can't find this function in linus'
> > > tree, or in -next, or in Andrew's -mm series. Where is this function
> > > from?
> >
> > This comes from our STMicroelectronics platform pad management
> > infrastructure; code available from:
> > http://git.stlinux.com/?p=stm/linux-sh4-2.6.32.y.git;a=summary It's
> > used to claim/manage various resources i.e. PIO and clock lines.
>
> That's interesting. So, this driver won't build with linus' tree? I
No, it won't.
> didn't think that the kernel catered for external interfaces like this
> - it causes all sorts of issues, not least of which is the fact that
> the driver can't be built or tested with the mainline kernel.
>
I know that this can be a problem but, having it in the main-line,
it could also help me on developing and testing the Arasan HC
on newer Kernels for our STM platforms.
> Andrew, what do you make of this?
Regards,
Peppe
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mmc: add SDHCI driver for STM platforms.
2010-08-02 14:36 ` Matt Fleming
2010-08-02 15:00 ` Peppe CAVALLARO
@ 2010-08-03 22:21 ` Andrew Morton
2010-08-04 5:35 ` Peppe CAVALLARO
1 sibling, 1 reply; 10+ messages in thread
From: Andrew Morton @ 2010-08-03 22:21 UTC (permalink / raw)
To: Matt Fleming; +Cc: Peppe CAVALLARO, linux-mmc
On Mon, 2 Aug 2010 15:36:31 +0100
Matt Fleming <matt@console-pimps.org> wrote:
> > > What is devm_stm_pad_claim()? I can't find this function in linus'
> > > tree, or in -next, or in Andrew's -mm series. Where is this function
> > > from?
> >
> > This comes from our STMicroelectronics platform pad management
> > infrastructure; code available from:
> > http://git.stlinux.com/?p=stm/linux-sh4-2.6.32.y.git;a=summary It's
> > used to claim/manage various resources i.e. PIO and clock lines.
>
> That's interesting. So, this driver won't build with linus' tree? I
> didn't think that the kernel catered for external interfaces like this
> - it causes all sorts of issues, not least of which is the fact that
> the driver can't be built or tested with the mainline kernel.
>
> Andrew, what do you make of this?
It definitely needs to be compileable. Otherwise it's dead code to
everyone else and nobody can maintain it as they make tree-wide or
subsystem-wide changes.
Also I do think the code in mainline should be able to be excecutable
(and testable!) without external code dependencies. This gets into the
realm of licensing concerns: is the out-of-tree code GPL? If not then
people will make a big fuss. If it _is_ GPL then get it merged up!
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] mmc: add SDHCI driver for STM platforms.
2010-08-03 22:21 ` Andrew Morton
@ 2010-08-04 5:35 ` Peppe CAVALLARO
2010-08-04 5:44 ` Andrew Morton
0 siblings, 1 reply; 10+ messages in thread
From: Peppe CAVALLARO @ 2010-08-04 5:35 UTC (permalink / raw)
To: Andrew Morton, Matt Fleming; +Cc: linux-mmc@vger.kernel.org
Hi Andrew,
> -----Original Message-----
> From: Andrew Morton [mailto:akpm@linux-foundation.org]
> Sent: Wednesday, August 04, 2010 12:21 AM
> To: Matt Fleming
> Cc: Peppe CAVALLARO; linux-mmc@vger.kernel.org
> Subject: Re: [PATCH] mmc: add SDHCI driver for STM platforms.
>
> On Mon, 2 Aug 2010 15:36:31 +0100
> Matt Fleming <matt@console-pimps.org> wrote:
>
> > > > What is devm_stm_pad_claim()? I can't find this function in linus'
> > > > tree, or in -next, or in Andrew's -mm series. Where is this function
> > > > from?
> > >
> > > This comes from our STMicroelectronics platform pad management
> > > infrastructure; code available from:
> > > http://git.stlinux.com/?p=stm/linux-sh4-2.6.32.y.git;a=summary It's
> > > used to claim/manage various resources i.e. PIO and clock lines.
> >
> > That's interesting. So, this driver won't build with linus' tree? I
> > didn't think that the kernel catered for external interfaces like this
> > - it causes all sorts of issues, not least of which is the fact that
> > the driver can't be built or tested with the mainline kernel.
> >
> > Andrew, what do you make of this?
>
> It definitely needs to be compileable. Otherwise it's dead code to
> everyone else and nobody can maintain it as they make tree-wide or
> subsystem-wide changes.
>
> Also I do think the code in mainline should be able to be excecutable
> (and testable!) without external code dependencies. This gets into the
> realm of licensing concerns: is the out-of-tree code GPL? If not then
> people will make a big fuss. If it _is_ GPL then get it merged up!
It is under GPL license and available from git.stlinux.com at this time.
Please also consider that I'm going to maintain and update the sdhci-stm
driver, currently on high priority in our side.
Many thanks for your effort and support.
Best Regards,
Peppe
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mmc: add SDHCI driver for STM platforms.
2010-08-04 5:35 ` Peppe CAVALLARO
@ 2010-08-04 5:44 ` Andrew Morton
2010-08-04 5:47 ` Peppe CAVALLARO
0 siblings, 1 reply; 10+ messages in thread
From: Andrew Morton @ 2010-08-04 5:44 UTC (permalink / raw)
To: Peppe CAVALLARO; +Cc: Matt Fleming, linux-mmc@vger.kernel.org
On Wed, 4 Aug 2010 07:35:20 +0200 Peppe CAVALLARO <peppe.cavallaro@st.com> wrote:
> Hi Andrew,
>
> > -----Original Message-----
> > From: Andrew Morton [mailto:akpm@linux-foundation.org]
> > Sent: Wednesday, August 04, 2010 12:21 AM
> > To: Matt Fleming
> > Cc: Peppe CAVALLARO; linux-mmc@vger.kernel.org
> > Subject: Re: [PATCH] mmc: add SDHCI driver for STM platforms.
> >
> > On Mon, 2 Aug 2010 15:36:31 +0100
> > Matt Fleming <matt@console-pimps.org> wrote:
> >
> > > > > What is devm_stm_pad_claim()? I can't find this function in linus'
> > > > > tree, or in -next, or in Andrew's -mm series. Where is this function
> > > > > from?
> > > >
> > > > This comes from our STMicroelectronics platform pad management
> > > > infrastructure; code available from:
> > > > http://git.stlinux.com/?p=stm/linux-sh4-2.6.32.y.git;a=summary It's
> > > > used to claim/manage various resources i.e. PIO and clock lines.
> > >
> > > That's interesting. So, this driver won't build with linus' tree? I
> > > didn't think that the kernel catered for external interfaces like this
> > > - it causes all sorts of issues, not least of which is the fact that
> > > the driver can't be built or tested with the mainline kernel.
> > >
> > > Andrew, what do you make of this?
> >
> > It definitely needs to be compileable. Otherwise it's dead code to
> > everyone else and nobody can maintain it as they make tree-wide or
> > subsystem-wide changes.
> >
> > Also I do think the code in mainline should be able to be excecutable
> > (and testable!) without external code dependencies. This gets into the
> > realm of licensing concerns: is the out-of-tree code GPL? If not then
> > people will make a big fuss. If it _is_ GPL then get it merged up!
>
> It is under GPL license and available from git.stlinux.com at this time.
> Please also consider that I'm going to maintain and update the sdhci-stm
> driver, currently on high priority in our side.
>
So why not merge the sdhci-stm driver into mainline at the same time as
"mmc: add SDHCI driver for STM platforms"? Then all of this won't be an
issue at all.
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] mmc: add SDHCI driver for STM platforms.
2010-08-04 5:44 ` Andrew Morton
@ 2010-08-04 5:47 ` Peppe CAVALLARO
2010-08-04 8:03 ` Matt Fleming
0 siblings, 1 reply; 10+ messages in thread
From: Peppe CAVALLARO @ 2010-08-04 5:47 UTC (permalink / raw)
To: Andrew Morton; +Cc: Matt Fleming, linux-mmc@vger.kernel.org
Hi Andrew,
> -----Original Message-----
> From: Andrew Morton [mailto:akpm@linux-foundation.org]
> Sent: Wednesday, August 04, 2010 7:44 AM
> To: Peppe CAVALLARO
> Cc: Matt Fleming; linux-mmc@vger.kernel.org
> Subject: Re: [PATCH] mmc: add SDHCI driver for STM platforms.
>
> On Wed, 4 Aug 2010 07:35:20 +0200 Peppe CAVALLARO <peppe.cavallaro@st.com>
> wrote:
>
> > Hi Andrew,
> >
> > > -----Original Message-----
> > > From: Andrew Morton [mailto:akpm@linux-foundation.org]
> > > Sent: Wednesday, August 04, 2010 12:21 AM
> > > To: Matt Fleming
> > > Cc: Peppe CAVALLARO; linux-mmc@vger.kernel.org
> > > Subject: Re: [PATCH] mmc: add SDHCI driver for STM platforms.
> > >
> > > On Mon, 2 Aug 2010 15:36:31 +0100
> > > Matt Fleming <matt@console-pimps.org> wrote:
> > >
> > > > > > What is devm_stm_pad_claim()? I can't find this function in
> linus'
> > > > > > tree, or in -next, or in Andrew's -mm series. Where is this
> function
> > > > > > from?
> > > > >
> > > > > This comes from our STMicroelectronics platform pad management
> > > > > infrastructure; code available from:
> > > > > http://git.stlinux.com/?p=stm/linux-sh4-2.6.32.y.git;a=summary It's
> > > > > used to claim/manage various resources i.e. PIO and clock lines.
> > > >
> > > > That's interesting. So, this driver won't build with linus' tree? I
> > > > didn't think that the kernel catered for external interfaces like
> this
> > > > - it causes all sorts of issues, not least of which is the fact that
> > > > the driver can't be built or tested with the mainline kernel.
> > > >
> > > > Andrew, what do you make of this?
> > >
> > > It definitely needs to be compileable. Otherwise it's dead code to
> > > everyone else and nobody can maintain it as they make tree-wide or
> > > subsystem-wide changes.
> > >
> > > Also I do think the code in mainline should be able to be excecutable
> > > (and testable!) without external code dependencies. This gets into the
> > > realm of licensing concerns: is the out-of-tree code GPL? If not then
> > > people will make a big fuss. If it _is_ GPL then get it merged up!
> >
> > It is under GPL license and available from git.stlinux.com at this time.
> > Please also consider that I'm going to maintain and update the sdhci-stm
> > driver, currently on high priority in our side.
> >
>
> So why not merge the sdhci-stm driver into mainline at the same time as
> "mmc: add SDHCI driver for STM platforms"? Then all of this won't be an
> issue at all.
Yes, we can do it. The driver will be merged next. It is not a problem
for me ;-).
Peppe
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mmc: add SDHCI driver for STM platforms.
2010-08-04 5:47 ` Peppe CAVALLARO
@ 2010-08-04 8:03 ` Matt Fleming
2010-09-20 8:21 ` Peppe CAVALLARO
0 siblings, 1 reply; 10+ messages in thread
From: Matt Fleming @ 2010-08-04 8:03 UTC (permalink / raw)
To: Peppe CAVALLARO; +Cc: Andrew Morton, linux-mmc@vger.kernel.org
On Wed, Aug 04, 2010 at 07:47:21AM +0200, Peppe CAVALLARO wrote:
>
> Yes, we can do it. The driver will be merged next. It is not a problem
> for me ;-).
Fantastic!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mmc: add SDHCI driver for STM platforms.
2010-08-04 8:03 ` Matt Fleming
@ 2010-09-20 8:21 ` Peppe CAVALLARO
0 siblings, 0 replies; 10+ messages in thread
From: Peppe CAVALLARO @ 2010-09-20 8:21 UTC (permalink / raw)
To: Matt Fleming; +Cc: Andrew Morton, linux-mmc@vger.kernel.org
On 08/04/2010 10:03 AM, Matt Fleming wrote:
> On Wed, Aug 04, 2010 at 07:47:21AM +0200, Peppe CAVALLARO wrote:
> >
> > Yes, we can do it. The driver will be merged next. It is not a problem
> > for me ;-).
>
> Fantastic!
>
Hello Matt, Andrew,
I've just reworked the driver removing the invocation to the own
devm_stm_pad_claim function (because it's not yet included in Linus Kernel).
In the new patch, (v2) the claim of the resources is through the platform.
Please let me know if it's ok for you.
Regards,
Giuseppe
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-09-20 8:22 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-29 8:31 [PATCH] mmc: add SDHCI driver for STM platforms Giuseppe CAVALLARO
2010-07-30 14:04 ` Peppe CAVALLARO
[not found] ` <20100802134050.GA7944@console-pimps.org>
[not found] ` <107012446AC13D4C90B85672EAF5FB0E9C2E08E20E@SAFEX1MAIL3.st.com>
2010-08-02 14:36 ` Matt Fleming
2010-08-02 15:00 ` Peppe CAVALLARO
2010-08-03 22:21 ` Andrew Morton
2010-08-04 5:35 ` Peppe CAVALLARO
2010-08-04 5:44 ` Andrew Morton
2010-08-04 5:47 ` Peppe CAVALLARO
2010-08-04 8:03 ` Matt Fleming
2010-09-20 8:21 ` Peppe CAVALLARO
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.