Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1259040ybi; Wed, 17 Jul 2019 12:06:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqxddFiTDTXsAWiZewHzJiidnUoC79KMZ94phN6Gs8rbvzuP4l6SV6MSVN5ZRsqgzk4aDFlu X-Received: by 2002:a65:64cf:: with SMTP id t15mr41665703pgv.88.1563390378212; Wed, 17 Jul 2019 12:06:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563390378; cv=none; d=google.com; s=arc-20160816; b=PSmv9vNrLTPyl4VQ9J3mF4qsQxFBU23+tKv5E8X8umvGYyOp6I4wSsEA2pnwxGLgAI GYW0Z5p2eZMPrBEn5q5hVz6GSv1OGAq4sRqNibfbsHIe7gYx5JU3I1LHVCZfdhZBcsjv QxI+Q8Fx4HAyVcFkKKmEW1eF/EGPL5LaPF+3cb9Mqzronbuk6ydwfJstKFApDpfxP1tx 0lc5LP1ZjgbNGg+2TffANbC/Iq54VuuW2stFwyvcllry2cNrgwl5zWNJp9wKSTyeF7nT 3EKcFTZ8cSl7qd1iJzMcCR8WOzS6dwohHyzdbeAc0CGK2f6gKArUhTTlIfFwL1awocWM +Sow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=cKjpTi+qr5+DtTcVUPXCxDEH24Hpo9wYFkLl96rVLR0=; b=C7mqH/o6kgkiWTV8Zd5yVmp6Hgoq2hSyiSYGYu1LzYtFm7P+W02xTv4fXFFoJk8n/4 9A3A3h/CF2VqvGw8eW2bJCd8D0+IC54W6nec/XKuVlvNydirVuetCfhTPGlYatvUdfqw eoeUEZGzg2Dk47NEgmSy9GJPt2Cfb7dLSMUI7RkjnjkvKSwgibcvAry7xlGzZDrDxqyH V4UVtJJ6ZO2yRHfkSE4DWuInECU/Ds1sU8sGychwj0JJwdvusCok0/JUzXHdSVPl76gX G4HcXGR7RE39Yx+YyMLN0wKc+G4ltw/9l6rrRn+CQh4jQnstDveOUFQ5BO4CUWrJBik+ +XIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ZmeK99JI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f21si5482722pgj.263.2019.07.17.12.06.01; Wed, 17 Jul 2019 12:06:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ZmeK99JI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727291AbfGQTFg (ORCPT + 99 others); Wed, 17 Jul 2019 15:05:36 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:52894 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726620AbfGQTFg (ORCPT ); Wed, 17 Jul 2019 15:05:36 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x6HJ4Yp4107033; Wed, 17 Jul 2019 14:04:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1563390274; bh=cKjpTi+qr5+DtTcVUPXCxDEH24Hpo9wYFkLl96rVLR0=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=ZmeK99JI3DppkZOFL4MpPQd/ahfSGj1YnyHtfxJD43RhfY+exbAI+iqIsMQjlMBtk yeoQNtRbG22+j+01s3kHMVMgM8oxSQl6LyQ+L963l7gE7wQy1CJQBk/QS8K85i5bNh jMdT6YYV6ZgLXEG4kPVOc1jhMFuRZuiyf4u851QE= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x6HJ4YIw110220 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 17 Jul 2019 14:04:34 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 17 Jul 2019 14:04:34 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Wed, 17 Jul 2019 14:04:34 -0500 Received: from [128.247.58.153] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x6HJ4XN0102793; Wed, 17 Jul 2019 14:04:33 -0500 Subject: Re: [PATCH 4/6] irqchip/irq-pruss-intc: Add helper functions to configure internal mapping To: David Lechner , Marc Zyngier , Rob Herring , Thomas Gleixner , Jason Cooper CC: Tony Lindgren , "Andrew F. Davis" , Roger Quadros , Lokesh Vutla , Grygorii Strashko , Sekhar Nori , Murali Karicheri , , , , References: <20190708035243.12170-1-s-anna@ti.com> <20190708035243.12170-5-s-anna@ti.com> <9aa5acd8-81bf-10dc-5a86-cea2acd1132b@lechnology.com> <23ae1767-3531-ea57-2c82-f2657baa123f@ti.com> <22825f06-d968-03a7-585b-8cbf4123915c@lechnology.com> From: Suman Anna Message-ID: Date: Wed, 17 Jul 2019 14:04:33 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <22825f06-d968-03a7-585b-8cbf4123915c@lechnology.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/17/19 12:57 PM, David Lechner wrote: > On 7/16/19 6:29 PM, Suman Anna wrote: >> Hi David, >> >> On 7/10/19 10:10 PM, David Lechner wrote: >>> On 7/7/19 10:52 PM, Suman Anna wrote: >>>> The PRUSS INTC receives a number of system input interrupt source >>>> events >>>> and supports individual control configuration and hardware >>>> prioritization. >>>> These input events can be mapped to some output host interrupts >>>> through 2 >>>> levels of many-to-one mapping i.e. events to channel mapping and >>>> channels >>>> to host interrupts. >>>> >>>> This mapping information is provided through the PRU firmware that is >>>> loaded onto a PRU core/s or through the device tree node of the PRU >>> >> >> Thanks for the thorough review and alternate solutions/suggestions. >> >>> What will the device tree bindings for this look like? >> >> They would be as in the below patch you already figured. > > Ah, makes sense now: the mapping is defined in the remoteproc node > rather than in the interrupt controller node. Actually in the PRU consumer/application node, but the client driver need not deal with invoking any special API. The functions are called transparently by the PRU remoteproc driver when the PRU client driver acquires a PRU. The 4th cell was used to identify the PRU from the list of prus in the client node. regards Suman > >> >>> >>> Looking back at Rob's comment on the initial series [1], I still think >>> that increasing the #interrupt-cells sounds like a reasonable solution. >>> >>> [1]: https://patchwork.kernel.org/patch/10697705/#22375155 >> >> So, there are couple of reasons why I did not use an extended >> #interrupt-cells: >> >> 1. There is only one irq descriptor associated with each event, and the >> usage of events is typically per application. And the descriptor mapping >> is done once. We can have two different applications use the same event >> with different mappings. So we want this programming done at >> application's usage of PRU (so done when a consumer driver acquires a >> PRU processor(s) which are treated as an exclusive resource). All the >> different application properties that you saw in [1] are configured at >> the time of acquiring a PRU and reset when they release a PRU. >> >> 2. The configuration is performed by Linux for all host interrupts and >> channels, and this was primarily done to save the very limited IRAM >> space for those needed by the PRUs. From firmware's point of view, this >> was offloaded to the ARM OS driver/infrastructure, but in general it is >> a design by contract between a PRU client driver and its firmware. Also, >> the DT binding semantics using interrupts property and request_irq() >> typically limits these to interrupts only being requested by MPU, and so >> will leave out those needed by PRUs. >> > > Hmm... case 1. is a tricky one indeed. If there are going to be times where > an event requires multiple mappings, I agree that this doesn't seem to fit > into any existing device tree bindings. > >