diff mbox series

[3/3] mmc: enabling ColdFire esdhc controller support

Message ID 20190512194125.7091-3-angelo@sysam.it (mailing list archive)
State New, archived
Headers show
Series [1/3] mmc: add Coldfire esdhc support | expand

Commit Message

Angelo Dureghello May 12, 2019, 7:41 p.m. UTC
Signed-off-by: Angelo Dureghello <angelo@sysam.it>
---
 drivers/mmc/host/Kconfig  | 13 +++++++++++++
 drivers/mmc/host/Makefile |  3 +++
 2 files changed, 16 insertions(+)

Comments

Greg Ungerer May 13, 2019, 4:19 a.m. UTC | #1
Hi Angelo,

On 13/5/19 5:41 am, Angelo Dureghello wrote:
> Signed-off-by: Angelo Dureghello <angelo@sysam.it>
> ---
>   drivers/mmc/host/Kconfig  | 13 +++++++++++++
>   drivers/mmc/host/Makefile |  3 +++
>   2 files changed, 16 insertions(+)
> 
> diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
> index 0e86340536b6..91007572a097 100644
> --- a/drivers/mmc/host/Kconfig
> +++ b/drivers/mmc/host/Kconfig
> @@ -220,6 +220,19 @@ config MMC_SDHCI_CNS3XXX
>   
>   	  If unsure, say N.
>   
> +config MMC_SDHCI_ESDHC_MCF
> +	tristate "SDHCI support for the Freescale eSDHC ColdFire controller"
> +	depends on M5441x
> +	depends on MMC_SDHCI_PLTFM
> +	select MMC_SDHCI_IO_ACCESSORS
> +	help
> +	  This selects the Freescale eSDHC/uSDHC controller support
> +	  found on i.MX25, i.MX35 i.MX5x and i.MX6x.

So you copied/pasted this from the entry for the MMC_SDHCI_ESDHC_IMX driver?

I have not looked at the hardware module of the SHDC controller in
the ColdFire parts, but is it in any way similar or the same as
Freescale uses in the iMX families?

Regards
Greg



> +	  If you have a controller with this interface, say Y or M here.
> +
> +	  If unsure, say N.
> +
>   config MMC_SDHCI_ESDHC_IMX
>   	tristate "SDHCI support for the Freescale eSDHC/uSDHC i.MX controller"
>   	depends on ARCH_MXC
> diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile
> index 73578718f119..17c3826dfe81 100644
> --- a/drivers/mmc/host/Makefile
> +++ b/drivers/mmc/host/Makefile
> @@ -80,6 +80,7 @@ obj-$(CONFIG_MMC_REALTEK_USB)	+= rtsx_usb_sdmmc.o
>   obj-$(CONFIG_MMC_SDHCI_PLTFM)		+= sdhci-pltfm.o
>   obj-$(CONFIG_MMC_SDHCI_CADENCE)		+= sdhci-cadence.o
>   obj-$(CONFIG_MMC_SDHCI_CNS3XXX)		+= sdhci-cns3xxx.o
> +obj-$(CONFIG_MMC_SDHCI_ESDHC_MCF)       += sdhci-esdhc-mcf.o
>   obj-$(CONFIG_MMC_SDHCI_ESDHC_IMX)	+= sdhci-esdhc-imx.o
>   obj-$(CONFIG_MMC_SDHCI_DOVE)		+= sdhci-dove.o
>   obj-$(CONFIG_MMC_SDHCI_TEGRA)		+= sdhci-tegra.o
> @@ -104,3 +105,5 @@ endif
>   
>   obj-$(CONFIG_MMC_SDHCI_XENON)	+= sdhci-xenon-driver.o
>   sdhci-xenon-driver-y		+= sdhci-xenon.o sdhci-xenon-phy.o
> +
> +CFLAGS_sdhci-esdhc-mcf.o := -DDEBUG
>
Angelo Dureghello May 13, 2019, 7:06 a.m. UTC | #2
Hi Greg,
On Mon, May 13, 2019 at 02:19:57PM +1000, Greg Ungerer wrote:
> Hi Angelo,
> 
> On 13/5/19 5:41 am, Angelo Dureghello wrote:
> > Signed-off-by: Angelo Dureghello <angelo@sysam.it>
> > ---
> >   drivers/mmc/host/Kconfig  | 13 +++++++++++++
> >   drivers/mmc/host/Makefile |  3 +++
> >   2 files changed, 16 insertions(+)
> > 
> > diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
> > index 0e86340536b6..91007572a097 100644
> > --- a/drivers/mmc/host/Kconfig
> > +++ b/drivers/mmc/host/Kconfig
> > @@ -220,6 +220,19 @@ config MMC_SDHCI_CNS3XXX
> >   	  If unsure, say N.
> > +config MMC_SDHCI_ESDHC_MCF
> > +	tristate "SDHCI support for the Freescale eSDHC ColdFire controller"
> > +	depends on M5441x
> > +	depends on MMC_SDHCI_PLTFM
> > +	select MMC_SDHCI_IO_ACCESSORS
> > +	help
> > +	  This selects the Freescale eSDHC/uSDHC controller support
> > +	  found on i.MX25, i.MX35 i.MX5x and i.MX6x.
> 
> So you copied/pasted this from the entry for the MMC_SDHCI_ESDHC_IMX driver?
> 
> I have not looked at the hardware module of the SHDC controller in
> the ColdFire parts, but is it in any way similar or the same as
> Freescale uses in the iMX families?
> 

Oh, i forgot those iMX references, need to fix it, thanks for 
catching it.

Initially i tried to use the existing imx driver, but mainly
the ColdFire controller needs all ops/accessors functions to be
big endian, and there are other minimal differecies in the
controllers. Finally the simpliest way was to create a separate
module. The base is still sdhci.c.

> Regards
> Greg
> 

Regards,
Angelo
> 
> 
> > +	  If you have a controller with this interface, say Y or M here.
> > +
> > +	  If unsure, say N.
> > +
> >   config MMC_SDHCI_ESDHC_IMX
> >   	tristate "SDHCI support for the Freescale eSDHC/uSDHC i.MX controller"
> >   	depends on ARCH_MXC
> > diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile
> > index 73578718f119..17c3826dfe81 100644
> > --- a/drivers/mmc/host/Makefile
> > +++ b/drivers/mmc/host/Makefile
> > @@ -80,6 +80,7 @@ obj-$(CONFIG_MMC_REALTEK_USB)	+= rtsx_usb_sdmmc.o
> >   obj-$(CONFIG_MMC_SDHCI_PLTFM)		+= sdhci-pltfm.o
> >   obj-$(CONFIG_MMC_SDHCI_CADENCE)		+= sdhci-cadence.o
> >   obj-$(CONFIG_MMC_SDHCI_CNS3XXX)		+= sdhci-cns3xxx.o
> > +obj-$(CONFIG_MMC_SDHCI_ESDHC_MCF)       += sdhci-esdhc-mcf.o
> >   obj-$(CONFIG_MMC_SDHCI_ESDHC_IMX)	+= sdhci-esdhc-imx.o
> >   obj-$(CONFIG_MMC_SDHCI_DOVE)		+= sdhci-dove.o
> >   obj-$(CONFIG_MMC_SDHCI_TEGRA)		+= sdhci-tegra.o
> > @@ -104,3 +105,5 @@ endif
> >   obj-$(CONFIG_MMC_SDHCI_XENON)	+= sdhci-xenon-driver.o
> >   sdhci-xenon-driver-y		+= sdhci-xenon.o sdhci-xenon-phy.o
> > +
> > +CFLAGS_sdhci-esdhc-mcf.o := -DDEBUG
> >
Adrian Hunter June 12, 2019, 6:35 a.m. UTC | #3
On 12/05/19 10:41 PM, Angelo Dureghello wrote:
> Signed-off-by: Angelo Dureghello <angelo@sysam.it>
> ---
>  drivers/mmc/host/Kconfig  | 13 +++++++++++++
>  drivers/mmc/host/Makefile |  3 +++
>  2 files changed, 16 insertions(+)
> 
> diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
> index 0e86340536b6..91007572a097 100644
> --- a/drivers/mmc/host/Kconfig
> +++ b/drivers/mmc/host/Kconfig
> @@ -220,6 +220,19 @@ config MMC_SDHCI_CNS3XXX
>  
>  	  If unsure, say N.
>  
> +config MMC_SDHCI_ESDHC_MCF
> +	tristate "SDHCI support for the Freescale eSDHC ColdFire controller"
> +	depends on M5441x
> +	depends on MMC_SDHCI_PLTFM
> +	select MMC_SDHCI_IO_ACCESSORS
> +	help
> +	  This selects the Freescale eSDHC/uSDHC controller support
> +	  found on i.MX25, i.MX35 i.MX5x and i.MX6x.
> +
> +	  If you have a controller with this interface, say Y or M here.
> +
> +	  If unsure, say N.
> +
>  config MMC_SDHCI_ESDHC_IMX
>  	tristate "SDHCI support for the Freescale eSDHC/uSDHC i.MX controller"
>  	depends on ARCH_MXC
> diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile
> index 73578718f119..17c3826dfe81 100644
> --- a/drivers/mmc/host/Makefile
> +++ b/drivers/mmc/host/Makefile
> @@ -80,6 +80,7 @@ obj-$(CONFIG_MMC_REALTEK_USB)	+= rtsx_usb_sdmmc.o
>  obj-$(CONFIG_MMC_SDHCI_PLTFM)		+= sdhci-pltfm.o
>  obj-$(CONFIG_MMC_SDHCI_CADENCE)		+= sdhci-cadence.o
>  obj-$(CONFIG_MMC_SDHCI_CNS3XXX)		+= sdhci-cns3xxx.o
> +obj-$(CONFIG_MMC_SDHCI_ESDHC_MCF)       += sdhci-esdhc-mcf.o
>  obj-$(CONFIG_MMC_SDHCI_ESDHC_IMX)	+= sdhci-esdhc-imx.o
>  obj-$(CONFIG_MMC_SDHCI_DOVE)		+= sdhci-dove.o
>  obj-$(CONFIG_MMC_SDHCI_TEGRA)		+= sdhci-tegra.o
> @@ -104,3 +105,5 @@ endif
>  
>  obj-$(CONFIG_MMC_SDHCI_XENON)	+= sdhci-xenon-driver.o
>  sdhci-xenon-driver-y		+= sdhci-xenon.o sdhci-xenon-phy.o
> +
> +CFLAGS_sdhci-esdhc-mcf.o := -DDEBUG

Leftover debugging?

>
diff mbox series

Patch

diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index 0e86340536b6..91007572a097 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -220,6 +220,19 @@  config MMC_SDHCI_CNS3XXX
 
 	  If unsure, say N.
 
+config MMC_SDHCI_ESDHC_MCF
+	tristate "SDHCI support for the Freescale eSDHC ColdFire controller"
+	depends on M5441x
+	depends on MMC_SDHCI_PLTFM
+	select MMC_SDHCI_IO_ACCESSORS
+	help
+	  This selects the Freescale eSDHC/uSDHC controller support
+	  found on i.MX25, i.MX35 i.MX5x and i.MX6x.
+
+	  If you have a controller with this interface, say Y or M here.
+
+	  If unsure, say N.
+
 config MMC_SDHCI_ESDHC_IMX
 	tristate "SDHCI support for the Freescale eSDHC/uSDHC i.MX controller"
 	depends on ARCH_MXC
diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile
index 73578718f119..17c3826dfe81 100644
--- a/drivers/mmc/host/Makefile
+++ b/drivers/mmc/host/Makefile
@@ -80,6 +80,7 @@  obj-$(CONFIG_MMC_REALTEK_USB)	+= rtsx_usb_sdmmc.o
 obj-$(CONFIG_MMC_SDHCI_PLTFM)		+= sdhci-pltfm.o
 obj-$(CONFIG_MMC_SDHCI_CADENCE)		+= sdhci-cadence.o
 obj-$(CONFIG_MMC_SDHCI_CNS3XXX)		+= sdhci-cns3xxx.o
+obj-$(CONFIG_MMC_SDHCI_ESDHC_MCF)       += sdhci-esdhc-mcf.o
 obj-$(CONFIG_MMC_SDHCI_ESDHC_IMX)	+= sdhci-esdhc-imx.o
 obj-$(CONFIG_MMC_SDHCI_DOVE)		+= sdhci-dove.o
 obj-$(CONFIG_MMC_SDHCI_TEGRA)		+= sdhci-tegra.o
@@ -104,3 +105,5 @@  endif
 
 obj-$(CONFIG_MMC_SDHCI_XENON)	+= sdhci-xenon-driver.o
 sdhci-xenon-driver-y		+= sdhci-xenon.o sdhci-xenon-phy.o
+
+CFLAGS_sdhci-esdhc-mcf.o := -DDEBUG