]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
bootstd: use ARCH_DMA_MINALIGN in memalign() when allocating memory
authorTony Dinh <mibodhi@gmail.com>
Tue, 19 Sep 2023 21:27:21 +0000 (14:27 -0700)
committerTom Rini <trini@konsulko.com>
Mon, 9 Oct 2023 19:24:31 +0000 (15:24 -0400)
Use ARCH_DMA_MINALIGN in memalign() when allocating memory to read the script from the media.

Ref: https://lore.kernel.org/u-boot/CAJaLiFy05F3Cr4X4G2mVkppXnBEFZrHQ+5CngYN8eJPg8ENWkg@mail.gmail.com/T/#m26daadc2463fe653b814a94e6309e5e6bb6be1d1

Note: this patch depends on the previous patch
https://patchwork.ozlabs.org/project/uboot/patch/20230917230649.30357-1-mibodhi@gmail.com/

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
boot/bootmeth_script.c

index 58c57a2d4b5babe528195aaf94f7e77c826aa069..345114dabf74aa8ec1d673507e71b18b4584a08b 100644 (file)
@@ -99,7 +99,7 @@ static int script_read_bootflow_file(struct udevice *bootstd,
        if (!bflow->subdir)
                return log_msg_ret("prefix", -ENOMEM);
 
-       ret = bootmeth_alloc_file(bflow, 0x10000, 1);
+       ret = bootmeth_alloc_file(bflow, 0x10000, ARCH_DMA_MINALIGN);
        if (ret)
                return log_msg_ret("read", ret);