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 8D54CCDB465 for ; Thu, 19 Oct 2023 08:18:53 +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:To:Subject: CC: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=l+h2uv27HTIYAysMiNZBgLzlPm0WQJUvPyJsv0fZjpk=; b=zZxfvnTqw+IUAR Q4x34tt/BvTw2qiSxZt/zdm37hxO2W1ld1IvOUmzonGL62NDYe8yeR9pIEEUzzjEZEg3HZi0znT7U ze2H+OTIkD8htFCP+h6TliSRHXSuFrP15qPPvYpVdaPV7oyEeNXJnYY4ewR8bXi+bbHkKGdQEmDEY 9J2rGepMaTNm9Hi9doMfGwXg5IApbsqqLwAqIbYQv2hVrfJ9gSsIUuT2MSi3UbYlA307ePsJDpyri ao2kpQW8pyile3eb6KWFqA7zRmqmgw8sIoToGDqefZOo7IuLJyk0kJ4lj1wGdKyVAWmyDSp5fpupl xbviKnTp6mNYSz7lWGBw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qtOEW-00GgqL-2Z; Thu, 19 Oct 2023 08:18:20 +0000 Received: from fllv0015.ext.ti.com ([198.47.19.141]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qtOET-00GgoZ-2o for linux-arm-kernel@lists.infradead.org; Thu, 19 Oct 2023 08:18:19 +0000 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 39J8Hh66099414; Thu, 19 Oct 2023 03:17:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1697703463; bh=Wa8s9G9TX8ZZJjeLXajpX2z+m7oQdM2kGBrLbOxOhTw=; h=Date:CC:Subject:To:References:From:In-Reply-To; b=Tkz+6AUQhgQbQ/hnXyO4Wkp3GG9ldhyXBYB4/mA6tr8qomMwbGNLUUWMiXzySNYwi IYpBqDdkGOAZF7i5l9for5+ZZ9gJPo3VosbMFOH+KOIqGnJnkW/Nj/JtUfeuCJZjh1 FFoTAujZsa0UAehJ3NLOdyrobqp773m0KRobTY30= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 39J8Hhdm067675 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 19 Oct 2023 03:17:43 -0500 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 19 Oct 2023 03:17:43 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 19 Oct 2023 03:17:43 -0500 Received: from [172.24.227.9] (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 39J8Hc0u107836; Thu, 19 Oct 2023 03:17:39 -0500 Message-ID: <08cb761b-e6ca-446a-9594-bc5a9733b470@ti.com> Date: Thu, 19 Oct 2023 13:47:38 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird CC: , , , , , , , , , Subject: Re: [PATCH v2] PCI: keystone: Fix ks_pcie_v3_65_add_bus() for AM654x SoC Content-Language: en-US To: Serge Semin References: <20231018075038.2740534-1-s-vadapalli@ti.com> <6b74d547-bdaf-41e3-8046-ce295a0ecf03@ti.com> From: Siddharth Vadapalli In-Reply-To: X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231019_011817_987771_210061FD X-CRM114-Status: GOOD ( 18.81 ) 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 Hello Serge, On 19/10/23 10:07, Siddharth Vadapalli wrote: > > > On 18/10/23 17:45, Serge Semin wrote: >> On Wed, Oct 18, 2023 at 05:26:53PM +0530, Siddharth Vadapalli wrote: ... > > Sure. Thank you for the suggestion. I will leave ks_pcie_ops as-is for the older > 3.65 controller while adding the ks_pcie_am6_ops without the .add_bus method for > the newer 4.90 controller. I assume this should be acceptable since the > pci-keystone.c driver only has two controller versions, namely 3.65a and 4.90a, > with the new 4.90a controller only applicable to AM654x SoC which is already > being distinguished in the driver using the is_am6 flag. > > In the v3 patch, I will add the following: > > static struct pci_ops ks_pcie_am6_ops = { > .map_bus = dw_pcie_own_conf_map_bus, > .read = pci_generic_config_read, > .write = pci_generic_config_write, > }; > > and also update ks_pcie_host_init() to the following: > if(ks_pcie->is_am6) > pp->bridge->ops = &ks_pcie_am6_ops; > else > pp->bridge->ops = &ks_pcie_ops; > >> >> Meanwhile your fix look more like a workaround. The >> ks_pcie_v3_65_add_bus() function will be still called for the AM6x >> v4.90 controllers, which based on its semantic would be and will be >> wrong in any case. So instead of noop-ing the function it would be >> better to just drop it being called for the new controllers. > > Yes, I will drop it for the new 4.90a controller rather than making it a no-op. I have posted the v3 patch at: https://lore.kernel.org/r/20231019081330.2975470-1-s-vadapalli@ti.com/ implementing your suggestion of adding a new pci_ops structure. Please review it and let me know in case of any feedback. -- Regards, Siddharth. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel