[PATCH v2 17/29] mci: allocate DMA-able memory
Ahmad Fatoum
a.fatoum at pengutronix.de
Fri Jun 18 21:50:43 PDT 2021
Doesn't yet make a difference, but in a future commit, RISC-V will use a
64-bit alignment for the sector buffers by defining a custom dma_alloc.
Prepare for this.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
drivers/mci/mci-core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index a094f3cbf522..b174067a7fbc 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -21,6 +21,7 @@
#include <of.h>
#include <linux/err.h>
#include <linux/sizes.h>
+#include <dma.h>
#define MAX_BUFFER_NUMBER 0xffffffff
@@ -1852,7 +1853,7 @@ static int mci_set_probe(struct param_d *param, void *priv)
static int mci_init(void)
{
- sector_buf = xmemalign(32, SECTOR_SIZE);
+ sector_buf = dma_alloc(SECTOR_SIZE);
return 0;
}
--
2.29.2
More information about the barebox
mailing list