From patchwork Mon Apr 16 15:52:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Chmiel?= X-Patchwork-Id: 10343375 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 9F9846039A for ; Mon, 16 Apr 2018 16:01:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8DB2F287BA for ; Mon, 16 Apr 2018 16:01:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 822D3287E1; Mon, 16 Apr 2018 16:01:01 +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=-2.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E7B76287BA for ; Mon, 16 Apr 2018 16:01:00 +0000 (UTC) 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=a47V5tx+6OjPUiqKmv0jP4jmsFS8Qz0y5QlOoOCFBMY=; b=o+goEJGBqMoQcc wFMxlsR/yRzJFVpG4kkSnjOrJ+FuSoMvQU1QiJ1pXdSfTT4Df9gKuJoE5hXYFPFqjcY/XnqWJR+sS ssduVcfejw3lAohYz53XZrPVfEZ925UibsiHZ8VqcDul7rtdXy5R0rmFPH+F1NEmb5lKnnOla9n0n IzBG3ujUJ9LbxP7qLIRbAIXhIzdt9qgxqHcOBjUy8HhGLtYJai/hxOd/fZmxRQ1c0nxTm6q/p9Ryk HRJV5BJtYjjBZcB/AekvL44WfrXsmPnreaoscc4ZA0W2pT9BfuulxasVfjZawRh9T//1/yC59BEh6 ERA9kTNY7QSujS7VoGPQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f86Yj-0007KT-4d; Mon, 16 Apr 2018 16:00:49 +0000 Received: from mail-lf0-x241.google.com ([2a00:1450:4010:c07::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f86Y9-0005pU-Nl for linux-arm-kernel@lists.infradead.org; Mon, 16 Apr 2018 16:00:20 +0000 Received: by mail-lf0-x241.google.com with SMTP id n14-v6so5270893lfe.5 for ; Mon, 16 Apr 2018 09:00:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/T9HU9SZVOqOMlY/8NU7XSlN8ZWeBNURpifQCIs75+M=; b=UHPBLjHZN9QoFTag6crRfLc/GiHkqLcFHkkOwkSKM40J0jK6KFY/cto9K2r66oiLIW LYzUGFvtfxRtCrlnWwsr77QPJYuu0vXamwqOT94aLUMJZ8Ssmo1JKqMGbKtjRJgOTqSg gLubnp3O+sF0BZZv8RFVrtMBYBfTEEBcIZjdnQu1ws7iGwDA7B/XySO3c/pKLkuueVIX doz/afnyJ1tJHDFvRLy6oNUjf+NvY2XbCGSnBSU0aOU9KxGyZdiIV3eUw7/dcDoRAjGi zq7PI58nKVqafXVKrTSJRo2fVW0KCVd47WZcaCe2ris+0rb5EB+S3WPsq2/615rgbYTJ dHpA== 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:mime-version:content-transfer-encoding; bh=/T9HU9SZVOqOMlY/8NU7XSlN8ZWeBNURpifQCIs75+M=; b=izJHRFUamzNDrL7mtd12W9cxZlYsb+DqDXJZpOnKFDMxU/ws9Z9C0mZzR5cDYG4gxF LX0cMQt6Wugfc+WgRwPtxshW/p/TTDXeqFXkb0W1AwBTeLJbGlWPXy5qbIAWUgyLFbvZ PT6yg0wQm6s4NObkmZNfO3gF86SOfMAVWv8nBQ3ULNR076YvBOR+Qwjti/K2oERjfYI+ oYhnMpPMJEFauop7crijVP6ALR6pTeNYV+poDBvG3zdnau5z8fSlykiYMQPpXoI8rGIW rknhoazewm2Tr3lgVwC0ZZaVngstU+FNtmwrfLKTVj1cErnOvzsJP4MuVqTzJDuiniLf szqA== X-Gm-Message-State: ALQs6tAZ9K8GLlAwMVHDGDYA6op9Gb5G8DlZECpF9yhdAQHmLR/mmSy1 acWtU5dNhIfxn9HZhZKUwdg= X-Google-Smtp-Source: AIpwx4/tsKCVco9/KTtKsla0SEvNZ264Yv0kymXzGHYV7USqt6u2YKUZY6qDOjKEmZTt56Zf5x/txA== X-Received: by 10.46.128.139 with SMTP id i11mr9673441ljg.97.1523894401840; Mon, 16 Apr 2018 09:00:01 -0700 (PDT) Received: from localhost.localdomain (user-94-254-174-4.play-internet.pl. [94.254.174.4]) by smtp.googlemail.com with ESMTPSA id s68-v6sm2172036lfs.22.2018.04.16.09.00.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Apr 2018 09:00:01 -0700 (PDT) From: =?UTF-8?q?Pawe=C5=82=20Chmiel?= To: tomasz.figa@gmail.com, krzk@kernel.org, s.nawrocki@samsung.com Subject: [PATCH v2 1/2] pinctrl/samsung: Correct EINTG banks order Date: Mon, 16 Apr 2018 17:52:45 +0200 Message-Id: <1523893966-8884-2-git-send-email-pawel.mikolaj.chmiel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523893966-8884-1-git-send-email-pawel.mikolaj.chmiel@gmail.com> References: <1523893966-8884-1-git-send-email-pawel.mikolaj.chmiel@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180416_090013_801471_C543E8E4 X-CRM114-Status: GOOD ( 13.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-samsung-soc@vger.kernel.org, linus.walleij@linaro.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux-gpio@vger.kernel.org, kgene@kernel.org, linux-arm-kernel@lists.infradead.org, =?UTF-8?q?Pawe=C5=82=20Chmiel?= Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP All banks with GPIO interrupts should be at beginning of bank array and without any other types of banks between them. This order is expected by exynos_eint_gpio_irq, when doing interrupt group to bank translation. Otherwise, kernel NULL pointer dereference would happen when trying to handle interrupt, due to wrong bank being looked up. Observed on s5pv210, when trying to handle gpj0 interrupt, where kernel was mapping it to gpi bank. Cc: stable@vger.kernel.org Fixes: 023e06dfa6882f500b9c86fd61f0b1913aa07f36 ("pinctrl: exynos: add exynos5410 SoC specific data") Fixes: 608a26a7bc04a39cfd7041f31ca2b2100113d14e ("pinctrl: Add s5pv210 support to pinctrl-exynos) Signed-off-by: Paweł Chmiel Reviewed-by: Tomasz Figa --- Changes from v1: - Limit changes to s5pv210 and Exynos5410. Exynos3250 will be handled later. - Added cc stable - Added fixes tag --- drivers/pinctrl/samsung/pinctrl-exynos-arm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/samsung/pinctrl-exynos-arm.c b/drivers/pinctrl/samsung/pinctrl-exynos-arm.c index 90c2744..4f4ae66 100644 --- a/drivers/pinctrl/samsung/pinctrl-exynos-arm.c +++ b/drivers/pinctrl/samsung/pinctrl-exynos-arm.c @@ -105,12 +105,12 @@ static const struct samsung_pin_bank_data s5pv210_pin_bank[] __initconst = { EXYNOS_PIN_BANK_EINTG(7, 0x1c0, "gpg1", 0x38), EXYNOS_PIN_BANK_EINTG(7, 0x1e0, "gpg2", 0x3c), EXYNOS_PIN_BANK_EINTG(7, 0x200, "gpg3", 0x40), - EXYNOS_PIN_BANK_EINTN(7, 0x220, "gpi"), EXYNOS_PIN_BANK_EINTG(8, 0x240, "gpj0", 0x44), EXYNOS_PIN_BANK_EINTG(6, 0x260, "gpj1", 0x48), EXYNOS_PIN_BANK_EINTG(8, 0x280, "gpj2", 0x4c), EXYNOS_PIN_BANK_EINTG(8, 0x2a0, "gpj3", 0x50), EXYNOS_PIN_BANK_EINTG(5, 0x2c0, "gpj4", 0x54), + EXYNOS_PIN_BANK_EINTN(7, 0x220, "gpi"), EXYNOS_PIN_BANK_EINTN(8, 0x2e0, "mp01"), EXYNOS_PIN_BANK_EINTN(4, 0x300, "mp02"), EXYNOS_PIN_BANK_EINTN(8, 0x320, "mp03"), @@ -630,7 +630,6 @@ static const struct samsung_pin_bank_data exynos5410_pin_banks0[] __initconst = EXYNOS_PIN_BANK_EINTG(4, 0x100, "gpc3", 0x20), EXYNOS_PIN_BANK_EINTG(7, 0x120, "gpc1", 0x24), EXYNOS_PIN_BANK_EINTG(7, 0x140, "gpc2", 0x28), - EXYNOS_PIN_BANK_EINTN(2, 0x160, "gpm5"), EXYNOS_PIN_BANK_EINTG(8, 0x180, "gpd1", 0x2c), EXYNOS_PIN_BANK_EINTG(8, 0x1A0, "gpe0", 0x30), EXYNOS_PIN_BANK_EINTG(2, 0x1C0, "gpe1", 0x34), @@ -641,6 +640,7 @@ static const struct samsung_pin_bank_data exynos5410_pin_banks0[] __initconst = EXYNOS_PIN_BANK_EINTG(2, 0x260, "gpg2", 0x48), EXYNOS_PIN_BANK_EINTG(4, 0x280, "gph0", 0x4c), EXYNOS_PIN_BANK_EINTG(8, 0x2A0, "gph1", 0x50), + EXYNOS_PIN_BANK_EINTN(2, 0x160, "gpm5"), EXYNOS_PIN_BANK_EINTN(8, 0x2C0, "gpm7"), EXYNOS_PIN_BANK_EINTN(6, 0x2E0, "gpy0"), EXYNOS_PIN_BANK_EINTN(4, 0x300, "gpy1"),