Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1156303ybi; Fri, 14 Jun 2019 09:31:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqxA0z5w/Nqck2ip0Kf57NoIMropr4oWHZJtD+7pojJcRYxOW4ea4AzNdhyXdu/TY3qM6g1e X-Received: by 2002:aa7:8049:: with SMTP id y9mr46099703pfm.195.1560529894689; Fri, 14 Jun 2019 09:31:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560529894; cv=none; d=google.com; s=arc-20160816; b=a73flej9bZHPSpTkzN2UD22AZnGrFKx3gZZ1uSn9IKT/tKCVfyjz77Asvu/FBqew0H /wBjxgIYDDyjSQ/An2HHGYAheIUgc7UBr9WXyX8uTsuf9bQO1nrlbv150t/UmuF69H14 uWj12AdTD6aA67dMSjFIGCzfGzE1CcQWIkTrBm1xF4fuo6tpZT6s4Fe4VmlZb4gerq3L IWeOAQqs9/J8BDdW94gVLqGZZ0x6D6QT/cu5hbquai5hFt+gqRZLkgLC+Aq/mhTCCGzl g0dHkzIZnFng7Ormgiv83p6VR9xrgWYbJtbuZXNQa1mX7wNZIbIHl/7cyW0r2PTGOeEW cIkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:mime-version:message-id :date:subject:cc:to:from; bh=kY8VvquYLGjeRdDquvZL6OISFhZiac6UhQbP3UIP5JE=; b=AGUhZMoL5+6y5mlBgBx2wagNYtZBBiUuQjxBU6GMWAb+B6uNo2U5vQ5Ht7l6zzA8Tc is38gqmIP+nMjA3FzLKcfxvMDGydqgeC4FbCiPwKBfk03TAF58CpwzXfr6Lb5bRW65DB OWo1Vfrb1mx2PV66z67dYXdH1yvFhGXe6mEMXiGIT+f3ZI7xUEV1O7HPqLMTNc+zBPo6 Tm6Gbh0HlvWeSaQ7KZ1VtyuRXGyJHIEMc0WPuNHcAgOeUGslyeLpUBC45BFbwq7h4WhR wuv1K8MkDXyjrPhVg7IhZioVUcdo1bv7+2jnzoq6cJDuZ71YzVivKwbA6DIPSo5/e94p SnAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=q+pR+ptS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t4si2569606pjq.54.2019.06.14.09.31.15; Fri, 14 Jun 2019 09:31:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=q+pR+ptS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726129AbfFNQbI (ORCPT + 99 others); Fri, 14 Jun 2019 12:31:08 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:10277 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725808AbfFNQbI (ORCPT ); Fri, 14 Jun 2019 12:31:08 -0400 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Fri, 14 Jun 2019 09:31:07 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Fri, 14 Jun 2019 09:31:07 -0700 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Fri, 14 Jun 2019 09:31:07 -0700 Received: from HQMAIL102.nvidia.com (172.18.146.10) by HQMAIL104.nvidia.com (172.18.146.11) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 14 Jun 2019 16:31:07 +0000 Received: from HQMAIL107.nvidia.com (172.20.187.13) by HQMAIL102.nvidia.com (172.18.146.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 14 Jun 2019 16:31:06 +0000 Received: from hqnvemgw02.nvidia.com (172.16.227.111) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Fri, 14 Jun 2019 16:31:06 +0000 Received: from dhcp-10-19-65-14.client.nvidia.com (Not Verified[10.19.65.14]) by hqnvemgw02.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Fri, 14 Jun 2019 09:31:05 -0700 From: Bitan Biswas To: Jassi Brar , Thierry Reding , Jonathan Hunter , , CC: Bitan Biswas Subject: [PATCH V2 1/2] mailbox: tegra: hsp: add noirq resume Date: Fri, 14 Jun 2019 09:31:00 -0700 Message-ID: <1560529861-31376-1-git-send-email-bbiswas@nvidia.com> X-Mailer: git-send-email 2.7.4 X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1560529867; bh=kY8VvquYLGjeRdDquvZL6OISFhZiac6UhQbP3UIP5JE=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: X-NVConfidentiality:MIME-Version:Content-Type; b=q+pR+ptSZk7iIYbX4kggcTHh1rRcw1G0HKLD/RkTLBsO2h/xnsfGs1RulBUEuqDLE qc43SB2OkZJtQXBjF2Cv2Dv2LYVmUT5weYFet6NbQ7U/LpUz38nu1F8pPjh47fCdP1 qaEVdM+wdVgovo6LUNeTm5N/EdNTrMzFZRIaNq5B5d6hugM9zHkS06f6mSasZva3i3 ZAQu+Tcuo2c8QIhJYTU9uWNaJqgdy5tLH8Kqb54s32YAoCeAyiHadfhQ+5yfnIgC3j unZvygFHS5CjEPeDuCHGd79E62wn26A033Ynxe3vRibfkcSInHPoC0JwGp4DPWpK8Y zxWQnSl3bN7pw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add noirq resume instead of resume callback for Tegra HSP. Tegra HSP resume needs tegra_hsp_doorbell_startup() call to fix timeout error for tegra_bpmp_transfer() during genpd resume noirq on Jetson TX2. Signed-off-by: Bitan Biswas --- drivers/mailbox/tegra-hsp.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c index 91f1a0c..91e223e 100644 --- a/drivers/mailbox/tegra-hsp.c +++ b/drivers/mailbox/tegra-hsp.c @@ -775,6 +775,12 @@ 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; + + list_for_each_entry(db, &hsp->doorbells, list) { + if (db && db->channel.chan) + tegra_hsp_doorbell_startup(db->channel.chan); + } for (i = 0; i < hsp->num_sm; i++) { struct tegra_hsp_mailbox *mb = &hsp->mailboxes[i]; @@ -786,7 +792,9 @@ static int __maybe_unused tegra_hsp_resume(struct device *dev) 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, }, -- 2.7.4