summaryrefslogtreecommitdiffstats
path: root/drivers/dma/bestcomm/fec.c
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2021-10-14 11:40:12 +0200
committerVinod Koul <vkoul@kernel.org>2021-10-18 08:13:12 +0200
commitadec566b05288f2787a1f88dbaf77ed8b0c644fa (patch)
treeac9347fc68014507127a91079acdcb7925849b20 /drivers/dma/bestcomm/fec.c
parentdmaengine: at_xdmac: use pm_ptr() (diff)
downloadlinux-adec566b05288f2787a1f88dbaf77ed8b0c644fa.tar.xz
linux-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/fec.c')
-rw-r--r--drivers/dma/bestcomm/fec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/bestcomm/fec.c b/drivers/dma/bestcomm/fec.c
index 7f1fb1c999e4..d203618ac11f 100644
--- a/drivers/dma/bestcomm/fec.c
+++ b/drivers/dma/bestcomm/fec.c
@@ -140,7 +140,7 @@ bcom_fec_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_FEC_RX_BD_PRAGMA);
@@ -241,7 +241,7 @@ bcom_fec_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_FEC_TX_BD_PRAGMA);