nvmem: core: Call nvmem_init() early when CONFIG_INITCALL_ASYNC=y

rockchip_otp_init() depends on nvmem_init() to init nvmem_bus_type.
But rockchip_otp_init() and nvmem_init() are both in the same
subsys_initcall level.

Fix this by moving nvmem_init() to the arch_initcall_sync level.

Change-Id: If591d89572d77adbec06fe2cc2af23b1a4b239fd
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This commit is contained in:
Tao Huang
2025-04-15 19:53:52 +08:00
parent 13cc56a3ec
commit 8c62e5fa38

View File

@@ -1948,7 +1948,7 @@ static void __exit nvmem_exit(void)
bus_unregister(&nvmem_bus_type);
}
#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT
#ifdef CONFIG_INITCALL_ASYNC
arch_initcall_sync(nvmem_init);
#else
subsys_initcall(nvmem_init);