From patchwork Thu Jun 16 21:09:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: hotran X-Patchwork-Id: 9181537 X-Patchwork-Delegate: rjw@sisk.pl 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 4AB5460573 for ; Thu, 16 Jun 2016 21:10:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A98827E5A for ; Thu, 16 Jun 2016 21:10:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2F59528383; Thu, 16 Jun 2016 21:10:30 +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=unavailable 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 A181728308 for ; Thu, 16 Jun 2016 21:10:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754500AbcFPVKH (ORCPT ); Thu, 16 Jun 2016 17:10:07 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:36213 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754466AbcFPVKG (ORCPT ); Thu, 16 Jun 2016 17:10:06 -0400 Received: by mail-pa0-f49.google.com with SMTP id b5so21433213pas.3 for ; Thu, 16 Jun 2016 14:10:05 -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=XO/iniy/XDoCaTmBAo3CP/xXiEy7s4HdyjFJmh9f18Q=; b=dL4iyHbWqknxKk1o67BbQ8T/Re8bkiqLsawgIHgLQSNd0fPj7TYQEohtGh4GOdVqyi 9IyOAIfqKhwc/gz1cehF3n2HS5usMTB/S9LMr/P5Mw+fkLe0qa0SjvPm3VaRVMt7AIwE RbXd0oG8Jfy9XP0M9BVdqvlObvvyIPgPxsLgE= 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=XO/iniy/XDoCaTmBAo3CP/xXiEy7s4HdyjFJmh9f18Q=; b=UJWZGH3c/mb5TdpvO7mR9wprwkHrBvGe9MXCYnzJSjQYlPn6Y0W36HP0UJdHK96kzv Kf17lkS3Uo1JmXciFUgJBMYyp5JvuU+cfIqdW2hj+0smOZetpv7W3UsOL+JSJAXS/n6u CojdCGM87lzEaJTByUcps2v9wx0xVK7DJMQzYgJLfi0ZoZeAQiyTLfO67E4ch+Dy6Zrg PtDkTHSoaaV+pFjkxw8RmFvTqvHGsz/492/ofk8RVKZ7WVoSDdftOtG3bpciq9h6aXzM PPHZF2kDjih+6moc7ZHUyuc/4GxPYBZ25AHPG56gfqQzenwY6odS7oWf7933/EsCmtx1 XCjg== X-Gm-Message-State: ALyK8tL0dSRb4JYbCc+vnpPzTDak2c1lJTzJWAmYrQZYP9fD7FGzAMn6bMaWhsyTH76ESC10 X-Received: by 10.66.4.106 with SMTP id j10mr7372975paj.111.1466111404985; Thu, 16 Jun 2016 14:10:04 -0700 (PDT) Received: from hotran_localhost.amcc.com ([206.80.4.98]) by smtp.gmail.com with ESMTPSA id pk18sm31648911pab.27.2016.06.16.14.10.03 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 16 Jun 2016 14:10:04 -0700 (PDT) From: Hoan Tran To: Ashwin Chaugule , Jassi Brar , "Rafael J. Wysocki" , Len Brown , pprakash@codeaurora.org Cc: Robert Moore , Lv Zheng , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, devel@acpica.org, lho@apm.com, Duc Dang , Hoan Tran Subject: [PATCH v2] mailbox: pcc: Add PCC request and free channel declarations Date: Thu, 16 Jun 2016 14:09:38 -0700 Message-Id: <1466111378-4390-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 Exports pcc_mbox_request_channel() and pcc_mbox_free_channel() declarations into a pcc.h header file. v2 * Introduce pcc.h header file for pcc client methods v1 * Initial Signed-off-by: Hoan Tran --- include/acpi/cppc_acpi.h | 7 +------ include/acpi/pcc.h | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 include/acpi/pcc.h diff --git a/include/acpi/cppc_acpi.h b/include/acpi/cppc_acpi.h index 259683a..ab1da43 100644 --- a/include/acpi/cppc_acpi.h +++ b/include/acpi/cppc_acpi.h @@ -15,10 +15,9 @@ #define _CPPC_ACPI_H #include -#include -#include #include +#include #include /* Only support CPPCv2 for now. */ @@ -131,8 +130,4 @@ extern int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls); extern int cppc_get_perf_caps(int cpu, struct cppc_perf_caps *caps); extern int acpi_get_psd_map(struct cpudata **); -/* Methods to interact with the PCC mailbox controller. */ -extern struct mbox_chan * - pcc_mbox_request_channel(struct mbox_client *, unsigned int); - #endif /* _CPPC_ACPI_H*/ diff --git a/include/acpi/pcc.h b/include/acpi/pcc.h new file mode 100644 index 0000000..17a940a --- /dev/null +++ b/include/acpi/pcc.h @@ -0,0 +1,29 @@ +/* + * PCC (Platform Communications Channel) methods + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; version 2 + * of the License. + */ + +#ifndef _PCC_H +#define _PCC_H + +#include +#include + +#ifdef CONFIG_PCC +extern struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *cl, + int subspace_id); +extern void pcc_mbox_free_channel(struct mbox_chan *chan); +#else +static inline struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *cl, + int subspace_id) +{ + return NULL; +} +static inline void pcc_mbox_free_channel(struct mbox_chan *chan) { } +#endif + +#endif /* _PCC_H */