Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1473505pxy; Thu, 6 May 2021 08:39:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhaaIujOx1ybTYEAJPBYHv5GZkHIe2Bvb/xux+xrMntxk+1u6KbjfDK83Ds9k7Jk/Z4aGo X-Received: by 2002:a62:7d07:0:b029:21b:d1bc:f6c8 with SMTP id y7-20020a627d070000b029021bd1bcf6c8mr5434847pfc.45.1620315577293; Thu, 06 May 2021 08:39:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620315577; cv=none; d=google.com; s=arc-20160816; b=LgFjWVoeFDy/z/lg2NlfPxUwcKq5CrkOuS4KJG9lkIhnK4uDdD7RuRTFNzUMZ7q1bu D/VQhCScOog6+/UcGmLtGA2S+3t8XsVqShW6why4bSNiQbsBAAn36leyp1v6TqSrtpoR Y8QOb0mlSZPeJUHqgOLMryJ8IoB1A1i2zE/nkam7jaPJbQY3NGBSNFcaUZ3x9WfdsNRy +ntvpTo4GCKA/7H3WoiSfCJQ/vMIL/R2kpHOAsoS9fGshZPDm4EVVUJ1PgJYaKif1+WD 5dNAlVHcu5Uwx5hSnDbDeYbNxzmni7RIg883Z7CEPmDI7a1V0lMv5c+gpA5y15R1CqZ1 KjEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=d5jGENM11sT8wW6ogxoaP8ZbexlWVNDoUrht1v3YypE=; b=Z6A8R/knqSawinxAaz148gLVurmUfe2xZEtmQrXGBBx6mSUdEbKp5GFvgd+terXVWq DB7fd04Lrbt7JYZBpH5T9yH/Xi4A+QLcvyAWKw76o0+TMdlKhaKdLDbV3i30qGHqfexw gxVR8xfp7hYYezPi4HNHrOBgTNrhU/ErYICsmWZOBmGfm7NI/y6uQBlJeN2G2Dqc9eV7 Q+f+bhnipTzNR0BqLFKEwNJlp7iOAjNgkkSDv3Uzq4F0W/KL1SgDCri+7MuGD7Fn4Z2M tnS/f8CTBC8uTCmMhEaanD6eKYhrw/Nb4BUSX4PBfRzjyBUjgnvvilmhpFmmGKxXbrRR eOtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BBQZNg72; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c4si3258470pfd.246.2021.05.06.08.39.23; Thu, 06 May 2021 08:39:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BBQZNg72; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235983AbhEFPiP (ORCPT + 99 others); Thu, 6 May 2021 11:38:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:46612 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235761AbhEFPeB (ORCPT ); Thu, 6 May 2021 11:34:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BE35E616EC; Thu, 6 May 2021 15:32:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620315175; bh=/+gs0ZSRDihhAytQvQhC3JU9pmLLRIVi8fOcngMUlsQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BBQZNg72+zIsTIei99cO7gRYKbGHxRUVBO5CGID3UxRoGYu+U85fMo2ixcw6GtMSZ +AJYhmcwD+5KVQJK6NAVIB2WZ2eMp91Y6fiY8/Gja5yIJ9QF/CSWZ2EUT8BfQtgX9J pvpjak348W8hfbPmhJa8KwXcv/XVWB8+3BTdCyvPn3wHrRojMRZncLBtANVl3fjGpJ sq54wrNotp0r3s9rKeERiwtQuwt7lMX6xJBL1alUyiltzld8XyRmfOzUx5xeJn5j0A GetZtoMwAO2cHe9UixL4dihnIMJcTEn3U9dkAp0BBmx0n8MvQkxBR6jg5a9wGIFEsc lKyZtsV/I0IaQ== Received: by pali.im (Postfix) id 75174BF9; Thu, 6 May 2021 17:32:55 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Lorenzo Pieralisi , Thomas Petazzoni , Rob Herring , Bjorn Helgaas Cc: Russell King , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Remi Pommarel , Xogium , Tomasz Maciej Nowak , Marc Zyngier , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 39/42] PCI: aardvark: Add comments for OB_WIN_ENABLE and ADDR_WIN_DISABLE Date: Thu, 6 May 2021 17:31:50 +0200 Message-Id: <20210506153153.30454-40-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210506153153.30454-1-pali@kernel.org> References: <20210506153153.30454-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a comment with explanation of these two bits. These comments are taken from U-Boot 2020.10 PCI aardvark driver. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- drivers/pci/controller/pci-aardvark.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller/pci-aardvark.c index 3c18e139b095..ac3ee48e69d7 100644 --- a/drivers/pci/controller/pci-aardvark.c +++ b/drivers/pci/controller/pci-aardvark.c @@ -428,11 +428,24 @@ static void advk_pcie_setup_hw(struct advk_pcie *pcie) reg = PCIE_IRQ_ALL_MASK & (~PCIE_IRQ_ENABLE_INTS_MASK); advk_writel(pcie, reg, HOST_CTRL_INT_MASK_REG); + /* + * Enable AXI address window location generation: + * When it is enabled, the default outbound window + * configurations (Default User Field: 0xD0074CFC) + * are used to transparent address translation for + * the outbound transactions. Thus, PCIe address + * windows are not required. + */ reg = advk_readl(pcie, PCIE_CORE_CTRL2_REG); reg |= PCIE_CORE_CTRL2_OB_WIN_ENABLE; advk_writel(pcie, reg, PCIE_CORE_CTRL2_REG); - /* Bypass the address window mapping for PIO */ + /* + * Bypass the address window mapping for PIO: + * Since PIO access already contains all required + * info over AXI interface by PIO registers, the + * address window is not required. + */ reg = advk_readl(pcie, PIO_CTRL); reg |= PIO_CTRL_ADDR_WIN_DISABLE; advk_writel(pcie, reg, PIO_CTRL); -- 2.20.1