From: Thomas Petazzoni Date: Thu, 20 Jun 2013 07:45:26 +0000 (+0200) Subject: arm: mvebu: fix coherency_late_init() for multiplatform X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1919bff0e25f5f7ce43474a3b972405f51023e99;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git arm: mvebu: fix coherency_late_init() for multiplatform As noticed by Arnaud Patard (Rtp) , commit 865e0527d2d7 ('arm: mvebu: avoid hardcoded virtual address in coherency code') added a postcore_initcall() to register the bus notifier that the mvebu code needs to apply correct DMA operations on its platform devices breaks the multiplatform boot on other platforms, because the bus notifier registration is unconditional. This commit fixes that by registering the bus notifier only if we have the mvebu coherency unit described in the Device Tree. The conditional used is exactly the same in which the bus_register_notifier() call was originally enclosed before 865e0527d2d7 ('arm: mvebu: avoid hardcoded virtual address in coherency code'). Signed-off-by: Thomas Petazzoni Reported-by: Arnaud Patard (Rtp) Acked-by: Andrew Lunn Signed-off-by: Jason Cooper --- diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c index 32fcf69f4202..be117591f7f2 100644 --- a/arch/arm/mach-mvebu/coherency.c +++ b/arch/arm/mach-mvebu/coherency.c @@ -147,8 +147,9 @@ int __init coherency_init(void) static int __init coherency_late_init(void) { - bus_register_notifier(&platform_bus_type, - &mvebu_hwcc_platform_nb); + if (of_find_matching_node(NULL, of_coherency_table)) + bus_register_notifier(&platform_bus_type, + &mvebu_hwcc_platform_nb); return 0; }