From: Rob Herring Date: Thu, 27 May 2021 22:32:17 +0000 (-0500) Subject: of: Drop reserved mem dependency on DMA_DECLARE_COHERENT and DMA_CMA X-Git-Tag: v5.15~817^2~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ee292a66e8199d234c8f8fa5cd3d2fef16fc97d;p=platform%2Fkernel%2Flinux-starfive.git of: Drop reserved mem dependency on DMA_DECLARE_COHERENT and DMA_CMA Reserved memory regions can be used for more than just DMA regions, so only enabling on DMA_DECLARE_COHERENT (via HAS_DMA) or DMA_CMA is wrong. This effectively doesn't matter except for the few cases arches select NO_DMA. At least, these users of RESERVEDMEM_OF_DECLARE depend on reserved memory support: arch/riscv/mm/init.c:RESERVEDMEM_OF_DECLARE(elfcorehdr, "linux,elfcorehdr", elfcore_hdr_setup); drivers/memory/tegra/tegra210-emc-table.c:RESERVEDMEM_OF_DECLARE(tegra210_emc_table, "nvidia,tegra210-emc-table", drivers/soc/fsl/qbman/bman_ccsr.c:RESERVEDMEM_OF_DECLARE(bman_fbpr, "fsl,bman-fbpr", bman_fbpr); drivers/soc/fsl/qbman/qman_ccsr.c:RESERVEDMEM_OF_DECLARE(qman_fqd, "fsl,qman-fqd", qman_fqd); drivers/soc/fsl/qbman/qman_ccsr.c:RESERVEDMEM_OF_DECLARE(qman_pfdr, "fsl,qman-pfdr", qman_pfdr); Let's simplify things and enable OF_RESERVED_MEM when OF_EARLY_FLATTREE is enabled. Cc: Christoph Hellwig Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210527223217.1572631-1-robh@kernel.org --- diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig index 1845043..3dfeae8 100644 --- a/drivers/of/Kconfig +++ b/drivers/of/Kconfig @@ -75,9 +75,7 @@ config OF_NET def_bool y config OF_RESERVED_MEM - bool - depends on OF_EARLY_FLATTREE - default y if DMA_DECLARE_COHERENT || DMA_CMA + def_bool OF_EARLY_FLATTREE config OF_RESOLVE bool