summaryrefslogtreecommitdiffstats
path: root/drivers/mailbox/tegra-hsp.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2019-08-09 16:53:39 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2019-08-09 16:53:39 +0200
commit0e1c438c44dd9cde56effb44c5f1cfeda72e108d (patch)
treefa3492d4d7d8b7444e5d8ebe6c78210826333e4b /drivers/mailbox/tegra-hsp.c
parentselftests: kvm: Adding config fragments (diff)
parentarm64: KVM: hyp: debug-sr: Mark expected switch fall-through (diff)
downloadlinux-0e1c438c44dd9cde56effb44c5f1cfeda72e108d.tar.xz
linux-0e1c438c44dd9cde56effb44c5f1cfeda72e108d.zip
Merge tag 'kvmarm-fixes-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
KVM/arm fixes for 5.3 - A bunch of switch/case fall-through annotation, fixing one actual bug - Fix PMU reset bug - Add missing exception class debug strings
Diffstat (limited to 'drivers/mailbox/tegra-hsp.c')
-rw-r--r--drivers/mailbox/tegra-hsp.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c
index 91f1a0c62779..4c5ba35d48d4 100644
--- a/drivers/mailbox/tegra-hsp.c
+++ b/drivers/mailbox/tegra-hsp.c
@@ -775,18 +775,28 @@ static int __maybe_unused tegra_hsp_resume(struct device *dev)
{
struct tegra_hsp *hsp = dev_get_drvdata(dev);
unsigned int i;
+ struct tegra_hsp_doorbell *db;
- for (i = 0; i < hsp->num_sm; i++) {
- struct tegra_hsp_mailbox *mb = &hsp->mailboxes[i];
+ list_for_each_entry(db, &hsp->doorbells, list) {
+ if (db && db->channel.chan)
+ tegra_hsp_doorbell_startup(db->channel.chan);
+ }
+
+ if (hsp->mailboxes) {
+ for (i = 0; i < hsp->num_sm; i++) {
+ struct tegra_hsp_mailbox *mb = &hsp->mailboxes[i];
- if (mb->channel.chan->cl)
- tegra_hsp_mailbox_startup(mb->channel.chan);
+ if (mb->channel.chan->cl)
+ tegra_hsp_mailbox_startup(mb->channel.chan);
+ }
}
return 0;
}
-static SIMPLE_DEV_PM_OPS(tegra_hsp_pm_ops, NULL, tegra_hsp_resume);
+static const struct dev_pm_ops tegra_hsp_pm_ops = {
+ .resume_noirq = tegra_hsp_resume,
+};
static const struct tegra_hsp_db_map tegra186_hsp_db_map[] = {
{ "ccplex", TEGRA_HSP_DB_MASTER_CCPLEX, HSP_DB_CCPLEX, },