From patchwork Tue Sep 15 11:00:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grzegorz Jaszczyk X-Patchwork-Id: 303987 Delivered-To: patch@linaro.org Received: by 2002:a92:5ad1:0:0:0:0:0 with SMTP id b78csp2430991ilg; Tue, 15 Sep 2020 04:15:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynnYBKQ6Wyf94Npywzgo86nItAwmJES95W8ow61FeGpEC+OdEP78CGcweepvXfADVWEwcE X-Received: by 2002:a17:906:82d1:: with SMTP id a17mr19323882ejy.385.1600168545027; Tue, 15 Sep 2020 04:15:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600168545; cv=none; d=google.com; s=arc-20160816; b=UXN1SZbQBeHhWQGlIR9Lqgu3bxLjra/bPuC5f1RyCFyu6ovFu+/W8x3grU5YrpfSA8 kh59+Uik17FmmqJt7zryu3qLLXRiIiisKpqWjzV+8GcuF27xvRV/cMaTF9Bn4s1LbdVK VBFwrQNeGuvjw4UKyQNLP2rpX8tus6toBed+C62kWbJ4+f7de9HG722MEpkM+U07OG8o Ot532D5yxbJALFTiwfC1TU0MgCAxyIOx4H600tfzYAer4JhWsAAALl4Q8fDE1zjdC6gk SiaWMUvGv3r8a3wktqELaURXfLRw/hmibq0hu1CgfRP4yR7ytreVQAssL6aUjvcFNu91 d3SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=mc2gdazpP2I7bg6WRsLz8UwRyinpHdK0stSWn7q23gw=; b=IY4uxP39My+AcEV+4VgMQBMuBmproGYeCQVICtcH9gi/00m1fL9OafzMt9S/NzEwMi 0iFiYmVFJcEj112lHU4INpP37h4rCM918oDmdCb/Ej+dpxPF224gmKXdpc2bpwtd2yG2 nGOVj+USZw1s2Tu/iSXxLLr6XLx+XwPW/KNcSYSgAWDMntVGB8koQrCsonoAYQ67lROs 1ZvCj/WL00ZDekiZJm9iqryZKJfMg2RVSIqNlv2BSnArOsZJJfB6HEXS+h+IY/ReVEDI fFugZTNaCu10xdhTSVUtbNCXhXb6jVayI+HrvX+p3nbXEUakDLZupdo00Oyg5uz+4FXk tCzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="WjZlN/Kd"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c4si9649042edw.41.2020.09.15.04.15.44; Tue, 15 Sep 2020 04:15:45 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="WjZlN/Kd"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726133AbgIOLO4 (ORCPT + 6 others); Tue, 15 Sep 2020 07:14:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726082AbgIOLNR (ORCPT ); Tue, 15 Sep 2020 07:13:17 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02C18C06121D for ; Tue, 15 Sep 2020 04:01:31 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id u21so2407268ljl.6 for ; Tue, 15 Sep 2020 04:01:31 -0700 (PDT) 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=mc2gdazpP2I7bg6WRsLz8UwRyinpHdK0stSWn7q23gw=; b=WjZlN/Kd9Jjxj+pMCooXrtqM/Mbi0szwmTXaJ7skiL/yJ5v/3ifkWd5b/hsdl5pPaq JBv/2KOxLgfMry2/ioIZAV9/oRcP9+nkFJyAUzwBcbyaRSfazV9xJvJMJE5AuXtzGdTS KNswQQrHg28VxTj2qkvyl/G1Kd56qkD9wzLZFuMfa8KhP2wREIPZ+pGNTxIyAPNP7JLC SpaPsbtFbM0Y6pgCO0PPD6BACZHwiSIgMZusSUzrUSX8WhA/a3yGEVl+RYOUXdAQkqsG vPmkFc/nLjlgLirmnrW/qNsLeX3NGpeNinQSLd2S7DF09oAg+p2dwGSBv38MguzYpYS3 h9+Q== 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=mc2gdazpP2I7bg6WRsLz8UwRyinpHdK0stSWn7q23gw=; b=c67r9rZGo2zY4ANobjhoBbGJZhJLQJAgoq66AJxz30YaiDcKcBtbc739mXyQYPWkv8 39FDWyMdgj1HFW23Yi3UK0guTPOf6aIeywQWwhBF2iaPJuJLyKLb0dkOrrng2YS2eTT7 j7tz4pwAr8Zu9mDd5ta8TRpR4R5gb/i2q5QIiw/0TQmPAwpolnTHB1y3uqKLdNb79GT/ +BIeP9diMHwW8MHfzuMMy0zEmrblzM+ChXwqCT74W8R3pHSSN6QBpUfeSyOPhgN3aXDz xsl9xFZX4JpYPi9onOuA2VW1cOtL5g6JOFT7w3d5MXVvdJgeujafXOBVAWIzoEV4IZ9k TSJw== X-Gm-Message-State: AOAM5304F0osrNDuDGs4i1OhvSJ0ODDV2pcU2hGPQdX8SoODyww2eZ+t t5iTERgqImEb/HIvK6Awk/JCHw== X-Received: by 2002:a2e:895a:: with SMTP id b26mr6623334ljk.468.1600167685701; Tue, 15 Sep 2020 04:01:25 -0700 (PDT) Received: from gilgamesh.semihalf.com (193-106-246-138.noc.fibertech.net.pl. [193.106.246.138]) by smtp.gmail.com with ESMTPSA id n3sm4588916ljj.59.2020.09.15.04.01.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Sep 2020 04:01:25 -0700 (PDT) From: Grzegorz Jaszczyk To: tglx@linutronix.de, jason@lakedaemon.net, maz@kernel.org, s-anna@ti.com Cc: grzegorz.jaszczyk@linaro.org, robh+dt@kernel.org, lee.jones@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, david@lechnology.com, praneeth@ti.com Subject: [PATCH v6 5/5] irqchip/irq-pruss-intc: Add support for ICSSG INTC on K3 SoCs Date: Tue, 15 Sep 2020 13:00:51 +0200 Message-Id: <1600167651-20851-6-git-send-email-grzegorz.jaszczyk@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1600167651-20851-1-git-send-email-grzegorz.jaszczyk@linaro.org> References: <1600167651-20851-1-git-send-email-grzegorz.jaszczyk@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Suman Anna The K3 AM65x and J721E SoCs have the next generation of the PRU-ICSS IP, commonly called ICSSG. The PRUSS INTC present within the ICSSG supports more System Events (160 vs 64), more Interrupt Channels and Host Interrupts (20 vs 10) compared to the previous generation PRUSS INTC instances. The first 2 and the last 10 of these host interrupt lines are used by the PRU and other auxiliary cores and sub-modules within the ICSSG, with 8 host interrupts connected to MPU. The host interrupts 5, 6, 7 are also connected to the other ICSSG instances within the SoC and can be partitioned as per system integration through the board dts files. Enhance the PRUSS INTC driver to add support for this ICSSG INTC instance. Signed-off-by: Suman Anna Signed-off-by: Grzegorz Jaszczyk --- v5->v6: - No change. v4->v5: - Rename: s/num_host_intrs/num_host_events/ regarding to change introduced in patch #2. v3->v4: - Move generic part to "irqchip/irq-pruss-intc: Add a PRUSS irqchip driver for PRUSS interrupts" patch and leave only platform related code. v2->v3: - Change patch order: use it directly after "irqchip/irq-pruss-intc: Implement irq_{get,set}_irqchip_state ops" and before new "irqchip/irq-pruss-intc: Add event mapping support" in order to reduce diff. v1->v2: - https://patchwork.kernel.org/patch/11069773/ --- drivers/irqchip/Kconfig | 2 +- drivers/irqchip/irq-pruss-intc.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig index 733e59f..25c8944 100644 --- a/drivers/irqchip/Kconfig +++ b/drivers/irqchip/Kconfig @@ -495,7 +495,7 @@ config TI_SCI_INTA_IRQCHIP config TI_PRUSS_INTC tristate "TI PRU-ICSS Interrupt Controller" - depends on ARCH_DAVINCI || SOC_AM33XX || SOC_AM43XX || SOC_DRA7XX || ARCH_KEYSTONE + depends on ARCH_DAVINCI || SOC_AM33XX || SOC_AM43XX || SOC_DRA7XX || ARCH_KEYSTONE || ARCH_K3 select IRQ_DOMAIN help This enables support for the PRU-ICSS Local Interrupt Controller diff --git a/drivers/irqchip/irq-pruss-intc.c b/drivers/irqchip/irq-pruss-intc.c index 41c6271..4be501e 100644 --- a/drivers/irqchip/irq-pruss-intc.c +++ b/drivers/irqchip/irq-pruss-intc.c @@ -628,11 +628,20 @@ static const struct pruss_intc_match_data pruss_intc_data = { .num_host_events = 10, }; +static const struct pruss_intc_match_data icssg_intc_data = { + .num_system_events = 160, + .num_host_events = 20, +}; + static const struct of_device_id pruss_intc_of_match[] = { { .compatible = "ti,pruss-intc", .data = &pruss_intc_data, }, + { + .compatible = "ti,icssg-intc", + .data = &icssg_intc_data, + }, { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, pruss_intc_of_match);