From patchwork Sat Nov 26 13:34:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 26249 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp4645889wrr; Sat, 26 Nov 2022 06:03:24 -0800 (PST) X-Google-Smtp-Source: AA0mqf7MoKkkUqkb+zowAZVG4H1+Rf9oUNeDbAdtIvfal0EhQCRhAQIhmOGSsK5RNzI2tcsdfzIc X-Received: by 2002:a63:fe01:0:b0:477:bf35:acb1 with SMTP id p1-20020a63fe01000000b00477bf35acb1mr14134052pgh.439.1669471404425; Sat, 26 Nov 2022 06:03:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669471404; cv=none; d=google.com; s=arc-20160816; b=oBTickGEz4trsaOjB7pgBIjmw/Wwi9cf2j7vIP/boi281VSf3jnhHXcWxlC4DAsagV O77YhMVTdWPcWSlT3ZvmBJIqASVNRNOGUh14Zn9Cqv9Of0qxaA1YZXHikJ6E/NyJ5D26 Z3aTjgcARfIsmYlYXJaw48RdiEA4kbVL++rz/WIxDxD7dz07soyeICkvr2DCWTsccicn nVHL+WBodc3Pd05OO5IwmKaFZG+ir7L2e57HlTZuOMHvy4w5+mU4WKrG0kXhVt0QGQmB 40bsfQgvYKzgwjkbQCpJXE6+aEhkH6ocf18rObdqkul/TbjAl/GSdP618tq+/L15v2Xn gINw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=yKxbvGFi6opj3Xg8bXiFsfp4VHNmZocIRZNkr9A0bO4=; b=UVh+VrEn7CFdAw1+bgDQ/T2ZhroGlFaZC2s+BpwCFDGxOO0A98dGM+8Syxr0nvw7/s YFpCOZ+SSu+y/84i+0K2dR0RLg0RDjsb/NmQI60o23fLruWjiXYlvph3uEE6RB8Pf7J+ xyZ3cZcCKpgs9wVIt8gEj9H9VBft0g4YK6i/3qRzBkZbcQUTS+tcHbAhtOPM8x+bs/pG hXCgxU1Z0KlFcIySnD/hawHsRNq/atZqpp8FLLubqsAL5a7BpZ/eJIQecdhKFL8AYGDp c2rmk46qVb7mPClmzAVH+J/2qhgQcpqnjeqJMkQVlE7juB8Kttiftn88i+oN5D2TDXBY iXQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=EQlsAelW; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s11-20020a65584b000000b0047712cb3fe3si7059001pgr.590.2022.11.26.06.03.08; Sat, 26 Nov 2022 06:03:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=EQlsAelW; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229694AbiKZNfw (ORCPT + 99 others); Sat, 26 Nov 2022 08:35:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229688AbiKZNfU (ORCPT ); Sat, 26 Nov 2022 08:35:20 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 001882181E for ; Sat, 26 Nov 2022 05:34:49 -0800 (PST) Date: Sat, 26 Nov 2022 13:34:47 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669469688; 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=yKxbvGFi6opj3Xg8bXiFsfp4VHNmZocIRZNkr9A0bO4=; b=EQlsAelWBp7fd3i12vQnqGg1ZmHkS01f004xEGmE/tGW8ysY2lSud7eaSDLtBoONO8OXZl nPk+Ek3OxYI+gmowXrud+SRApbODuHssGJQgZi+MdAoE5tu+P4XnS5n+KTsfFVEt3nNFJT Bbt20ALHiH/8qKofqv0FVaPHecXX3n1/uJ1QMIEdP0tQb6Mkf3NLP9nkAiAi2CZSRifLYK aumdZoPNjfS0x2/5qaFoCCJN2lDokAG8i41xHrQMNVnFNirTwYHGUTt9fxP5yq829djjWP o5PioD9vA30poeJKJvpjR/WsmdAusLDtJ0uHtRmsczS6Zf2GfZqjHP8yn2sAwg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669469688; 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=yKxbvGFi6opj3Xg8bXiFsfp4VHNmZocIRZNkr9A0bO4=; b=/6kTGYFXKJqAHCCmPHuW4uUZckQ4iVlN+oMM3jAenE24RZVf/ZRn8CKcLeqnwFWf4T4cbj XRJ2Ph/Ep6tTqGAA== From: "irqchip-bot for Liu Peibao" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-kernel@vger.kernel.org Subject: [irqchip: irq/irqchip-next] irqchip: loongarch-cpu: add DT support Cc: Liu Peibao , Marc Zyngier , tglx@linutronix.de In-Reply-To: <20221114113824.1880-2-liupeibao@loongson.cn> References: <20221114113824.1880-2-liupeibao@loongson.cn> MIME-Version: 1.0 Message-ID: <166946968726.4906.11156861205994702462.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749471793877726912?= X-GMAIL-MSGID: =?utf-8?q?1750567647103010622?= The following commit has been merged into the irq/irqchip-next branch of irqchip: Commit-ID: 855d4ca4bdb366aab3d43408b74e02ab629d1d55 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/855d4ca4bdb366aab3d43408b74e02ab629d1d55 Author: Liu Peibao AuthorDate: Mon, 14 Nov 2022 19:38:23 +08:00 Committer: Marc Zyngier CommitterDate: Sat, 26 Nov 2022 11:54:11 irqchip: loongarch-cpu: add DT support LoongArch is coming to support booting with FDT, so DT support of this driver is desired. Signed-off-by: Liu Peibao Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221114113824.1880-2-liupeibao@loongson.cn --- drivers/irqchip/irq-loongarch-cpu.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/irqchip/irq-loongarch-cpu.c b/drivers/irqchip/irq-loongarch-cpu.c index 741612b..a28b7c5 100644 --- a/drivers/irqchip/irq-loongarch-cpu.c +++ b/drivers/irqchip/irq-loongarch-cpu.c @@ -92,6 +92,25 @@ static const struct irq_domain_ops loongarch_cpu_intc_irq_domain_ops = { .xlate = irq_domain_xlate_onecell, }; +#ifdef CONFIG_OF +int __init loongarch_cpu_irq_of_init(struct device_node *of_node, + struct device_node *parent) +{ + cpuintc_handle = of_node_to_fwnode(of_node); + + irq_domain = irq_domain_create_linear(cpuintc_handle, EXCCODE_INT_NUM, + &loongarch_cpu_intc_irq_domain_ops, NULL); + if (!irq_domain) + panic("Failed to add irqdomain for loongarch CPU"); + + set_handle_irq(&handle_cpu_irq); + + return 0; +} +IRQCHIP_DECLARE(cpu_intc, "loongson,cpu-interrupt-controller", + loongarch_cpu_irq_of_init); +#endif + static int __init liointc_parse_madt(union acpi_subtable_headers *header, const unsigned long end)