diff options
author | Anatolij Gustschin <agust@denx.de> | 2021-10-14 11:40:12 +0200 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2021-10-18 11:43:12 +0530 |
commit | adec566b05288f2787a1f88dbaf77ed8b0c644fa (patch) | |
tree | ac9347fc68014507127a91079acdcb7925849b20 /drivers/dma/bestcomm/gen_bd.c | |
parent | 8e0c7e486014f8e924f5dc8f7a8719adb48f9d92 (diff) | |
download | lwn-adec566b05288f2787a1f88dbaf77ed8b0c644fa.tar.gz lwn-adec566b05288f2787a1f88dbaf77ed8b0c644fa.zip |
dmaengine: bestcomm: fix system boot lockups
memset() and memcpy() on an MMIO region like here results in a
lockup at startup on mpc5200 platform (since this first happens
during probing of the ATA and Ethernet drivers). Use memset_io()
and memcpy_toio() instead.
Fixes: 2f9ea1bde0d1 ("bestcomm: core bestcomm support for Freescale MPC5200")
Cc: stable@vger.kernel.org # v5.14+
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Link: https://lore.kernel.org/r/20211014094012.21286-1-agust@denx.de
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/bestcomm/gen_bd.c')
-rw-r--r-- | drivers/dma/bestcomm/gen_bd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/bestcomm/gen_bd.c b/drivers/dma/bestcomm/gen_bd.c index 906ddba6a6f5..8a24a5cbc263 100644 --- a/drivers/dma/bestcomm/gen_bd.c +++ b/drivers/dma/bestcomm/gen_bd.c @@ -142,7 +142,7 @@ bcom_gen_bd_rx_reset(struct bcom_task *tsk) tsk->index = 0; tsk->outdex = 0; - memset(tsk->bd, 0x00, tsk->num_bd * tsk->bd_size); + memset_io(tsk->bd, 0x00, tsk->num_bd * tsk->bd_size); /* Configure some stuff */ bcom_set_task_pragma(tsk->tasknum, BCOM_GEN_RX_BD_PRAGMA); @@ -226,7 +226,7 @@ bcom_gen_bd_tx_reset(struct bcom_task *tsk) tsk->index = 0; tsk->outdex = 0; - memset(tsk->bd, 0x00, tsk->num_bd * tsk->bd_size); + memset_io(tsk->bd, 0x00, tsk->num_bd * tsk->bd_size); /* Configure some stuff */ bcom_set_task_pragma(tsk->tasknum, BCOM_GEN_TX_BD_PRAGMA); |