From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9AF58C2D0FA for ; Wed, 13 May 2020 12:56:56 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2C4EE2492E for ; Wed, 13 May 2020 12:56:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hksfX9eE"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="e/8u+7n1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2C4EE2492E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=W9Jxk4B2y2m9aiR2K/fuL81HS2rmwkEeTcDxaFk7O2c=; b=hksfX9eEokb8Dt wDj7z5suEHktX2mNIfaGOUE59KgDLyUucg6ZA5YBnZknlijlMnGGhIB86AULn5nXmf8tmwnyrSKsU dzOvuAFebEcgvkREoS3Q3sMmLh+fdeQmR6VPAkETrcYNR+Z8x5jnqNZ/AEOCtCSxr3pnRmxzGXRC6 7trEBb7vXPe059OpaPjuldpGIlFAF3FaaNzqKONalNo+QVqONzYAVnnrm8rJ7TBpXXV+1mGDh7LWj NMPgCPwO/VXlPxPN59pZa7BLexgB52+/RP7n//GE+XsHcq2LjIPFcu5x0GHjsgAl/qedo1F8KFDmp cy2iTWR0bvO15YoZgUUg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jYqwR-00029B-ES; Wed, 13 May 2020 12:56:55 +0000 Received: from esa2.microchip.iphmx.com ([68.232.149.84]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jYqw2-0001ml-4V for linux-arm-kernel@lists.infradead.org; Wed, 13 May 2020 12:56:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1589374590; x=1620910590; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WZs4qSGRBrl6o2f2lxXITxeDdZF+Q5jzpsB7ABIsFbU=; b=e/8u+7n1u5OEq/CBmcByIy/+E2oAbkkx7xdfmPEJmQROzb/sc7yEq2V7 L4uWcO/wPwsRz95Lu/8vCdaaCVsPdT5z53d55Vm4rpa1KMhMR/9/tEPZq zOy82fMrjKptvHXVxH1zb3yDaIooQ0QhW0JvRdZhKqgAZecHL9dueFxie daBMaoevG9LNz15MgQKxOQrUBOpREVApoNUS37usDEdR2kF9k53wZd1YU hPamTR6edfTb1j4Gqnl3oBKLJuFghHDlaIg0/+3stxI9DWB3Kpuivb+w4 lzdgCZH9BWQwNIkSw2WaXwsASkvVFz9TS7dOaU08eyl9a1a7iLEKDbydh A==; IronPort-SDR: 3ikZKAyB22KBrZk1FzU8VvJgBhd9k54O9JjFg6AcKl3y9Du84qZFtlR0mm7ZAHBquLWsOmxT2R xnpvkU5ljUwcmRcU0VIqdmxBlHmLDgerCJwSFXxz+8XqAmRUrCA6AYOm0Vx1W0gX6HKE1Umtfp wW+iNZ6sTV/7rFMhhZ1LWtri18WBwwgMKdDswvBQl4vPatwlGTrb3PhXSOKItooUNrZcudLsQt xX8TgWneIZeWwb8SKPjaGpDbbgsuO85ZfHWrw9egM7BuaczTqN8V0XyD+FZmsByL3sys6mIrpb waw= X-IronPort-AV: E=Sophos;i="5.73,387,1583218800"; d="scan'208";a="75132769" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 13 May 2020 05:56:26 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 13 May 2020 05:56:28 -0700 Received: from soft-dev15.microsemi.net (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Wed, 13 May 2020 05:56:23 -0700 From: Lars Povlsen List-Id: To: SoC Team , Arnd Bergmann , Stephen Boyd , Linus Walleij Subject: [PATCH 03/14] pinctrl: ocelot: Fix GPIO interrupt decoding on Jaguar2 Date: Wed, 13 May 2020 14:55:21 +0200 Message-ID: <20200513125532.24585-4-lars.povlsen@microchip.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200513125532.24585-1-lars.povlsen@microchip.com> References: <20200513125532.24585-1-lars.povlsen@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200513_055630_248905_D920936A X-CRM114-Status: GOOD ( 12.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Alexandre Belloni , Steen Hegelund , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Microchip Linux Driver Support , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Olof Johansson , Michael Turquette , Lars Povlsen Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org This fixes a problem with using the GPIO as an interrupt on Jaguar2 (and similar), as the register layout of the platforms with 64 GPIO's are pairwise, such that the original offset must be multiplied with the platform stride. Fixes: da801ab56ad8 pinctrl: ocelot: add MSCC Jaguar2 support. Reviewed-by: Alexandre Belloni Signed-off-by: Lars Povlsen --- drivers/pinctrl/pinctrl-ocelot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c index 375f3ea3b80c4..95c225bc7572f 100644 --- a/drivers/pinctrl/pinctrl-ocelot.c +++ b/drivers/pinctrl/pinctrl-ocelot.c @@ -680,11 +680,12 @@ static void ocelot_irq_handler(struct irq_desc *desc) struct irq_chip *parent_chip = irq_desc_get_chip(desc); struct gpio_chip *chip = irq_desc_get_handler_data(desc); struct ocelot_pinctrl *info = gpiochip_get_data(chip); + unsigned int id_reg = OCELOT_GPIO_INTR_IDENT * info->stride; unsigned int reg = 0, irq, i; unsigned long irqs; for (i = 0; i < info->stride; i++) { - regmap_read(info->map, OCELOT_GPIO_INTR_IDENT + 4 * i, ®); + regmap_read(info->map, id_reg + 4 * i, ®); if (!reg) continue; -- 2.26.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel