[PATCH] mmc: atmel-mci: fix timeout errors in SDIO mode when using DMA

2013-11-20 Thread ludovic.desroches
From: Ludovic Desroches With some SDIO devices, timeout errors can happen when reading data. To solve this issue the DMA transfer has to be activated before sending the command to the device. This order is incorrect in PDC mode. So we have to take care if we are using DMA or PDC to know when to s

[PATCH] mmc: atmel-mci: fix oops in atmci_tasklet_func

2013-09-09 Thread ludovic.desroches
From: Rodolfo Giometti In some cases, a NULL pointer dereference happens because data is NULL when STATE_END_REQUEST case is reached in atmci_tasklet_func. Cc: #3.9+ Signed-off-by: Rodolfo Giometti Acked-by: Ludovic Desroches --- drivers/mmc/host/atmel-mci.c | 14 -- 1 file chang

[PATCH] mmc: atmel-mci: abort transfer on timeout error

2013-09-09 Thread ludovic.desroches
From: Ludovic Desroches When a software timeout occurs, the transfer is not stopped. In DMA case, it causes DMA channel to be stuck because the transfer is still active causing following transfers to be queued but not computed. Cc: #3.9+ Signed-off-by: Ludovic Desroches Reported-by: Alexander

[PATCH v3 6/6] ARM: at91: dts: add MCI DMA support

2013-04-19 Thread ludovic.desroches
From: Ludovic Desroches Add DMA resources to MCI nodes. Signed-off-by: Ludovic Desroches --- arch/arm/boot/dts/at91sam9g45.dtsi | 4 arch/arm/boot/dts/at91sam9n12.dtsi | 2 ++ arch/arm/boot/dts/at91sam9x5.dtsi | 4 arch/arm/boot/dts/sama5d3.dtsi | 6 ++ 4 files changed, 16 i

[PATCH v3 5/6] mci: at91: convert to dma_request_slave_channel_compat()

2013-04-19 Thread ludovic.desroches
From: Ludovic Desroches Use generic DMA DT helper. Platforms booting with or without DT populated are both supported. Signed-off-by: Ludovic Desroches Acked-by: Jean-Christophe PLAGNIOL-VILLARD Acked-by: Nicolas Ferre --- drivers/mmc/host/atmel-mci.c | 25 - 1 file ch

[PATCH v3 4/6] ARM: at91: dts: add i2c dma support

2013-04-19 Thread ludovic.desroches
From: Ludovic Desroches Add DMA resources to i2c nodes. Signed-off-by: Ludovic Desroches --- arch/arm/boot/dts/at91sam9n12.dtsi | 6 ++ arch/arm/boot/dts/at91sam9x5.dtsi | 9 + arch/arm/boot/dts/sama5d3.dtsi | 9 + 3 files changed, 24 insertions(+) diff --git a/arch/a

[PATCH v3 3/6] i2c: at91: convert to dma_request_slave_channel_compat()

2013-04-19 Thread ludovic.desroches
From: Ludovic Desroches Use generic DMA DT helper. Platforms booting with or without DT populated are both supported. Signed-off-by: Ludovic Desroches Acked-by: Nicolas Ferre Acked-by: Jean-Christophe PLAGNIOL-VILLARD --- drivers/i2c/busses/i2c-at91.c | 49 ++-

[PATCH v3 2/6] ARM: at91: dts: set #dma-cells to the correct value

2013-04-19 Thread ludovic.desroches
From: Ludovic Desroches Moving to generic DMA DT binding involves to set #dma-cells to 2. Signed-off-by: Ludovic Desroches --- arch/arm/boot/dts/at91sam9g45.dtsi | 1 + arch/arm/boot/dts/at91sam9n12.dtsi | 1 + arch/arm/boot/dts/at91sam9x5.dtsi | 2 ++ arch/arm/boot/dts/sama5d3.dtsi | 4 +

[PATCH v3 1/6] at_hdmac: move to generic DMA binding

2013-04-19 Thread ludovic.desroches
From: Ludovic Desroches Update at_hdmac driver to support generic DMA device tree binding. Devices can still request channel with dma_request_channel() then it doesn't break DMA for non DT boards. Signed-off-by: Ludovic Desroches Acked-by: Nicolas Ferre Acked-by: Jean-Christophe PLAGNIOL-VILLA

[PATCH v3 0/6] ARM: at91: move to generic DMA device tree binding

2013-04-19 Thread ludovic.desroches
From: Ludovic Desroches Hi, I resend the set of patches due to minor fixes. I think patches will go through different subsytems. Patch 1/6: dma subsystem Patch 2/6, 4/6, 6/6: arm-soc Patch 3/6: i2c subsystem, already taken by Wolfram, thx. Patch 5/6: mmc subsystem v3 changes: - compile at_dma_

[PATCH 6/6] ARM: at91: dts: add MCI DMA support

2013-04-16 Thread ludovic.desroches
From: Ludovic Desroches Add DMA resources to MCI nodes. Signed-off-by: Ludovic Desroches --- arch/arm/boot/dts/at91sam9g45.dtsi | 4 arch/arm/boot/dts/at91sam9n12.dtsi | 2 ++ arch/arm/boot/dts/at91sam9x5.dtsi | 4 arch/arm/boot/dts/sama5d3.dtsi | 6 ++ 4 files changed, 16 i

[PATCH 5/6] mci: at91: convert to dma_request_slave_channel_compat()

2013-04-16 Thread ludovic.desroches
From: Ludovic Desroches Use generic DMA DT helper. Platforms booting with or without DT populated are both supported. Signed-off-by: Ludovic Desroches Acked-by: Jean-Christophe PLAGNIOL-VILLARD Acked-by: Nicolas Ferre --- drivers/mmc/host/atmel-mci.c | 25 - 1 file ch

[PATCH 4/6] ARM: at91: dts: add i2c dma support

2013-04-16 Thread ludovic.desroches
From: Ludovic Desroches Add DMA resources to i2c nodes. Signed-off-by: Ludovic Desroches --- arch/arm/boot/dts/at91sam9n12.dtsi | 6 ++ arch/arm/boot/dts/at91sam9x5.dtsi | 9 + arch/arm/boot/dts/sama5d3.dtsi | 9 + 3 files changed, 24 insertions(+) diff --git a/arch/a

[PATCH 3/6] i2c: at91: convert to dma_request_slave_channel_compat()

2013-04-16 Thread ludovic.desroches
From: Ludovic Desroches Use generic DMA DT helper. Platforms booting with or without DT populated are both supported. Signed-off-by: Ludovic Desroches --- drivers/i2c/busses/i2c-at91.c | 49 ++- 1 file changed, 25 insertions(+), 24 deletions(-) diff --g

[PATCH 2/6] ARM: at91: dts: set #dma-cells to the correct value

2013-04-16 Thread ludovic.desroches
From: Ludovic Desroches Moving to generic DMA DT binding involves to set #dma-cells to 2. Signed-off-by: Ludovic Desroches --- arch/arm/boot/dts/at91sam9g45.dtsi | 1 + arch/arm/boot/dts/at91sam9n12.dtsi | 1 + arch/arm/boot/dts/at91sam9x5.dtsi | 2 ++ arch/arm/boot/dts/sama5d3.dtsi | 4 +

[PATCH 1/6] at_hdmac: move to generic DMA binding

2013-04-16 Thread ludovic.desroches
From: Ludovic Desroches Update at_hdmac driver to support generic DMA device tree binding. Devices can still request channel with dma_request_channel() then it doesn't break DMA for non DT boards. Signed-off-by: Ludovic Desroches Acked-by: Nicolas Ferre Acked-by: Jean-Christophe PLAGNIOL-VILLA

[PATCH v2 0/6] ARM: at91: move to generic DMA device tree binding

2013-04-16 Thread ludovic.desroches
From: Ludovic Desroches Hi, This set of patches introduces DMA device tree bindings support for the atmel DMA controller and first driver conversions. Patch 3/6 has already been taken by Wolfram. v2 changes: - update documentation about dma bindings according to Nicolas' comments - put dtsi ch

[PATCH 3/3] mci: at91: convert to dma_request_slave_channel_compat()

2013-04-15 Thread ludovic.desroches
From: Ludovic Desroches Use generic DMA DT helper. Platforms booting with or without DT populated are both supported. Signed-off-by: Ludovic Desroches --- drivers/mmc/host/atmel-mci.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/drivers/mmc/ho

[PATCH 2/3] i2c: at91: convert to dma_request_slave_channel_compat()

2013-04-15 Thread ludovic.desroches
From: Ludovic Desroches Use generic DMA DT helper. Platforms booting with or without DT populated are both supported. Signed-off-by: Ludovic Desroches --- drivers/i2c/busses/i2c-at91.c | 49 ++- 1 file changed, 25 insertions(+), 24 deletions(-) diff --g

[PATCH 1/3] at_hdmac: move to generic DMA binding

2013-04-15 Thread ludovic.desroches
From: Ludovic Desroches Update at_hdmac driver to support generic DMA device tree binding. Devices can still request channel with dma_request_channel() then it doesn't break DMA for non DT boards. Signed-off-by: Ludovic Desroches --- .../devicetree/bindings/dma/atmel-dma.txt | 26

[PATCH 0/3] ARM: at91: move to generic DMA device tree bindings

2013-04-15 Thread ludovic.desroches
From: Ludovic Desroches Hi, This set of patches introduces DMA device tree bindings support for the atmel DMA controller and first driver conversions. I'll send an update of dts file in the next version if there is no major issue with the bindings. Regards Ludovic Desroches (3): at_hdmac:

[PATCH] mmc: atmel-mci: pio hang on block errors

2013-03-20 Thread ludovic.desroches
From: Terry Barnaby The driver is doing, by default, multi-block reads. When a block error occurs card/block.c instigates a single block read: "mmcblk0: retrying using single block read". It leaves the sg chain intact and just changes the length attribute for the first sg entry and the overall sg

[PATCH] mmc: at91-mci: remove driver

2012-10-29 Thread ludovic.desroches
From: Ludovic Desroches The at91-mci driver is no more needed since atmel-mci driver supports all Atmel devices. Signed-off-by: Ludovic Desroches Acked-by: Nicolas Ferre --- Hello, This patch removes the old at91-mci driver for 3.8 as it has been planned. Regards Ludovic MAINTAINERS

[PATCH 4/4] ARM: dts: add nodes for atmel hsmci controllers for atmel boards

2012-07-24 Thread ludovic.desroches
From: Ludovic Desroches Add mci controller nodes to atmel boards. Signed-off-by: Ludovic Desroches Acked-by: Jean-Christophe PLAGNIOL-VILLARD --- arch/arm/boot/dts/at91sam9263ek.dts | 10 ++ arch/arm/boot/dts/at91sam9g20ek_2mmc.dts| 12 arch/arm/boot/dts/a

[PATCH 3/4] ARM: dts: add nodes for atmel hsmci controllers for atmel SOCs

2012-07-24 Thread ludovic.desroches
From: Ludovic Desroches Add mci controller nodes to atmel SOCs. Signed-off-by: Ludovic Desroches Acked-by: Jean-Christophe PLAGNIOL-VILLARD --- arch/arm/boot/dts/at91sam9260.dtsi |9 + arch/arm/boot/dts/at91sam9263.dtsi | 18 ++ arch/arm/boot/dts/at91sam9g45.dtsi

[PATCH 2/4] ARM: at91: add clocks for DT entries

2012-07-24 Thread ludovic.desroches
From: Ludovic Desroches Add clocks to clock lookup table for DT entries. Signed-off-by: Ludovic Desroches Acked-by: Jean-Christophe PLAGNIOL-VILLARD --- arch/arm/mach-at91/at91sam9260.c |1 + arch/arm/mach-at91/at91sam9263.c |2 ++ arch/arm/mach-at91/at91sam9g45.c |2 ++ arch/arm/

[PATCH 1/4] mmc: atmel-mci: add device tree support

2012-07-24 Thread ludovic.desroches
From: Ludovic Desroches Signed-off-by: Ludovic Desroches --- .../devicetree/bindings/mmc/atmel-hsmci.txt| 68 drivers/mmc/host/atmel-mci.c | 85 +++- 2 files changed, 151 insertions(+), 2 deletions(-) create mode 100644 Documen

[PATCH RESEND v5 0/4] atmel-mci device tree support

2012-07-24 Thread ludovic.desroches
From: Ludovic Desroches Hello, I resend this set of patches because patches 2, 3 and 4 were acked by Jean-Christophe. Patch 1 was also acked by Jean-Christophe excepted for cd-inverted property since it was redundant with gpio bindings. I thought we were agree to go ahead since it was a common

[PATCH] mmc: atmel-mci: not busy flag has also to be used for read operations

2012-07-24 Thread ludovic.desroches
From: Ludovic Desroches Even if the datasheet says that the not busy flag has to be used only for write operations, it's false excepted for version lesser than v2xx. Not waiting the not busy flag for read operations can cause the controller to hang-up during the initialization of some SD cards.

[PATCH] mmc: atmel-mci: fix burst/chunk size modification

2012-06-06 Thread ludovic.desroches
From: Nicolas Ferre The use of DMA slave config operation requires that the burst size (aka chunk size) is specified through this interface. Modify atmel-mci slave driver to use this specification on its side. Signed-off-by: Nicolas Ferre Signed-off-by: Ludovic Desroches --- Hi Chris, Sorry f

[PATCH 4/4 v5] ARM: dts: add nodes for atmel hsmci controllers for atmel boards

2012-05-24 Thread ludovic.desroches
From: Ludovic Desroches Add mci controller nodes to atmel boards. Signed-off-by: Ludovic Desroches --- arch/arm/boot/dts/at91sam9263ek.dts | 10 ++ arch/arm/boot/dts/at91sam9g20ek_2mmc.dts| 12 arch/arm/boot/dts/at91sam9g20ek_common.dtsi |9 + a

[PATCH v5 0/4] atmel-mci device tree support

2012-05-24 Thread ludovic.desroches
Hi, This patch-set adds device tree support for atmel-mci. Regards Ludovic v5: - cleanup - split dts commit: one for SOCs, one for boards v4: - cleanup - add extra chips and boards for atmel-mci dt support v3: - use cd-inverted instead of cd-invert to follow mmc common binding. - don't assign

[PATCH 2/4 v5] ARM: at91: add clocks for DT entries

2012-05-24 Thread ludovic.desroches
From: Ludovic Desroches Add clocks to clock lookup table for DT entries. Signed-off-by: Ludovic Desroches Acked-by: Jean-Christophe PLAGNIOL-VILLARD --- arch/arm/mach-at91/at91sam9260.c |1 + arch/arm/mach-at91/at91sam9263.c |2 ++ arch/arm/mach-at91/at91sam9g45.c |2 ++ arch/arm/

[PATCH 3/4 v5] ARM: dts: add nodes for atmel hsmci controllers for atmel SOCs

2012-05-24 Thread ludovic.desroches
From: Ludovic Desroches Add mci controller nodes to atmel SOCs. Signed-off-by: Ludovic Desroches --- arch/arm/boot/dts/at91sam9260.dtsi |9 + arch/arm/boot/dts/at91sam9263.dtsi | 18 ++ arch/arm/boot/dts/at91sam9g45.dtsi | 18 ++ arch/arm/boot/dt

[PATCH 1/4 v5] mmc: atmel-mci: add device tree support

2012-05-24 Thread ludovic.desroches
From: Ludovic Desroches Signed-off-by: Ludovic Desroches --- .../devicetree/bindings/mmc/atmel-hsmci.txt| 67 +++ drivers/mmc/host/atmel-mci.c | 85 +++- 2 files changed, 150 insertions(+), 2 deletions(-) create mode 100644 Document

[PATCH v4 3/3] ARM: dts: add nodes for atmel hsmci controllers for atmel platforms

2012-05-23 Thread ludovic.desroches
From: Ludovic Desroches Add nodes for mci controllers. Signed-off-by: Ludovic Desroches --- v4: add new chips and boards arch/arm/boot/dts/at91sam9260.dtsi |9 + arch/arm/boot/dts/at91sam9263.dtsi | 18 ++ arch/arm/boot/dts/at91sam9263ek.dts

[PATCH v4 2/3] ARM: at91: add clocks for DT entries

2012-05-23 Thread ludovic.desroches
From: Ludovic Desroches Add clocks to clock lookup table for DT entries. Signed-off-by: Ludovic Desroches --- v4: add new chips arch/arm/mach-at91/at91sam9260.c |1 + arch/arm/mach-at91/at91sam9263.c |2 ++ arch/arm/mach-at91/at91sam9g45.c |2 ++ arch/arm/mach-at91/at91sam9n12.c |

[PATCH] mmc: atmel-mci: fix data timeout issue

2012-05-23 Thread ludovic.desroches
From: Ludovic Desroches The data timeout timer was configured after mmc_add_host call. So, with bad timings, it was possible to have a mmc request causing mod_timer call on a non setup timer. Signed-off-by: Ludovic Desroches --- drivers/mmc/host/atmel-mci.c |4 ++-- 1 files changed, 2 inse

[PATCH v4 1/3] mmc: atmel-mci: add device tree support

2012-05-23 Thread ludovic.desroches
From: Ludovic Desroches Signed-off-by: Ludovic Desroches --- .../devicetree/bindings/mmc/atmel-hsmci.txt| 67 +++ drivers/mmc/host/atmel-mci.c | 87 +++- 2 files changed, 152 insertions(+), 2 deletions(-) create mode 100644 Document

[PATCH v3 3/3] ARM: dts: add nodes for atmel hsmci controllers for atmel platforms

2012-05-22 Thread ludovic.desroches
From: Ludovic Desroches Add nodes for mci controllers. Signed-off-by: Ludovic Desroches --- arch/arm/boot/dts/at91sam9g20.dtsi | 12 arch/arm/boot/dts/at91sam9g25ek.dts| 16 arch/arm/boot/dts/at91sam9g45.dtsi | 24 arch/a

[PATCH v3 2/3] ARM: at91: add clocks for DT entries

2012-05-22 Thread ludovic.desroches
From: Ludovic Desroches Add clocks to clock lookup table for DT entries. Signed-off-by: Ludovic Desroches --- arch/arm/mach-at91/at91sam9260.c |1 + arch/arm/mach-at91/at91sam9g45.c |2 ++ arch/arm/mach-at91/at91sam9x5.c |2 ++ 3 files changed, 5 insertions(+), 0 deletions(-) dif

[PATCH v3 1/3] mmc: atmel-mci: add device tree support

2012-05-22 Thread ludovic.desroches
From: Ludovic Desroches Signed-off-by: Ludovic Desroches --- .../devicetree/bindings/mmc/atmel-hsmci.txt| 67 +++ drivers/mmc/host/atmel-mci.c | 89 +++- 2 files changed, 154 insertions(+), 2 deletions(-) create mode 100644 Document

[PATCH v3 0/3] atmel-mci device tree support

2012-05-22 Thread ludovic.desroches
Hi, This patch-set adds device tree support for atmel-mci. Regards Ludovic v3: - use cd-inverted instead of cd-invert to follow mmc common binding. - don't assign a pointer to pdev->dev.platform. - add mci controller nodes to other chips and boards. - put all dts file changes together. v2: - s

[PATCH v2] ARM: at91: add atmel-mci support for chips and boards which can use it

2012-05-21 Thread ludovic.desroches
From: Ludovic Desroches Since atmel-mci driver supports all atmel mci version excepted the rm9200 one, use it instead of at91_mci driver. Signed-off-by: Ludovic Desroches --- V2: add several boards I missed arch/arm/mach-at91/at91rm9200_devices.c | 99 ++ arch/arm/mach-at91

[PATCH 2/2] mmc: at91-mci: this driver is now deprecated

2012-05-16 Thread ludovic.desroches
From: Ludovic Desroches at91-mci is deprecated since atmel-mci can deal with all chips. Signed-off-by: Ludovic Desroches --- Documentation/feature-removal-schedule.txt | 11 +++ drivers/mmc/host/Kconfig |7 +-- 2 files changed, 16 insertions(+), 2 deletions(

[PATCH 1/2] ARM: at91: add atmel-mci support for chips and boards which can use it

2012-05-16 Thread ludovic.desroches
From: Ludovic Desroches Since atmel-mci driver supports all atmel mci version excepted the rm9200 one, use it instead of at91_mci driver. Signed-off-by: Ludovic Desroches --- arch/arm/mach-at91/at91rm9200_devices.c | 99 ++ arch/arm/mach-at91/at91sam9261_devices.c | 67 +++

[PATCH 0/2] ARM: at91: allow all boards to use atmel-mci driver

2012-05-16 Thread ludovic.desroches
This set of patches depends on 'mmc: atmel-mci: add support for old mci IPs' which allows to use atmel-mci driver on all boards. So keeping at91-mci only for old chips is no more necessary. If there are no issues with this new atmel-mci driver, at91-mci driver will be removed for 3.7 release. Reg

[PATCH] mmc: atmel-mci: fix burst/chunk size modification

2012-05-16 Thread ludovic.desroches
From: Nicolas Ferre The use of DMA slave config operation requires that the burst size (aka chunk size) is specified through this interface. Modify atmel-mci slave driver to use this specification on its side. Signed-off-by: Nicolas Ferre Signed-off-by: Ludovic Desroches --- drivers/mmc/host

[PATCH] mmc: atmel-mci: fix burst/chunk size modification

2012-05-16 Thread ludovic.desroches
This patch requires the following set of patches from slave-dma/next: 1dd1ea8 dmaengine: at_hdmac: take maxburst from slave configuration b409ebf dmaengine: at_hdmac: remove ATC_DEFAULT_CTRLA constant b89a9cb dmaengine: at_hdmac: remove some at_dma_slave comments Regards Ludovic -- To unsubscr

[PATCH 4/4] mmc: atmel-mci: add debug logs

2012-05-16 Thread ludovic.desroches
From: Ludovic Desroches Signed-off-by: Ludovic Desroches --- drivers/mmc/host/atmel-mci.c | 41 + 1 files changed, 41 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index 92c4145..a5856c6 100644 -

[PATCH 3/4] mmc: atmel-mci: add support for version lower than v2xx

2012-05-16 Thread ludovic.desroches
From: Ludovic Desroches Fix mci IP bugs and endianness issue. Signed-off-by: Ludovic Desroches --- drivers/mmc/host/atmel-mci.c | 62 +++--- 1 files changed, 58 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atm

[PATCH 2/4] mmc: atmel-mci: change the state machine

2012-05-16 Thread ludovic.desroches
From: Ludovic Desroches The state machine use in atmel-mci can't work with old IP versions (< 0x200). This patch allows to have a common state machine for all versions in order to remove at91-mci driver only used for old versions. Signed-off-by: Ludovic Desroches --- drivers/mmc/host/atmel-mci

[PATCH 1/4] mmc: atmel-mci: the r/w proof capability lack was not well managed

2012-05-16 Thread ludovic.desroches
From: Ludovic Desroches First mci IPs (mainly on rm9200 and 9261) don't have the r/w proof capability. The driver didn't work correctly without this capability in PDC mode because of the double buffer switch which is too slow even if we stop the transfer to perform this switch. Signed-off-by: Lu

[PATCH 0/4] mmc: atmel-mci: add support for old mci IPs

2012-05-16 Thread ludovic.desroches
This set of patches is an extra step to remove at91-mci dirver which is mainly used for old chips having mci IPs whose version is lesser than v2xx (rm9200 and 9261). Since it introduces many changes and there was a lack of logs to help people when there is an issue with atmel-mci driver, I added so