Skip to contentSkip to conversation

MMC: SD/MMC Host Controller for Wondermedia WM8505/WM8650

PATCH In review Tony Prisk 2 participants 4 messages Nov 18, 2012

Subsystems (3)
lore
Share & tools
lore

Tony Prisk

author
#0 lore raw

PATCH v3 1/1 MMC: SD/MMC Host Controller for Wondermedia WM8505/WM8650

This patch adds support for the SD/MMC host controller found on Wondermedia 8xxx series SoCs, currently supported under arm/arch-vt8500.

A binding document is also included, based on mmc.txt with additional properties.

---
v2: Changes made as per review by Girish K S
v3: Changes made as per review by Chris Ball
Add MAINTAINERS entry for driver
Replace pr_err with dev_err.
Style changes as requested.

 .../devicetree/bindings/mmc/vt8500-sdmmc.txt       |   23 +
 MAINTAINERS                                        |    1 +
 drivers/mmc/host/Kconfig                           |   12 +
 drivers/mmc/host/Makefile                          |    1 +
 drivers/mmc/host/wmt-sdmmc.c                       | 1025 ++++++++++++++++++++
 5 files changed, 1062 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mmc/vt8500-sdmmc.txt
 create mode 100644 drivers/mmc/host/wmt-sdmmc.c
Documentation/devicetree/bindings/mmc/vt8500-sdmmc.txt new file +23 -0
new file mode 100644
index 0000000..d7fb6ab
@@ -0,0 +1,23 @@
+* Wondermedia WM8505/WM8650 SD/MMC Host Controller
+
+This file documents differences between the core properties described
+by mmc.txt and the properties used by the wmt-sdmmc driver.
+
+Required properties:
+- compatible: Should be "wm,wm8505-sdhc".
+- interrupts: Two interrupts are required - regular irq and dma irq.
+
+Optional properties:
+- sdon-inverted: SD_ON bit is inverted on the controller
+
+Examples:
+
+sdhc@d800a000 {
+	compatible = "wm,wm8505-sdhc";
+	reg = <0xd800a000 0x1000>;
+	interrupts = <20 21>;
+	clocks = <&sdhc>;
+	bus-width = <4>;
+	sdon-inverted;
+};
+
MAINTAINERS +1 -0
index e73060f..edb72f1 100644
@@ -1221,6 +1221,7 @@ F:	drivers/video/wm8505fb*
 F:	drivers/video/wmt_ge_rops.*
 F:	drivers/tty/serial/vt8500_serial.c
 F:	drivers/rtc/rtc-vt8500-c
+F:	drivers/mmc/host/wmt-sdmmc.c
 
 ARM/ZIPIT Z2 SUPPORT
 M:	Marek Vasut <[email protected]>
drivers/mmc/host/Kconfig +12 -0
index 9bf10e7..7f4377b 100644
@@ -621,3 +621,15 @@ config MMC_USHC
 
 	  Note: These controllers only support SDIO cards and do not
 	  support MMC or SD memory cards.
+
+config MMC_WMT
+	tristate "Wondermedia SD/MMC Host Controller support"
+	depends on ARCH_VT8500
+	default y
+	help
+	  This selects support for the SD/MMC Host Controller on
+	  Wondermedia WM8505/WM8650 based SoCs.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called wmt-sdmmc.
+
drivers/mmc/host/Makefile +1 -0
index 17ad0a7..9c91f1f 100644
@@ -45,6 +45,7 @@ obj-$(CONFIG_MMC_SH_MMCIF)	+= sh_mmcif.o
 obj-$(CONFIG_MMC_JZ4740)	+= jz4740_mmc.o
 obj-$(CONFIG_MMC_VUB300)	+= vub300.o
 obj-$(CONFIG_MMC_USHC)		+= ushc.o
+obj-$(CONFIG_MMC_WMT)		+= wmt-sdmmc.o
 
 obj-$(CONFIG_MMC_SDHCI_PLTFM)		+= sdhci-pltfm.o
 obj-$(CONFIG_MMC_SDHCI_CNS3XXX)		+= sdhci-cns3xxx.o
drivers/mmc/host/wmt-sdmmc.c new file +1025 -0

1,025 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#1 lore raw

Hi Tony, thanks for the quick turnaround,

drivers/mmc/host/wmt-sdmmc.c line 790

Quoted 5 lines · Tony Prisk
drivers/mmc/host/wmt-sdmmc.c new file +5 -0
+	regular_irq = irq_of_parse_and_map(np, 0);
+	dma_irq = irq_of_parse_and_map(np, 1);
+
+	if ((!regular_irq) | (!dma_irq)) {
+		dev_err(&pdev->dev, "Getting IRQs failed!\n");

I think you meant ||, not |, and you could remove the redundant parens.

Other than that, I think this is ready -- if you want to ACK the above change I'll fold it in without having you resend the patch.

Thanks,

- Chris.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
author Acked-by
#2 lore raw
Quoted 11 lines · Chris Ball

Hi Tony, thanks for the quick turnaround,

drivers/mmc/host/wmt-sdmmc.c line 790

Quoted 5 lines · Tony Prisk
drivers/mmc/host/wmt-sdmmc.c new file +5 -0
+	regular_irq = irq_of_parse_and_map(np, 0);
+	dma_irq = irq_of_parse_and_map(np, 1);
+
+	if ((!regular_irq) | (!dma_irq)) {
+		dev_err(&pdev->dev, "Getting IRQs failed!\n");

I think you meant ||, not |, and you could remove the redundant parens.

Quoted 6 lines

Other than that, I think this is ready -- if you want to ACK the above change I'll fold it in without having you resend the patch.

Thanks,

- Chris.

Oops - Good catch.

Regards
Tony P

#3 lore raw

Hi,

Quoted 9 lines · Tony Prisk
Quoted 9 lines · Tony Prisk

drivers/mmc/host/wmt-sdmmc.c line 790

Quoted 5 lines
drivers/mmc/host/wmt-sdmmc.c new file +5 -0
+	regular_irq = irq_of_parse_and_map(np, 0);
+	dma_irq = irq_of_parse_and_map(np, 1);
+
+	if ((!regular_irq) | (!dma_irq)) {
+		dev_err(&pdev->dev, "Getting IRQs failed!\n");

I think you meant ||, not |, and you could remove the redundant parens.

Quoted 5 lines
Quoted 2 lines

Other than that, I think this is ready -- if you want to ACK the above change I'll fold it in without having you resend the patch.

Oops - Good catch.

Thanks, pushed to mmc-next for 3.8.

- Chris.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child