From patchwork Tue Nov 13 09:51:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 10680143 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8740C14BA for ; Tue, 13 Nov 2018 09:52:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76EBB2A17E for ; Tue, 13 Nov 2018 09:52:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6ADB92A1FD; Tue, 13 Nov 2018 09:52:14 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 13BF62A1E4 for ; Tue, 13 Nov 2018 09:52:14 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=ND7eGiYYVm1Mpkl4+au7zHjMxidOHYhogXwxIrczRvA=; b=jM42uScAl3pkuGV0Cl/pWpXqCY OPHNVj/v94M4nNYodnD5ZIxrdqWeR2+ZxelnLZcTo3avGgrVYmE4/f4GETWTRmddGVFP5vWE13paH 7AxnZAnr1l5kuOjR8YR4FqCpfjHGDLDAhOB7bAoidUUCYbod941jZg0uW/2rkniChCokXsPbyEH65 aeWS67qVlDUnWyzGSOJD6Bb6E1WXra1ueKBM6HJSvgl1gi0z2r89l07rpIaCyPE3U008HaGldnlXL QU1iA2i1r0sURTpwrjPBzte1/COzHKm51tNcbwp7TsoAKWClQS85lkZtSJpU6BeDlmoVb1wS0sSKA kau3GXyA==; 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 1gMVMh-0001qu-Qu; Tue, 13 Nov 2018 09:52:11 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMVMe-0001ot-Vc for linux-arm-kernel@lists.infradead.org; Tue, 13 Nov 2018 09:52:10 +0000 Received: by mail-wr1-x441.google.com with SMTP id j17-v6so12500277wrq.11 for ; Tue, 13 Nov 2018 01:51:58 -0800 (PST) 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=tjLGayql7yCYJSAwW7hn4YcSYNkPJBOMlvKL2addz8c=; b=T+0wNMalUeS8Gk94cewQ9eKynMLerA4SG/ZseVqHeDIAe3ZE5VsWDg0/NcU2zs5HRf hsb6/ClTXINx+TwGX2zNvd8dA9VAS0XyLIMJPbYUHRNfL/7pVCHs4VJKuCdkNKAsj9nt jLH5NCn5tbo+9PFs1DOFdN65q2Q/8RJs3j8l8= 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=tjLGayql7yCYJSAwW7hn4YcSYNkPJBOMlvKL2addz8c=; b=sWRp1Rtz97N2eGeRT0uLHp6DcekXh7Pq37D63owh/hs7ZF1dqsxhV0AWQ0HeeyOC8p /rTIKtyqlH8JdhDKKQllKUcv+6kVT9P36CmduEMSej6xzzuKSXV+5+Lpfk8UtrCk4Fw+ M6Y/2sRqiObRnH6EDvGmLL1pHNKxrM87/D/dppW2Pr4tC8uayKiIkmXgxN5P2kEeJ1TI MFUbFlCeGLxPwtnKcalyZx7CdPNHNiieIZbOtDy01N4BaJr/vrHyuZgtRc2yqmMWRts8 XxU0XdPrqIDG3clc6F5UX2uyoFEZuLOiSoqOqL/9vO2Uq4p6VJIQYSOaaNXS4h11mOEg m+/Q== X-Gm-Message-State: AGRZ1gJMlYpVz0Sakx4XBcrkE921/nRdvHL2pEmrT82S5doYrCYY84r3 1j1G4+inc2Y8DR4mQszCv7TT0kh0+U17+w== X-Google-Smtp-Source: AJdET5fcYfMfPb0CXnVMYvHRo9NcbDLEkYMgs1ItT0qxCcUQcC+Alo7jEydnXzMqCPoAB6CxDnzppw== X-Received: by 2002:a5d:4a11:: with SMTP id m17-v6mr4104009wrq.259.1542102717359; Tue, 13 Nov 2018 01:51:57 -0800 (PST) Received: from lmecxl0911.lme.st.com ([2a04:cec0:1088:2b4c:8cab:bca7:b2f2:d2bb]) by smtp.gmail.com with ESMTPSA id d4sm6044279wrp.89.2018.11.13.01.51.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Nov 2018 01:51:56 -0800 (PST) From: Benjamin Gaignard X-Google-Original-From: Benjamin Gaignard To: linus.walleij@linaro.org, robh+dt@kernel.org, alexandre.torgue@st.com Subject: [PATCH 1/3] dt-bindings: pinctrl: stm32: Document hwlocks properties Date: Tue, 13 Nov 2018 10:51:40 +0100 Message-Id: <20181113095142.32015-2-benjamin.gaignard@st.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20181113095142.32015-1-benjamin.gaignard@st.com> References: <20181113095142.32015-1-benjamin.gaignard@st.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181113_015209_011698_3488AF9E X-CRM114-Status: GOOD ( 11.30 ) 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: devicetree@vger.kernel.org, Benjamin Gaignard , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 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 Add hwlocks as optional property Signed-off-by: Benjamin Gaignard --- Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt index ef4f2ff4a1aa..48df30a36b01 100644 --- a/Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt @@ -56,6 +56,7 @@ Optional properties: More details in Documentation/devicetree/bindings/gpio/gpio.txt. - st,bank-ioport: should correspond to the EXTI IOport selection (EXTI line used to select GPIOs as interrupts). + - hwlocks: reference to a phandle of a hardware spinlock provider node. Example 1: #include From patchwork Tue Nov 13 09:51:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 10680145 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3163014BA for ; Tue, 13 Nov 2018 09:52:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E8CC2A07E for ; Tue, 13 Nov 2018 09:52:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 129432A17E; Tue, 13 Nov 2018 09:52:25 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 8E68C2A07E for ; Tue, 13 Nov 2018 09:52:24 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=8cYpG89W63DEZ3H0HNRtBOw7JxD4sSMJiHr/1Btk18k=; b=qmleLRVG9+/ptWBjMxD+M4tw+i 4LbcDyQtlEheU7smR4JqY1dx/5oqyVeVvNVLgBI51pJf8mEGV7SExTO8fvsMQ0V4jHDilqCkZV3ma jezo0+Vk7T2GkVWNP6DEvv5oeQ29C8rXPTE23+NmF9E2oJv+k+E0uEc06ukodg9BlFT+AwFVeKySI QAPOdNZq6xsi8KIgWtbOQ9XZWm4/Mxyj58LzkZWn7T3ebsk015C4csKzicLDshRHD0agizf36UvsG 0p+GfgFBfX3I9P2Gux41Kyl1A3l8DyxGZC8thKs6XUmY+Mu0neMhE/ozBzUxY3XveSt0yRCxkGC5n 9HW9PUIg==; 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 1gMVMt-00022n-7m; Tue, 13 Nov 2018 09:52:23 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMVMh-0001oz-35 for linux-arm-kernel@lists.infradead.org; Tue, 13 Nov 2018 09:52:12 +0000 Received: by mail-wr1-x444.google.com with SMTP id z13-v6so12531708wrs.3 for ; Tue, 13 Nov 2018 01:52:00 -0800 (PST) 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=f89cMj1x0peUIdYx+E2neeLwZox9dXEqOpz/Qk6Yxrs=; b=Y1yrWTXU3aK87bQqSob3sCL3iXKmCV/3pSwU9EFEf4UyY7kOoeEqkWVLx9nHGB9BU1 jis8vuUd0wNokc+WbCVee9OxhTa5mMJGyaHWNaZCWgg3821BilpYdpx2wDze1COPLdfA 0KibfLTi5padJ2UzBXtVPT/gmRH/DerQxI6Y4= 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=f89cMj1x0peUIdYx+E2neeLwZox9dXEqOpz/Qk6Yxrs=; b=gHwqEG2raHVcMhF69CqzgZMcvRnMnNyhHLSDK3OCQnq2ZveONu6oLd6cKbW4FIOowd XCLxUO/IiAuk0ykRd1jPjSdwq99GMQX4naZDW+3d4722xM99wG9L/XQA47ZU46DpHqeb ycue4LRNrVH9jwCGcrlkXY4BCmlRy8i680Py5vM5BwcmWO0N1CzDWMda0maCnizJXXNj hH5jzlu8VUudqHvaoiyQFHHB9vALPss0rUYdy56nKP2fA+dD1EySR/M40NjdhBJd08O+ uwIBAHwjsvuMO229EkWYuG24PcpNi4WT/Sf5omZy+ST36/pmxfhmpc+a4IV3wFx1QEoA qs2g== X-Gm-Message-State: AGRZ1gJcroMgC44yyEFVx8wm50yQ3MfRO/OwDEYxvlNfZefL1k2vjjM/ X8t9G1vBBvaT/psrxiHSkc8+ew== X-Google-Smtp-Source: AJdET5cWqDM+asTq8sRWRxTpVsbFQgyMzq9hYTZXJfGZC7gVM6gjJoctEFJ6VMjza1lF6fRBgX8Rig== X-Received: by 2002:adf:e7c6:: with SMTP id e6-v6mr4151190wrn.49.1542102719379; Tue, 13 Nov 2018 01:51:59 -0800 (PST) Received: from lmecxl0911.lme.st.com ([2a04:cec0:1088:2b4c:8cab:bca7:b2f2:d2bb]) by smtp.gmail.com with ESMTPSA id d4sm6044279wrp.89.2018.11.13.01.51.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Nov 2018 01:51:58 -0800 (PST) From: Benjamin Gaignard X-Google-Original-From: Benjamin Gaignard To: linus.walleij@linaro.org, robh+dt@kernel.org, alexandre.torgue@st.com Subject: [PATCH 2/3] pinctrl: stm32: protect configuration registers with a hwspinlock Date: Tue, 13 Nov 2018 10:51:41 +0100 Message-Id: <20181113095142.32015-3-benjamin.gaignard@st.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20181113095142.32015-1-benjamin.gaignard@st.com> References: <20181113095142.32015-1-benjamin.gaignard@st.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181113_015211_126836_E3C14BC0 X-CRM114-Status: GOOD ( 18.47 ) 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: devicetree@vger.kernel.org, Benjamin Gaignard , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 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 If a hwspinlock if defined in device tree use it to protect configuration registers. Signed-off-by: Benjamin Gaignard Acked-by: Alexandre TORGUE --- drivers/pinctrl/stm32/pinctrl-stm32.c | 71 ++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/pinctrl-stm32.c index a9bec6e6fdd1..dce9dabaf4d5 100644 --- a/drivers/pinctrl/stm32/pinctrl-stm32.c +++ b/drivers/pinctrl/stm32/pinctrl-stm32.c @@ -8,6 +8,7 @@ */ #include #include +#include #include #include #include @@ -51,6 +52,8 @@ #define gpio_range_to_bank(chip) \ container_of(chip, struct stm32_gpio_bank, range) +#define HWSPINLOCK_TIMEOUT 5 /* msec */ + static const char * const stm32_gpio_functions[] = { "gpio", "af0", "af1", "af2", "af3", "af4", @@ -91,6 +94,7 @@ struct stm32_pinctrl { struct irq_domain *domain; struct regmap *regmap; struct regmap_field *irqmux[STM32_GPIO_PINS_PER_BANK]; + struct hwspinlock *hwlock; }; static inline int stm32_gpio_pin(int gpio) @@ -576,14 +580,24 @@ static int stm32_pmx_get_func_groups(struct pinctrl_dev *pctldev, static void stm32_pmx_set_mode(struct stm32_gpio_bank *bank, int pin, u32 mode, u32 alt) { + struct stm32_pinctrl *pctl = dev_get_drvdata(bank->gpio_chip.parent); u32 val; int alt_shift = (pin % 8) * 4; int alt_offset = STM32_GPIO_AFRL + (pin / 8) * 4; unsigned long flags; + int err = 0; clk_enable(bank->clk); spin_lock_irqsave(&bank->lock, flags); + if (pctl->hwlock) + err = hwspin_lock_timeout(pctl->hwlock, HWSPINLOCK_TIMEOUT); + + if (err) { + dev_err(pctl->dev, "Can't get hwspinlock\n"); + goto unlock; + } + val = readl_relaxed(bank->base + alt_offset); val &= ~GENMASK(alt_shift + 3, alt_shift); val |= (alt << alt_shift); @@ -594,6 +608,10 @@ static void stm32_pmx_set_mode(struct stm32_gpio_bank *bank, val |= mode << (pin * 2); writel_relaxed(val, bank->base + STM32_GPIO_MODER); + if (pctl->hwlock) + hwspin_unlock(pctl->hwlock); + +unlock: spin_unlock_irqrestore(&bank->lock, flags); clk_disable(bank->clk); } @@ -683,17 +701,31 @@ static const struct pinmux_ops stm32_pmx_ops = { static void stm32_pconf_set_driving(struct stm32_gpio_bank *bank, unsigned offset, u32 drive) { + struct stm32_pinctrl *pctl = dev_get_drvdata(bank->gpio_chip.parent); unsigned long flags; u32 val; + int err = 0; clk_enable(bank->clk); spin_lock_irqsave(&bank->lock, flags); + if (pctl->hwlock) + err = hwspin_lock_timeout(pctl->hwlock, HWSPINLOCK_TIMEOUT); + + if (err) { + dev_err(pctl->dev, "Can't get hwspinlock\n"); + goto unlock; + } + val = readl_relaxed(bank->base + STM32_GPIO_TYPER); val &= ~BIT(offset); val |= drive << offset; writel_relaxed(val, bank->base + STM32_GPIO_TYPER); + if (pctl->hwlock) + hwspin_unlock(pctl->hwlock); + +unlock: spin_unlock_irqrestore(&bank->lock, flags); clk_disable(bank->clk); } @@ -719,17 +751,31 @@ static u32 stm32_pconf_get_driving(struct stm32_gpio_bank *bank, static void stm32_pconf_set_speed(struct stm32_gpio_bank *bank, unsigned offset, u32 speed) { + struct stm32_pinctrl *pctl = dev_get_drvdata(bank->gpio_chip.parent); unsigned long flags; u32 val; + int err = 0; clk_enable(bank->clk); spin_lock_irqsave(&bank->lock, flags); + if (pctl->hwlock) + err = hwspin_lock_timeout(pctl->hwlock, HWSPINLOCK_TIMEOUT); + + if (err) { + dev_err(pctl->dev, "Can't get hwspinlock\n"); + goto unlock; + } + val = readl_relaxed(bank->base + STM32_GPIO_SPEEDR); val &= ~GENMASK(offset * 2 + 1, offset * 2); val |= speed << (offset * 2); writel_relaxed(val, bank->base + STM32_GPIO_SPEEDR); + if (pctl->hwlock) + hwspin_unlock(pctl->hwlock); + +unlock: spin_unlock_irqrestore(&bank->lock, flags); clk_disable(bank->clk); } @@ -755,17 +801,31 @@ static u32 stm32_pconf_get_speed(struct stm32_gpio_bank *bank, static void stm32_pconf_set_bias(struct stm32_gpio_bank *bank, unsigned offset, u32 bias) { + struct stm32_pinctrl *pctl = dev_get_drvdata(bank->gpio_chip.parent); unsigned long flags; u32 val; + int err = 0; clk_enable(bank->clk); spin_lock_irqsave(&bank->lock, flags); + if (pctl->hwlock) + err = hwspin_lock_timeout(pctl->hwlock, HWSPINLOCK_TIMEOUT); + + if (err) { + dev_err(pctl->dev, "Can't get hwspinlock\n"); + goto unlock; + } + val = readl_relaxed(bank->base + STM32_GPIO_PUPDR); val &= ~GENMASK(offset * 2 + 1, offset * 2); val |= bias << (offset * 2); writel_relaxed(val, bank->base + STM32_GPIO_PUPDR); + if (pctl->hwlock) + hwspin_unlock(pctl->hwlock); + +unlock: spin_unlock_irqrestore(&bank->lock, flags); clk_disable(bank->clk); } @@ -1140,7 +1200,7 @@ int stm32_pctl_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct stm32_pinctrl *pctl; struct pinctrl_pin_desc *pins; - int i, ret, banks = 0; + int i, ret, hwlock_id, banks = 0; if (!np) return -EINVAL; @@ -1160,6 +1220,15 @@ int stm32_pctl_probe(struct platform_device *pdev) platform_set_drvdata(pdev, pctl); + /* hwspinlock is optional */ + hwlock_id = of_hwspin_lock_get_id(pdev->dev.of_node, 0); + if (hwlock_id < 0) { + if (hwlock_id == -EPROBE_DEFER) + return hwlock_id; + } else { + pctl->hwlock = hwspin_lock_request_specific(hwlock_id); + } + pctl->dev = dev; pctl->match_data = match->data; ret = stm32_pctrl_build_state(pdev); From patchwork Tue Nov 13 09:51:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 10680149 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BDBD81747 for ; Tue, 13 Nov 2018 09:52:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A77F42A17E for ; Tue, 13 Nov 2018 09:52:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 992B72A1FD; Tue, 13 Nov 2018 09:52:58 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 369472A17E for ; Tue, 13 Nov 2018 09:52:58 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=JRfOmSmU9S4LIN79JBS8ba4pMkDgc5zSo810GON0FHQ=; b=YFF9qwhiFE+X16uolwywtWTLgc iM4bQyUOUVFbe2aYdaAmfpBeh2A/68ezzS/hK3V+KROQWGumFa+WvcD63FofP/l7UIYlRjLYDvEEt hiKHgha7KAAg+qRK7b+Dzy5CykiyNNHJ7f99ne+GhTGkvewAgoDMWX1OwymdRwBlJTWTRcCWwdV3d 06Nz/U9tCYqdQM8aTeMOyVnAch/NDgj1l5ijmY+ckjDiG6XZYuzRdcJgZN/joP/0os/Itw85X8ENI ZNQsJQ8uQd9OhyBRCuQm7b9IKqWqFH0kglaWbi9+KwAHFq75eyM6/RdR2FstuzlCp248JC9fRdg5r IH76HHnw==; 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 1gMVNJ-0002ai-RG; Tue, 13 Nov 2018 09:52:49 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMVMi-0001p7-Kr for linux-arm-kernel@lists.infradead.org; Tue, 13 Nov 2018 09:52:14 +0000 Received: by mail-wm1-x342.google.com with SMTP id t15-v6so10799313wmt.0 for ; Tue, 13 Nov 2018 01:52:02 -0800 (PST) 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=5FLtnV+wQIcNUrNrHkM6Ut8LWj8aU2ocfMFyomIotT4=; b=XNTHJBvJR7vTHxamm+10/rQwlHl+lCQChVUq7XhhWIZv5VzofJ4v/Cks61vFvzAkrj JSnAgBerb+2dkykxd55Hxq5zoGPFwUmOMwQQ7+4SC2hITG+0NhusC6s9voQ+eDYnRx6e WKnc8zCO9PBIlhIW4//6y/+DLO/aSdzDtrTS4= 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=5FLtnV+wQIcNUrNrHkM6Ut8LWj8aU2ocfMFyomIotT4=; b=dc3H0OpJL08Jgm0Mx3enoNEpT6U2ig5CWN2I1PGSm6VS2MRUHKRB46RgaB9BD4jIP2 Zx25XiVGrAhTwAWllPNA85uXMFlMJ+AYqiYo+hM34T7om6FToVUnJkukUWF4s+tA+NUI nno+vZCJdIMy30EyNxxH2NjGhtPAMGzLw3qt7TQO2NW6a+YaNb3/rR276jECrlaAZPAP AZ5ztw0MJwAMBS9+0q6cRcfYxv5SNLwdk4WvRU9+wbl08NoGILvmrcUMJDaV8YujJWLe hY9UK1S5C1buPxbtlvVfqMSy1MLU9s3DwZM7bC8nOuiSp/Gyc0RxAcc7jBHaSoEYh/Sd ArqQ== X-Gm-Message-State: AGRZ1gKv/CFwMKhMAUye8SruXYFF0pB+biECX789E+Vc6ubPJHZuuFm1 wDF9cHR+aYBJljLkYMNCU3Q1sw== X-Google-Smtp-Source: AJdET5dPUhi4uro2/QGE51QkU/Nhi0ZKMAwzYNQoncmtj/ls/wRWoQGP8AITcZQxR5AVgZh6MluVYQ== X-Received: by 2002:a1c:7ec9:: with SMTP id z192-v6mr2782098wmc.43.1542102721132; Tue, 13 Nov 2018 01:52:01 -0800 (PST) Received: from lmecxl0911.lme.st.com ([2a04:cec0:1088:2b4c:8cab:bca7:b2f2:d2bb]) by smtp.gmail.com with ESMTPSA id d4sm6044279wrp.89.2018.11.13.01.51.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Nov 2018 01:52:00 -0800 (PST) From: Benjamin Gaignard X-Google-Original-From: Benjamin Gaignard To: linus.walleij@linaro.org, robh+dt@kernel.org, alexandre.torgue@st.com Subject: [PATCH 3/3] ARM: dts: stm32: Add hwlock for pinctrl Date: Tue, 13 Nov 2018 10:51:42 +0100 Message-Id: <20181113095142.32015-4-benjamin.gaignard@st.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20181113095142.32015-1-benjamin.gaignard@st.com> References: <20181113095142.32015-1-benjamin.gaignard@st.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181113_015212_693311_0ADC6AC5 X-CRM114-Status: GOOD ( 12.35 ) 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: devicetree@vger.kernel.org, Benjamin Gaignard , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 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 Define a hwspinlock to be used by pin-controller Signed-off-by: Benjamin Gaignard --- arch/arm/boot/dts/stm32mp157-pinctrl.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/stm32mp157-pinctrl.dtsi b/arch/arm/boot/dts/stm32mp157-pinctrl.dtsi index c4851271e810..2886e5a6ac27 100644 --- a/arch/arm/boot/dts/stm32mp157-pinctrl.dtsi +++ b/arch/arm/boot/dts/stm32mp157-pinctrl.dtsi @@ -14,6 +14,7 @@ ranges = <0 0x50002000 0xa400>; interrupt-parent = <&exti>; st,syscfg = <&exti 0x60 0xff>; + hwlocks = <&hsem 0>; pins-are-numbered; gpioa: gpio@50002000 {