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 B214EC3DA63 for ; Fri, 26 Jul 2024 05:08:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3rKwuSlqAIySxz11l4PWG6VIoo7RMKChxKPZ2GCuBEY=; b=koCAG1hRyBVRc9bD8EeoFuNL9r gsYjHqtWvv8zvbIiRwQwFErbaI4qONvIKAY+ezBfAmudy5ArbLbn7eTHEzwT8QU9rQqHDURHSgfdV 2Mhve0qPp17Suc02ReHdvVoLH20ChhRnIepAr34IgO0h0vg5EH9S+ifr428tYC+62+Fp9Z/1sDCXU 7jh0jZcYHySEl1IYqXApl6Q1fVSemmT5OUEzhLIBKhaEgG5RTncY/YiZqtyt+3TF4CwI+hUMoTGq3 qBrdeoY/oVZejiigOfgMWgui6FMdFVQkpz49VKEhMjGbGuD+69vCXJk6WW4npfSREHingxJcla2H8 p9B+WDrg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sXDC1-00000002vB7-166h; Fri, 26 Jul 2024 05:08:37 +0000 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sXDBc-00000002v5t-0hFn for linux-arm-kernel@lists.infradead.org; Fri, 26 Jul 2024 05:08:13 +0000 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-70eaf5874ddso521392b3a.3 for ; Thu, 25 Jul 2024 22:08:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721970491; x=1722575291; darn=lists.infradead.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=3rKwuSlqAIySxz11l4PWG6VIoo7RMKChxKPZ2GCuBEY=; b=kdmsNQFSAD4VoEt+BbxaxXPOB+xsT05dpZzjsmHbpns0EcQ0ddasTFLcemBzIU3tAG hOJW4ksi4CIrXTtR38jlzt0Qm5R7FNs4XXQ35HQCJ0Em1jeV8ldhX1xlRL+zHBuRxGXf D5sIn/BA3A25b+2hDrEU0bmvJKMYHHO/9H2Fp3ul3hjq2/tkJqbSQMOSmgSXcDwAJk8n mPtWJFwxSi+FZ8AMnsB3y3S1sqfCtJAJDg+sgtuTth9Do/qW8gRO46PFRZsaaXeF4q0m /2gZFAML7JeaffrgusS6DnY7UdPpUMwU5xYPmIf8pU1S37WNcgzOHnBlDgrqtJwyJg0w yqkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721970491; x=1722575291; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3rKwuSlqAIySxz11l4PWG6VIoo7RMKChxKPZ2GCuBEY=; b=h5ezp9Qv8YwEUY+1UD+UdT8m+IRcMjHxY+yDlbsMKUkgECpzdEI7LgWSqoD7KML9C4 bvMuQJF8kbUvgS/hCPlUaHO/CaRfZ8470ddIJaQP30xfCQ6kBqCuOoKeeOhPqGGhoBk9 qDLw4kHeCHBMTiHgVBdl4EiVsknhde1qNCxwOgOXR4rjb8fckgWpcFYE2W0GEzy/ikNV goI5pKzdMrTxKyPc1oFrXebjwxykI5dtf92IOdCZWxtGvAQO4wCpayOcc7tkBX/20sM6 LJM3ZdgeS6D9abkJIOZ9W5LgEMd7/++WQ/2pcnwrM8RpVnnBju28XFznSWwCAQcbaJfB T0PA== X-Forwarded-Encrypted: i=1; AJvYcCWag2q5/0iiwpyE4i+Sk9EZHxppnKRqNMzyFfi1liiQobECXqUMGT50yZX5P0zJTDOYuSkL+61+oAVGho+C4r5a9F/XkkX1R22seV8V9PSOAk7Thlc= X-Gm-Message-State: AOJu0Yyv1irwi1EX5B/q3o5zvMqM+gYIz2XIY4u1ZNfiF/dx4SnDeGrv FZGKAl9L3YCamOVIvCmfbmOj1uuCflV66i7C0+cSsKHfGXiBzw4NVuMjEQRB0g== X-Google-Smtp-Source: AGHT+IFPb+cpIlmTJHSn/eJI9XIpxgM8cTQg0C4/esBr4+srXONC/O3SgQ8mdQoB+Y0Wokbd7ElKDg== X-Received: by 2002:a05:6a21:388a:b0:1c4:7138:ad1b with SMTP id adf61e73a8af0-1c47b4f896amr4158589637.54.1721970491165; Thu, 25 Jul 2024 22:08:11 -0700 (PDT) Received: from thinkpad ([220.158.156.199]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fed7f99099sm22814675ad.247.2024.07.25.22.08.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jul 2024 22:08:10 -0700 (PDT) Date: Fri, 26 Jul 2024 10:38:05 +0530 From: Manivannan Sadhasivam To: Jim Quinlan Cc: linux-pci@vger.kernel.org, Nicolas Saenz Julienne , Bjorn Helgaas , Lorenzo Pieralisi , Cyril Brulebois , Stanimir Varbanov , Krzysztof Kozlowski , bcm-kernel-feedback-list@broadcom.com, jim2101024@gmail.com, Florian Fainelli , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , open list Subject: Re: [PATCH v4 09/12] PCI: brcmstb: Refactor for chips with many regular inbound BARs Message-ID: <20240726050805.GC2628@thinkpad> References: <20240716213131.6036-1-james.quinlan@broadcom.com> <20240716213131.6036-10-james.quinlan@broadcom.com> <20240725045318.GJ2317@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240725_220812_252979_733BD870 X-CRM114-Status: GOOD ( 25.87 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jul 25, 2024 at 04:29:56PM -0400, Jim Quinlan wrote: > On Thu, Jul 25, 2024 at 12:53 AM Manivannan Sadhasivam > wrote: > > > > On Tue, Jul 16, 2024 at 05:31:24PM -0400, Jim Quinlan wrote: > > > Previously, our chips provided three inbound "BARS" with fixed purposes: > > > the first was for mapping SoC internal registers, the second was for > > > memory, and the third was for memory but with the endian swapped. We > > > typically only used one of these BARs. > > > > > > Complicating that BARs usage was the fact that the PCIe HW would do a > > > baroque internal mapping of system memory, and concatenate the regions of > > > multiple memory controllers. > > > > > > Newer chips such as the 7712 and Cable Modem SOCs have taken a step forward > > > and now provide multiple inbound BARs. This works in concert with the > > > dma-ranges property, where each provided range becomes an inbound BAR. > > > > > > This commit provides support for these new chips and their multiple > > > inbound BARs but also keeps the legacy support for the older system. > > > > > > > BAR belongs to the endpoints not to the RC. How can the RC have 'BARs'? RC can > > only map endpoint BARs to MEM region. What you are referring to is 'MEM region' > > maybe? > > Agreed, it is confusing. Long story short, the HW team gave the > inbound windows the label "BAR". We will still have to use their > register names, Wow, such an inventive naming :) > e.g. PCIE_MISC_RC_BAR4_CONFIG_LO, but what I can do is change > for example "struct rc_bar" to "struct inbound_win" as well as make similar > changes to the code and function names. > > Let's assume you will be okay with my plan above; if not, please tell > me what you would prefer. > Yes please. Just keep BAR in the register name and use 'inbound_win' elsewhere. Even better, add a comment at the top of these register names to clarify that these refer to inbound windows. - Mani -- மணிவண்ணன் சதாசிவம்