From patchwork Thu Sep 21 16:49:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georgi Djakov X-Patchwork-Id: 113871 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp2244460qgf; Thu, 21 Sep 2017 09:49:57 -0700 (PDT) X-Received: by 10.98.211.72 with SMTP id q69mr6363207pfg.308.1506012597241; Thu, 21 Sep 2017 09:49:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506012597; cv=none; d=google.com; s=arc-20160816; b=HCOMsfQ7uNt1muZxPkQPT5t3oPUXDPH284AGbx+nfMF/yTGPcNyg6H7e0cirUimkDF LgGSlW6SNxuZWjB5MTKgV3b3DbqRQXTQi0ViEawMHhTd8CfSdcpdxtDMheMt0PMA7IOA O1vSkPzsGGP/K1ORM5TnQdg6xba7jIM6c+wDnqaGaQQ6z3lkm2nKSlbVc+e4rmhW+p5V 8+7snFgYWWylNb/Qkk7GhQdESsAOUgvn6tFfHuK6kB7sFHfyi6uQIeACgcvatcQXfmr3 XZv756N/YYSoZtwvaRcL79IfQMucX72VmQitBWS/DG9GmjhipSakmYcSCcz3kE5ViElK 5lKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=Rx6gbuzzqKyqb1MIioYD1IlkFilzlDyADulu9UCwVsg=; b=TiWyG/jL2Tbdmr0jv/imQcIPGxqikeiptq7eCuh5BGAXHWqUcQ0IQ++63P2FYPSu5p l12RFm4HM+mqPRcobWQvcVfDQTn02/W/dRHK7dOkwMbjpDXJkucCZqLLCG8zK+YsX/tP rBHxflEWEYqD0+cSRmIhMmI98Ai35ZB16IGiheVk2Gak1MFLE1h4On4NbxQpyBaCFpB6 QYxfNPCpIWm/NbXwNPiU71DY2AVQkNG2sIOq+Kxhikl4ZehTUYW7AsciYjXSaDOwPLoo lFQgDfatZ+MU0PuWI/Znca0JC7wi4cJ37tLmx7cCAFdS+hIfGKfGEnmOdnAIYP5tSFUx 3xkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PbOWUSLf; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si1289159pli.371.2017.09.21.09.49.56; Thu, 21 Sep 2017 09:49:57 -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=@linaro.org header.s=google header.b=PbOWUSLf; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751892AbdIUQtw (ORCPT + 26 others); Thu, 21 Sep 2017 12:49:52 -0400 Received: from mail-wm0-f48.google.com ([74.125.82.48]:45405 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751861AbdIUQts (ORCPT ); Thu, 21 Sep 2017 12:49:48 -0400 Received: by mail-wm0-f48.google.com with SMTP id q124so3600777wmb.0 for ; Thu, 21 Sep 2017 09:49:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Rx6gbuzzqKyqb1MIioYD1IlkFilzlDyADulu9UCwVsg=; b=PbOWUSLffaNyDG4sy2V0z8Y49AQ6M186burxTLUCxoKH7Rh6Jux7pFe4f4kslnSVd/ 7LKuPlo1PAcGkxPBEOf88gQW5iLr8j5diM6zuA66FaQfCpFvhdrrqp/3dGVGQna70Arm WC1jxq+oNjyD/gSkaHjGGOLa/gPHg6Sombasc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Rx6gbuzzqKyqb1MIioYD1IlkFilzlDyADulu9UCwVsg=; b=jdSy4VrCA79xVfUJcwq3qM7JAtsYQytOSSmFI3XJYerVqh/g8ZTC4XRfUHwIJ6cHZf 2NmzdYH1KEzz2ELftnu+Z+hyf2ZrN0NMPnfEgcliqmM4pywcNLXoNtCjyADoWas7+Bar dsnxAxh7igAv5kp06i/bL1U/iaYSMq2LTAtioBqOAWLuZiXB/1irDpHi3aUStthEzNmK I/T2NPmnD+uDnfjIwFRDy5NRB7RTZQrGH7x0NwSFQskrx91tabkGfWxkULg4meG5S/FI QNFl+HLCGTiQWmCsCRcF7eVywr8c48OCB+hCLnO+6eFrmyfWO0ohNOwcnp9FVLAWWWiW mHfg== X-Gm-Message-State: AHPjjUil0ktS99nAa4500x+gILZ0RiB8UilCbfm8ykc9dsrN0f4WrDch DewBJ+q5R5XyB7LqIGrCpBQyqarQ1pY= X-Google-Smtp-Source: AOwi7QAsCU69LSkXyKmI1HKT+B4EsK+elQa8MwlzvGoF6Cmq+IxossrFnsPgQbrzJL5MgOTveOliOA== X-Received: by 10.80.226.12 with SMTP id n12mr1865113edl.290.1506012586887; Thu, 21 Sep 2017 09:49:46 -0700 (PDT) Received: from mms-0441.qualcomm.mm-sol.com ([212.45.67.2]) by smtp.googlemail.com with ESMTPSA id i16sm993311edj.29.2017.09.21.09.49.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Sep 2017 09:49:46 -0700 (PDT) From: Georgi Djakov To: sboyd@codeaurora.org, jassisinghbrar@gmail.com, bjorn.andersson@linaro.org, robh+dt@kernel.org Cc: mturquette@baylibre.com, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, georgi.djakov@linaro.org Subject: [PATCH v9 3/7] mailbox: qcom: Move the apcs struct into a separate header Date: Thu, 21 Sep 2017 19:49:36 +0300 Message-Id: <20170921164940.20343-4-georgi.djakov@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170921164940.20343-1-georgi.djakov@linaro.org> References: <20170921164940.20343-1-georgi.djakov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move the structure shared by the APCS IPC device and its subdevices into a separate header file. Signed-off-by: Georgi Djakov --- drivers/mailbox/qcom-apcs-ipc-mailbox.c | 11 +---------- include/linux/mailbox/qcom-apcs.h | 34 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 10 deletions(-) create mode 100644 include/linux/mailbox/qcom-apcs.h diff --git a/drivers/mailbox/qcom-apcs-ipc-mailbox.c b/drivers/mailbox/qcom-apcs-ipc-mailbox.c index fd9055eacf42..50c7f6c54b74 100644 --- a/drivers/mailbox/qcom-apcs-ipc-mailbox.c +++ b/drivers/mailbox/qcom-apcs-ipc-mailbox.c @@ -20,16 +20,7 @@ #include #include #include - -#define QCOM_APCS_IPC_BITS 32 - -struct qcom_apcs_ipc { - struct mbox_controller mbox; - struct mbox_chan mbox_chans[QCOM_APCS_IPC_BITS]; - - struct regmap *regmap; - unsigned long offset; -}; +#include static const struct regmap_config apcs_regmap_config = { .reg_bits = 32, diff --git a/include/linux/mailbox/qcom-apcs.h b/include/linux/mailbox/qcom-apcs.h new file mode 100644 index 000000000000..7e48fa2372dc --- /dev/null +++ b/include/linux/mailbox/qcom-apcs.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2017, Linaro Limited + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef _LINUX_QCOM_APCS_H_ +#define _LINUX_QCOM_APCS_H_ + +#define QCOM_APCS_IPC_BITS 32 + +/** + * struct qcom_apcs_ipc - APCS shared struct + * + * @mbox: mailbox controller + * @mbox_chans: array of the available communication channels + * @offset: mailbox IPC register offset + * @regmap: register map used to access APCS registers + */ +struct qcom_apcs_ipc { + struct mbox_controller mbox; + struct mbox_chan mbox_chans[QCOM_APCS_IPC_BITS]; + unsigned long offset; + struct regmap *regmap; +}; + +#endif /* _LINUX_QCOM_APCS_H_ */