Re: [PATCH] irqchip/stm32: fix return value of stm32_exti_h_set_affinity

2020-09-21 Thread Ludovic BARRE
Hi Marc Just a gentleman ping about this patch. I verified, you could always apply this patch on linux master branch. Regards Ludo Le 6/12/20 à 9:29 AM, Ludovic Barre a écrit : exti hardware point of view, there is no specific action on set_affinity. So the affinity must be forwarded

[PATCH] irqchip/stm32: fix return value of stm32_exti_h_set_affinity

2020-06-12 Thread Ludovic Barre
exti hardware point of view, there is no specific action on set_affinity. So the affinity must be forwarded to parent if there is a descendent irqchips, otherwise just return IRQ_SET_MASK_OK_DONE. Signed-off-by: Ludovic Barre --- drivers/irqchip/irq-stm32-exti.c | 2 +- 1 file changed, 1

[PATCH] mmc: mmci: add sdio datactrl mask for sdmmc revisions

2020-06-11 Thread Ludovic Barre
This patch adds datactrl_mask_sdio for sdmmc revisions. sdmmc revisions used same bit of previous ST variant. Signed-off-by: Ludovic Barre --- drivers/mmc/host/mmci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index a69d6a0c2e15

[PATCH 1/2] mmc: mmci_sdmmc: fix DMA API warning overlapping mappings

2020-05-26 Thread Ludovic Barre
map in this case. This patch adds dma_unmap_sg when the dma is finalized and the data cookie is zero (request not prepared). Signed-off-by: Ludovic Barre --- drivers/mmc/host/mmci_stm32_sdmmc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mmc/host/mmci_stm32_sdmmc.c b/drivers/mmc/h

[PATCH 2/2] mmc: mmci_sdmmc: fix DMA API warning max segment size

2020-05-26 Thread Ludovic Barre
c core (host->mmc->max_seg_size). Signed-off-by: Ludovic Barre --- drivers/mmc/host/mmci_stm32_sdmmc.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/mmci_stm32_sdmmc.c b/drivers/mmc/host/mmci_stm32_sdmmc.c index 2965b1c062e1..5

[PATCH 0/2] mmc: mmci_sdmmc: fix dma api warnings

2020-05-26 Thread Ludovic Barre
This patch series fixes warnings see with DMA_API_DEBUG_SG=y Ludovic Barre (2): mmc: mmci_sdmmc: fix DMA API warning overlapping mappings mmc: mmci_sdmmc: fix DMA API warning max segment size drivers/mmc/host/mmci_stm32_sdmmc.c | 14 -- 1 file changed, 8 insertions(+), 6

[PATCH 0/2] mmc: add unstuck function if host is in deadlock state

2019-10-11 Thread Ludovic Barre
From: Ludovic Barre As discussed in this thread: https://patchwork.kernel.org/patch/10786421/ After a request, the host could be in deadlock state, and waiting for a specific action to unstuck the hardware block before resending a new command. This series adds mmc_hw_unstuck callback (structure

[PATCH 2/2] mmc: mmci: add unstuck feature

2019-10-11 Thread Ludovic Barre
From: Ludovic Barre On busy_timeout feature if busy is too long on R1B command a datatimeout occurs and a specific actions is needed to clear the DPSM bit: -reset the controller to clear the DPSM bit. -restore registers: clk, pwr, datactrl. Signed-off-by: Ludovic Barre --- drivers/mmc/host

[PATCH 1/2] mmc: add unstuck function if host is in deadlock state

2019-10-11 Thread Ludovic Barre
From: Ludovic Barre After a request a host may be in deadlock state, and wait a specific action to unstuck the hardware block before re-sending a new command. This patch adds an optional callback mmc_hw_unstuck which allows the host to unstuck the controller. In order to avoid a critical

[PATCH V7 3/3] mmc: mmci: sdmmc: add busy_complete callback

2019-10-08 Thread Ludovic Barre
From: Ludovic Barre This patch adds a specific busy_complete callback for sdmmc variant. sdmmc has 2 status flags: -busyd0: This is a hardware status flag (inverted value of d0 line). it does not generate an interrupt. -busyd0end: This indicates only end of busy following a CMD response

[PATCH V7 2/3] mmc: mmci: add busy_complete callback

2019-10-08 Thread Ludovic Barre
From: Ludovic Barre This patch adds busy_completion callback at mmci_host_ops to allow to define a specific busy completion by variant. The legacy code corresponding to busy completion used by ux500 variants is moved to ux500_busy_complete function. Signed-off-by: Ludovic Barre --- drivers

[PATCH V7 0/3] mmc: mmci: add busy detect for stm32 sdmmc variant

2019-10-08 Thread Ludovic Barre
From: Ludovic Barre This patch series adds busy detect for stm32 sdmmc variant. Some adaptations are required: -On sdmmc the data timer is started on data transfert and busy state, so we must add hardware busy timeout support. -Add busy_complete callback at mmci_host_ops to allow to define

[PATCH V7 1/3] mmc: mmci: add hardware busy timeout feature

2019-10-08 Thread Ludovic Barre
From: Ludovic Barre In the stm32_sdmmc variant, the datatimer is active not only during data transfers with the DPSM, but also while waiting for the busyend IRQs from commands having the MMC_RSP_BUSY flag set. This leads to an incorrect IRQ being raised to signal MCI_DATATIMEOUT error, which

Re: [PATCH V6 3/3] mmc: mmci: sdmmc: add busy_complete callback

2019-10-07 Thread Ludovic BARRE
hi Ulf Le 10/4/19 à 9:31 AM, Ulf Hansson a écrit : On Thu, 5 Sep 2019 at 14:22, Ludovic Barre wrote: From: Ludovic Barre This patch adds a specific busy_complete callback for sdmmc variant. sdmmc has 2 status flags: -busyd0: This is a hardware status flag (inverted value of d0 line

Re: [PATCH V6 1/3] mmc: mmci: add hardware busy timeout feature

2019-10-04 Thread Ludovic BARRE
hi Ulf Le 10/4/19 à 8:20 AM, Ulf Hansson a écrit : On Fri, 4 Oct 2019 at 08:12, Ulf Hansson wrote: On Thu, 5 Sep 2019 at 14:21, Ludovic Barre wrote: From: Ludovic Barre In some variants, the data timer starts and decrements when the DPSM enters in Wait_R or Busy state (while data

Re: [PATCH V6 0/3] mmc: mmci: add busy detect for stm32 sdmmc variant

2019-09-18 Thread Ludovic BARRE
hi Ulf Just a "gentleman ping" about this series and https://lkml.org/lkml/2019/9/4/747 Regards Ludo Le 9/5/19 à 2:21 PM, Ludovic Barre a écrit : From: Ludovic Barre This patch series adds busy detect for stm32 sdmmc variant. Some adaptations are required: -On sdmmc the

[PATCH V6 3/3] mmc: mmci: sdmmc: add busy_complete callback

2019-09-05 Thread Ludovic Barre
From: Ludovic Barre This patch adds a specific busy_complete callback for sdmmc variant. sdmmc has 2 status flags: -busyd0: This is a hardware status flag (inverted value of d0 line). it does not generate an interrupt. -busyd0end: This indicates only end of busy following a CMD response

[PATCH V6 2/3] mmc: mmci: add busy_complete callback

2019-09-05 Thread Ludovic Barre
From: Ludovic Barre This patch adds busy_completion callback at mmci_host_ops to allow to define a specific busy completion by variant. The legacy code corresponding to busy completion used by ux500 variants is moved to ux500_busy_complete function. The busy_detect boolean property is replaced

[PATCH V6 0/3] mmc: mmci: add busy detect for stm32 sdmmc variant

2019-09-05 Thread Ludovic Barre
From: Ludovic Barre This patch series adds busy detect for stm32 sdmmc variant. Some adaptations are required: -On sdmmc the data timer is started on data transfert and busy state, so we must add hardware busy timeout support. -Add busy_complete callback at mmci_host_ops to allow to define

[PATCH V6 1/3] mmc: mmci: add hardware busy timeout feature

2019-09-05 Thread Ludovic Barre
From: Ludovic Barre In some variants, the data timer starts and decrements when the DPSM enters in Wait_R or Busy state (while data transfer or MMC_RSP_BUSY), and generates a data timeout error if the counter reach 0. -Define max_busy_timeout (in ms) according to clock. -Set data timer register

Re: [PATCH V5 1/3] mmc: mmci: add hardware busy timeout feature

2019-09-04 Thread Ludovic BARRE
hi Ulf On 8/26/19 1:39 PM, Ulf Hansson wrote: On Tue, 13 Aug 2019 at 12:00, Ludovic Barre wrote: From: Ludovic Barre In some variants, the data timer starts and decrements when the DPSM enters in Wait_R or Busy state (while data transfer or MMC_RSP_BUSY), and generates a data timeout error

[PATCH V5 0/3] mmc: mmci: add busy detect for stm32 sdmmc variant

2019-08-13 Thread Ludovic Barre
From: Ludovic Barre This patch series adds busy detect for stm32 sdmmc variant. Some adaptations are required: -On sdmmc the data timer is started on data transfert and busy state, so we must add hardware busy timeout support. -Add busy_complete callback at mmci_host_ops to allow to define

[PATCH V5 2/3] mmc: mmci: add busy_complete callback

2019-08-13 Thread Ludovic Barre
From: Ludovic Barre This patch adds busy_completion callback at mmci_host_ops to allow to define a specific busy completion by variant. The legacy code corresponding to busy completion used by ux500 variants is moved to ux500_busy_complete function. The busy_detect boolean property is replaced

[PATCH V5 1/3] mmc: mmci: add hardware busy timeout feature

2019-08-13 Thread Ludovic Barre
From: Ludovic Barre In some variants, the data timer starts and decrements when the DPSM enters in Wait_R or Busy state (while data transfer or MMC_RSP_BUSY), and generates a data timeout error if the counter reach 0. -Define max_busy_timeout (in ms) according to clock. -Set data timer register

[PATCH V5 3/3] mmc: mmci: sdmmc: add busy_complete callback

2019-08-13 Thread Ludovic Barre
From: Ludovic Barre This patch adds a specific busy_complete callback for sdmmc variant. sdmmc has 2 status flags: -busyd0: This is a hardware status flag (inverted value of d0 line). it does not generate an interrupt. -busyd0end: This indicates only end of busy following a CMD response

[PATCH V4 0/3] mmc: mmci: add busy detect for stm32 sdmmc variant

2019-08-05 Thread Ludovic Barre
From: Ludovic Barre This patch series adds busy detect for stm32 sdmmc variant. Some adaptations are required: -On sdmmc the data timer is started on data transfert and busy state, so we must add hardware busy timeout support. -Add busy_complete callback at mmci_host_ops to allow to define

[PATCH V4 2/3] mmc: mmci: add busy_complete callback

2019-08-05 Thread Ludovic Barre
From: Ludovic Barre This patch adds busy_completion callback at mmci_host_ops to allow to define a specific busy completion by variant. The legacy code corresponding to busy completion used by ux500 variants is moved to ux500_busy_complete function. The busy_detect boolean property is replaced

[PATCH V4 1/3] mmc: mmci: add hardware busy timeout feature

2019-08-05 Thread Ludovic Barre
From: Ludovic Barre In some variants, the data timer starts and decrements when the DPSM enters in Wait_R or Busy state (while data transfer or MMC_RSP_BUSY), and generates a data timeout error if the counter reach 0. -Define max_busy_timeout (in ms) according to clock. -Set data timer register

[PATCH V4 3/3] mmc: mmci: sdmmc: add busy_complete callback

2019-08-05 Thread Ludovic Barre
From: Ludovic Barre This patch adds a specific busy_complete callback for sdmmc variant. sdmmc has 2 status flags: -busyd0: This is a hardware status flag (inverted value of d0 line). it does not generate an interrupt. -busyd0end: This indicates only end of busy following a CMD response

Re: [Linux-stm32] [PATCH V3 1/3] mmc: mmci: fix read status for busy detect

2019-08-05 Thread Ludovic BARRE
hi Ulf On 7/26/19 11:41 AM, Ludovic BARRE wrote: hi Ulf Thanks to your "Clarify comments ..." commit, like is closes I resumed upstream of this series. On 7/15/19 6:31 PM, Ulf Hansson wrote: On Mon, 3 Jun 2019 at 17:55, Ludovic Barre wrote: From: Ludovic Barre "busy_detec

Re: [PATCH V3 1/3] mmc: mmci: fix read status for busy detect

2019-07-26 Thread Ludovic BARRE
hi Ulf Thanks to your "Clarify comments ..." commit, like is closes I resumed upstream of this series. On 7/15/19 6:31 PM, Ulf Hansson wrote: On Mon, 3 Jun 2019 at 17:55, Ludovic Barre wrote: From: Ludovic Barre "busy_detect_flag" is used to read & clear b

RE: [PATCH V3 0/3] mmc: mmci: add busy detect for stm32 sdmmc variant

2019-07-15 Thread Ludovic BARRE
Hi Ulf like scheduled, I send you a "gentleman ping" about this series. Regards, Ludo De : Ulf Hansson Envoyé : jeudi 20 juin 2019 15:50 À : Ludovic BARRE Cc : Rob Herring; Srinivas Kandagatla; Maxime Coquelin; Alexandre TORGUE; Linux ARM; Li

[PATCH] ARM: dts: stm32: activate dma for qspi on stm32mp157

2019-06-27 Thread Ludovic Barre
From: Ludovic Barre This patch activates dma for qspi on stm32mp157. Signed-off-by: Ludovic Barre --- arch/arm/boot/dts/stm32mp157c.dtsi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/boot/dts/stm32mp157c.dtsi b/arch/arm/boot/dts/stm32mp157c.dtsi index 2afeee6..205ea1d

[PATCH] spi: stm32-qspi: remove signal sensitive on completion

2019-06-27 Thread Ludovic Barre
From: Ludovic Barre On umount step a sigkill signal is set (without user specific action), due to sigkill signal the completion will be interrupted and the data transfer can't be finished if a sync is needed. Signed-off-by: Ludovic Barre --- drivers/spi/spi-stm32-qspi.c | 10 +++--- 1

[PATCH] dt-bindings: spi: stm32-qspi: add dma properties

2019-06-27 Thread Ludovic Barre
From: Ludovic Barre This patch adds description of dma properties (optional). Signed-off-by: Ludovic Barre --- Documentation/devicetree/bindings/spi/spi-stm32-qspi.txt | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/spi/spi-stm32

Re: [PATCH V3 0/3] mmc: mmci: add busy detect for stm32 sdmmc variant

2019-06-13 Thread Ludovic BARRE
hi Ulf Just a "gentleman ping" about this series. I know you are busy, it's just to be sure you do not forget me :-) Regards Ludo On 6/3/19 5:55 PM, Ludovic Barre wrote: From: Ludovic Barre This patch series adds busy detect for stm32 sdmmc variant. Some adaptations are requir

[PATCH V3 0/3] mmc: mmci: add busy detect for stm32 sdmmc variant

2019-06-03 Thread Ludovic Barre
From: Ludovic Barre This patch series adds busy detect for stm32 sdmmc variant. Some adaptations are required: -Clear busy status bit if busy_detect_flag and busy_detect_mask are different. -Add hardware busy timeout with MMCIDATATIMER register. V3: -rebase on latest mmc next -replace re-read

[PATCH V3 1/3] mmc: mmci: fix read status for busy detect

2019-06-03 Thread Ludovic Barre
From: Ludovic Barre "busy_detect_flag" is used to read & clear busy value of mmci status. "busy_detect_mask" is used to manage busy irq of mmci mask. So to read mmci status the busy_detect_flag must be take account. if the variant does not support busy detect

[PATCH V3 2/3] mmc: mmci: add hardware busy timeout feature

2019-06-03 Thread Ludovic Barre
From: Ludovic Barre In some variants, the data timer is enabled when the DPSM is in busy state (while data transfer or MMC_RSP_BUSY), and could generate a data timeout error if the counter reach 0. -Define max_busy_timeout (in ms) according to clock. -Set data timer register if the command has

[PATCH V3 3/3] mmc: mmci: add busy detect for stm32 sdmmc variant

2019-06-03 Thread Ludovic Barre
From: Ludovic Barre This patch enables busy detection for stm32 sdmmc which requires to set data timer to define the busy timeout. sdmmc has 2 flags: -busyd0: inverted value of d0 line. -busyd0end which indicates only end of busy following a cmd response. Only one interrupt on busyd0end. Signed

Re: [PATCH V2 3/5] mmc: mmci: fix clear of busy detect status

2019-05-29 Thread Ludovic BARRE
hi Ulf On 5/27/19 8:17 PM, Ulf Hansson wrote: On Fri, 26 Apr 2019 at 09:46, Ludovic Barre wrote: From: Ludovic Barre The "busy_detect_flag" is used to read/clear busy value of mmci status. The "busy_detect_mask" is used to manage busy irq of mmci mask. For sdmmc varia

Re: [PATCH V2 0/5] mmc: mmci: add busy detect for stm32 sdmmc variant

2019-05-21 Thread Ludovic BARRE
On 5/21/19 9:56 AM, Ulf Hansson wrote: On Tue, 21 May 2019 at 09:38, Ludovic BARRE wrote: hi Ulf Just a "gentleman ping" about the rest of series. "mmc: mmci: add busy detect for stm32 sdmmc variant" Thanks! It's been a busy period and I am currently traveling

Re: [PATCH V2 0/5] mmc: mmci: add busy detect for stm32 sdmmc variant

2019-05-21 Thread Ludovic BARRE
hi Ulf Just a "gentleman ping" about the rest of series. "mmc: mmci: add busy detect for stm32 sdmmc variant" Regards Ludo On 5/3/19 3:29 PM, Ulf Hansson wrote: On Tue, 30 Apr 2019 at 14:06, Ludovic BARRE wrote: On 4/30/19 1:13 PM, Ulf Hansson wrote: On Fri,

[PATCH] mtd: spi-nor: stm32: remove the driver as it was replaced by spi-stm32-qspi.c

2019-05-07 Thread Ludovic Barre
From: Ludovic Barre There's a new driver using the SPI memory interface of the SPI framework at spi/spi-stm32-qspi.c, which can be used together with m25p80.c to replace the functionality of this SPI NOR driver. The "new" driver uses the same dt properties and not affects

Re: [PATCH V2 0/5] mmc: mmci: add busy detect for stm32 sdmmc variant

2019-05-03 Thread Ludovic BARRE
hi Ulf On 5/3/19 3:29 PM, Ulf Hansson wrote: On Tue, 30 Apr 2019 at 14:06, Ludovic BARRE wrote: On 4/30/19 1:13 PM, Ulf Hansson wrote: On Fri, 26 Apr 2019 at 09:46, Ludovic Barre wrote: From: Ludovic Barre This patch series adds busy detect for stm32 sdmmc variant. Some adaptations

[PATCH V3] watchdog: stm32: add dynamic prescaler support

2019-05-03 Thread Ludovic Barre
From: Ludovic Barre This patch allows to define the max prescaler by compatible. To set a large range of timeout, the prescaler should be set dynamically (from the timeout request) to improve the resolution in order to have a timeout close to the expected value. Signed-off-by: Ludovic Barre

Re: [PATCH V2 1/3] watchdog: stm32: update to devm_watchdog_register_device

2019-05-03 Thread Ludovic BARRE
hi Guenter On 5/2/19 10:21 PM, Guenter Roeck wrote: On Thu, May 02, 2019 at 04:08:44PM +0200, Ludovic Barre wrote: From: Ludovic Barre This patch updates to devm_watchdog_register_device interface Not that easy. See below. A more complete solution is at https://patchwork.kernel.org/patch

[PATCH V2 2/3] watchdog: stm32: update return values recommended by watchdog kernel api

2019-05-02 Thread Ludovic Barre
From: Ludovic Barre This patch updates return values on watchdog-kernel-api.txt: return 0 on succes, -EINVAL for "parameter out of range" and -EIO for "could not write value to the watchdog". Signed-off-by: Ludovic Barre --- drivers/watchdog/stm32_iwdg.c | 21 +

[PATCH V2 0/3] watchdog: stm32: add dynamic prescaler support

2019-05-02 Thread Ludovic Barre
From: Ludovic Barre This patch series updates stm32 watchdog driver on: -use devm_watchdog_register_device -Guenter's recommendation about return value: set_timeout return 0 on succes, -EINVAL for "parameter out of range" and -EIO for "could not write value to the watchdog&

[PATCH V2 3/3] watchdog: stm32: add dynamic prescaler support

2019-05-02 Thread Ludovic Barre
From: Ludovic Barre This patch allows to define the max prescaler by compatible. To set a large range of timeout, the prescaler should be set dynamically (from the timeout request) to improve the resolution in order to have a timeout close to the expected value. Signed-off-by: Ludovic Barre

[PATCH V2 1/3] watchdog: stm32: update to devm_watchdog_register_device

2019-05-02 Thread Ludovic Barre
From: Ludovic Barre This patch updates to devm_watchdog_register_device interface Signed-off-by: Ludovic Barre --- drivers/watchdog/stm32_iwdg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/watchdog/stm32_iwdg.c b/drivers/watchdog/stm32_iwdg.c index e00e3b3

Re: [PATCH V2 0/5] mmc: mmci: add busy detect for stm32 sdmmc variant

2019-04-30 Thread Ludovic BARRE
On 4/30/19 1:13 PM, Ulf Hansson wrote: On Fri, 26 Apr 2019 at 09:46, Ludovic Barre wrote: From: Ludovic Barre This patch series adds busy detect for stm32 sdmmc variant. Some adaptations are required: -Avoid to check and poll busy status when is not expected. -Clear busy status bit

Re: [PATCH] watchdog: stm32: add dynamic prescaler support

2019-04-29 Thread Ludovic BARRE
Hi Guenter On 4/26/19 4:16 PM, Guenter Roeck wrote: On Fri, Apr 26, 2019 at 03:41:15PM +0200, Ludovic Barre wrote: From: Ludovic Barre This patch allows to define the max prescaler by compatible. To set a large range of timeout, the prescaler should be set dynamically (from the timeout

[PATCH] watchdog: stm32: add dynamic prescaler support

2019-04-26 Thread Ludovic Barre
From: Ludovic Barre This patch allows to define the max prescaler by compatible. To set a large range of timeout, the prescaler should be set dynamically (from the timeout request) to improve the resolution in order to have a timeout close to the expected value. Signed-off-by: Ludovic Barre

[PATCH V2 3/5] mmc: mmci: fix clear of busy detect status

2019-04-26 Thread Ludovic Barre
From: Ludovic Barre The "busy_detect_flag" is used to read/clear busy value of mmci status. The "busy_detect_mask" is used to manage busy irq of mmci mask. For sdmmc variant, the 2 properties have not the same offset. To clear the busyd0 status bit, we must add busy detect

[PATCH V2 1/5] mmc: mmci: cleanup mmci_cmd_irq for busy detect feature

2019-04-26 Thread Ludovic Barre
From: Ludovic Barre This patch cleans mmci_cmd_irq function for busy detect feature. Signed-off-by: Ludovic Barre --- drivers/mmc/host/mmci.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 9e9596a..049f8e3

[PATCH V2 5/5] mmc: mmci: add busy detect for stm32 sdmmc variant

2019-04-26 Thread Ludovic Barre
From: Ludovic Barre This patch enables busy detection for stm32 sdmmc which requires to set data timer to define the busy timeout. sdmmc has 2 flags: -busyd0: inverted value of d0 line. -busyd0end which indicates only end of busy following a cmd response. Only one interrupt on busyd0end. Signed

[PATCH V2 2/5] mmc: mmci: avoid fake busy polling in mmci_irq

2019-04-26 Thread Ludovic Barre
From: Ludovic Barre mmci_irq function loops until the status is totally cleared. However the busy_detect_flag could occurred even if no busy response is expected and that busy d0 line is low (like in cmd11: voltage switch). Like busy_detect_flag is handled into mmci_cmd_irq this flag can

[PATCH V2 0/5] mmc: mmci: add busy detect for stm32 sdmmc variant

2019-04-26 Thread Ludovic Barre
From: Ludovic Barre This patch series adds busy detect for stm32 sdmmc variant. Some adaptations are required: -Avoid to check and poll busy status when is not expected. -Clear busy status bit if busy_detect_flag and busy_detect_mask are different. -Add hardware busy timeout with MMCIDATATIMER

[PATCH V2 4/5] mmc: mmci: add hardware busy timeout feature

2019-04-26 Thread Ludovic Barre
From: Ludovic Barre In some variants, the data timer is enabled when the DPSM is in busy state (while data transfert or MMC_RSP_BUSY), and could generate a data timeout error if the counter reach 0. -Define max_busy_timeout (in ms) according to clock. -Set data timer register if the command has

Re: [PATCH 1/4] mmc: mmci: avoid fake busy polling

2019-04-25 Thread Ludovic BARRE
On 4/25/19 12:08 PM, Ulf Hansson wrote: On Thu, 25 Apr 2019 at 11:22, Ludovic BARRE wrote: hi Ulf On 4/23/19 3:39 PM, Ulf Hansson wrote: On Tue, 5 Mar 2019 at 17:10, Ludovic Barre wrote: From: Ludovic Barre The busy status bit could occurred even if no busy response is expected

Re: [PATCH 1/4] mmc: mmci: avoid fake busy polling

2019-04-25 Thread Ludovic BARRE
hi Ulf On 4/23/19 3:39 PM, Ulf Hansson wrote: On Tue, 5 Mar 2019 at 17:10, Ludovic Barre wrote: From: Ludovic Barre The busy status bit could occurred even if no busy response is expected (example cmd11). On sdmmc variant, the busy_detect_flag reflects inverted value of d0 state, it's

Re: [PATCH] spi: stm32-qspi: manage the get_irq error case

2019-04-24 Thread Ludovic BARRE
On 4/24/19 5:19 PM, Fabien Dessenne wrote: During probe, check the "get_irq" error value. Signed-off-by: Fabien Dessenne Acked-by: Ludovic Barre --- drivers/spi/spi-stm32-qspi.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/spi/spi-stm32-qspi.c b/drive

Re: [PATCH 0/4] mmc: mmci: add busy detect for stm32 sdmmc variant

2019-04-11 Thread Ludovic BARRE
hi Ulf On 4/11/19 3:29 PM, Ulf Hansson wrote: On Thu, 11 Apr 2019 at 14:37, Ludovic BARRE wrote: Hi Ulf Just a gentleman ping about this series. I sent this series at same time of dt_mode (no dependence between both). Thanks for pinging. It's been a busy period, with travels etc. I am

Re: [PATCH 0/4] mmc: mmci: add busy detect for stm32 sdmmc variant

2019-04-11 Thread Ludovic BARRE
Hi Ulf Just a gentleman ping about this series. I sent this series at same time of dt_mode (no dependence between both). BR Ludo On 3/5/19 5:10 PM, Ludovic Barre wrote: From: Ludovic Barre This patch series adds busy detect for stm32 sdmmc variant. Some adaptations are required: -Avoid

Re: [PATCH V4 4/5] mmc: mmci: stm32: define get_dctrl_cfg

2019-03-27 Thread Ludovic BARRE
On 3/27/19 11:54 AM, Ulf Hansson wrote: On Wed, 27 Mar 2019 at 10:05, Ludovic Barre wrote: From: Ludovic Barre This patch defines get_dctrl_cfg callback for sdmmc variant. sdmmc variant has specific stm32 transfer modes. sdmmc data transfer mode selection could be: -Block data transfer

[PATCH V4 2/5] mmc: mmci: define get_dctrl_cfg for legacy variant

2019-03-27 Thread Ludovic Barre
From: Ludovic Barre This patch defines get_dctrl_cfg callback for legacy variants whatever DMA_ENGINE configuration. Signed-off-by: Ludovic Barre --- drivers/mmc/host/mmci.c | 30 -- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host

[PATCH V4 3/5] mmc: mmci: qcom: define get_dctrl_cfg

2019-03-27 Thread Ludovic Barre
From: Ludovic Barre This patch defines get_dctrl_cfg callback for qcom variant. qcom variant has a specific block size definition. Signed-off-by: Ludovic Barre --- drivers/mmc/host/mmci_qcom_dml.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/mmc/host/mmci_qcom_dml.c b

[PATCH V4 4/5] mmc: mmci: stm32: define get_dctrl_cfg

2019-03-27 Thread Ludovic Barre
From: Ludovic Barre This patch defines get_dctrl_cfg callback for sdmmc variant. sdmmc variant has specific stm32 transfer modes. sdmmc data transfer mode selection could be: -Block data transfer ending on block count. -SDIO multibyte data transfer. -MMC Stream data transfer (not used). -Block

[PATCH V4 1/5] mmc: mmci: add get_datactrl_cfg callback and helper functions

2019-03-27 Thread Ludovic Barre
From: Ludovic Barre This patch adds get_datactrl_cfg callback in mmci_host_ops to allow to get datactrl configuration specific at variant. Common helper function is defined and could be call by variant. Signed-off-by: Ludovic Barre --- drivers/mmc/host/mmci.h | 6 ++ 1 file changed, 6

[PATCH V4 5/5] mmc: mmci: replace blksz_datactrlXX by get_datactrl_cfg callback

2019-03-27 Thread Ludovic Barre
From: Ludovic Barre This patch allows to get datactrl configuration specific at variant. This introduce more flexibility on datactlr value. Signed-off-by: Ludovic Barre --- drivers/mmc/host/mmci.c | 26 ++ drivers/mmc/host/mmci.h | 7 --- 2 files changed, 2

[PATCH V4 0/5] mmc: mmci: add get_datactrl_cfg callback

2019-03-27 Thread Ludovic Barre
From: Ludovic Barre This patch series adds get_datactrl_cfg callback in mmci_host_ops to allow to get datactrl configuration specific at variant. change V4: -keep mmci and ux500v2 variant init in the c file. change V3: -keep the common functions in mmci_start_data. define function used by some

Re: [PATCH V3 2/5] mmc: mmci: define get_dctrl_cfg for legacy variant

2019-03-27 Thread Ludovic BARRE
On 3/26/19 6:46 PM, Ulf Hansson wrote: On Tue, 26 Mar 2019 at 10:11, Ludovic Barre wrote: From: Ludovic Barre This patch defines get_dctrl_cfg callback for legacy variants whatever DMA_ENGINE configuration. Signed-off-by: Ludovic Barre --- drivers/mmc/host/mmci.c | 31

[PATCH V3 3/5] mmc: mmci: qcom: define get_dctrl_cfg

2019-03-26 Thread Ludovic Barre
From: Ludovic Barre This patch defines get_dctrl_cfg callback for qcom variant. qcom variant has a specific block size definition. Signed-off-by: Ludovic Barre --- drivers/mmc/host/mmci_qcom_dml.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/mmc/host/mmci_qcom_dml.c b

[PATCH V3 5/5] mmc: mmci: replace blksz_datactrlXX by get_datactrl_cfg callback

2019-03-26 Thread Ludovic Barre
From: Ludovic Barre This patch allows to get datactrl configuration specific at variant. This introduce more flexibility on datactlr value. Signed-off-by: Ludovic Barre --- drivers/mmc/host/mmci.c | 26 ++ drivers/mmc/host/mmci.h | 7 --- 2 files changed, 2

[PATCH V3 2/5] mmc: mmci: define get_dctrl_cfg for legacy variant

2019-03-26 Thread Ludovic Barre
From: Ludovic Barre This patch defines get_dctrl_cfg callback for legacy variants whatever DMA_ENGINE configuration. Signed-off-by: Ludovic Barre --- drivers/mmc/host/mmci.c | 31 +++ drivers/mmc/host/mmci.h | 3 +++ 2 files changed, 26 insertions(+), 8 deletions

[PATCH V3 4/5] mmc: mmci: stm32: define get_dctrl_cfg

2019-03-26 Thread Ludovic Barre
From: Ludovic Barre This patch defines get_dctrl_cfg callback for sdmmc variant. sdmmc variant has specific stm32 transfer modes. sdmmc data transfer mode selection could be: -Block data transfer ending on block count. -SDIO multibyte data transfer. -MMC Stream data transfer (not used). -Block

[PATCH V3 0/5] mmc: mmci: add get_datactrl_cfg callback

2019-03-26 Thread Ludovic Barre
From: Ludovic Barre This patch series adds get_datactrl_cfg callback in mmci_host_ops to allow to get datactrl configuration specific at variant. change V3: -keep the common functions in mmci_start_data. define function used by some variants like an helper (example mmci_dctrl_blks used by mmci

[PATCH V3 1/5] mmc: mmci: add get_datactrl_cfg callback and helper functions

2019-03-26 Thread Ludovic Barre
From: Ludovic Barre This patch adds get_datactrl_cfg callback in mmci_host_ops to allow to get datactrl configuration specific at variant. Common helper function is defined and could be call by variant. Signed-off-by: Ludovic Barre --- drivers/mmc/host/mmci.h | 6 ++ 1 file changed, 6

[PATCH V2 2/2] spi: stm32-qspi: add dma support

2019-03-25 Thread Ludovic Barre
From: Ludovic Barre This patch adds the dma support for the stm32-qspi hardware. The memory buffer constraints (lowmem, vmalloc, kmap) are taken into account by framework. In read mode, the memory map is preferred vs dma (due to better throughput). If the dma transfer fails the buffer is sent

[PATCH V2 1/2] spi: stm32-qspi: add spi_master_put in release function

2019-03-25 Thread Ludovic Barre
From: Ludovic Barre This patch adds spi_master_put in release function to drop the controller's refcount. Signed-off-by: Ludovic Barre --- drivers/spi/spi-stm32-qspi.c | 46 +++- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/drivers

[PATCH V2 0/2] spi: stm32-qspi: add dma support

2019-03-25 Thread Ludovic Barre
From: Ludovic Barre This patch series adds dma support for the stm32-qspi. In read mode, the memory map is preferred vs dma (due to better throughput). If the dma transfer fails the buffer is sent by polling. V2: -fixe build error in patch 1/2 (move qspi->phys_base in patch 2) Ludovic Barre

Re: [PATCH 1/2] spi: stm32-qspi: add spi_master_put in release function

2019-03-25 Thread Ludovic BARRE
hi Mark On 3/25/19 5:03 PM, Mark Brown wrote: On Fri, Mar 22, 2019 at 03:35:53PM +0100, Ludovic Barre wrote: From: Ludovic Barre This patch adds spi_master_put in release function to drop the controller's refcount. I'm getting build errors with this: CC drivers/spi/spi-stm32

[PATCH 2/2] spi: stm32-qspi: add dma support

2019-03-22 Thread Ludovic Barre
From: Ludovic Barre This patch adds the dma support for the stm32-qspi hardware. The memory buffer constraints (lowmem, vmalloc, kmap) are taken into account by framework. In read mode, the memory map is preferred vs dma (due to better throughput). If the dma transfer fails the buffer is sent

[PATCH 1/2] spi: stm32-qspi: add spi_master_put in release function

2019-03-22 Thread Ludovic Barre
From: Ludovic Barre This patch adds spi_master_put in release function to drop the controller's refcount. Signed-off-by: Ludovic Barre --- drivers/spi/spi-stm32-qspi.c | 48 +++- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/drivers

[PATCH 0/2] spi: stm32-qspi: add dma support

2019-03-22 Thread Ludovic Barre
From: Ludovic Barre This patch series adds dma support for the stm32-qspi. In read mode, the memory map is preferred vs dma (due to better throughput). If the dma transfer fails the buffer is sent by polling. Ludovic Barre (2): spi: stm32-qspi: add spi_master_put in release function spi

[PATCH 1/2] ARM: dts: stm32: add pinctrl sleep config for qspi on stm32mp157c-ev1

2019-03-08 Thread Ludovic Barre
From: Ludovic Barre This patch adds pinctrl sleep config for qspi on stm32mp157c-ev1 Signed-off-by: Ludovic Barre --- arch/arm/boot/dts/stm32mp157-pinctrl.dtsi | 26 ++ arch/arm/boot/dts/stm32mp157c-ev1.dts | 3 ++- 2 files changed, 28 insertions(+), 1 deletion

[PATCH 0/2] ARM: dts: stm32: qspi update for stm32mp157c-ev1

2019-03-08 Thread Ludovic Barre
From: Ludovic Barre This patch series add sleep pins configuration needed to suspend support and add jedec compatible for 2 nor flash of stm32mp157c-ev1. Ludovic Barre (2): ARM: dts: stm32: add pinctrl sleep config for qspi on stm32mp157c-ev1 ARM: dts: stm32: add jedec compatible for nor

[PATCH 2/2] ARM: dts: stm32: add jedec compatible for nor flash on stm32mp157c-ev1

2019-03-08 Thread Ludovic Barre
From: Ludovic Barre This patch adds jedec compatible for spi-nor flash on stm32mp157c-ev1 (needed with new spi-mem interface). Signed-off-by: Ludovic Barre --- arch/arm/boot/dts/stm32mp157c-ev1.dts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/stm32mp157c-ev1.dts b

[PATCH 2/2] spi: spi-mem: stm32-qspi: add suspend/resume support

2019-03-08 Thread Ludovic Barre
From: Ludovic Barre This patch adds suspend and resume support for spi-stm32-qspi drivers. Signed-off-by: Ludovic Barre --- drivers/spi/spi-stm32-qspi.c | 39 +++ 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-stm32-qspi.c b

[PATCH 0/2] spi: spi-mem: stm32-qspi: add suspend support and fix

2019-03-08 Thread Ludovic Barre
From: Ludovic Barre This patch series adds suspend support and fix a nor memory corruption due to timeout counter issue. Ludovic Barre (2): spi: spi-mem: stm32-qspi: avoid memory corruption at low frequency spi: spi-mem: stm32-qspi: add suspend/resume support drivers/spi/spi-stm32-qspi.c

[PATCH 1/2] spi: spi-mem: stm32-qspi: avoid memory corruption at low frequency

2019-03-08 Thread Ludovic Barre
From: Ludovic Barre This patch solves a memory corruption seen at 8 MHz. To avoid such issue, timeout counter is disabled. Signed-off-by: Ludovic Barre --- drivers/spi/spi-stm32-qspi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/spi/spi-stm32-qspi.c b

Re: [PATCH V2 6/6] mmc: mmci: replace blksz_datactrlXX by get_datactrl_cfg callback

2019-03-08 Thread Ludovic BARRE
hi Russell, Ulf On 3/7/19 5:46 PM, Russell King - ARM Linux admin wrote: On Thu, Mar 07, 2019 at 05:39:02PM +0100, Ludovic Barre wrote: - if (data->flags & MMC_DATA_READ) - datactrl |= MCI_DPSM_DIRECTION; Given that this is currently an invariant between all, it

[PATCH V2 4/6] mmc: mmci: qcom: define get_dctrl_cfg

2019-03-07 Thread Ludovic Barre
From: Ludovic Barre This patch defines get_dctrl_cfg callback for qcom variant. qcom variant has a specific block size definition. Signed-off-by: Ludovic Barre --- drivers/mmc/host/mmci_qcom_dml.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/mmc/host

[PATCH V2 3/6] mmc: mmci: define get_dctrl_cfg for legacy variant

2019-03-07 Thread Ludovic Barre
From: Ludovic Barre This patch defines get_dctrl_cfg callback for legacy variants whatever DMA_ENGINE configuration. Signed-off-by: Ludovic Barre --- drivers/mmc/host/mmci.c | 44 drivers/mmc/host/mmci.h | 3 +++ 2 files changed, 39 insertions

[PATCH V2 2/6] mmc: mmci: add helper functions to define datactrl value for variants

2019-03-07 Thread Ludovic Barre
From: Ludovic Barre This patch adds default helper functions to define datactrl value. Each variant could use these helpers to define datactrl and adds their specific field. Signed-off-by: Ludovic Barre --- drivers/mmc/host/mmci.c | 25 + drivers/mmc/host/mmci.h | 5

[PATCH V2 6/6] mmc: mmci: replace blksz_datactrlXX by get_datactrl_cfg callback

2019-03-07 Thread Ludovic Barre
From: Ludovic Barre This patch allows to get datactrl configuration specific at variant. This introduce more flexibility on datactlr value. Signed-off-by: Ludovic Barre --- drivers/mmc/host/mmci.c | 31 +-- drivers/mmc/host/mmci.h | 7 --- 2 files changed, 1

[PATCH V2 5/6] mmc: mmci: stm32: define get_dctrl_cfg

2019-03-07 Thread Ludovic Barre
From: Ludovic Barre This patch defines get_dctrl_cfg callback for sdmmc variant. sdmmc variant has specific stm32 transfer modes. sdmmc data transfer mode selection could be: -Block data transfer ending on block count. -SDIO multibyte data transfer. -MMC Stream data transfer (not used). -Block

[PATCH V2 0/6] mmc: mmci: add get_datactrl_cfg callback

2019-03-07 Thread Ludovic Barre
From: Ludovic Barre This patch series adds get_datactrl_cfg callback in mmci_host_ops to allow to get datactrl configuration specific at variant. change V2: -This V2 has been rebased on "mmc: mmci: Cleanup some variant related code" series -add helpers functions to define default data

[PATCH V2 1/6] mmc: mmci: add get_datactrl_cfg callback

2019-03-07 Thread Ludovic Barre
From: Ludovic Barre This patch adds get_datactrl_cfg callback in mmci_host_ops to allow to get datactrl configuration specific at variant. Signed-off-by: Ludovic Barre --- drivers/mmc/host/mmci.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/host/mmci.h b/drivers/mmc/host

  1   2   3   4   5   6   7   8   9   10   >