From: Robin Murphy <robin.murphy@arm.com> To: will.deacon@arm.com Cc: iommu@lists.linux-foundation.org, sricharan@codeaurora.org, vivek.gautam@codeaurora.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 2/2] iommu/arm-smmu: Add system PM support Date: Tue, 8 Aug 2017 14:56:15 +0100 [thread overview] Message-ID: <fb763ab0725fdff19767147de03fdc8b6578786c.1502200001.git.robin.murphy@arm.com> (raw) In-Reply-To: <8cbeda2e236903e20878694c975c8143fd32ad47.1502200001.git.robin.murphy@arm.com> With all our hardware state tracked in such a way that we can naturally restore it as part of the necessary reset, resuming is trivial, and there's nothing to do on suspend at all. Signed-off-by: Robin Murphy <robin.murphy@arm.com> --- v2: Whitespace fixes drivers/iommu/arm-smmu.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index 8f2f345ab7b1..7f7eccab120a 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -2359,10 +2359,21 @@ static int arm_smmu_device_remove(struct platform_device *pdev) return 0; } +static int __maybe_unused arm_smmu_pm_resume(struct device *dev) +{ + struct arm_smmu_device *smmu = dev_get_drvdata(dev); + + arm_smmu_device_reset(smmu); + return 0; +} + +static SIMPLE_DEV_PM_OPS(arm_smmu_pm_ops, NULL, arm_smmu_pm_resume); + static struct platform_driver arm_smmu_driver = { .driver = { .name = "arm-smmu", .of_match_table = of_match_ptr(arm_smmu_of_match), + .pm = &arm_smmu_pm_ops, }, .probe = arm_smmu_device_probe, .remove = arm_smmu_device_remove, -- 2.13.4.dirty
WARNING: multiple messages have this Message-ID (diff)
From: robin.murphy@arm.com (Robin Murphy) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 2/2] iommu/arm-smmu: Add system PM support Date: Tue, 8 Aug 2017 14:56:15 +0100 [thread overview] Message-ID: <fb763ab0725fdff19767147de03fdc8b6578786c.1502200001.git.robin.murphy@arm.com> (raw) In-Reply-To: <8cbeda2e236903e20878694c975c8143fd32ad47.1502200001.git.robin.murphy@arm.com> With all our hardware state tracked in such a way that we can naturally restore it as part of the necessary reset, resuming is trivial, and there's nothing to do on suspend at all. Signed-off-by: Robin Murphy <robin.murphy@arm.com> --- v2: Whitespace fixes drivers/iommu/arm-smmu.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index 8f2f345ab7b1..7f7eccab120a 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -2359,10 +2359,21 @@ static int arm_smmu_device_remove(struct platform_device *pdev) return 0; } +static int __maybe_unused arm_smmu_pm_resume(struct device *dev) +{ + struct arm_smmu_device *smmu = dev_get_drvdata(dev); + + arm_smmu_device_reset(smmu); + return 0; +} + +static SIMPLE_DEV_PM_OPS(arm_smmu_pm_ops, NULL, arm_smmu_pm_resume); + static struct platform_driver arm_smmu_driver = { .driver = { .name = "arm-smmu", .of_match_table = of_match_ptr(arm_smmu_of_match), + .pm = &arm_smmu_pm_ops, }, .probe = arm_smmu_device_probe, .remove = arm_smmu_device_remove, -- 2.13.4.dirty
next prev parent reply other threads:[~2017-08-08 13:56 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-08-08 13:56 [PATCH v2 1/2] iommu/arm-smmu: Track context bank state Robin Murphy 2017-08-08 13:56 ` Robin Murphy 2017-08-08 13:56 ` Robin Murphy [this message] 2017-08-08 13:56 ` [PATCH v2 2/2] iommu/arm-smmu: Add system PM support Robin Murphy
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=fb763ab0725fdff19767147de03fdc8b6578786c.1502200001.git.robin.murphy@arm.com \ --to=robin.murphy@arm.com \ --cc=iommu@lists.linux-foundation.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=sricharan@codeaurora.org \ --cc=vivek.gautam@codeaurora.org \ --cc=will.deacon@arm.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.