Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76769C4338F for ; Mon, 2 Aug 2021 00:58:10 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 00CD260560 for ; Mon, 2 Aug 2021 00:58:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 00CD260560 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3CCE8833AF; Mon, 2 Aug 2021 02:57:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="ZVdmjMnJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9A00883362; Mon, 2 Aug 2021 02:56:39 +0200 (CEST) Received: from mail-oo1-xc2c.google.com (mail-oo1-xc2c.google.com [IPv6:2607:f8b0:4864:20::c2c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 66B0883344 for ; Mon, 2 Aug 2021 02:55:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-oo1-xc2c.google.com with SMTP id e3-20020a4ab9830000b029026ada3b6b90so38580oop.0 for ; Sun, 01 Aug 2021 17:55:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WjX7sm5ohJ0NjK4UpFpYj+ysmdcf666WMzkAPwy2GfE=; b=ZVdmjMnJ2iK9e3gGCp6PN3UIVkaf59+o7+yWmJCXikLiyn2o6pkzU0y/bcALIFkuhe vw70DFltLBpa48ZUVXcJtmf8ox9G2wwXV/k53TkqYqiBgVnZfMi2bzmZ0z1kcy+u5Xme vbhecCSSWs5MNy2COMJPtGepoqpTsu7JZ3Lys= 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:mime-version:content-transfer-encoding; bh=WjX7sm5ohJ0NjK4UpFpYj+ysmdcf666WMzkAPwy2GfE=; b=nLI1cPswVS+mBqNLKMmQIsNCLcv931WJlZ9fyYY4qo86zN06RlImSXtVo5stlzuVMh ktvxGZiTkKd3sUXSGcN+u0eE8rMpyOysbDXRjDbeNZFxJz210pesYxSBiWhZ9Aks7fud QOAILmQ7OIeZTtHz4CXVKwFM1L5HrF8V9ZEaONj+vvKxS/HHk78xg8IQoMJyFHxf6idV 2LfaZl4SWvltuv7WqRBK5MQKDuFrCZesf4X24z08YvAPjqOMf2CCXxj67A0Jo2It5NDE 2fxhcGrV8Mjhi0zMcu0yRX9x0vPInQ5UhKj93ps2grpJO2GErzLQV9hfB9eyXSS5C8zj EK6w== X-Gm-Message-State: AOAM533KGO0JwI/nrRRi0t9CWyjCXxDYLS/4RUPhDFqeDjl6OTi+BcaK +XhQ6Xnbx2aL93V/V0ZoOcuQUHjcQZUR+Q/2 X-Google-Smtp-Source: ABdhPJzNitta8sb/cG0g8aGxH5mxCIQ3wC6RmgvCeZclpFps7qjunLzGq0xBFfA7Ghc0SQ1Bl9z3Jg== X-Received: by 2002:a4a:a7cb:: with SMTP id n11mr2599743oom.30.1627865705832; Sun, 01 Aug 2021 17:55:05 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id s2sm1452616ooc.15.2021.08.01.17.55.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Aug 2021 17:55:05 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Stefano Babic Subject: [PATCH v2 18/32] pci: imx: Drop use of DM_PCI Date: Sun, 1 Aug 2021 18:54:31 -0600 Message-Id: <20210802005446.2267075-19-sjg@chromium.org> X-Mailer: git-send-email 2.32.0.554.ge1b32706d8-goog In-Reply-To: <20210802005446.2267075-1-sjg@chromium.org> References: <20210802005446.2267075-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Now that DM_PCI is always enabled we don't need to check it. Drop this old code. Signed-off-by: Simon Glass --- (no changes since v1) drivers/pci/pcie_imx.c | 81 ------------------------------------------ 1 file changed, 81 deletions(-) diff --git a/drivers/pci/pcie_imx.c b/drivers/pci/pcie_imx.c index 7b46fdb89a3..756166fd3ea 100644 --- a/drivers/pci/pcie_imx.c +++ b/drivers/pci/pcie_imx.c @@ -681,86 +681,6 @@ static int imx_pcie_link_up(struct imx_pcie_priv *priv) return 0; } -#if !CONFIG_IS_ENABLED(DM_PCI) -static struct imx_pcie_priv imx_pcie_priv = { - .dbi_base = (void __iomem *)MX6_DBI_ADDR, - .cfg_base = (void __iomem *)MX6_ROOT_ADDR, -}; - -static struct imx_pcie_priv *priv = &imx_pcie_priv; - -static int imx_pcie_read_config(struct pci_controller *hose, pci_dev_t d, - int where, u32 *val) -{ - struct imx_pcie_priv *priv = hose->priv_data; - - return imx_pcie_read_cfg(priv, d, where, val); -} - -static int imx_pcie_write_config(struct pci_controller *hose, pci_dev_t d, - int where, u32 val) -{ - struct imx_pcie_priv *priv = hose->priv_data; - - return imx_pcie_write_cfg(priv, d, where, val); -} - -void imx_pcie_init(void) -{ - /* Static instance of the controller. */ - static struct pci_controller pcc; - struct pci_controller *hose = &pcc; - int ret; - - memset(&pcc, 0, sizeof(pcc)); - - hose->priv_data = priv; - - /* PCI I/O space */ - pci_set_region(&hose->regions[0], - MX6_IO_ADDR, MX6_IO_ADDR, - MX6_IO_SIZE, PCI_REGION_IO); - - /* PCI memory space */ - pci_set_region(&hose->regions[1], - MX6_MEM_ADDR, MX6_MEM_ADDR, - MX6_MEM_SIZE, PCI_REGION_MEM); - - /* System memory space */ - pci_set_region(&hose->regions[2], - MMDC0_ARB_BASE_ADDR, MMDC0_ARB_BASE_ADDR, - 0xefffffff, PCI_REGION_MEM | PCI_REGION_SYS_MEMORY); - - hose->region_count = 3; - - pci_set_ops(hose, - pci_hose_read_config_byte_via_dword, - pci_hose_read_config_word_via_dword, - imx_pcie_read_config, - pci_hose_write_config_byte_via_dword, - pci_hose_write_config_word_via_dword, - imx_pcie_write_config); - - /* Start the controller. */ - ret = imx_pcie_link_up(priv); - - if (!ret) { - pci_register_hose(hose); - hose->last_busno = pci_hose_scan(hose); - } -} - -void imx_pcie_remove(void) -{ - imx6_pcie_assert_core_reset(priv, true); -} - -/* Probe function. */ -void pci_init_board(void) -{ - imx_pcie_init(); -} -#else static int imx_pcie_dm_read_config(const struct udevice *dev, pci_dev_t bdf, uint offset, ulong *value, enum pci_size_t size) @@ -852,4 +772,3 @@ U_BOOT_DRIVER(imx_pcie) = { .priv_auto = sizeof(struct imx_pcie_priv), .flags = DM_FLAG_OS_PREPARE, }; -#endif -- 2.32.0.554.ge1b32706d8-goog