From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E8D1CC05027 for ; Wed, 15 Feb 2023 02:39:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=voVwL17s3V2BbNVXjT0mY8Zm4+eaZfDLSqV1hrabVsU=; b=GUJLX0io39Xx7f Q/cRRSuazvo1qfm7DX0DvRN2tmRmbrhySAO89K0CBKR+GWiSINpD1gEhcxZHN89OWzcHUZ0NFFCam OBzZHg7cenjnfUz1YrL4r448VWxy8gCqj05sdsdhOKU26HY/bUAsgqp164JC1SwBEz1WQnDAA5qwX +b0Kf4BmUhmUdI6NP7QgFfIB0gp1Pd7QdVbao0xS5LPzhiezbTQA7s/1quNtTbuIwnD9DcapLhffx KsKPjv3gxYMykxIJ5becLV/qQDw5EJ9JoVUvh+yDPJiWuRvfURw6bijiGDXJqPVSnE17ZHME7Nsak E5S0/W9PYOeo1Zl5vYGw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pS7hD-004Pc6-1k; Wed, 15 Feb 2023 02:38:59 +0000 Received: from esa4.hgst.iphmx.com ([216.71.154.42]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pS7hA-004Pb7-DF for linux-arm-kernel@lists.infradead.org; Wed, 15 Feb 2023 02:38:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1676428736; x=1707964736; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=LRGknKhxil6Qohqe+Jm3wtRMBjwrnnr85uMuaDhF6bI=; b=PEoDuqr7mdUJwNeKkfO6xNxa0MhHO0YCT1uoEU+mQu98AkbGPdm7gxs/ CvOg7AEqyYe9/k8VeLbAbdGkbWG8VbPnt1OMIZD4K89/K1dgnHzZ3Lqjd gjYDdBzMhxRrG/GWrRmD35YCPRknLZD6schBkympxvjwIt+44cP1hlw6L nS/Vaz+I062ELuNXqLhZxQzyelC4qP4oDaUxb2idEeNM8w3VKFlITVY3J poHHCAxYFi5u2HmWk6MqkpDzvmfOcN2uzPGWsZ1MhWGZszkw+VdwBvmoq gYI56uTk3wnvLGcc8/wxlkTAnyYVk2GNvhzfKXMref/Fz5bY+fly6DBs+ Q==; X-IronPort-AV: E=Sophos;i="5.97,298,1669046400"; d="scan'208";a="221626862" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 15 Feb 2023 10:38:55 +0800 IronPort-SDR: ecXN9MfgQicyydD4LCWeSY6/C/YlypQ8SV6uS3x10TbQnxGa6LRupo4ed/8GRHhRmvXv/qw45Q k/GiO05tQ77D/IJUIozWcrMwY5AbMIjNGlfa6WErGRQ2AHA/1oek0C+yYPGi2pQtlNyiXAsqf5 2wNGF1cM+2jUmVm6rqkgU2o8WOG8agS5xMnTQkXpMhAbuXHAUE6T4Ez2j5iGGGMO8g1ALFxZGB Bd3yDn0gc4y90GvoqbluQygBuuk2qcTd53VPtl1lG5+z+mUX05AwRsKsgD+5r1g/GNzc3BRRfi hAE= Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 14 Feb 2023 17:50:17 -0800 IronPort-SDR: Z+ldZivPdTfJq7JWxZc48vrD+NlW1uirTh8z7b7kQbhD/DTonf4XxjCdIwQfiOEp61LJj1qgeW 6IHMX/dxGrItHDw7VFXGu690wwYzivvzCoEKGA5VEfBCi42UQ9DsXmKF7QnnC/lHjESRsQBiVx 222GKIE/nXrL4qUMWFoLR+Dvscr5fgS2CMlaTDEat8zYWffxTFJFzZ/Vr/wsPAc0FVQyyBEDgs gpQvoWZH8B9f33EGVYY11ntOS9iwrRmihIJqYeMowEw9/+ROghxj5ZHE5X3DbsdMJZLDFCH0ou iu0= WDCIronportException: Internal Received: from usg-ed-osssrv.wdc.com ([10.3.10.180]) by uls-op-cesaip02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 14 Feb 2023 18:38:54 -0800 Received: from usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTP id 4PGj264yzQz1RwvL for ; Tue, 14 Feb 2023 18:38:54 -0800 (PST) Authentication-Results: usg-ed-osssrv.wdc.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=opensource.wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= opensource.wdc.com; h=content-transfer-encoding:content-type :in-reply-to:organization:from:references:to:content-language :subject:user-agent:mime-version:date:message-id; s=dkim; t= 1676428733; x=1679020734; bh=LRGknKhxil6Qohqe+Jm3wtRMBjwrnnr85uM uaDhF6bI=; b=HFn/XTBOmCRXwNl1rv11Q40ZgxO+WDnGEOvySfbGvYcTidahx62 0dVss0hxRSODx5fmEDRcNRrAHVRULPb3zexnP5C/mfGiyT6aeU3BOxWRtMwjOJ20 B2GOfq0VTpQeTF8/ZoDgSiQst/+PTxvXfh06iiHVdxMPDEaffExqQK3d6zbPOb/k aJcrxb8uak5xKl3NmDtG0eMHfhOaCoDo67SwHXZbY4nVgVeQD6CutSyDih5ZtImx 5eh8YjmMo6I2absY993+zR8I2QAFKKlc2fVkSODrt/eTiSxshauQ8EXXvLSpw2Zm oIr7IE34agdo4CiA1rbFyt7aWmy7dWyz3mw== X-Virus-Scanned: amavisd-new at usg-ed-osssrv.wdc.com Received: from usg-ed-osssrv.wdc.com ([127.0.0.1]) by usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id utfzvYqe0pky for ; Tue, 14 Feb 2023 18:38:53 -0800 (PST) Received: from [10.225.163.116] (unknown [10.225.163.116]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4PGj222VYbz1RvLy; Tue, 14 Feb 2023 18:38:50 -0800 (PST) Message-ID: Date: Wed, 15 Feb 2023 11:38:48 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH v2 7/9] PCI: rockchip: Fix legacy IRQ generation for RK3399 PCIe endpoint core Content-Language: en-US To: Rick Wertenbroek , alberto.dassatti@heig-vd.ch Cc: xxm@rock-chips.com, rick.wertenbroek@heig-vd.ch, stable@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Shawn Lin , Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=c5=84ski?= , Bjorn Helgaas , Jani Nikula , Mikko Kovanen , Rodrigo Vivi , Greg Kroah-Hartman , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org References: <20230214140858.1133292-1-rick.wertenbroek@gmail.com> <20230214140858.1133292-8-rick.wertenbroek@gmail.com> From: Damien Le Moal Organization: Western Digital Research In-Reply-To: <20230214140858.1133292-8-rick.wertenbroek@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230214_183856_562180_6AEB8EE9 X-CRM114-Status: GOOD ( 21.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2/14/23 23:08, Rick Wertenbroek wrote: > Fix legacy IRQ generation for RK3399 PCIe endpoint core according to > the technical reference manual (TRM). Assert and deassert legacy > interrupt (INTx) through the legacy interrupt control register > ("PCIE_CLIENT_LEGACY_INT_CTRL") instead of manually generating a PCIe > message. The generation of the legacy interrupt was tested and validated > with the PCIe endpoint test driver. > > Fixes: cf590b078391 ("PCI: rockchip: Add EP driver for Rockchip PCIe controller") > Cc: stable@vger.kernel.org > Signed-off-by: Rick Wertenbroek > --- > drivers/pci/controller/pcie-rockchip-ep.c | 38 +++++------------------ > drivers/pci/controller/pcie-rockchip.h | 6 ++++ > 2 files changed, 14 insertions(+), 30 deletions(-) > > diff --git a/drivers/pci/controller/pcie-rockchip-ep.c b/drivers/pci/controller/pcie-rockchip-ep.c > index cbc281a6a..ca5b363ba 100644 > --- a/drivers/pci/controller/pcie-rockchip-ep.c > +++ b/drivers/pci/controller/pcie-rockchip-ep.c > @@ -328,45 +328,23 @@ static void rockchip_pcie_ep_assert_intx(struct rockchip_pcie_ep *ep, u8 fn, > u8 intx, bool is_asserted) > { > struct rockchip_pcie *rockchip = &ep->rockchip; > - u32 r = ep->max_regions - 1; > - u32 offset; > - u32 status; > - u8 msg_code; > - > - if (unlikely(ep->irq_pci_addr != ROCKCHIP_PCIE_EP_PCI_LEGACY_IRQ_ADDR || > - ep->irq_pci_fn != fn)) { > - rockchip_pcie_prog_ep_ob_atu(rockchip, fn, r, > - AXI_WRAPPER_NOR_MSG, > - ep->irq_phys_addr, 0, 0); > - ep->irq_pci_addr = ROCKCHIP_PCIE_EP_PCI_LEGACY_IRQ_ADDR; By the way, ROCKCHIP_PCIE_EP_PCI_LEGACY_IRQ_ADDR is now unused. Remove it too please. -- Damien Le Moal Western Digital Research _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel