From daf43701e907b2937c9e65ae5f73832d8fac0529 Mon Sep 17 00:00:00 2001 From: Ziyuan Xu Date: Wed, 10 Aug 2022 15:40:53 +0800 Subject: [PATCH] mailbox: rockchip: initcall early when CONFIG_ROCKCHIP_THUNDER_BOOT=y Signed-off-by: Ziyuan Xu Change-Id: I8401351fa059eec3473070347b3480e214ff10ee --- drivers/mailbox/rockchip-mailbox.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/mailbox/rockchip-mailbox.c b/drivers/mailbox/rockchip-mailbox.c index 03985b45cbf2..a30949964ccb 100644 --- a/drivers/mailbox/rockchip-mailbox.c +++ b/drivers/mailbox/rockchip-mailbox.c @@ -285,7 +285,15 @@ static struct platform_driver rockchip_mbox_driver = { }, }; +#if defined(CONFIG_ROCKCHIP_THUNDER_BOOT) +static int __init rockchip_mbox_driver_init(void) +{ + return platform_driver_register(&rockchip_mbox_driver); +} +core_initcall(rockchip_mbox_driver_init); +#else module_platform_driver(rockchip_mbox_driver); +#endif MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("Rockchip mailbox: communicate between CPU cores and MCU");