diff options
author | Richard Zhu <hongxing.zhu@nxp.com> | 2017-03-21 10:15:40 +0800 |
---|---|---|
committer | Jason Liu <jason.hui.liu@nxp.com> | 2019-02-12 10:26:00 +0800 |
commit | 8f77660a7bae5b708b8fc7e4914a944cc83868a6 (patch) | |
tree | f40fd2787a1764cb05f4b9ed9bd6a045e88b308a /drivers/rpmsg | |
parent | cd2fa478535bc18e5baeb62f1d2c78f81cbc540b (diff) |
MLK-14487-1 rpmsg: imx: validate the rpmsg on imx7ulp
- change the module_init to subsys_initcall.
Otherwise, the pf1550-rpmsg would be invoked before
the rpmsg bus driver on imx7ulp.
Then, sdhc wouldn't be powered up properly if pf1550
isn't functional.
- remove the no longer used imc_rpmsg_exit.
- pass the real device id if the shared irq is requested.
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Tested-by: Daniel Baluta <daniel.baluta@nxp.com>
Diffstat (limited to 'drivers/rpmsg')
-rw-r--r-- | drivers/rpmsg/imx_rpmsg.c | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/drivers/rpmsg/imx_rpmsg.c b/drivers/rpmsg/imx_rpmsg.c index ba548989de34..5d4d301fc564 100644 --- a/drivers/rpmsg/imx_rpmsg.c +++ b/drivers/rpmsg/imx_rpmsg.c @@ -458,7 +458,7 @@ static int imx_rpmsg_probe(struct platform_device *pdev) ret = request_irq(irq, imx_mu_rpmsg_isr, IRQF_EARLY_RESUME | IRQF_SHARED, - "imx-mu-rpmsg", &mu_rpmsg_box); + "imx-mu-rpmsg", dev); if (ret) { pr_err("%s: register interrupt %d failed, rc %d\n", __func__, irq, ret); @@ -541,19 +541,6 @@ static int imx_rpmsg_probe(struct platform_device *pdev) return ret; } -static int imx_rpmsg_remove(struct platform_device *pdev) -{ - int i, j; - - for (i = 0; i < ARRAY_SIZE(imx_rpmsg_vprocs); i++) { - struct imx_rpmsg_vproc *rpdev = &imx_rpmsg_vprocs[i]; - - for (j = 0; j < rpdev->vdev_nums; j++) - unregister_virtio_device(&rpdev->ivdev[j].vdev); - } - return 0; -} - static struct platform_driver imx_rpmsg_driver = { .driver = { .owner = THIS_MODULE, @@ -561,7 +548,6 @@ static struct platform_driver imx_rpmsg_driver = { .of_match_table = imx_rpmsg_dt_ids, }, .probe = imx_rpmsg_probe, - .remove = imx_rpmsg_remove, }; static int __init imx_rpmsg_init(void) @@ -577,15 +563,7 @@ static int __init imx_rpmsg_init(void) return ret; } -static void __exit imx_rpmsg_exit(void) -{ - pr_info("imx rpmsg driver is unregistered.\n"); - platform_driver_unregister(&imx_rpmsg_driver); -} - -module_exit(imx_rpmsg_exit); -module_init(imx_rpmsg_init); - MODULE_AUTHOR("Freescale Semiconductor, Inc."); MODULE_DESCRIPTION("iMX remote processor messaging virtio device"); MODULE_LICENSE("GPL v2"); +subsys_initcall(imx_rpmsg_init); |