* [PATCH 0/3] Make DMA slave ID 0 invalid to simplify platform data
@ 2011-05-24 10:23 ` Guennadi Liakhovetski
0 siblings, 0 replies; 16+ messages in thread
From: Guennadi Liakhovetski @ 2011-05-24 10:23 UTC (permalink / raw)
To: linux-sh
Cc: linux-mmc, Simon Horman, Magnus Damm, Ian Molton, Dan Williams,
Vinod Koul
Currently platforms, using the SDHI TMIO driver, have to specify negative
DMA slave IDs to force PIO mode. If default 0 is left, the driver
recognises it as a valid DMA slave ID and tries to acquire channels. This
fails then, because the driver cannot allocate two channels with the same
ID, but it would be better to just make 0 an invalid ID to prevent this.
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 0/3] Make DMA slave ID 0 invalid to simplify platform data
@ 2011-05-24 10:23 ` Guennadi Liakhovetski
0 siblings, 0 replies; 16+ messages in thread
From: Guennadi Liakhovetski @ 2011-05-24 10:23 UTC (permalink / raw)
To: linux-sh
Cc: linux-mmc, Simon Horman, Magnus Damm, Ian Molton, Dan Williams,
Vinod Koul
Currently platforms, using the SDHI TMIO driver, have to specify negative
DMA slave IDs to force PIO mode. If default 0 is left, the driver
recognises it as a valid DMA slave ID and tries to acquire channels. This
fails then, because the driver cannot allocate two channels with the same
ID, but it would be better to just make 0 an invalid ID to prevent this.
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/3] sh: mark DMA slave ID 0 as invalid
2011-05-24 10:23 ` Guennadi Liakhovetski
@ 2011-05-24 10:23 ` Guennadi Liakhovetski
-1 siblings, 0 replies; 16+ messages in thread
From: Guennadi Liakhovetski @ 2011-05-24 10:23 UTC (permalink / raw)
To: linux-sh
Cc: linux-mmc, Simon Horman, Magnus Damm, Ian Molton, Dan Williams,
Vinod Koul
This makes it possible to leave DMA slave IDs in the platform data
at default 0 value without hitting DMA channel allocation error paths.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
arch/sh/include/cpu-sh4/cpu/sh7722.h | 1 +
arch/sh/include/cpu-sh4/cpu/sh7724.h | 1 +
arch/sh/include/cpu-sh4/cpu/sh7757.h | 1 +
3 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/sh/include/cpu-sh4/cpu/sh7722.h b/arch/sh/include/cpu-sh4/cpu/sh7722.h
index 7a5b8a3..bd06227 100644
--- a/arch/sh/include/cpu-sh4/cpu/sh7722.h
+++ b/arch/sh/include/cpu-sh4/cpu/sh7722.h
@@ -236,6 +236,7 @@ enum {
};
enum {
+ SHDMA_SLAVE_INVALID,
SHDMA_SLAVE_SCIF0_TX,
SHDMA_SLAVE_SCIF0_RX,
SHDMA_SLAVE_SCIF1_TX,
diff --git a/arch/sh/include/cpu-sh4/cpu/sh7724.h b/arch/sh/include/cpu-sh4/cpu/sh7724.h
index 7eb4359..3daef8e 100644
--- a/arch/sh/include/cpu-sh4/cpu/sh7724.h
+++ b/arch/sh/include/cpu-sh4/cpu/sh7724.h
@@ -285,6 +285,7 @@ enum {
};
enum {
+ SHDMA_SLAVE_INVALID,
SHDMA_SLAVE_SCIF0_TX,
SHDMA_SLAVE_SCIF0_RX,
SHDMA_SLAVE_SCIF1_TX,
diff --git a/arch/sh/include/cpu-sh4/cpu/sh7757.h b/arch/sh/include/cpu-sh4/cpu/sh7757.h
index 05b8196..41f9f8b 100644
--- a/arch/sh/include/cpu-sh4/cpu/sh7757.h
+++ b/arch/sh/include/cpu-sh4/cpu/sh7757.h
@@ -252,6 +252,7 @@ enum {
};
enum {
+ SHDMA_SLAVE_INVALID,
SHDMA_SLAVE_SDHI_TX,
SHDMA_SLAVE_SDHI_RX,
SHDMA_SLAVE_MMCIF_TX,
--
1.7.2.5
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 1/3] sh: mark DMA slave ID 0 as invalid
@ 2011-05-24 10:23 ` Guennadi Liakhovetski
0 siblings, 0 replies; 16+ messages in thread
From: Guennadi Liakhovetski @ 2011-05-24 10:23 UTC (permalink / raw)
To: linux-sh
Cc: linux-mmc, Simon Horman, Magnus Damm, Ian Molton, Dan Williams,
Vinod Koul
This makes it possible to leave DMA slave IDs in the platform data
at default 0 value without hitting DMA channel allocation error paths.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
arch/sh/include/cpu-sh4/cpu/sh7722.h | 1 +
arch/sh/include/cpu-sh4/cpu/sh7724.h | 1 +
arch/sh/include/cpu-sh4/cpu/sh7757.h | 1 +
3 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/sh/include/cpu-sh4/cpu/sh7722.h b/arch/sh/include/cpu-sh4/cpu/sh7722.h
index 7a5b8a3..bd06227 100644
--- a/arch/sh/include/cpu-sh4/cpu/sh7722.h
+++ b/arch/sh/include/cpu-sh4/cpu/sh7722.h
@@ -236,6 +236,7 @@ enum {
};
enum {
+ SHDMA_SLAVE_INVALID,
SHDMA_SLAVE_SCIF0_TX,
SHDMA_SLAVE_SCIF0_RX,
SHDMA_SLAVE_SCIF1_TX,
diff --git a/arch/sh/include/cpu-sh4/cpu/sh7724.h b/arch/sh/include/cpu-sh4/cpu/sh7724.h
index 7eb4359..3daef8e 100644
--- a/arch/sh/include/cpu-sh4/cpu/sh7724.h
+++ b/arch/sh/include/cpu-sh4/cpu/sh7724.h
@@ -285,6 +285,7 @@ enum {
};
enum {
+ SHDMA_SLAVE_INVALID,
SHDMA_SLAVE_SCIF0_TX,
SHDMA_SLAVE_SCIF0_RX,
SHDMA_SLAVE_SCIF1_TX,
diff --git a/arch/sh/include/cpu-sh4/cpu/sh7757.h b/arch/sh/include/cpu-sh4/cpu/sh7757.h
index 05b8196..41f9f8b 100644
--- a/arch/sh/include/cpu-sh4/cpu/sh7757.h
+++ b/arch/sh/include/cpu-sh4/cpu/sh7757.h
@@ -252,6 +252,7 @@ enum {
};
enum {
+ SHDMA_SLAVE_INVALID,
SHDMA_SLAVE_SDHI_TX,
SHDMA_SLAVE_SDHI_RX,
SHDMA_SLAVE_MMCIF_TX,
--
1.7.2.5
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/3] ARM: mach-shmobile: mark DMA slave ID 0 as invalid
2011-05-24 10:23 ` Guennadi Liakhovetski
@ 2011-05-24 10:24 ` Guennadi Liakhovetski
-1 siblings, 0 replies; 16+ messages in thread
From: Guennadi Liakhovetski @ 2011-05-24 10:24 UTC (permalink / raw)
To: linux-sh
Cc: linux-mmc, Simon Horman, Magnus Damm, Ian Molton, Dan Williams,
Vinod Koul
This makes it possible to leave DMA slave IDs in the platform data
at default 0 value without hitting DMA channel allocation error paths.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
arch/arm/mach-shmobile/include/mach/sh7372.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-shmobile/include/mach/sh7372.h b/arch/arm/mach-shmobile/include/mach/sh7372.h
index 6a290b7..75076b1 100644
--- a/arch/arm/mach-shmobile/include/mach/sh7372.h
+++ b/arch/arm/mach-shmobile/include/mach/sh7372.h
@@ -436,6 +436,7 @@ enum {
/* DMA slave IDs */
enum {
+ SHDMA_SLAVE_INVALID,
SHDMA_SLAVE_SCIF0_TX,
SHDMA_SLAVE_SCIF0_RX,
SHDMA_SLAVE_SCIF1_TX,
--
1.7.2.5
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/3] ARM: mach-shmobile: mark DMA slave ID 0 as invalid
@ 2011-05-24 10:24 ` Guennadi Liakhovetski
0 siblings, 0 replies; 16+ messages in thread
From: Guennadi Liakhovetski @ 2011-05-24 10:24 UTC (permalink / raw)
To: linux-sh
Cc: linux-mmc, Simon Horman, Magnus Damm, Ian Molton, Dan Williams,
Vinod Koul
This makes it possible to leave DMA slave IDs in the platform data
at default 0 value without hitting DMA channel allocation error paths.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
arch/arm/mach-shmobile/include/mach/sh7372.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-shmobile/include/mach/sh7372.h b/arch/arm/mach-shmobile/include/mach/sh7372.h
index 6a290b7..75076b1 100644
--- a/arch/arm/mach-shmobile/include/mach/sh7372.h
+++ b/arch/arm/mach-shmobile/include/mach/sh7372.h
@@ -436,6 +436,7 @@ enum {
/* DMA slave IDs */
enum {
+ SHDMA_SLAVE_INVALID,
SHDMA_SLAVE_SCIF0_TX,
SHDMA_SLAVE_SCIF0_RX,
SHDMA_SLAVE_SCIF1_TX,
--
1.7.2.5
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 3/3] mmc: SDHI: DMA slave ID 0 is invalid
2011-05-24 10:23 ` Guennadi Liakhovetski
@ 2011-05-24 10:24 ` Guennadi Liakhovetski
-1 siblings, 0 replies; 16+ messages in thread
From: Guennadi Liakhovetski @ 2011-05-24 10:24 UTC (permalink / raw)
To: linux-sh
Cc: linux-mmc, Simon Horman, Magnus Damm, Ian Molton, Dan Williams,
Vinod Koul
Don't try to allocate DMA resources, if the platform didn't specify
positive DMA slave IDs.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
drivers/mmc/host/sh_mobile_sdhi.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
index c05d699..e646741 100644
--- a/drivers/mmc/host/sh_mobile_sdhi.c
+++ b/drivers/mmc/host/sh_mobile_sdhi.c
@@ -132,7 +132,7 @@ static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev)
mmc_data->ocr_mask = p->tmio_ocr_mask;
mmc_data->capabilities |= p->tmio_caps;
- if (p->dma_slave_tx >= 0 && p->dma_slave_rx >= 0) {
+ if (p->dma_slave_tx > 0 && p->dma_slave_rx > 0) {
priv->param_tx.slave_id = p->dma_slave_tx;
priv->param_rx.slave_id = p->dma_slave_rx;
priv->dma_priv.chan_priv_tx = &priv->param_tx;
--
1.7.2.5
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 3/3] mmc: SDHI: DMA slave ID 0 is invalid
@ 2011-05-24 10:24 ` Guennadi Liakhovetski
0 siblings, 0 replies; 16+ messages in thread
From: Guennadi Liakhovetski @ 2011-05-24 10:24 UTC (permalink / raw)
To: linux-sh
Cc: linux-mmc, Simon Horman, Magnus Damm, Ian Molton, Dan Williams,
Vinod Koul
Don't try to allocate DMA resources, if the platform didn't specify
positive DMA slave IDs.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
drivers/mmc/host/sh_mobile_sdhi.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
index c05d699..e646741 100644
--- a/drivers/mmc/host/sh_mobile_sdhi.c
+++ b/drivers/mmc/host/sh_mobile_sdhi.c
@@ -132,7 +132,7 @@ static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev)
mmc_data->ocr_mask = p->tmio_ocr_mask;
mmc_data->capabilities |= p->tmio_caps;
- if (p->dma_slave_tx >= 0 && p->dma_slave_rx >= 0) {
+ if (p->dma_slave_tx > 0 && p->dma_slave_rx > 0) {
priv->param_tx.slave_id = p->dma_slave_tx;
priv->param_rx.slave_id = p->dma_slave_rx;
priv->dma_priv.chan_priv_tx = &priv->param_tx;
--
1.7.2.5
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 0/3] Make DMA slave ID 0 invalid to simplify platform data
2011-05-24 10:23 ` Guennadi Liakhovetski
@ 2011-05-25 2:32 ` Paul Mundt
-1 siblings, 0 replies; 16+ messages in thread
From: Paul Mundt @ 2011-05-25 2:32 UTC (permalink / raw)
To: Guennadi Liakhovetski
Cc: linux-sh, linux-mmc, Simon Horman, Magnus Damm, Ian Molton,
Dan Williams, Vinod Koul
On Tue, May 24, 2011 at 12:23:55PM +0200, Guennadi Liakhovetski wrote:
> Currently platforms, using the SDHI TMIO driver, have to specify negative
> DMA slave IDs to force PIO mode. If default 0 is left, the driver
> recognises it as a valid DMA slave ID and tries to acquire channels. This
> fails then, because the driver cannot allocate two channels with the same
> ID, but it would be better to just make 0 an invalid ID to prevent this.
>
I suppose the ordering for this will be adding the invalid IDs for all of
the CPUs first and then updating the SDHI driver accordingly during -rc2
or something like that.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/3] Make DMA slave ID 0 invalid to simplify platform data
@ 2011-05-25 2:32 ` Paul Mundt
0 siblings, 0 replies; 16+ messages in thread
From: Paul Mundt @ 2011-05-25 2:32 UTC (permalink / raw)
To: Guennadi Liakhovetski
Cc: linux-sh, linux-mmc, Simon Horman, Magnus Damm, Ian Molton,
Dan Williams, Vinod Koul
On Tue, May 24, 2011 at 12:23:55PM +0200, Guennadi Liakhovetski wrote:
> Currently platforms, using the SDHI TMIO driver, have to specify negative
> DMA slave IDs to force PIO mode. If default 0 is left, the driver
> recognises it as a valid DMA slave ID and tries to acquire channels. This
> fails then, because the driver cannot allocate two channels with the same
> ID, but it would be better to just make 0 an invalid ID to prevent this.
>
I suppose the ordering for this will be adding the invalid IDs for all of
the CPUs first and then updating the SDHI driver accordingly during -rc2
or something like that.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/3] Make DMA slave ID 0 invalid to simplify platform
2011-05-25 2:32 ` Paul Mundt
@ 2011-05-25 6:48 ` Guennadi Liakhovetski
-1 siblings, 0 replies; 16+ messages in thread
From: Guennadi Liakhovetski @ 2011-05-25 6:48 UTC (permalink / raw)
To: Paul Mundt
Cc: linux-sh, linux-mmc, Simon Horman, Magnus Damm, Ian Molton,
Dan Williams, Vinod Koul
On Wed, 25 May 2011, Paul Mundt wrote:
> On Tue, May 24, 2011 at 12:23:55PM +0200, Guennadi Liakhovetski wrote:
> > Currently platforms, using the SDHI TMIO driver, have to specify negative
> > DMA slave IDs to force PIO mode. If default 0 is left, the driver
> > recognises it as a valid DMA slave ID and tries to acquire channels. This
> > fails then, because the driver cannot allocate two channels with the same
> > ID, but it would be better to just make 0 an invalid ID to prevent this.
> >
> I suppose the ordering for this will be adding the invalid IDs for all of
> the CPUs first and then updating the SDHI driver accordingly during -rc2
> or something like that.
Yes, otherwise it would break SDHI DMA on sh7757, where one of the IDs =
0.
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/3] Make DMA slave ID 0 invalid to simplify platform data
@ 2011-05-25 6:48 ` Guennadi Liakhovetski
0 siblings, 0 replies; 16+ messages in thread
From: Guennadi Liakhovetski @ 2011-05-25 6:48 UTC (permalink / raw)
To: Paul Mundt
Cc: linux-sh, linux-mmc, Simon Horman, Magnus Damm, Ian Molton,
Dan Williams, Vinod Koul
On Wed, 25 May 2011, Paul Mundt wrote:
> On Tue, May 24, 2011 at 12:23:55PM +0200, Guennadi Liakhovetski wrote:
> > Currently platforms, using the SDHI TMIO driver, have to specify negative
> > DMA slave IDs to force PIO mode. If default 0 is left, the driver
> > recognises it as a valid DMA slave ID and tries to acquire channels. This
> > fails then, because the driver cannot allocate two channels with the same
> > ID, but it would be better to just make 0 an invalid ID to prevent this.
> >
> I suppose the ordering for this will be adding the invalid IDs for all of
> the CPUs first and then updating the SDHI driver accordingly during -rc2
> or something like that.
Yes, otherwise it would break SDHI DMA on sh7757, where one of the IDs ==
0.
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/3] mmc: SDHI: DMA slave ID 0 is invalid
2011-05-24 10:24 ` Guennadi Liakhovetski
@ 2011-06-20 14:52 ` Guennadi Liakhovetski
-1 siblings, 0 replies; 16+ messages in thread
From: Guennadi Liakhovetski @ 2011-06-20 14:52 UTC (permalink / raw)
To: linux-sh
Cc: linux-mmc, Simon Horman, Magnus Damm, Ian Molton, Dan Williams,
Vinod Koul, Chris Ball
Hi Chris
Can we please get this patch too in for 3.0? It is a part of a
patch-series, of which all others havs already been applied. This specific
patch makes the behaviour of the SDHI driver consistent with other DMA
users on sh-mobile, namely, that default platform data with no DMA
information provided immediately switches the driver to the PIO mode. This
patch fixes this logical error of trying to acquire DMA channels with
invalid configuration information and avoids ugly error messages in the
kernel log.
Thanks
Guennadi
On Tue, 24 May 2011, Guennadi Liakhovetski wrote:
> Don't try to allocate DMA resources, if the platform didn't specify
> positive DMA slave IDs.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
> drivers/mmc/host/sh_mobile_sdhi.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
> index c05d699..e646741 100644
> --- a/drivers/mmc/host/sh_mobile_sdhi.c
> +++ b/drivers/mmc/host/sh_mobile_sdhi.c
> @@ -132,7 +132,7 @@ static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev)
> mmc_data->ocr_mask = p->tmio_ocr_mask;
> mmc_data->capabilities |= p->tmio_caps;
>
> - if (p->dma_slave_tx >= 0 && p->dma_slave_rx >= 0) {
> + if (p->dma_slave_tx > 0 && p->dma_slave_rx > 0) {
> priv->param_tx.slave_id = p->dma_slave_tx;
> priv->param_rx.slave_id = p->dma_slave_rx;
> priv->dma_priv.chan_priv_tx = &priv->param_tx;
> --
> 1.7.2.5
>
>
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/3] mmc: SDHI: DMA slave ID 0 is invalid
@ 2011-06-20 14:52 ` Guennadi Liakhovetski
0 siblings, 0 replies; 16+ messages in thread
From: Guennadi Liakhovetski @ 2011-06-20 14:52 UTC (permalink / raw)
To: linux-sh
Cc: linux-mmc, Simon Horman, Magnus Damm, Ian Molton, Dan Williams,
Vinod Koul, Chris Ball
Hi Chris
Can we please get this patch too in for 3.0? It is a part of a
patch-series, of which all others havs already been applied. This specific
patch makes the behaviour of the SDHI driver consistent with other DMA
users on sh-mobile, namely, that default platform data with no DMA
information provided immediately switches the driver to the PIO mode. This
patch fixes this logical error of trying to acquire DMA channels with
invalid configuration information and avoids ugly error messages in the
kernel log.
Thanks
Guennadi
On Tue, 24 May 2011, Guennadi Liakhovetski wrote:
> Don't try to allocate DMA resources, if the platform didn't specify
> positive DMA slave IDs.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
> drivers/mmc/host/sh_mobile_sdhi.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
> index c05d699..e646741 100644
> --- a/drivers/mmc/host/sh_mobile_sdhi.c
> +++ b/drivers/mmc/host/sh_mobile_sdhi.c
> @@ -132,7 +132,7 @@ static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev)
> mmc_data->ocr_mask = p->tmio_ocr_mask;
> mmc_data->capabilities |= p->tmio_caps;
>
> - if (p->dma_slave_tx >= 0 && p->dma_slave_rx >= 0) {
> + if (p->dma_slave_tx > 0 && p->dma_slave_rx > 0) {
> priv->param_tx.slave_id = p->dma_slave_tx;
> priv->param_rx.slave_id = p->dma_slave_rx;
> priv->dma_priv.chan_priv_tx = &priv->param_tx;
> --
> 1.7.2.5
>
>
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/3] mmc: SDHI: DMA slave ID 0 is invalid
2011-06-20 14:52 ` Guennadi Liakhovetski
@ 2011-06-20 19:37 ` Chris Ball
-1 siblings, 0 replies; 16+ messages in thread
From: Chris Ball @ 2011-06-20 19:37 UTC (permalink / raw)
To: Guennadi Liakhovetski
Cc: linux-sh, linux-mmc, Simon Horman, Magnus Damm, Ian Molton,
Dan Williams, Vinod Koul
Hi Guennadi,
On Mon, Jun 20 2011, Guennadi Liakhovetski wrote:
> Can we please get this patch too in for 3.0? It is a part of a
> patch-series, of which all others havs already been applied. This specific
> patch makes the behaviour of the SDHI driver consistent with other DMA
> users on sh-mobile, namely, that default platform data with no DMA
> information provided immediately switches the driver to the PIO mode. This
> patch fixes this logical error of trying to acquire DMA channels with
> invalid configuration information and avoids ugly error messages in the
> kernel log.
>
> Thanks
> Guennadi
>
> On Tue, 24 May 2011, Guennadi Liakhovetski wrote:
>
>> Don't try to allocate DMA resources, if the platform didn't specify
>> positive DMA slave IDs.
>>
>> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
>> ---
>> drivers/mmc/host/sh_mobile_sdhi.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
>> index c05d699..e646741 100644
>> --- a/drivers/mmc/host/sh_mobile_sdhi.c
>> +++ b/drivers/mmc/host/sh_mobile_sdhi.c
>> @@ -132,7 +132,7 @@ static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev)
>> mmc_data->ocr_mask = p->tmio_ocr_mask;
>> mmc_data->capabilities |= p->tmio_caps;
>>
>> - if (p->dma_slave_tx >= 0 && p->dma_slave_rx >= 0) {
>> + if (p->dma_slave_tx > 0 && p->dma_slave_rx > 0) {
>> priv->param_tx.slave_id = p->dma_slave_tx;
>> priv->param_rx.slave_id = p->dma_slave_rx;
>> priv->dma_priv.chan_priv_tx = &priv->param_tx;
>> --
>> 1.7.2.5
Thanks, pushed to mmc-next for 3.0.
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/3] mmc: SDHI: DMA slave ID 0 is invalid
@ 2011-06-20 19:37 ` Chris Ball
0 siblings, 0 replies; 16+ messages in thread
From: Chris Ball @ 2011-06-20 19:37 UTC (permalink / raw)
To: Guennadi Liakhovetski
Cc: linux-sh, linux-mmc, Simon Horman, Magnus Damm, Ian Molton,
Dan Williams, Vinod Koul
Hi Guennadi,
On Mon, Jun 20 2011, Guennadi Liakhovetski wrote:
> Can we please get this patch too in for 3.0? It is a part of a
> patch-series, of which all others havs already been applied. This specific
> patch makes the behaviour of the SDHI driver consistent with other DMA
> users on sh-mobile, namely, that default platform data with no DMA
> information provided immediately switches the driver to the PIO mode. This
> patch fixes this logical error of trying to acquire DMA channels with
> invalid configuration information and avoids ugly error messages in the
> kernel log.
>
> Thanks
> Guennadi
>
> On Tue, 24 May 2011, Guennadi Liakhovetski wrote:
>
>> Don't try to allocate DMA resources, if the platform didn't specify
>> positive DMA slave IDs.
>>
>> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
>> ---
>> drivers/mmc/host/sh_mobile_sdhi.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
>> index c05d699..e646741 100644
>> --- a/drivers/mmc/host/sh_mobile_sdhi.c
>> +++ b/drivers/mmc/host/sh_mobile_sdhi.c
>> @@ -132,7 +132,7 @@ static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev)
>> mmc_data->ocr_mask = p->tmio_ocr_mask;
>> mmc_data->capabilities |= p->tmio_caps;
>>
>> - if (p->dma_slave_tx >= 0 && p->dma_slave_rx >= 0) {
>> + if (p->dma_slave_tx > 0 && p->dma_slave_rx > 0) {
>> priv->param_tx.slave_id = p->dma_slave_tx;
>> priv->param_rx.slave_id = p->dma_slave_rx;
>> priv->dma_priv.chan_priv_tx = &priv->param_tx;
>> --
>> 1.7.2.5
Thanks, pushed to mmc-next for 3.0.
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2011-06-20 19:37 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-24 10:23 [PATCH 0/3] Make DMA slave ID 0 invalid to simplify platform data Guennadi Liakhovetski
2011-05-24 10:23 ` Guennadi Liakhovetski
2011-05-24 10:23 ` [PATCH 1/3] sh: mark DMA slave ID 0 as invalid Guennadi Liakhovetski
2011-05-24 10:23 ` Guennadi Liakhovetski
2011-05-24 10:24 ` [PATCH 2/3] ARM: mach-shmobile: " Guennadi Liakhovetski
2011-05-24 10:24 ` Guennadi Liakhovetski
2011-05-24 10:24 ` [PATCH 3/3] mmc: SDHI: DMA slave ID 0 is invalid Guennadi Liakhovetski
2011-05-24 10:24 ` Guennadi Liakhovetski
2011-06-20 14:52 ` Guennadi Liakhovetski
2011-06-20 14:52 ` Guennadi Liakhovetski
2011-06-20 19:37 ` Chris Ball
2011-06-20 19:37 ` Chris Ball
2011-05-25 2:32 ` [PATCH 0/3] Make DMA slave ID 0 invalid to simplify platform data Paul Mundt
2011-05-25 2:32 ` Paul Mundt
2011-05-25 6:48 ` [PATCH 0/3] Make DMA slave ID 0 invalid to simplify platform Guennadi Liakhovetski
2011-05-25 6:48 ` [PATCH 0/3] Make DMA slave ID 0 invalid to simplify platform data Guennadi Liakhovetski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.