mailbox: rockchip: initcall early when CONFIG_ROCKCHIP_THUNDER_BOOT=y

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I8401351fa059eec3473070347b3480e214ff10ee
This commit is contained in:
Ziyuan Xu
2022-08-10 15:40:53 +08:00
committed by Tao Huang
parent 0da77f77c0
commit daf43701e9

View File

@@ -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");