All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org>,
	Stefano Babic <sbabic@denx.de>
Subject: [PATCH 19/33] pci: imx: Drop use of DM_PCI
Date: Mon, 26 Jul 2021 07:34:25 -0600	[thread overview]
Message-ID: <20210726133440.634682-20-sjg@chromium.org> (raw)
In-Reply-To: <20210726133440.634682-1-sjg@chromium.org>

Now that DM_PCI is always enabled we don't need to check it. Drop this
old code.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 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.432.gabb21c7263-goog


  parent reply	other threads:[~2021-07-26 13:42 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-26 13:34 [PATCH 00/33] pci: Drop all pre-driver model code Simon Glass
2021-07-26 13:34 ` [PATCH 01/33] configs: Resync with savedefconfig Simon Glass
2021-07-26 13:34 ` [PATCH 02/33] pci: Drop old code from pci command Simon Glass
2021-07-26 13:34 ` [PATCH 03/33] ppc: Remove UCP1020 board Simon Glass
2021-07-26 15:08   ` Tom Rini
2021-07-26 13:34 ` [PATCH 04/33] pci: Drop old code from header file Simon Glass
2021-07-26 13:34 ` [PATCH 05/33] pci: Remove guard around compatibility functions Simon Glass
2021-07-26 13:34 ` [PATCH 06/33] pci: Drop DM_PCI check from fdtdec Simon Glass
2021-07-26 13:34 ` [PATCH 07/33] pci: Drop DM_PCI check from pci_common Simon Glass
2021-07-26 13:34 ` [PATCH 08/33] ppc: Drop CONFIG_SYS_PCI_SUBSYS_VENDORID Simon Glass
2021-07-26 13:34 ` [PATCH 09/33] pci: powerpc: Drop old code Simon Glass
2021-07-26 13:34 ` [PATCH 10/33] pci: freescale: " Simon Glass
2021-07-26 13:34 ` [PATCH 11/33] pci: dm: core: Drop DM_PCI check from devfdt_get_addr_pci() Simon Glass
2021-07-26 13:34 ` [PATCH 12/33] ppc: Drop DM_PCI from config files Simon Glass
2021-07-26 13:34 ` [PATCH 13/33] pci: acpi: Drop DM_PCI check from ahci Simon Glass
2021-07-26 13:34 ` [PATCH 14/33] pci: usb: Drop DM_PCI from ohci Simon Glass
2021-07-26 13:34 ` [PATCH 15/33] ppc: malta: Drop use of DM_PCI Simon Glass
2021-07-27  1:22   ` Daniel Schwierzeck
2021-07-26 13:34 ` [PATCH 16/33] ppc: socrates: " Simon Glass
2021-07-26 13:34 ` [PATCH 17/33] pci: gt64120: " Simon Glass
2021-07-27  1:26   ` Daniel Schwierzeck
2021-07-26 13:34 ` [PATCH 18/33] pci: msc01: " Simon Glass
2021-07-27  1:26   ` Daniel Schwierzeck
2021-07-26 13:34 ` Simon Glass [this message]
2021-07-26 13:34 ` [PATCH 20/33] pci: scsi: pci: Drop DM_PCI check from scsi Simon Glass
2021-07-26 13:34 ` [PATCH 21/33] pci: Drop DM_PCI check from bios_emul Simon Glass
2021-07-26 13:34 ` [PATCH 22/33] net: Drop DM_PCI check from designware driver Simon Glass
2021-07-27  4:25   ` Ramon Fried
2021-07-26 13:34 ` [PATCH 23/33] pci: imx: Drop DM_PCI check from cpu driver Simon Glass
2021-07-26 13:34 ` [PATCH 24/33] pci: arm: mvebu: Drop DM_PCI check from Simon Glass
2021-07-26 13:34 ` [PATCH 25/33] pci: sata_sil: Drop DM_PCI checks Simon Glass
2021-07-26 13:34 ` [PATCH 26/33] distro_bootcmd: Drop DM_PCI check Simon Glass
2021-07-26 13:34 ` [PATCH 27/33] pci: Drop pci_init_board() Simon Glass
2021-07-26 13:34 ` [PATCH 28/33] pci: ppc: Drop ftpci100 driver Simon Glass
2021-07-26 13:34 ` [PATCH 29/33] ppc: Drop idt8t49n222a_serdes_clk driver Simon Glass
2021-07-26 13:34 ` [PATCH 30/33] ppc: Drop t4qds and b4860qds references Simon Glass
2021-07-26 13:34 ` [PATCH 31/33] pci: Drop PCI_INDIRECT_BRIDGE Simon Glass
2021-07-26 13:34 ` [PATCH 32/33] pci: Drop DM_PCI Simon Glass
2021-07-26 13:34 ` [PATCH 33/33] pci: Drop migration method Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210726133440.634682-20-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=sbabic@denx.de \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.