From patchwork Wed Jan 20 19:58:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Crispin X-Patchwork-Id: 8105091 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AC7189F6DA for ; Mon, 25 Jan 2016 09:46:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CB0362027D for ; Mon, 25 Jan 2016 09:46:31 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 05ADF20279 for ; Mon, 25 Jan 2016 09:46:31 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aNdhg-0007xi-Rz; Mon, 25 Jan 2016 09:44:56 +0000 Received: from arrakis.dune.hu ([78.24.191.176]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aNdhV-0007tG-FP; Mon, 25 Jan 2016 09:44:46 +0000 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 7F8FB28BE60; Mon, 25 Jan 2016 10:43:40 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00, DATE_IN_PAST_96_XX, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from localhost.localdomain (p548C992E.dip0.t-ipconnect.de [84.140.153.46]) by arrakis.dune.hu (Postfix) with ESMTPSA; Mon, 25 Jan 2016 10:43:40 +0100 (CET) From: John Crispin To: Matthias Brugger Subject: [PATCH V2 05/11] soc: mediatek: PMIC wrap: WRAP_INT_EN needs a different bitmask for MT2701/7623 Date: Wed, 20 Jan 2016 20:58:57 +0100 Message-Id: <1453319943-35491-5-git-send-email-blogic@openwrt.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1453319943-35491-1-git-send-email-blogic@openwrt.org> References: <1453319943-35491-1-git-send-email-blogic@openwrt.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160125_014445_700444_40AB7554 X-CRM114-Status: GOOD ( 11.21 ) X-Spam-Score: 1.5 (+) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Steven Liu , Sascha Hauer , linux-kernel@vger.kernel.org, Henry Chen , Flora Fu , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, John Crispin MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Level: * X-Virus-Scanned: ClamAV using ClamSMTP MT2701 and MT7623 use a different bitmask for PWRAP_INT_EN. Signed-off-by: John Crispin --- drivers/soc/mediatek/mtk-pmic-wrap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c index ab2202d..948fc73 100644 --- a/drivers/soc/mediatek/mtk-pmic-wrap.c +++ b/drivers/soc/mediatek/mtk-pmic-wrap.c @@ -371,6 +371,7 @@ struct pmic_wrapper_type { int *regs; enum pwrap_type type; u32 arb_en_all; + u32 int_en_all; int (*init_reg_clock)(struct pmic_wrapper *wrp); int (*init_special)(struct pmic_wrapper *wrp); }; @@ -824,6 +825,7 @@ static struct pmic_wrapper_type pwrap_mt8135 = { .regs = mt8135_regs, .type = PWRAP_MT8135, .arb_en_all = 0x1ff, + .int_en_all = BIT(31) | BIT(1), .init_reg_clock = pwrap_mt8135_init_reg_clock, .init_special = pwrap_mt8135_init_special, }; @@ -832,6 +834,7 @@ static struct pmic_wrapper_type pwrap_mt8173 = { .regs = mt8173_regs, .type = PWRAP_MT8173, .arb_en_all = 0x3f, + .int_en_all = BIT(31) | BIT(1), .init_reg_clock = pwrap_mt8173_init_reg_clock, .init_special = pwrap_mt8173_init_special, }; @@ -945,7 +948,7 @@ static int pwrap_probe(struct platform_device *pdev) PWRAP_WDT_SRC_MASK_NO_STAUPD : PWRAP_WDT_SRC_MASK_ALL; pwrap_writel(wrp, wdt_src, PWRAP_WDT_SRC_EN); pwrap_writel(wrp, 0x1, PWRAP_TIMER_EN); - pwrap_writel(wrp, ~((1 << 31) | (1 << 1)), PWRAP_INT_EN); + pwrap_writel(wrp, ~wrp->master->int_en_all, PWRAP_INT_EN); irq = platform_get_irq(pdev, 0); ret = devm_request_irq(wrp->dev, irq, pwrap_interrupt, IRQF_TRIGGER_HIGH,