From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 836AF307480; Tue, 24 Jun 2025 15:41:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750779660; cv=none; b=QAvXLa6qgEOVx5OdFxou6GXgtVjz4CKuUCAwzSdyOcamP97v2TUQZqhke0ernH1rIFLf2FoI0oXAHLFDbP71nuEt1if3W6CwW7oO3rJiIgQzIopoT+VE8mdk/kfUqHOMcmkHBjbAhSYXt4vqZyHL43y09kwPWEL/0kZZkWucX5w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750779660; c=relaxed/simple; bh=V4cFT1hqRldsR5zu8HOg3Q2LTneYk9DIMbOYJXD5/V0=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=MwKWmF7fKgq/MOHyZpCsMkz3xwYVdFWh9LKNkmCyRLaF49jPa3eCAnqerfdAUvgB1CLb+k3q6XUugkBy/lOZTDuhs5kBV42PTJVUm24gkb0HGsoxOfzC4w+0qKqJrfLY0H89D2MVUpieEi0gJSOJrolmII3rGJYYbZgFaKvlsyY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SpBF33O5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SpBF33O5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D022AC4CEE3; Tue, 24 Jun 2025 15:40:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1750779660; bh=V4cFT1hqRldsR5zu8HOg3Q2LTneYk9DIMbOYJXD5/V0=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=SpBF33O5DmWK2ju99YB+4lma9jKXpW06Qy7WaO72fUGRR1bwapxUreARlC7ACWT6K d7vv4X3sGIn9LGbgcTNo3m5HJIra8v37CKiK8VkCbUNooIqlcYyh8VByADcphLjB9W hYlSLlPFnIJKGwnFPitY38ytqBnIwNYFchiWpKgQFsRDQMDIhi5yhHtaKUrJqUIfhI M+utXRuCz03/g3TIw4+WeJGu3yf5PFgqTBHYBduyJ+DgVZQ5TroV2E01VPGEMlzJrk LU61+IsoQyxe1V5snMuI1Aeg04lidkunp9VMazrO8DDzUHZSLfluTSyWQAZA4nsWG6 Cps8jR3ACfGjQ== Date: Tue, 24 Jun 2025 10:40:58 -0500 From: Bjorn Helgaas To: Jacky Chou Cc: Ilpo =?utf-8?B?SsOkcnZpbmVu?= , "bhelgaas@google.com" , "lpieralisi@kernel.org" , "kwilczynski@kernel.org" , "mani@kernel.org" , "robh@kernel.org" , "krzk+dt@kernel.org" , "conor+dt@kernel.org" , "joel@jms.id.au" , "andrew@codeconstruct.com.au" , "vkoul@kernel.org" , "kishon@kernel.org" , "linus.walleij@linaro.org" , "p.zabel@pengutronix.de" , "linux-aspeed@lists.ozlabs.org" , "linux-pci@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , LKML , "linux-phy@lists.infradead.org" , "openbmc@lists.ozlabs.org" , "linux-gpio@vger.kernel.org" , "elbadrym@google.com" , "romlem@google.com" , "anhphan@google.com" , "wak@google.com" , "yuxiaozhang@google.com" , BMC-SW Subject: Re: [PATCH 7/7] pci: aspeed: Add ASPEED PCIe host controller driver Message-ID: <20250624154058.GA1478094@bhelgaas> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Mon, Jun 23, 2025 at 05:41:13AM +0000, Jacky Chou wrote: [Apparently you trimmed out some of the lines that show who said what; there should be more lines here like: > On Fri, Jun 13, 2025 at 03:03:55PM +0300, Ilpo Järvinen wrote: > > On Fri, 13 Jun 2025, Jacky Chou wrote: ] > > > +#include #include > > > +/* TLP configuration type 0 and type 1 */ > > > +#define CRG_READ_FMTTYPE(type) (0x04000000 | (type << 24)) > > > +#define CRG_WRITE_FMTTYPE(type) (0x44000000 | (type << 24)) > > > > These are straight from PCIe spec, right? > > > > I think those should come from defines inside > > include/uapi/linux/pci_regs.h, there might not be one already, so > > you might have to add them. > > > > I also think you should actually use the type as boolean, and > > return one of the two defines based on it. A helper to do that > > might be generic PCI header material as well. > > > > Agreed. This definition is used on TLP header. Maybe I will try to > add some definitions to pci_regs.h or pci.h This values might come from the PCIe spec, but unless they are needed outside drivers/pci, any #defines should probably go in drivers/pci/pci.h.