From patchwork Thu Oct 1 06:00:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinath Mannam X-Patchwork-Id: 11810929 X-Patchwork-Delegate: lorenzo.pieralisi@arm.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 49DCD139A for ; Thu, 1 Oct 2020 06:01:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 20A7021D7D for ; Thu, 1 Oct 2020 06:01:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="Hr4FGV6n" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730357AbgJAGBT (ORCPT ); Thu, 1 Oct 2020 02:01:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730301AbgJAGBS (ORCPT ); Thu, 1 Oct 2020 02:01:18 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 628ECC0613D0 for ; Wed, 30 Sep 2020 23:01:18 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id x123so3475305pfc.7 for ; Wed, 30 Sep 2020 23:01:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=f/SkpM6tbRsXOCCJlOhKUcxkHsc04pd7BesYNpcz9ko=; b=Hr4FGV6nGqJjSbz4H0Au/5QtVJc9aDthW/u7I9wGVNI5HnDmdDfLkPjviw82XVFaV9 V4UOxi7Tf60XhgASsZR4CQDRH2ON/ayKFUd/jUc0XRiRrqK5ydEnO5LSL2C2GmJKA+l2 uuOniiF0PcrjIIHH9sEy+59CkvMtFKXh7CLO0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=f/SkpM6tbRsXOCCJlOhKUcxkHsc04pd7BesYNpcz9ko=; b=tFqfqC4OzIuUYHF9p+74FqcZVAq6DOfIxghE/u76qlfLAtTDZ7COaNcaIfKozPe8Gg k7g3gbBfaCmXc2S7SZ4Yb+fRGR0yOhTS07M0fxqAzhiEaW274GV08rxH8nlJN8qkYibl zLNT8yKyMonTTws377JE3GiHVVeEcIh3LQm9UOO+z/lhB0A6eUoQl1wL/XP6mjcQsDCj +W/wh9RExUIiyjWsUQwzFg6qPWcOOZE/covUHtgdIM0qugbvf4jrBNDrkZkM5sNlSdFo HMFOyR0aeknu8eLbFvG1B/kFNYkXgZ9pnQcpMJlZHV8uRY3TpB8vIiA+bjmjPJhEL6hj ux/A== X-Gm-Message-State: AOAM532LuZhsaL6VunYflrh4xYtds1CtwnT+IVIL6gl/S1+NH6Vmp2UA 95dcU8yVGsQ4rOzeTtXWZntFnQ== X-Google-Smtp-Source: ABdhPJxFndR3dwJs0uQsZn3nNsaM1j+1gfIn4Aj8SpyIqST2IsmV+tbPyVYjUBVypeLV9LvI4qpUug== X-Received: by 2002:a62:520e:0:b029:142:2501:3979 with SMTP id g14-20020a62520e0000b029014225013979mr1172795pfb.62.1601532077798; Wed, 30 Sep 2020 23:01:17 -0700 (PDT) Received: from mannams-OptiPlex-7010.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id l2sm4032112pjy.3.2020.09.30.23.01.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Sep 2020 23:01:17 -0700 (PDT) From: Srinath Mannam To: Lorenzo Pieralisi , Bjorn Helgaas , Ray Jui Cc: bcm-kernel-feedback-list@broadcom.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Roman Bacik , Srinath Mannam Subject: [PATCH v3 2/3] PCI: iproc: Invalidate correct PAXB inbound windows Date: Thu, 1 Oct 2020 11:30:53 +0530 Message-Id: <20201001060054.6616-3-srinath.mannam@broadcom.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201001060054.6616-1-srinath.mannam@broadcom.com> References: <20201001060054.6616-1-srinath.mannam@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Roman Bacik Second stage bootloader prior to Linux boot may use all inbound windows including IARR1/IMAP1. We need to ensure all previous configuration of inbound windows are invalidated during the initialization stage of the Linux iProc PCIe driver. Add fix to define and invalidate IARR1/IMAP1 because it was missed in previous patch. Fixes: 9415743e4c8a ("PCI: iproc: Invalidate PAXB address mapping") Signed-off-by: Roman Bacik Signed-off-by: Srinath Mannam --- drivers/pci/controller/pcie-iproc.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/pcie-iproc.c b/drivers/pci/controller/pcie-iproc.c index d901b9d392b8..cc5b7823edeb 100644 --- a/drivers/pci/controller/pcie-iproc.c +++ b/drivers/pci/controller/pcie-iproc.c @@ -192,8 +192,15 @@ static const struct iproc_pcie_ib_map paxb_v2_ib_map[] = { .imap_window_offset = 0x4, }, { - /* IARR1/IMAP1 (currently unused) */ - .type = IPROC_PCIE_IB_MAP_INVALID, + /* IARR1/IMAP1 */ + .type = IPROC_PCIE_IB_MAP_MEM, + .size_unit = SZ_1M, + .region_sizes = { 8 }, + .nr_sizes = 1, + .nr_windows = 8, + .imap_addr_offset = 0x4, + .imap_window_offset = 0x8, + }, { /* IARR2/IMAP2 */ @@ -351,6 +358,8 @@ static const u16 iproc_pcie_reg_paxb_v2[IPROC_PCIE_MAX_NUM_REG] = { [IPROC_PCIE_OMAP3] = 0xdf8, [IPROC_PCIE_IARR0] = 0xd00, [IPROC_PCIE_IMAP0] = 0xc00, + [IPROC_PCIE_IARR1] = 0xd08, + [IPROC_PCIE_IMAP1] = 0xd70, [IPROC_PCIE_IARR2] = 0xd10, [IPROC_PCIE_IMAP2] = 0xcc0, [IPROC_PCIE_IARR3] = 0xe00,