Received: by 10.223.164.202 with SMTP id h10csp457275wrb; Mon, 6 Nov 2017 09:25:26 -0800 (PST) X-Google-Smtp-Source: ABhQp+QjSgnxkJMMa4VNNRV0dreHAf2rey4GG0hxK2ZtQN7Yar0LlPYh/F+v8Kopi40NYWvIulTo X-Received: by 10.84.184.12 with SMTP id l12mr15448887plc.404.1509989126745; Mon, 06 Nov 2017 09:25:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509989126; cv=none; d=google.com; s=arc-20160816; b=lSAswoqKyVBwiQmuIIp0bv/hY4jrYEA5V5kjxRHrRTqbrDZ8x3RYCmwkdymGt3hn1n epXVlpPpQPT4JzC7twIm2QZBrVMKVQNEqQPc7ONYJRY90I/n85OB2E8b7sDVYuEsVaEB FzMHGIVvqiKQs4QrYGnJw+yOw4AvljHaNg2OzYx2olAk3vxY1i/mkP+J0zBOnMGEpJc5 yowMp8wCmkfG6l8REzgf9pnHfHKikiR1VeKM0KRPPd4DgWi7tYKZPx+GVmy4Nyy8TlYc gQSvvGsW/A7DLB6yUbBYcjMlL/SUAdQvq6FTjkkl3499lk002I6nnHo/uz6DMfGSQTSA DUmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=blyzOqQM8gabJ3+RUSwY6OnLZ7w+eHrd9cSbJcvyJCE=; b=FTXUZkAXM8nMk5GnI9NSEnd5+Hcan7xzZlns7/5UUTtusHKHlEzD667mNabVDhVhJW ZaCifAil/RQqLb9gp2euoDzSB4Uj3ObLpND2GfW6J+LZYjvfGeHpRFL0men83QRq59hJ eOGM1ygnq7Wk8nh/JjMisnrbwf4/J29QQmaz5rHARmOh7y72mG4bLmCsUUqPTrOrrupF 4GaLgqoHfMEOzVyq6HC3p7LJgYTcN6AW3we6QiRgN7Mw7QPT5RF80pSUrDPklB3y+6uO QaJiwJDdNBELrTZl1kkLcdpRo8kP9Y4WQgNEy6Jc3H999rLAJ980CNxB0fWe0BkqBZUt PN4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x12si11446380pgq.380.2017.11.06.09.25.13; Mon, 06 Nov 2017 09:25:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754647AbdKFRF2 (ORCPT + 96 others); Mon, 6 Nov 2017 12:05:28 -0500 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:52294 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754556AbdKFREf (ORCPT ); Mon, 6 Nov 2017 12:04:35 -0500 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vA6Gwj2o020508; Mon, 6 Nov 2017 18:03:48 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2e15ahkq38-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 06 Nov 2017 18:03:48 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id D140431; Mon, 6 Nov 2017 17:03:45 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas22.st.com [10.75.90.92]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id B52AB28BF; Mon, 6 Nov 2017 17:03:45 +0000 (GMT) Received: from SAFEX1HUBCAS23.st.com (10.75.90.46) by Safex1hubcas22.st.com (10.75.90.92) with Microsoft SMTP Server (TLS) id 14.3.352.0; Mon, 6 Nov 2017 18:03:45 +0100 Received: from lmecxl0923.lme.st.com (10.48.0.237) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.352.0; Mon, 6 Nov 2017 18:03:45 +0100 From: Ludovic Barre To: Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring CC: Maxime Coquelin , Alexandre Torgue , , , Subject: [PATCH v3 4/9] irqchip: stm32: add stm32h7 support Date: Mon, 6 Nov 2017 18:03:34 +0100 Message-ID: <1509987819-29599-5-git-send-email-ludovic.Barre@st.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509987819-29599-1-git-send-email-ludovic.Barre@st.com> References: <1509987819-29599-1-git-send-email-ludovic.Barre@st.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.48.0.237] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-06_06:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ludovic Barre stm32h7 has up to 96 inputs (3 banks of 32 inputs max). Signed-off-by: Ludovic Barre --- drivers/irqchip/irq-stm32-exti.c | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c index ef37870..8f409a9 100644 --- a/drivers/irqchip/irq-stm32-exti.c +++ b/drivers/irqchip/irq-stm32-exti.c @@ -38,6 +38,39 @@ static const struct stm32_exti_bank *stm32f4xx_exti_banks[] = { &stm32f4xx_exti_b1, }; +static const struct stm32_exti_bank stm32h7xx_exti_b1 = { + .imr_ofst = 0x80, + .emr_ofst = 0x84, + .rtsr_ofst = 0x00, + .ftsr_ofst = 0x04, + .swier_ofst = 0x08, + .pr_ofst = 0x88, +}; + +static const struct stm32_exti_bank stm32h7xx_exti_b2 = { + .imr_ofst = 0x90, + .emr_ofst = 0x94, + .rtsr_ofst = 0x20, + .ftsr_ofst = 0x24, + .swier_ofst = 0x28, + .pr_ofst = 0x98, +}; + +static const struct stm32_exti_bank stm32h7xx_exti_b3 = { + .imr_ofst = 0xA0, + .emr_ofst = 0xA4, + .rtsr_ofst = 0x40, + .ftsr_ofst = 0x44, + .swier_ofst = 0x48, + .pr_ofst = 0xA8, +}; + +static const struct stm32_exti_bank *stm32h7xx_exti_banks[] = { + &stm32h7xx_exti_b1, + &stm32h7xx_exti_b2, + &stm32h7xx_exti_b3, +}; + static unsigned long stm32_exti_pending(struct irq_chip_generic *gc) { const struct stm32_exti_bank *stm32_bank = gc->private; @@ -256,3 +289,12 @@ static int __init stm32f4_exti_of_init(struct device_node *np, } IRQCHIP_DECLARE(stm32f4_exti, "st,stm32-exti", stm32f4_exti_of_init); + +static int __init stm32h7_exti_of_init(struct device_node *np, + struct device_node *parent) +{ + return stm32_exti_init(stm32h7xx_exti_banks, + ARRAY_SIZE(stm32h7xx_exti_banks), np); +} + +IRQCHIP_DECLARE(stm32h7_exti, "st,stm32h7-exti", stm32h7_exti_of_init); -- 2.7.4 From 1583421130156145403@xxx Tue Nov 07 15:21:03 +0000 2017 X-GM-THRID: 1582684052372565644 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread