Skip to contentSkip to conversation

Add DT support for davinci_mmc driver

PATCH New Manjunathappa, Prakash 4 participants 8 messages Mar 28, 2013 – Apr 3, 2013 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

v7 cover Add DT support for davinci_mmc driver

Patch set adds DT support for davinci_mmc driver and is verified on da850-evm without card_detect/write_protect and EDMA support. Also takecare to derive controller IP version from platform_device_id table, remove version specification in pdata.

Applies on top of below patch series under community review:
"Enable SPI flash support on da850-evm DT kernel"
http://www.spinics.net/lists/arm-kernel/msg231546.html

This series is reviewed and tested by Sekhar Nori, with and without DT on da850 EVM.

Since v6:
Add DMA handling capability, but not tested.

Since v5:
Add below patch to this series.
"mmc: davinci: allow driver to work without DMA resource" Choose smaller device name, da830-mmc instead of davinci-mmc-da830 and dm6441-mmc instead of davinci-mmc-dm355.

Since v4:
Minor nit, check on return value for failure of max-frequency property parsing.
Merged patch "ARM: davinci: mmc: derive version information from device name" with patch 1/4.

Since v3:
Added support to derive IP version information from platform_device_id table.

Since v2:
Modified the default value for bus-width and skipping the property specifications for highspeed card capabilties for now. Re-ordered patch 2 and 3.

Since v1:
Modified the DT parse function to take default values, updated DT binding documentation accordingly.

Manjunathappa, Prakash (5):
mmc: davinci: allow driver to work without DMA resource
ARM: davinci: mmc: derive version information from device name
mmc: davinci_mmc: add DT support
ARM: davinci: da850: add mmc DT entries
ARM: davinci: da850: override mmc DT node device name

 .../devicetree/bindings/mmc/davinci_mmc.txt        |   33 +++++++
 arch/arm/boot/dts/da850-evm.dts                    |    7 ++
 arch/arm/boot/dts/da850.dtsi                       |   15 +++
 arch/arm/mach-davinci/board-da830-evm.c            |    1 -
 arch/arm/mach-davinci/board-da850-evm.c            |    2 -
 arch/arm/mach-davinci/board-dm355-evm.c            |    1 -
 arch/arm/mach-davinci/board-dm365-evm.c            |    1 -
 arch/arm/mach-davinci/board-dm644x-evm.c           |    1 -
 arch/arm/mach-davinci/board-neuros-osd2.c          |    1 -
 arch/arm/mach-davinci/board-omapl138-hawk.c        |    1 -
 arch/arm/mach-davinci/board-tnetv107x-evm.c        |    1 -
 arch/arm/mach-davinci/da830.c                      |    2 +-
 arch/arm/mach-davinci/da850.c                      |    4 +-
 arch/arm/mach-davinci/da8xx-dt.c                   |    1 +
 arch/arm/mach-davinci/devices-da8xx.c              |    4 +-
 arch/arm/mach-davinci/devices-tnetv107x.c          |    4 +-
 arch/arm/mach-davinci/devices.c                    |    6 +-
 arch/arm/mach-davinci/dm355.c                      |    4 +-
 arch/arm/mach-davinci/dm365.c                      |    4 +-
 arch/arm/mach-davinci/dm644x.c                     |    2 +-
 arch/arm/mach-davinci/tnetv107x.c                  |    4 +-
 drivers/mmc/host/davinci_mmc.c                     |   98 ++++++++++++++++++--
 include/linux/platform_data/mmc-davinci.h          |    3 -
 23 files changed, 163 insertions(+), 37 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mmc/davinci_mmc.txt
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH v7 1/5 mmc: davinci: allow driver to work without DMA resource

Do not return probe failure with missing DMA resources, allow driver to work in PIO mode.
Tested on da850-evm by mounting partition followed by file creation and deletion.

---
 drivers/mmc/host/davinci_mmc.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
drivers/mmc/host/davinci_mmc.c +6 -4
index f5d46ea..bd848d3 100644
@@ -1191,13 +1191,15 @@ static int __init davinci_mmcsd_probe(struct platform_device *pdev)
 
 	r = platform_get_resource(pdev, IORESOURCE_DMA, 0);
 	if (!r)
-		goto out;
-	host->rxdma = r->start;
+		dev_warn(&pdev->dev, "RX DMA resource not specified\n");
+	else
+		host->rxdma = r->start;
 
 	r = platform_get_resource(pdev, IORESOURCE_DMA, 1);
 	if (!r)
-		goto out;
-	host->txdma = r->start;
+		dev_warn(&pdev->dev, "TX DMA resource not specified\n");
+	else
+		host->txdma = r->start;
 
 	host->mem_res = mem;
 	host->base = ioremap(mem->start, mem_size);
Signature · 1 line
1.7.4.1
#2 lore raw

PATCH v7 1/5 mmc: davinci: allow driver to work without DMA resource

Quoted 7 lines · Prakash

Do not return probe failure with missing DMA resources, allow driver to work in PIO mode.
Tested on da850-evm by mounting partition followed by file creation and deletion.

Chris accepted this patch on March 22nd. You should have dropped this from this series.

Thanks,
Sekhar

#3 lore raw

PATCH v7 1/5 mmc: davinci: allow driver to work without DMA resource

Quoted 6 lines · Sekhar
Quoted 5 lines · Prakash

Do not return probe failure with missing DMA resources, allow driver to work in PIO mode.
Tested on da850-evm by mounting partition followed by file creation and deletion.

Quoted 6 lines
Quoted 2 lines

Chris accepted this patch on March 22nd. You should have dropped this from this series.

Thanks Sekhar, I missed Chris's reply somehow.

Chris,
Please ignore this patch.

Regards,
Prakash

#4 lore raw

v7 cover Add DT support for davinci_mmc driver

In reply to Manjunathappa, Prakash
Quoted 6 lines · Prakash

Patch set adds DT support for davinci_mmc driver and is verified on da850-evm without card_detect/write_protect and EDMA support. Also takecare to derive controller IP version from platform_device_id table, remove version specification in pdata.

Quoted 6 lines

Applies on top of below patch series under community review:
"Enable SPI flash support on da850-evm DT kernel"
http://www.spinics.net/lists/arm-kernel/msg231546.html

This series is reviewed and tested by Sekhar Nori, with and without DT on da850 EVM.

Very nice!

Quoted 2 lines

Since v6:
Add DMA handling capability, but not tested.

What I was asking for was actually just adding the description to the binding documentation, not also to the code, but the code does look correct to me, so this is fine, too.

Arnd

#5 lore raw

v7 cover Add DT support for davinci_mmc driver

In reply to Manjunathappa, Prakash

Hi Chris,

Quoted 29 lines · Prakash

Patch set adds DT support for davinci_mmc driver and is verified on da850-evm without card_detect/write_protect and EDMA support. Also takecare to derive controller IP version from platform_device_id table, remove version specification in pdata.

Manjunathappa, Prakash (5):
mmc: davinci: allow driver to work without DMA resource
ARM: davinci: mmc: derive version information from device name
mmc: davinci_mmc: add DT support
ARM: davinci: da850: add mmc DT entries
ARM: davinci: da850: override mmc DT node device name

 .../devicetree/bindings/mmc/davinci_mmc.txt        |   33 +++++++
 arch/arm/boot/dts/da850-evm.dts                    |    7 ++
 arch/arm/boot/dts/da850.dtsi                       |   15 +++
 arch/arm/mach-davinci/board-da830-evm.c            |    1 -
 arch/arm/mach-davinci/board-da850-evm.c            |    2 -
 arch/arm/mach-davinci/board-dm355-evm.c            |    1 -
 arch/arm/mach-davinci/board-dm365-evm.c            |    1 -
 arch/arm/mach-davinci/board-dm644x-evm.c           |    1 -
 arch/arm/mach-davinci/board-neuros-osd2.c          |    1 -
 arch/arm/mach-davinci/board-omapl138-hawk.c        |    1 -
 arch/arm/mach-davinci/board-tnetv107x-evm.c        |    1 -
 arch/arm/mach-davinci/da830.c                      |    2 +-
 arch/arm/mach-davinci/da850.c                      |    4 +-
 arch/arm/mach-davinci/da8xx-dt.c                   |    1 +
 arch/arm/mach-davinci/devices-da8xx.c              |    4 +-
 arch/arm/mach-davinci/devices-tnetv107x.c          |    4 +-
 arch/arm/mach-davinci/devices.c                    |    6 +-
Quoted 8 lines
 arch/arm/mach-davinci/dm355.c                      |    4 +-
 arch/arm/mach-davinci/dm365.c                      |    4 +-
 arch/arm/mach-davinci/dm644x.c                     |    2 +-
 arch/arm/mach-davinci/tnetv107x.c                  |    4 +-
 drivers/mmc/host/davinci_mmc.c                     |   98 ++++++++++++++++++--
 include/linux/platform_data/mmc-davinci.h          |    3 -
 23 files changed, 163 insertions(+), 37 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mmc/davinci_mmc.txt

I would like to take this series through DaVinci tree to manage the dependencies with mach-davinci. I need your ack on the driver part and the DT binding. Can you please provide your ack?

Thanks,
Sekhar

#6 lore raw

v7 cover Add DT support for davinci_mmc driver

Hi,

Quoted 3 lines · Sekhar Nori

I would like to take this series through DaVinci tree to manage the dependencies with mach-davinci. I need your ack on the driver part and the DT binding. Can you please provide your ack?

Thanks,

- Chris.

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

v7 cover Add DT support for davinci_mmc driver

Quoted 8 lines · Chris Ball

Hi,

Quoted 3 lines · Sekhar Nori

I would like to take this series through DaVinci tree to manage the dependencies with mach-davinci. I need your ack on the driver part and the DT binding. Can you please provide your ack?

Thanks Chris. I added your Ack to 2/5 and 3/5 which had driver changes.

Regards,
Sekhar