Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp3489263rwb; Mon, 5 Sep 2022 12:38:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR75iZ4c7e/LZlw8ZYJdpMfyvXqYBPrQa84REiwV2MtL7acEh25apqJkwqMZMCBNKah1hyfK X-Received: by 2002:a05:6402:3546:b0:43e:466c:d4ed with SMTP id f6-20020a056402354600b0043e466cd4edmr44943402edd.48.1662406681261; Mon, 05 Sep 2022 12:38:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662406681; cv=none; d=google.com; s=arc-20160816; b=0jDcZM+LqFa/MygzaFbIfTJmQl7dZXGswhNdjrV4bnYsQ5N50Y9RyxzhGpMqcxspPp acZ8Edh5HCB1096djCsDU37c2kJyKBuGxySTglsiIthAHW2TbwuagQj/P3w4MKwXaB9z si8t/rJZCpbBcD7k9AbNz41Q3nLKTjrq9Vq44UXw5quieg5xQBwpwDnp6Cogvfk3u2Wo Lb9Cqe53BOOtPMs8eKKJZY32QTUNPeTnP/5Cazn5mTeVD6iA46l9RoRSkmLFBtKoB14u grrj424bB5SqiNW2rB8QDLBFVQetJHYoIB7PG/dkyeSkphh/8HngPyOr6NO+NVwtrl2G 6tpg== 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=IulNYSWm65aOYMMrf79cKJ1BmqkfzOWFcXsAgUgAlmE=; b=XsGM51Q6WLgCSOs2hVlenuf5LFNEMuiqRT6+oNm0hTrRgIIXg0ewB/UcFJ37sowN5I OIK0aBkm6QsDZfXBjOpjRahBOhY9VQTgDwi7rE+yzJypyXMApWqANiX7xdovNHzfzGVm ZXOJX+ccp1z8OxrEUWpEtU7w9kJv9Qq9lgyc98VM+iKcX4tUEBPkc1+pGjPgTNCf/bj+ zCMjc49P4PVatg1EpbYwc3I2+Jv9CjGPfCwE3QdAFXCc3Dmr+SJOIPOCYlA4cMHqCI1d 3sT7rhIUmSI6yp8vfl2H3Xsu/+cZ4xyRzOFm/LZS+tzbXiWxADcA2x625K+HhgSLiOMg OnIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=M6UNZUzL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y21-20020a170906471500b0073db945fcc0si7542210ejq.214.2022.09.05.12.37.32; Mon, 05 Sep 2022 12:38:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=M6UNZUzL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231928AbiIETZV (ORCPT + 99 others); Mon, 5 Sep 2022 15:25:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbiIETZR (ORCPT ); Mon, 5 Sep 2022 15:25:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 969FD1A814; Mon, 5 Sep 2022 12:25:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 32C8B6130A; Mon, 5 Sep 2022 19:25:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69D98C43470; Mon, 5 Sep 2022 19:25:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662405914; bh=tnlQt8uAhD9MRbuUnIAmbky2iGpTR1k2zzQd6YiZe4Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M6UNZUzL/kVaqNPtX59YFKzyhhy2UBOEwYlujhIpmWIoZyT4Bc2uYKh6a2Ivke5S0 194cZjBKV7JDTZEc/qiDxPXCY8Yr4dKQIz6MtPSaFnr4Ap5v5XWxY92m6zxuKbTcne r3GoyMk6CsyzrBHZGJ05t1FjY3phIwvLrwD8E9/Le8V7GN9tP1CwwRP9zoomIjikM7 Lkmn9tPkQAJt3OKSni5GT8LrAFxHQ3u++LTEv9Qk/tJxtWhjlbHOY8t+ZzugujlVSx HZyfMDvSmuEuJz1abagB/P7c6G7fHT9TQVsprpZULz8u+Lzhw/wn5BkZU1DETLaXZA 27AanXc0LL1Aw== Received: by pali.im (Postfix) id 1145C20B1; Mon, 5 Sep 2022 21:25:12 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Bjorn Helgaas , Lorenzo Pieralisi , Rob Herring , Krzysztof Kozlowski , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Russell King , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Thomas Petazzoni , Mauri Sandberg Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 1/7] ARM: orion: Move PCIe mbus window mapping from orion5x_setup_wins() to pcie_setup() Date: Mon, 5 Sep 2022 21:23:04 +0200 Message-Id: <20220905192310.22786-2-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220905192310.22786-1-pali@kernel.org> References: <20220718202843.6766-1-maukka@ext.kapsi.fi> <20220905192310.22786-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This would allow to migrate Orion PCIe code to pci-mvebu.c driver as this driver reads mapping information from device tree files and does not relay on static mappings. Signed-off-by: Pali Rohár --- Changes in v3: * Split it from pci-mvebu.c change to separate patch --- arch/arm/mach-orion5x/common.c | 13 ------------- arch/arm/mach-orion5x/pci.c | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 2e711b7252c6..df5e7b237946 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c @@ -228,19 +228,6 @@ void __init orion5x_init_early(void) void orion5x_setup_wins(void) { - /* - * The PCIe windows will no longer be statically allocated - * here once Orion5x is migrated to the pci-mvebu driver. - */ - mvebu_mbus_add_window_remap_by_id(ORION_MBUS_PCIE_IO_TARGET, - ORION_MBUS_PCIE_IO_ATTR, - ORION5X_PCIE_IO_PHYS_BASE, - ORION5X_PCIE_IO_SIZE, - ORION5X_PCIE_IO_BUS_BASE); - mvebu_mbus_add_window_by_id(ORION_MBUS_PCIE_MEM_TARGET, - ORION_MBUS_PCIE_MEM_ATTR, - ORION5X_PCIE_MEM_PHYS_BASE, - ORION5X_PCIE_MEM_SIZE); mvebu_mbus_add_window_remap_by_id(ORION_MBUS_PCI_IO_TARGET, ORION_MBUS_PCI_IO_ATTR, ORION5X_PCI_IO_PHYS_BASE, diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c index 888fdc9099c5..e0836be92f3f 100644 --- a/arch/arm/mach-orion5x/pci.c +++ b/arch/arm/mach-orion5x/pci.c @@ -147,6 +147,20 @@ static int __init pcie_setup(struct pci_sys_data *sys) */ orion_pcie_setup(PCIE_BASE); + /* + * The PCIe windows will no longer be statically allocated + * here once Orion5x is migrated to the pci-mvebu driver. + */ + mvebu_mbus_add_window_remap_by_id(ORION_MBUS_PCIE_IO_TARGET, + ORION_MBUS_PCIE_IO_ATTR, + ORION5X_PCIE_IO_PHYS_BASE, + ORION5X_PCIE_IO_SIZE, + ORION5X_PCIE_IO_BUS_BASE); + mvebu_mbus_add_window_by_id(ORION_MBUS_PCIE_MEM_TARGET, + ORION_MBUS_PCIE_MEM_ATTR, + ORION5X_PCIE_MEM_PHYS_BASE, + ORION5X_PCIE_MEM_SIZE); + /* * Check whether to apply Orion-1/Orion-NAS PCIe config * read transaction workaround. -- 2.20.1