* [PATCH RESEND] dmaengine: ti-dma-crossbar: Correct am335x/am43xx mux value type
@ 2017-11-08 10:02 Peter Ujfalusi
2017-11-08 14:22 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Peter Ujfalusi @ 2017-11-08 10:02 UTC (permalink / raw)
To: vinod.koul, dan.j.williams; +Cc: dmaengine, linux-kernel, linux-omap
The used 0x1f mask is only valid for am335x family of SoC, different family
using this type of crossbar might have different number of electable
events. In case of am43xx family 0x3f mask should have been used for
example.
Instead of trying to handle each family's mask, just use u8 type to store
the mux value since the event offsets are aligned to byte offset.
Fixes: 42dbdcc6bf965 ("dmaengine: ti-dma-crossbar: Add support for crossbar on AM33xx/AM43xx")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
Vinod,
this patch somehow got missed, I have sent it in May:
https://patchwork.kernel.org/patch/9736747/
Regards,
Peter
drivers/dma/ti-dma-crossbar.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/dma/ti-dma-crossbar.c b/drivers/dma/ti-dma-crossbar.c
index f1d04b70ee67..7df910e7c348 100644
--- a/drivers/dma/ti-dma-crossbar.c
+++ b/drivers/dma/ti-dma-crossbar.c
@@ -49,12 +49,12 @@ struct ti_am335x_xbar_data {
struct ti_am335x_xbar_map {
u16 dma_line;
- u16 mux_val;
+ u8 mux_val;
};
-static inline void ti_am335x_xbar_write(void __iomem *iomem, int event, u16 val)
+static inline void ti_am335x_xbar_write(void __iomem *iomem, int event, u8 val)
{
- writeb_relaxed(val & 0x1f, iomem + event);
+ writeb_relaxed(val, iomem + event);
}
static void ti_am335x_xbar_free(struct device *dev, void *route_data)
@@ -105,7 +105,7 @@ static void *ti_am335x_xbar_route_allocate(struct of_phandle_args *dma_spec,
}
map->dma_line = (u16)dma_spec->args[0];
- map->mux_val = (u16)dma_spec->args[2];
+ map->mux_val = (u8)dma_spec->args[2];
dma_spec->args[2] = 0;
dma_spec->args_count = 2;
--
Peter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH RESEND] dmaengine: ti-dma-crossbar: Correct am335x/am43xx mux value type
2017-11-08 10:02 [PATCH RESEND] dmaengine: ti-dma-crossbar: Correct am335x/am43xx mux value type Peter Ujfalusi
@ 2017-11-08 14:22 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2017-11-08 14:22 UTC (permalink / raw)
To: Peter Ujfalusi; +Cc: dan.j.williams, dmaengine, linux-kernel, linux-omap
On Wed, Nov 08, 2017 at 12:02:25PM +0200, Peter Ujfalusi wrote:
> The used 0x1f mask is only valid for am335x family of SoC, different family
> using this type of crossbar might have different number of electable
> events. In case of am43xx family 0x3f mask should have been used for
> example.
> Instead of trying to handle each family's mask, just use u8 type to store
> the mux value since the event offsets are aligned to byte offset.
>
> Fixes: 42dbdcc6bf965 ("dmaengine: ti-dma-crossbar: Add support for crossbar on AM33xx/AM43xx")
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
> Vinod,
>
> this patch somehow got missed, I have sent it in May:
> https://patchwork.kernel.org/patch/9736747/
not sure how, but applied now
--
~Vinod
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-08 14:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-08 10:02 [PATCH RESEND] dmaengine: ti-dma-crossbar: Correct am335x/am43xx mux value type Peter Ujfalusi
2017-11-08 14:22 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox