From nobody Thu Apr 2 20:28:23 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2219F4014A2; Thu, 26 Mar 2026 15:21:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774538521; cv=none; b=qNFvItWH+5pRB3oCUKZwlH/CTOXwYftfng+XTBcQGchyVAHmSqQf1aHKiqJzv30IWEdG+SnaGUcbxxf3OUNFB5I8GRCXeCvSRt8rTmW/EJ7cKmiBedy/sP5qlZeUBB/UnxDAJ6+XnP/TXh7U09jVzWTJ/u9KpSSclHKY8/x/RMQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774538521; c=relaxed/simple; bh=kWz2abm9bUAJn9EQapk1g6R9M9s7P+zcc8h9vo6ctPw=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=HOmLC0ZbfYFWX2mgl4Rpu3aoqgYfOx3hv8SljMCyUJCxJJXqmU/3qS3/H1q9nDJaSSYw8WgBIEUrlqseAb238gb6CbvmL1amoUIvbt6gNROuhD/9Zchd7VDjDtVGCv4yRrMpuzrLAv5NMhPTRYN6/cfJBxMBy8GQDgJR7jb9nts= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=iNJFWTSI; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=o5DDVr3p; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="iNJFWTSI"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="o5DDVr3p" Date: Thu, 26 Mar 2026 15:21:55 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1774538516; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xC/49W1bfLyjlHAtfxVrT423n71srG3KeBkJaYtFohM=; b=iNJFWTSIaMad31ubNPztJt4yBGSR+iIV6oHDc4fcBAHXyQLI9j72sWvwLozLO3af0BwJOI OsEl/RuSkzoHdGfdORvGMZ+qrPQekIdxaV03LK3B8XiJS6PHTKQSWynob+4N/Bi/cB3FXS O1vIXwKPv6Z90UvPnc1cdRbNxskYxS5dz2BHueUazAOWCaWQiCWZU/HjAx2Gx59QRLYk+F 6dgqv7vemXAzfoCH0AgotWzpyshSLW5MimrDC/XW02aOagxEbD6xG9Se4i4nl6fkkN37oq LbZyICjrj5xFATG/MzbIe1OB7QVCR1zB8zO+jTjxJsIxyn8le0FHT+X7JZMDIg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1774538516; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xC/49W1bfLyjlHAtfxVrT423n71srG3KeBkJaYtFohM=; b=o5DDVr3p4bDmlarAXvMMOlHxoVtS4xFaXI9k0z7YbdmjdyZ3a0DVimH2W6YKnj/Kn8qfoT rC19mXTHtZDxYgCQ== From: "tip-bot2 for Icenowy Zheng" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/drivers] irqchip/loongson-pch-lpc: Add OF init code Cc: Jiaxun Yang , Icenowy Zheng , Thomas Gleixner , Huacai Chen , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260321092032.3502701-6-zhengxingda@iscas.ac.cn> References: <20260321092032.3502701-6-zhengxingda@iscas.ac.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177453851539.1647592.1348476241417576759.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the irq/drivers branch of tip: Commit-ID: ed3772aa48cf84ae313156cfe6544e8cba5aa043 Gitweb: https://git.kernel.org/tip/ed3772aa48cf84ae313156cfe6544e8cb= a5aa043 Author: Icenowy Zheng AuthorDate: Sat, 21 Mar 2026 17:20:31 +08:00 Committer: Thomas Gleixner CommitterDate: Thu, 26 Mar 2026 16:15:04 +01:00 irqchip/loongson-pch-lpc: Add OF init code The OF-based MIPS Loongson-3 systems can also have a PCH LPC interrupt controller. Add OF-based initialization code for this driver. Co-developed-by: Jiaxun Yang Signed-off-by: Jiaxun Yang Signed-off-by: Icenowy Zheng Signed-off-by: Thomas Gleixner Reviewed-by: Huacai Chen Link: https://patch.msgid.link/20260321092032.3502701-6-zhengxingda@iscas.a= c.cn --- drivers/irqchip/irq-loongson-pch-lpc.c | 35 +++++++++++++++++++++++++- 1 file changed, 35 insertions(+) diff --git a/drivers/irqchip/irq-loongson-pch-lpc.c b/drivers/irqchip/irq-l= oongson-pch-lpc.c index 2bb6659..7117ca6 100644 --- a/drivers/irqchip/irq-loongson-pch-lpc.c +++ b/drivers/irqchip/irq-loongson-pch-lpc.c @@ -13,6 +13,8 @@ #include #include #include +#include +#include #include =20 #include "irq-loongson.h" @@ -224,6 +226,7 @@ free_priv: return -ENOMEM; } =20 +#ifdef CONFIG_ACPI int __init pch_lpc_acpi_init(struct irq_domain *parent, struct acpi_madt_l= pc_pic *acpi_pchlpc) { struct fwnode_handle *irq_handle; @@ -256,3 +259,35 @@ int __init pch_lpc_acpi_init(struct irq_domain *parent= , struct acpi_madt_lpc_pic =20 return 0; } +#endif /* CONFIG_ACPI */ + +#ifdef CONFIG_OF +static int __init pch_lpc_of_init(struct device_node *node, struct device_= node *parent) +{ + struct fwnode_handle *irq_handle; + struct resource res; + int parent_irq, ret; + + if (of_address_to_resource(node, 0, &res)) + return -EINVAL; + + parent_irq =3D irq_of_parse_and_map(node, 0); + if (!parent_irq) { + pr_err("Failed to get the parent IRQ for LPC IRQs\n"); + return -EINVAL; + } + + irq_handle =3D of_fwnode_handle(node); + + ret =3D pch_lpc_init(res.start, resource_size(&res), irq_handle, + parent_irq); + if (ret) { + irq_dispose_mapping(parent_irq); + return ret; + } + + return 0; +} + +IRQCHIP_DECLARE(pch_lpc, "loongson,ls7a-lpc", pch_lpc_of_init); +#endif /* CONFIG_OF */