Skip to contentSkip to conversation

mmc: Add driver for Freescale eSDHC controllers

PATCH In review Anton Vorontsov 6 participants 11 messages Jan 14, 2009 – Jan 22, 2009 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: Add driver for Freescale eSDHC controllers

From: Xie Xiaobo <[email protected]>

This patch adds support for the Freescale Enhanced Secure Digital Host Controller Interface as found in some Freescale PowerPC microprocessors (e.g. MPC837x SOCs).

---
 drivers/mmc/host/Kconfig  |    9 +
 drivers/mmc/host/Makefile |    1 +
 drivers/mmc/host/esdhc.c  | 1321 +++++++++++++++++++++++++++++++++++++++++++++
 drivers/mmc/host/esdhc.h  |  255 +++++++++
 4 files changed, 1586 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mmc/host/esdhc.c
 create mode 100644 drivers/mmc/host/esdhc.h
drivers/mmc/host/Kconfig +9 -0
index dfa585f..941975c 100644
@@ -65,6 +65,15 @@ config MMC_RICOH_MMC
 
 	  If unsure, say Y.
 
+config MMC_ESDHC
+	tristate "Freescale Enhanced SD Host Controller Interface support"
+	depends on FSL_SOC
+	help
+	  This selects the Freescale Enhanced SD Host Controller Interface
+	  as found in some Freescale PowerPC microprocessors.
+
+	  If unsure, say N.
+
 config MMC_OMAP
 	tristate "TI OMAP Multimedia Card Interface support"
 	depends on ARCH_OMAP
drivers/mmc/host/Makefile +1 -0
index f485328..031489f 100644
@@ -12,6 +12,7 @@ obj-$(CONFIG_MMC_IMX)		+= imxmmc.o
 obj-$(CONFIG_MMC_SDHCI)		+= sdhci.o
 obj-$(CONFIG_MMC_SDHCI_PCI)	+= sdhci-pci.o
 obj-$(CONFIG_MMC_RICOH_MMC)	+= ricoh_mmc.o
+obj-$(CONFIG_MMC_ESDHC)		+= esdhc.o
 obj-$(CONFIG_MMC_WBSD)		+= wbsd.o
 obj-$(CONFIG_MMC_AU1X)		+= au1xmmc.o
 obj-$(CONFIG_MMC_OMAP)		+= omap.o
drivers/mmc/host/esdhc.c new file +1321 -0

1,321 lines not on this page · raw message

drivers/mmc/host/esdhc.h new file +255 -0

255 lines not on this page · raw message

Signature · 1 line
1.5.6.5
#1 lore raw
Quoted 3 lines

This patch adds support for the Freescale Enhanced Secure Digital Host Controller Interface as found in some Freescale PowerPC microprocessors (e.g. MPC837x SOCs).

The Freescale ESDHC controller is basically compatible with the standard SDHC controller. but the eshdc expand some bits.

The esdhc.c is much like the orignal sdhci.c.
it is possible to merge them.

Thanks, Dave

#2 lore raw
Quoted 9 lines · Liu Dave
Quoted 3 lines

This patch adds support for the Freescale Enhanced Secure Digital Host Controller Interface as found in some Freescale PowerPC microprocessors (e.g. MPC837x SOCs).

The Freescale ESDHC controller is basically compatible with the standard SDHC controller. but the eshdc expand some bits.

The esdhc.c is much like the orignal sdhci.c.
it is possible to merge them.

Ah. I wonder why Freescale just didn't write some patches for sdhci, but copied the code instead...

Thanks for the info, I'll look into merging the driver into sdhci.

Signature · 3 lines
Anton Vorontsov
email: [email protected]
irc://irc.freenode.net/bd2
#3 lore raw
Quoted 4 lines · On Thu, 15 Jan 2009 02:56:05 +0300 Anton Vorontsov <[email protected]>…

Ah. I wonder why Freescale just didn't write some patches for sdhci, but copied the code instead...

Probably because it was quicker. Samsung did the same thing, but now Ben Dooks has patches to properly support it via sdhci.

Rgds

Signature · 9 lines
     -- Pierre Ossman

  Linux kernel, MMC maintainer        http://www.kernel.org
  rdesktop, core developer          http://www.rdesktop.org

  WARNING: This correspondence is being monitored by the
  Swedish government. Make sure your server uses encryption
  for SMTP traffic and consider using PGP for end-to-end
  encryption.
#4 lore raw
Quoted 2 lines

Probably because it was quicker. Samsung did the same thing, but now Ben Dooks has patches to properly support it via sdhci.

Pierre,
What samsung driver are you talking? Could you point it to me?

Thanks, Dave

#5 lore raw
Quoted 6 lines · On Thu, 15 Jan 2009 14:11:09 +0800 "Liu Dave" <[email protected]> wrote:
Quoted 2 lines

Probably because it was quicker. Samsung did the same thing, but now Ben Dooks has patches to properly support it via sdhci.

Pierre,
What samsung driver are you talking? Could you point it to me?

I'm afraid I haven't seen any readily available sources for their driver. If you meant Ben's version, you can find the latest revision here:

http://marc.info/?t=122823266100005

Unfortunately marc.info didn't sort out the threading, but you should be able to find all the patches there or some other LKML archive.

Rgds

Signature · 9 lines
     -- Pierre Ossman

  Linux kernel, MMC maintainer        http://www.kernel.org
  rdesktop, core developer          http://www.rdesktop.org

  WARNING: This correspondence is being monitored by the
  Swedish government. Make sure your server uses encryption
  for SMTP traffic and consider using PGP for end-to-end
  encryption.
#6 lore raw
Quoted 8 lines

I'm afraid I haven't seen any readily available sources for their driver. If you meant Ben's version, you can find the latest revision here:
=20
http://marc.info/?t=3D122823266100005
=20
Unfortunately marc.info didn't sort out the threading, but you should be able to find all the patches there or some other LKML archive.

Thanks Pierre, That is my needs.

#7 lore raw
In reply to Anton Vorontsov
Quoted 5 lines · Anton Vorontsov
Quoted 4 lines · Liu Dave
Quoted 3 lines

This patch adds support for the Freescale Enhanced Secure Digital Host Controller Interface as found in some Freescale PowerPC microprocessors (e.g. MPC837x SOCs).

Quoted 8 lines
Quoted 5 lines

The Freescale ESDHC controller is basically compatible with the standard SDHC controller. but the eshdc expand some bits.

The esdhc.c is much like the orignal sdhci.c.
it is possible to merge them.

Ah. I wonder why Freescale just didn't write some patches for sdhci, but copied the code instead...

For the same reasons earthmen like tea.

Signature · 3 lines
Ben ([email protected], http://www.fluff.org/)

  'a smiley only costs 4 bytes'
#8 lore raw
In reply to Anton Vorontsov
Quoted 11 lines · Anton Vorontsov

From: Xie Xiaobo <[email protected]>

This patch adds support for the Freescale Enhanced Secure Digital Host Controller Interface as found in some Freescale PowerPC microprocessors (e.g. MPC837x SOCs).

---

Quoted 8 lines
drivers/mmc/host/Kconfig  |    9 +
drivers/mmc/host/Makefile |    1 +
drivers/mmc/host/esdhc.c  | 1321 ++++++++++++++++++++++++++++++++++++ 
+++++++++
drivers/mmc/host/esdhc.h  |  255 +++++++++
4 files changed, 1586 insertions(+), 0 deletions(-)

create mode 100644 drivers/mmc/host/esdhc.c
create mode 100644 drivers/mmc/host/esdhc.h

Want to work some device tree docs for this.

- k

#9 lore raw
Quoted 23 lines · Kumar Gala
Quoted 11 lines · Anton Vorontsov

From: Xie Xiaobo <[email protected]>

This patch adds support for the Freescale Enhanced Secure Digital Host Controller Interface as found in some Freescale PowerPC microprocessors (e.g. MPC837x SOCs).

---

Quoted 8 lines
drivers/mmc/host/Kconfig  |    9 +
drivers/mmc/host/Makefile |    1 +
drivers/mmc/host/esdhc.c  | 1321 ++++++++++++++++++++++++++++++++++++ 
+++++++++
drivers/mmc/host/esdhc.h  |  255 +++++++++
4 files changed, 1586 insertions(+), 0 deletions(-)

create mode 100644 drivers/mmc/host/esdhc.c
create mode 100644 drivers/mmc/host/esdhc.h

Quoted 1 line

Want to work some device tree docs for this.

Will do. Though all the needed nodes already in the .dts files. ;-)

Thanks,

Signature · 3 lines
Anton Vorontsov
email: [email protected]
irc://irc.freenode.net/bd2
#10 lore raw
In reply to Anton Vorontsov

drivers/mmc/host/Kconfig config MMC_RICOH_MMC · line 75

Quoted 9 lines · Anton Vorontsov
drivers/mmc/host/Kconfig +8 -0
+config MMC_ESDHC
+       tristate "Freescale Enhanced SD Host Controller Interface support"
+       depends on FSL_SOC
+       help
+         This selects the Freescale Enhanced SD Host Controller Interface
+         as found in some Freescale PowerPC microprocessors.
+
+         If unsure, say N.

The naming could be improved, calling it ESDHC instead of ESDHCI is very
confusing: SDHCI is the controller chip while SDHC is a type of card (high capacity SD). This driver clearly does not refer to the card type but rather to the controller.

	Arnd <><