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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id A9C1BC5475B for ; Sun, 3 Mar 2024 12:22:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=A4E1/t55tYdCLf7hyxT3bXyyrXL47xgwk+CDthI0sbk=; b=eK0dCVNgPRxruh JZzIQgkc8V5Wa04Efrw7XkGJGPrAxp2IVpRFfGDFCWTbhW9EwdZR2jdf8VQg9voFZ4jimHVuy5jSD 4j+SI5H5UqwdiM0wFDxmkpN8h+vOQPe28yP4rYUlceHlozE78stRaJrobvZE1YKfB3LkoZzkNnffb VfEzJ9q1aR/ILsHhDug+U7aOgLhxGOl8dSQ1v8ZI9hG6DeRtdHm9CHSgjN9dqrTqPzAtAxVcpy+b8 ys1W5SZpZ1h1fGXUSbRqfPyiiDRuMHRCe7JkOkpGVl1VAMmxk+/3aig91skrjYp1BXrt0f2WCZvUM PAstsT6w7h7uN+JiOXGg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rgkqs-00000005rPs-2ANs; Sun, 03 Mar 2024 12:21:58 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rgkqp-00000005rO8-1MA0 for linux-arm-kernel@lists.infradead.org; Sun, 03 Mar 2024 12:21:57 +0000 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-33e2268ed96so1578714f8f.3 for ; Sun, 03 Mar 2024 04:21:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1709468511; x=1710073311; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=cqQVtMCteF6vcIB8GNjsI4lJiOVGsEEIhmJjprsB3tk=; b=eUEcRrgxQdniq1jVepK5ejRWONV2nOM2Cr7e5eyTbKQyCE9m4SAvPK2olglpfg4Nc9 hjRrKCfwodEdqmz8tO9hdEbGcI0cZaohfZd6bevUnws4mLx8H1rlnu/2Ztc3AOQ09aMb aoi1NTW0iXVdBQE19khk5+yEPKEU0AiwJQ1iCKPuUlvDyQZBcVQx4Fi1bWw1uu4e+KYj h4SLnSsFydaZ/OLVo+6SMA6v0ucweDiEcPRkN/gyLg+OeNYxQQVy6rDSd01ZznWcwzQa F00Ty8e/Uv+yBE9Smf9bAbpYnRuMJ9O6yAsxVEowWR0UpjCSi6n1Rx2OmU7uecLhHqVm oA4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709468511; x=1710073311; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cqQVtMCteF6vcIB8GNjsI4lJiOVGsEEIhmJjprsB3tk=; b=Y0/jZY+ykDafO1B5CwzzPaVJzNn8rwjVK6gOxSWstVV+YvKWGjR1MPp8ZG+Da5e2Jx XZRCtIxA0bXs/lSNRYwkbeikwdq/bF+hQWmRQ8/IO3xR9Wj2zsiz0RyoJ0lPGFZ7rAPE IINx7Cf5IV5lqdrxxmXIMZ4AmPFz/kJeFWt1mGDMipclAmX0K0Tgm0eHGZFpBDm0mOla mk38Am72r/xnVS+mrauyyyHvgID1M9djiK6brts7Xbzt02LmkoOrYccewXUGl9gF1VVk L2KD4tbHXwY6C+AQIe/yKIEZsdUJha6eGudavlb4dtlzZ386mcwGnyjmSF+/tPMfTxmA AoaQ== X-Forwarded-Encrypted: i=1; AJvYcCVWuwVRebeD+gJ9fRfYgT9WF3fnTTCQdha8YAn1czNh/z/Xnc0WHolpYT3UJhST5wwiZcxIhyJ4wkmjaryw++jyFnoTi4OlJg+o3vNcKtWv2lfFGD8= X-Gm-Message-State: AOJu0Ywzl1wFypxebEK7cxPeDMjqJwVRJRtc9tRSFO3HEpqGThU2/RBf L5xF1ZQe6Xk8y0PlPDqdX0C9gXqLzQNmpw/tNU8Up2nTO40+l5evhsf9gVdHXk8= X-Google-Smtp-Source: AGHT+IEu5lNzZcOQMvaj3aD3ucAe4AnZoeQHEj7SRA/srmJnV1u3ip0F9kF0Dy0Mtto3LEWcBAh9tQ== X-Received: by 2002:a5d:5950:0:b0:33d:2899:3a8a with SMTP id e16-20020a5d5950000000b0033d28993a8amr4240620wri.39.1709468511266; Sun, 03 Mar 2024 04:21:51 -0800 (PST) Received: from [192.168.50.4] ([82.78.167.38]) by smtp.gmail.com with ESMTPSA id dw2-20020a0560000dc200b0033ddfba0c67sm9477927wrb.41.2024.03.03.04.21.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 03 Mar 2024 04:21:50 -0800 (PST) Message-ID: Date: Sun, 3 Mar 2024 14:21:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 29/39] irqchip/atmel-aic5: Add support to get nirqs from DT for sam9x60 & sam9x7 Content-Language: en-US To: Varshini Rajendran , robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, tglx@linutronix.de, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, andre.przywara@arm.com, mani@kernel.org, shawnguo@kernel.org, durai.manickamkr@microchip.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20240223171342.669133-1-varshini.rajendran@microchip.com> <20240223172905.673053-1-varshini.rajendran@microchip.com> From: claudiu beznea In-Reply-To: <20240223172905.673053-1-varshini.rajendran@microchip.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240303_042155_407777_E181FA2E X-CRM114-Status: GOOD ( 20.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 23.02.2024 19:29, Varshini Rajendran wrote: > Add support to get number of IRQs from the respective DT node for sam9x60 > and sam9x7 devices. Since only this factor differs between the two SoCs, > this patch adds support for the same. Adapt the sam9x60 dtsi > accordingly. > > Signed-off-by: Varshini Rajendran > --- > Changes in v4: > - Changed the implementation to fetch the NIRQs from DT as per the > comment to avoid introducing a new compatible when this is the only > difference between the SoCs related to this IP. > --- > arch/arm/boot/dts/microchip/sam9x60.dtsi | 1 + > drivers/irqchip/irq-atmel-aic5.c | 11 ++++++++--- > 2 files changed, 9 insertions(+), 3 deletions(-) > > diff --git a/arch/arm/boot/dts/microchip/sam9x60.dtsi b/arch/arm/boot/dts/microchip/sam9x60.dtsi > index 73d570a17269..e405f68c9f54 100644 > --- a/arch/arm/boot/dts/microchip/sam9x60.dtsi > +++ b/arch/arm/boot/dts/microchip/sam9x60.dtsi > @@ -1201,6 +1201,7 @@ aic: interrupt-controller@fffff100 { > interrupt-controller; > reg = <0xfffff100 0x100>; > atmel,external-irqs = <31>; > + microchip,nr-irqs = <50>; > }; > > dbgu: serial@fffff200 { > diff --git a/drivers/irqchip/irq-atmel-aic5.c b/drivers/irqchip/irq-atmel-aic5.c > index 145535bd7560..5d96ad8860d3 100644 > --- a/drivers/irqchip/irq-atmel-aic5.c > +++ b/drivers/irqchip/irq-atmel-aic5.c > @@ -398,11 +398,16 @@ static int __init sama5d4_aic5_of_init(struct device_node *node, > } > IRQCHIP_DECLARE(sama5d4_aic5, "atmel,sama5d4-aic", sama5d4_aic5_of_init); > > -#define NR_SAM9X60_IRQS 50 > - > static int __init sam9x60_aic5_of_init(struct device_node *node, > struct device_node *parent) > { > - return aic5_of_init(node, parent, NR_SAM9X60_IRQS); > + int ret, nr_irqs; > + > + ret = of_property_read_u32(node, "microchip,nr-irqs", &nr_irqs); > + if (ret) { > + pr_err("Not found microchip,nr-irqs property\n"); This breaks the ABI. You should ensure old device trees are still working with this patch. > + return ret; > + } > + return aic5_of_init(node, parent, nr_irqs); > } > IRQCHIP_DECLARE(sam9x60_aic5, "microchip,sam9x60-aic", sam9x60_aic5_of_init); _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel