diff --git a/arch/arm/configs/rv1126b-fastboot.config b/arch/arm/configs/rv1126b-fastboot.config index fcac9385c431..89e5fb406ffe 100644 --- a/arch/arm/configs/rv1126b-fastboot.config +++ b/arch/arm/configs/rv1126b-fastboot.config @@ -241,7 +241,7 @@ CONFIG_FS_MBCACHE=m # CONFIG_GPIO_XRA1403 is not set # CONFIG_HI8435 is not set # CONFIG_IIO_SSP_SENSORHUB is not set -# CONFIG_INITCALL_ASYNC is not set +CONFIG_INITCALL_ASYNC=y # CONFIG_INITRAMFS_FORCE is not set CONFIG_INITRAMFS_SOURCE="" # CONFIG_INV_ICM42600_SPI is not set diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index f8dd0b3cc8e0..27bda26119cc 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c @@ -1049,4 +1049,8 @@ static int __init alignment_init(void) return 0; } +#ifdef CONFIG_INITCALL_ASYNC +fs_initcall_sync(alignment_init); +#else fs_initcall(alignment_init); +#endif diff --git a/drivers/char/misc.c b/drivers/char/misc.c index cba19bfdc44d..da6fcf81ec2b 100644 --- a/drivers/char/misc.c +++ b/drivers/char/misc.c @@ -290,4 +290,8 @@ fail_remove: remove_proc_entry("misc", NULL); return err; } +#ifdef CONFIG_INITCALL_ASYNC +arch_initcall_sync(misc_init); +#else subsys_initcall(misc_init); +#endif diff --git a/drivers/dma/rockchip-dma.c b/drivers/dma/rockchip-dma.c index e38820e4b780..bb0cecc562fe 100644 --- a/drivers/dma/rockchip-dma.c +++ b/drivers/dma/rockchip-dma.c @@ -1353,7 +1353,21 @@ static struct platform_driver rk_pdma_driver = { .remove = rk_dma_remove, }; +#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT +static int __init rk_pdma_driver_init(void) +{ + return platform_driver_register(&rk_pdma_driver); +} +arch_initcall_sync(rk_pdma_driver_init); + +static void __exit rk_pdma_driver_exit(void) +{ + platform_driver_unregister(&rk_pdma_driver); +} +module_exit(rk_pdma_driver_exit); +#else module_platform_driver(rk_pdma_driver); +#endif MODULE_DESCRIPTION("Rockchip DMA Driver"); MODULE_AUTHOR("Sugar.Zhang@rock-chips.com"); diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 69bd7978f448..0bee4583c777 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -1079,7 +1079,9 @@ error: return ret; } -#ifdef CONFIG_VIDEO_REVERSE_IMAGE +#ifdef CONFIG_INITCALL_ASYNC +subsys_initcall(drm_core_init); +#elif defined CONFIG_VIDEO_REVERSE_IMAGE fs_initcall(drm_core_init); #else module_init(drm_core_init); diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index a36e83a0c913..6b8e7f3faba0 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -5312,7 +5312,11 @@ err_did_platform_register: return err; } +#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT +rootfs_initcall(panel_simple_init); +#else module_init(panel_simple_init); +#endif static void __exit panel_simple_exit(void) { diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index de17959481a4..5743d1f0e6e1 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -2961,7 +2961,11 @@ static void __exit hid_exit(void) hid_quirks_exit(HID_BUS_ANY); } +#ifdef CONFIG_INITCALL_ASYNC +rootfs_initcall(hid_init); +#else module_init(hid_init); +#endif module_exit(hid_exit); MODULE_AUTHOR("Andreas Gal"); diff --git a/drivers/iio/adc/rockchip_saradc.c b/drivers/iio/adc/rockchip_saradc.c index c90aeddd5e9f..57e2f3b082ca 100644 --- a/drivers/iio/adc/rockchip_saradc.c +++ b/drivers/iio/adc/rockchip_saradc.c @@ -981,7 +981,21 @@ static struct platform_driver rockchip_saradc_driver = { }, }; +#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT +static int __init rockchip_saradc_driver_init(void) +{ + return platform_driver_register(&rockchip_saradc_driver); +} +fs_initcall(rockchip_saradc_driver_init); + +static void __exit rockchip_saradc_driver_exit(void) +{ + platform_driver_unregister(&rockchip_saradc_driver); +} +module_exit(rockchip_saradc_driver_exit); +#else module_platform_driver(rockchip_saradc_driver); +#endif MODULE_AUTHOR("Heiko Stuebner "); MODULE_DESCRIPTION("Rockchip SARADC driver"); diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index ad130745f66e..f4e998489506 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -193,7 +193,11 @@ static int __init iommu_subsys_init(void) return 0; } +#ifdef CONFIG_INITCALL_ASYNC +postcore_initcall_sync(iommu_subsys_init); +#else subsys_initcall(iommu_subsys_init); +#endif static int remove_iommu_group(struct device *dev, void *data) { diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c index c48af6b2d865..f53b2041518e 100644 --- a/drivers/iommu/rockchip-iommu.c +++ b/drivers/iommu/rockchip-iommu.c @@ -1827,7 +1827,7 @@ static struct platform_driver rk_iommu_driver = { }, }; -#ifdef CONFIG_VIDEO_REVERSE_IMAGE +#if defined(CONFIG_VIDEO_REVERSE_IMAGE) || defined(CONFIG_ROCKCHIP_THUNDER_BOOT) static int __init rk_iommu_init(void) { return platform_driver_register(&rk_iommu_driver); diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c index 2e9742952c4e..a4969f1a7e36 100644 --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c @@ -277,4 +277,8 @@ static int __init blackhole_netdev_init(void) return 0; } +#ifdef CONFIG_INITCALL_ASYNC +fs_initcall(blackhole_netdev_init); +#else device_initcall(blackhole_netdev_init); +#endif diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index 53a6c4702078..2325f2de9af0 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -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); diff --git a/drivers/opp/debugfs.c b/drivers/opp/debugfs.c index 2285308bf4b8..2a7a414aad46 100644 --- a/drivers/opp/debugfs.c +++ b/drivers/opp/debugfs.c @@ -330,4 +330,8 @@ static int __init opp_debug_init(void) return 0; } +#ifdef CONFIG_INITCALL_ASYNC +core_initcall_sync(opp_debug_init); +#else core_initcall(opp_debug_init); +#endif diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index d93ddf1262c5..e56bc020f695 100644 --- a/drivers/phy/phy-core.c +++ b/drivers/phy/phy-core.c @@ -1235,4 +1235,8 @@ static int __init phy_core_init(void) return 0; } +#ifdef CONFIG_INITCALL_ASYNC +subsys_initcall(phy_core_init); +#else device_initcall(phy_core_init); +#endif diff --git a/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c b/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c index bf366053cec2..4b76f8521b55 100644 --- a/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c +++ b/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c @@ -1166,7 +1166,21 @@ static struct platform_driver inno_dsidphy_driver = { .probe = inno_dsidphy_probe, .remove = inno_dsidphy_remove, }; +#ifdef CONFIG_INITCALL_ASYNC +static int __init inno_dsidphy_driver_init(void) +{ + return platform_driver_register(&inno_dsidphy_driver); +} +fs_initcall(inno_dsidphy_driver_init); + +static void __exit inno_dsidphy_driver_exit(void) +{ + platform_driver_unregister(&inno_dsidphy_driver); +} +module_exit(inno_dsidphy_driver_exit); +#else module_platform_driver(inno_dsidphy_driver); +#endif MODULE_AUTHOR("Wyon Bi "); MODULE_DESCRIPTION("Innosilicon MIPI/LVDS/TTL Video Combo PHY driver"); diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c index f6928c6051cc..50861763b182 100644 --- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c +++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c @@ -4808,7 +4808,21 @@ static struct platform_driver rockchip_usb2phy_driver = { .of_match_table = rockchip_usb2phy_dt_match, }, }; +#ifdef CONFIG_INITCALL_ASYNC +static int __init rockchip_usb2phy_driver_init(void) +{ + return platform_driver_register(&rockchip_usb2phy_driver); +} +fs_initcall(rockchip_usb2phy_driver_init); + +static void __exit rockchip_usb2phy_driver_exit(void) +{ + platform_driver_unregister(&rockchip_usb2phy_driver); +} +module_exit(rockchip_usb2phy_driver_exit); +#else module_platform_driver(rockchip_usb2phy_driver); +#endif MODULE_AUTHOR("Frank Wang "); MODULE_DESCRIPTION("Rockchip USB2.0 PHY driver"); diff --git a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c index 7a305b1aa2e1..d1a89be9d333 100644 --- a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c +++ b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c @@ -1604,7 +1604,21 @@ static struct platform_driver rockchip_combphy_driver = { .of_match_table = rockchip_combphy_of_match, }, }; +#ifdef CONFIG_INITCALL_ASYNC +static int __init rockchip_combphy_driver_init(void) +{ + return platform_driver_register(&rockchip_combphy_driver); +} +fs_initcall(rockchip_combphy_driver_init); + +static void __exit rockchip_combphy_driver_exit(void) +{ + platform_driver_unregister(&rockchip_combphy_driver); +} +module_exit(rockchip_combphy_driver_exit); +#else module_platform_driver(rockchip_combphy_driver); +#endif MODULE_DESCRIPTION("Rockchip NANENG COMBPHY driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 9a67dc064c73..d7a5b85df7e1 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -2341,4 +2341,8 @@ static int __init pinctrl_init(void) } /* init early since many drivers really need to initialized pinmux early */ +#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_INITCALL_ASYNC) +core_initcall_sync(pinctrl_init); +#else core_initcall(pinctrl_init); +#endif diff --git a/drivers/pwm/sysfs.c b/drivers/pwm/sysfs.c index aa0a16351a14..245250ee3c45 100644 --- a/drivers/pwm/sysfs.c +++ b/drivers/pwm/sysfs.c @@ -660,4 +660,8 @@ static int __init pwm_sysfs_init(void) { return class_register(&pwm_class); } +#ifdef CONFIG_INITCALL_ASYNC +postcore_initcall(pwm_sysfs_init); +#else subsys_initcall(pwm_sysfs_init); +#endif diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 16e365b87233..3bdf9a7b13ac 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -6543,7 +6543,7 @@ static int __init regulator_init(void) } /* init early to allow our consumers to complete system booting */ -#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT +#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_INITCALL_ASYNC) core_initcall_sync(regulator_init); #else core_initcall(regulator_init); diff --git a/drivers/regulator/pwm-regulator.c b/drivers/regulator/pwm-regulator.c index cfae5de4dfcb..3a458c3bb02b 100644 --- a/drivers/regulator/pwm-regulator.c +++ b/drivers/regulator/pwm-regulator.c @@ -416,7 +416,21 @@ static struct platform_driver pwm_regulator_driver = { .probe = pwm_regulator_probe, }; +#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT +static int __init pwm_regulator_driver_init(void) +{ + return platform_driver_register(&pwm_regulator_driver); +} +subsys_initcall_sync(pwm_regulator_driver_init); + +static void __exit pwm_regulator_driver_exit(void) +{ + platform_driver_unregister(&pwm_regulator_driver); +} +module_exit(pwm_regulator_driver_exit); +#else module_platform_driver(pwm_regulator_driver); +#endif MODULE_LICENSE("GPL"); MODULE_AUTHOR("Lee Jones "); diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index 2f7553ceaeeb..272256cc80f3 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c @@ -1251,7 +1251,7 @@ static void __exit serial8250_exit(void) #endif } -#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT +#ifdef CONFIG_INITCALL_ASYNC rootfs_initcall(serial8250_init); #else module_init(serial8250_init); diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index a55feb708688..8371681023b1 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c @@ -720,7 +720,21 @@ static struct platform_driver pwm_backlight_driver = { .shutdown = pwm_backlight_shutdown, }; +#ifdef CONFIG_INITCALL_ASYNC +static int __init pwm_backlight_driver_init(void) +{ + return platform_driver_register(&pwm_backlight_driver); +} +fs_initcall(pwm_backlight_driver_init); + +static void __exit pwm_backlight_driver_exit(void) +{ + platform_driver_unregister(&pwm_backlight_driver); +} +module_exit(pwm_backlight_driver_exit); +#else module_platform_driver(pwm_backlight_driver); +#endif MODULE_DESCRIPTION("PWM based Backlight Driver"); MODULE_LICENSE("GPL v2"); diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c index 65dba9076f31..4f1f9b40f714 100644 --- a/kernel/ksysfs.c +++ b/kernel/ksysfs.c @@ -270,4 +270,8 @@ exit: return error; } +#ifdef CONFIG_INITCALL_ASYNC +pure_initcall(ksysfs_init); +#else core_initcall(ksysfs_init); +#endif diff --git a/kernel/params.c b/kernel/params.c index 5b92310425c5..fbe43d5acc3d 100644 --- a/kernel/params.c +++ b/kernel/params.c @@ -971,6 +971,10 @@ static int __init param_sysfs_init(void) return 0; } +#ifdef CONFIG_INITCALL_ASYNC +arch_initcall_sync(param_sysfs_init); +#else subsys_initcall(param_sysfs_init); +#endif #endif /* CONFIG_SYSFS */ diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index a3650699463b..a0a8370e06b6 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c @@ -1073,7 +1073,11 @@ static int __init clocksource_done_booting(void) mutex_unlock(&clocksource_mutex); return 0; } +#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT +pure_initcall(clocksource_done_booting); +#else fs_initcall(clocksource_done_booting); +#endif /* * Enqueue the clocksource sorted by rating diff --git a/net/ipv4/bpfilter/sockopt.c b/net/ipv4/bpfilter/sockopt.c index 1b34cb9a7708..62b269a33dca 100644 --- a/net/ipv4/bpfilter/sockopt.c +++ b/net/ipv4/bpfilter/sockopt.c @@ -77,4 +77,8 @@ static int __init bpfilter_sockopt_init(void) return 0; } +#ifdef CONFIG_INITCALL_ASYNC +rootfs_initcall(bpfilter_sockopt_init); +#else device_initcall(bpfilter_sockopt_init); +#endif diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c index e4e1999d93f5..ada7302af59d 100644 --- a/net/ipv4/inet_diag.c +++ b/net/ipv4/inet_diag.c @@ -1480,7 +1480,11 @@ static void __exit inet_diag_exit(void) kfree(inet_diag_table); } +#ifdef CONFIG_INITCALL_ASYNC +rootfs_initcall(inet_diag_init); +#else module_init(inet_diag_init); +#endif module_exit(inet_diag_exit); MODULE_LICENSE("GPL"); MODULE_ALIAS_NET_PF_PROTO_TYPE(PF_NETLINK, NETLINK_SOCK_DIAG, 2 /* AF_INET */); diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 0ccd94e15ef3..04e40294a250 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c @@ -1329,6 +1329,10 @@ out_unregister_tcp_proto: proto_unregister(&tcpv6_prot); goto out; } +#ifdef CONFIG_INITCALL_ASYNC +rootfs_initcall(inet6_init); +#else module_init(inet6_init); +#endif MODULE_ALIAS_NETPROTO(PF_INET6); diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c index 52245dbfae31..28d957860dda 100644 --- a/net/netfilter/nf_conntrack_standalone.c +++ b/net/netfilter/nf_conntrack_standalone.c @@ -1250,5 +1250,9 @@ static void __exit nf_conntrack_standalone_fini(void) nf_conntrack_cleanup_end(); } +#ifdef CONFIG_INITCALL_ASYNC +rootfs_initcall(nf_conntrack_standalone_init); +#else module_init(nf_conntrack_standalone_init); +#endif module_exit(nf_conntrack_standalone_fini); diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index e8cc8eef0ab6..b2f111832899 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c @@ -2012,6 +2012,10 @@ static void __exit xt_fini(void) kfree(xt); } +#ifdef CONFIG_INITCALL_ASYNC +rootfs_initcall(xt_init); +#else module_init(xt_init); +#endif module_exit(xt_fini); diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index 3e16527beb91..117a6f74f21e 100644 --- a/net/netlink/genetlink.c +++ b/net/netlink/genetlink.c @@ -1495,7 +1495,11 @@ problem: panic("GENL: Cannot register controller: %d\n", err); } +#ifdef CONFIG_INITCALL_ASYNC +core_initcall_sync(genl_init); +#else core_initcall(genl_init); +#endif static int genlmsg_mcast(struct sk_buff *skb, u32 portid, unsigned long group, gfp_t flags) diff --git a/net/socket.c b/net/socket.c index 000e0badf3fa..af64c7241d4c 100644 --- a/net/socket.c +++ b/net/socket.c @@ -3233,7 +3233,11 @@ out_mount: goto out; } +#ifdef CONFIG_INITCALL_ASYNC +pure_initcall(sock_init); /* early initcall */ +#else core_initcall(sock_init); /* early initcall */ +#endif #ifdef CONFIG_PROC_FS void socket_seq_show(struct seq_file *seq) diff --git a/sound/soc/rockchip/rockchip_multicodecs.c b/sound/soc/rockchip/rockchip_multicodecs.c index 9d18fafea8e5..05e2494637a4 100644 --- a/sound/soc/rockchip/rockchip_multicodecs.c +++ b/sound/soc/rockchip/rockchip_multicodecs.c @@ -999,7 +999,21 @@ static struct platform_driver rockchip_multicodecs_driver = { }, }; +#ifdef CONFIG_INITCALL_ASYNC +static int __init rockchip_multicodecs_driver_init(void) +{ + return platform_driver_register(&rockchip_multicodecs_driver); +} +late_initcall(rockchip_multicodecs_driver_init); + +static void __exit rockchip_multicodecs_driver_exit(void) +{ + platform_driver_unregister(&rockchip_multicodecs_driver); +} +module_exit(rockchip_multicodecs_driver_exit); +#else module_platform_driver(rockchip_multicodecs_driver); +#endif MODULE_AUTHOR("Sugar Zhang "); MODULE_DESCRIPTION("Rockchip General Multicodecs ASoC driver");