From 45719cacf645796012ddd248ad08af757ffa1c77 Mon Sep 17 00:00:00 2001 From: Ranjani Vaidyanathan Date: Wed, 6 Oct 2021 11:25:39 -0500 Subject: MLK-25649-7 rpmsg: imx: Add support for identifying SCU wakeup source from sysfs Consolidate SCU wakeup defines in the header file. Signed-off-by: Ranjani Vaidyanathan (cherry picked from commit d7b1dd90185df67fe1e713ff439fc898201cb8c8) (cherry picked from commit 5693275abe2a558f7a433bba23eb8ae35bd30749) --- drivers/rpmsg/imx_rpmsg.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/rpmsg/imx_rpmsg.c b/drivers/rpmsg/imx_rpmsg.c index 9dd704ae5a64..b93df26bd21b 100644 --- a/drivers/rpmsg/imx_rpmsg.c +++ b/drivers/rpmsg/imx_rpmsg.c @@ -61,8 +61,6 @@ struct imx_rpmsg_vproc { struct platform_device *pdev; }; -#define SC_IRQ_GROUP_REBOOTED 5U /* Partition reboot complete */ - /* * The time consumption by remote ready is less than 1ms in the * evaluation. Set the max wait timeout as 50ms here. @@ -418,7 +416,7 @@ static int imx_rpmsg_partition_notify(struct notifier_block *nb, /* Ignore other irqs */ if (!((event & BIT(rpdev->mub_partition)) && - (*(u8 *)group == SC_IRQ_GROUP_REBOOTED))) + (*(u8 *)group == IMX_SC_IRQ_GROUP_REBOOTED))) return 0; imx_rpmsg_restore(rpdev); @@ -618,7 +616,7 @@ static int imx_rpmsg_probe(struct platform_device *pdev) &rpdev->mub_partition)) rpdev->mub_partition = 3; /* default partition 3 */ - ret = imx_scu_irq_group_enable(SC_IRQ_GROUP_REBOOTED, + ret = imx_scu_irq_group_enable(IMX_SC_IRQ_GROUP_REBOOTED, BIT(rpdev->mub_partition), true); if (ret) { @@ -628,7 +626,7 @@ static int imx_rpmsg_probe(struct platform_device *pdev) ret = imx_scu_irq_register_notifier(&rpdev->proc_nb); if (ret) { - imx_scu_irq_group_enable(SC_IRQ_GROUP_REBOOTED, + imx_scu_irq_group_enable(IMX_SC_IRQ_GROUP_REBOOTED, BIT(rpdev->mub_partition), false); dev_warn(&pdev->dev, "reqister scu notifier failed.\n"); -- cgit v1.2.3