From patchwork Wed Sep 16 16:36:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grzegorz Jaszczyk X-Patchwork-Id: 312563 Delivered-To: patch@linaro.org Received: by 2002:a92:5ad1:0:0:0:0:0 with SMTP id b78csp651504ilg; Wed, 16 Sep 2020 10:10:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAB2nQLpf5yi3/KUkOLMCXsXICFDarSNQL3U8k/sT3n6dDLj/nsXGOKOSYNryxGDI5rzvf X-Received: by 2002:a17:906:2786:: with SMTP id j6mr26144893ejc.73.1600276224076; Wed, 16 Sep 2020 10:10:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600276224; cv=none; d=google.com; s=arc-20160816; b=pFjdTwS71LXY1ApdIel1XEzuIiUDupxCPcKVJ5HctWfhX714zLpFixcG+xqKXOBUbe avAxTkwmFrbM8u0cdIMsF/HLIPCkgr7Xeyzp5Z+QhJelBg/vUSe8yQpWNdBxaXrWHLsp 1Cg+KOp+L2gJPwaL9dv7y5sFfVdE8hyrvddTEtO+WjwGea9VByJs/DvoeyO543fWDgBc zIpXbpdfkSE2yBh6DkjjNT36PKuLxGzhMoufLFqBqo71uOeFhHTopxkHV+jNlgdc1dRt 4CmDGHZyGOocjPsqjI4FX8KoW2s83VeOk9M09k7Q4cSc43trQ3Lgu8+OiHh0cqPtZm0R fZaw== 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=i7gj/Nh8EGIMLYny0ckHHCC3KzEEY3dk78DyFkalFas=; b=WlHC5iKTS356xlLadRqy9STRyPPysmrdOEtm/MTjGN7+7t+XsqstughZvEHiZLGgFn Vb7X0Yb3CE6l3yonzqkFdLQ/dcpqXJ/OVrW+t0R7VxwWvt5N7x2SStAhjxOYGjOEZFYM QhJW4g/4PeXRz7FbzP5Z8ypYuHV1S2QA38yfdXIVKkJspT64YG9PPluRL0Un9IKDBzw1 MLZPNN/r8UUgN8ZJpHwiAhJHRRCXLbfRdHeSunWRwEkNiFdNGxtoAc53CgPXmrrZ4Uoa d0ledZl14ecsISBKeCS/58j7qyc+6a5S5XyzorlKgDILAJvdel64JPd/TOg+9Hp3Ty8I mayQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OXV2czXH; 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 ca20si12864501edb.445.2020.09.16.10.10.23; Wed, 16 Sep 2020 10:10:24 -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=OXV2czXH; 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 S1726873AbgIPRKN (ORCPT + 6 others); Wed, 16 Sep 2020 13:10:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726854AbgIPRJW (ORCPT ); Wed, 16 Sep 2020 13:09:22 -0400 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD189C02C2B9 for ; Wed, 16 Sep 2020 09:37:12 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id q8so7684880lfb.6 for ; Wed, 16 Sep 2020 09:37:12 -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=i7gj/Nh8EGIMLYny0ckHHCC3KzEEY3dk78DyFkalFas=; b=OXV2czXHSzNB9gK5puIx4OtBccuHuoEEXxTJymesg/maaUyhIbM4Fp67x5jajv9xHZ ky++sC7oCo8Ln/6QkYF+T28lpqc7eFfJRuv8wx2mYDF3PEVoQ2Rsrm6ZMKrwIWHNnOKo y3+OacNOhef2bvFe61dQWjg53Z9MfRuAMNqzRbdiSvDYlatalaUsUiB2m8nY9t+xgD04 /VoWYu3MjSidCsvpVLuLd/QNmEYcv2RvrMLyYeG5Jk+ja7oG4nq7fpF3Em4kz06wuQa0 Q2L8pevz8GXJ+FoYBjJsxwTLumKGa1yZ7gV/3RI2zxdc00Mo6Hc4+ui1U03TQP6YmkVk C+QQ== 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=i7gj/Nh8EGIMLYny0ckHHCC3KzEEY3dk78DyFkalFas=; b=NdeIC6Gs5il6GVcWfoqV2uG1jovnli+I8x/ot0NplU5Zzs+iFpIeYZHpkOW8d62h8r IWLBcjBu+PPfEOCsBXKVmY7n0QU0Ha0lZvrPgTuLj8QQEirBOKD+sqqcoAaF2Vy+QTNn /hVIn1Do7pT7SHN1RUJndHN0Ie0YHFIsnIZzD0PTnH+UAa0Tadbo86T16bTDpkcwZywu AKvlXrHySjJT55FBhZxmZbmNTk3vZaIlxSWe6a6iMSJ9+ZlOsSp2Zio3cPqEEktyVfLM O0CFPBQhEIoK7FqnILMgLoO6TSY9VLhAoB4vGToS/6PxinU7gU2JmcpNL8keIYmMnhLX lhWg== X-Gm-Message-State: AOAM533NPLr+Ia6pq5kDQK8eFbjfyr3dCMylPgXKY7omYpXdLBGT4SUt kqzci+AOyU8o7vHvK/A41rgI2orPMpSfPQ== X-Received: by 2002:a19:8142:: with SMTP id c63mr7926347lfd.175.1600274231059; Wed, 16 Sep 2020 09:37:11 -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 o15sm4684400lfo.188.2020.09.16.09.37.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Sep 2020 09:37:10 -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 v7 5/5] irqchip/irq-pruss-intc: Add support for ICSSG INTC on K3 SoCs Date: Wed, 16 Sep 2020 18:36:38 +0200 Message-Id: <1600274198-30470-3-git-send-email-grzegorz.jaszczyk@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1600274198-30470-1-git-send-email-grzegorz.jaszczyk@linaro.org> References: <1600274198-30470-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 Co-developed-by: Grzegorz Jaszczyk Signed-off-by: Grzegorz Jaszczyk --- v6->v7: - Add Co-developed-by tag. 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 bfe529a..92fb578 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);