All of lore.kernel.org
 help / color / mirror / Atom feed
From: <argus.lin@mediatek.com>
To: Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>
Cc: Chenglin Xu <chenglin.xu@mediatek.com>,
	argus.lin@mediatek.com, Sean Wang <sean.wang@mediatek.com>,
	wsd_upstream@mediatek.com, henryc.chen@mediatek.com,
	flora.fu@mediatek.com, Chen Zhong <chen.zhong@mediatek.com>,
	Christophe Jaillet <christophe.jaillet@wanadoo.fr>,
	"shailendra . v" <shailendra.v@samsung.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Subject: [PATCH v2 3/5] soc: mediatek: pwrap: add int1_en_all and capability flag
Date: Mon, 29 Jan 2018 17:09:42 +0800	[thread overview]
Message-ID: <20180129090944.28687-3-argus.lin@mediatek.com> (raw)
In-Reply-To: <20180129090944.28687-1-argus.lin@mediatek.com>


[-- Attachment #1.1: Type: text/html, Size: 2436 bytes --]

[-- Attachment #1.2: Type: text/plain, Size: 1500 bytes --]

From: Argus Lin <argus.lin@mediatek.com>

New pwrap support int1_en flag for starvation and channel
request exception. We need to register it for interrupt
handler.
We also add pwrap capability flag used to declare if we
support BRIDGE, RESET, DCM, PRIORITY_SEL and INT1_EN
or not.

Signed-off-by: Argus Lin <argus.lin@mediatek.com>
---
 drivers/soc/mediatek/mtk-pmic-wrap.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index e9e054a15b7d..9f924d3f8645 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -76,6 +76,13 @@
 #define PWRAP_SLV_CAP_SECURITY	BIT(2)
 #define HAS_CAP(_c, _x)	(((_c) & (_x)) == (_x))
 
+/* Group of bits used for shown pwrap capability */
+#define PWRAP_CAP_BRIDGE	BIT(0)
+#define PWRAP_CAP_RESET		BIT(1)
+#define PWRAP_CAP_DCM		BIT(2)
+#define PWRAP_CAP_PRIORITY_SEL	BIT(3)
+#define PWRAP_CAP_INT1_EN	BIT(4)
+
 /* defines for slave device wrapper registers */
 enum dew_regs {
 	PWRAP_DEW_BASE,
@@ -681,9 +688,11 @@ struct pmic_wrapper_type {
 	enum pwrap_type type;
 	u32 arb_en_all;
 	u32 int_en_all;
+	u32 int1_en_all;
 	u32 spi_w;
 	u32 wdt_src;
-	unsigned int has_bridge:1;
+	/* Flags indicating the capability for the target pwrap */
+	u32 caps;
 	int (*init_reg_clock)(struct pmic_wrapper *wrp);
 	int (*init_soc_specific)(struct pmic_wrapper *wrp);
 };
-- 
2.12.5

  parent reply	other threads:[~2018-01-29  9:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-29  9:09 [PATCH v2 1/5] dt-bindings: pwrap: mediatek: add pwrap support for MT6797 argus.lin
2018-01-29  9:09 ` [PATCH v2 2/5] arm64: dts: mt6797: add pwrap support for mt6797 argus.lin
2018-01-30 12:57   ` Matthias Brugger
2018-01-30 12:57     ` Matthias Brugger
2018-02-11  8:55     ` Argus Lin
2018-01-29  9:09 ` argus.lin [this message]
2018-01-30 12:55   ` [PATCH v2 3/5] soc: mediatek: pwrap: add int1_en_all and capability flag Matthias Brugger
2018-01-30 12:55     ` Matthias Brugger
2018-02-12  1:55     ` Argus Lin
2018-01-29  9:09 ` [PATCH v2 4/5] soc: mediatek: pwrap: add pwrap for mt6797 SoCs argus.lin
2018-01-29  9:09 ` [PATCH v2 5/5] soc: mediatek: pwrap: add mt6351 " argus.lin
2018-01-30 12:58 ` [PATCH v2 1/5] dt-bindings: pwrap: mediatek: add pwrap support for MT6797 Matthias Brugger
2018-01-30 12:58   ` Matthias Brugger
2018-02-11  8:52   ` Argus Lin (林書慶)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180129090944.28687-3-argus.lin@mediatek.com \
    --to=argus.lin@mediatek.com \
    --cc=catalin.marinas@arm.com \
    --cc=chen.zhong@mediatek.com \
    --cc=chenglin.xu@mediatek.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=devicetree@vger.kernel.org \
    --cc=flora.fu@mediatek.com \
    --cc=henryc.chen@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=sean.wang@mediatek.com \
    --cc=shailendra.v@samsung.com \
    --cc=will.deacon@arm.com \
    --cc=wsd_upstream@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.