From patchwork Thu Jul 21 21:07:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: hotran X-Patchwork-Id: 9242527 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2D822602F0 for ; Thu, 21 Jul 2016 21:08:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D17227BF7 for ; Thu, 21 Jul 2016 21:08:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1149627F85; Thu, 21 Jul 2016 21:08:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB20227BF7 for ; Thu, 21 Jul 2016 21:08:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754124AbcGUVIF (ORCPT ); Thu, 21 Jul 2016 17:08:05 -0400 Received: from mail-pf0-f179.google.com ([209.85.192.179]:35496 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754088AbcGUVIE (ORCPT ); Thu, 21 Jul 2016 17:08:04 -0400 Received: by mail-pf0-f179.google.com with SMTP id x72so33857914pfd.2 for ; Thu, 21 Jul 2016 14:08:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apm.com; s=apm; h=from:to:cc:subject:date:message-id; bh=s92Yxg7MWmCtfPdhdecHr3JnkjFUgbETGS9XuFNeZMc=; b=FXhTWCs6eXZGawmejK8Mw5ZRqyzl8+QXp6h1z/IC5+W96X8X4jgMe25EU+uev2+ubc B411kjEtRBEDFH2Z2nrDDonyQVx+d64IdqVzIKSdU7L0jadbQWrrMQEtOy/po6JAcCnc vs4Xz535EGe6k6/n3VAHak3WRauLm3cqBj0LE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=s92Yxg7MWmCtfPdhdecHr3JnkjFUgbETGS9XuFNeZMc=; b=a1eNRw9aGdyeYROn51El9doP3SXnjUEDpq5hRVUqaHvwHFh/ouQdC4gH/SJigcu0ap Vbjq4kKxmvet+FUzEiYQC2ilqGAV9Rhng6eLbeW/yv8ZfSTR5ndnpGH0h6sGQlxEBd8h r1icV2uYwhHitKa+CebtJs3/IeyFBd3Y3BqyLT7I0VSigFSQ/39+Sl9mTPdmwD35NYs1 yOyLXlZmlbUh442P/UiFyTIcNJ+1foUKh/pSRzXaQhVQ/lyJSrRdw7rdGAyljO0cTq5D j/05pO1zYFN8IQIcDD4XJWYDkFAX49oqDnAWA+QzLeE/13emCNlBxRfFhNpoPNccB9OT KLDA== X-Gm-Message-State: AEkoousGc/yMTY2yTuBV2YEcRXP05tbVjFyKVaJVjuLKrUIxemynns+Fbuv2ypO5cgEec/P6 X-Received: by 10.98.65.139 with SMTP id g11mr477277pfd.140.1469135282715; Thu, 21 Jul 2016 14:08:02 -0700 (PDT) Received: from hotran_localhost.amcc.com ([206.80.4.98]) by smtp.gmail.com with ESMTPSA id c125sm14421716pfc.40.2016.07.21.14.08.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Jul 2016 14:08:02 -0700 (PDT) From: Hoan Tran To: "Rafael J. Wysocki" , Len Brown , pprakash@codeaurora.org, Ashwin Chaugule Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, lho@apm.com, Duc Dang , Hoan Tran Subject: [PATCH] ACPI: CPPC: Support PCC with interrupt flag Date: Thu, 21 Jul 2016 14:07:45 -0700 Message-Id: <1469135265-27048-1-git-send-email-hotran@apm.com> X-Mailer: git-send-email 1.9.1 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For PCC mailbox with interrupt flag, CPPC should call mbox_chan_txdone() function to notify the mailbox framework about TX completion. Signed-off-by: Hoan Tran Reviewed-by: Prashanth Prakash --- This patch is tested on top and depends on patch[1]: [1] http://www.spinics.net/lists/linux-acpi/msg66041.html - [PATCH v3] mailbox: pcc: Support HW-Reduced Communication Subspace type 2 drivers/acpi/cppc_acpi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c index 2e98173..19606aa 100644 --- a/drivers/acpi/cppc_acpi.c +++ b/drivers/acpi/cppc_acpi.c @@ -191,7 +191,11 @@ static int send_pcc_cmd(u16 cmd) last_cmd_cmpl_time = ktime_get(); } - mbox_client_txdone(pcc_channel, ret); + if (pcc_channel->mbox->txdone_irq) + mbox_chan_txdone(pcc_channel, ret); + else + mbox_client_txdone(pcc_channel, ret); + return ret; }