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>
Subject: [PATCH 17/33] pci: gt64120: Drop use of DM_PCI
Date: Mon, 26 Jul 2021 07:34:23 -0600	[thread overview]
Message-ID: <20210726133440.634682-18-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/pci_gt64120.c | 64 ---------------------------------------
 1 file changed, 64 deletions(-)

diff --git a/drivers/pci/pci_gt64120.c b/drivers/pci/pci_gt64120.c
index e57fedf036e..153c65b119a 100644
--- a/drivers/pci/pci_gt64120.c
+++ b/drivers/pci/pci_gt64120.c
@@ -114,69 +114,6 @@ static int gt_config_access(struct gt64120_pci_controller *gt,
 	return 0;
 }
 
-#if !IS_ENABLED(CONFIG_DM_PCI)
-static int gt_read_config_dword(struct pci_controller *hose, pci_dev_t dev,
-				int where, u32 *value)
-{
-	struct gt64120_pci_controller *gt = hose_to_gt64120(hose);
-
-	*value = 0xffffffff;
-	return gt_config_access(gt, PCI_ACCESS_READ, dev, where, value);
-}
-
-static int gt_write_config_dword(struct pci_controller *hose, pci_dev_t dev,
-				 int where, u32 value)
-{
-	struct gt64120_pci_controller *gt = hose_to_gt64120(hose);
-	u32 data = value;
-
-	return gt_config_access(gt, PCI_ACCESS_WRITE, dev, where, &data);
-}
-
-void gt64120_pci_init(void *regs, unsigned long sys_bus, unsigned long sys_phys,
-		     unsigned long sys_size, unsigned long mem_bus,
-		     unsigned long mem_phys, unsigned long mem_size,
-		     unsigned long io_bus, unsigned long io_phys,
-		     unsigned long io_size)
-{
-	static struct gt64120_pci_controller global_gt;
-	struct gt64120_pci_controller *gt;
-	struct pci_controller *hose;
-
-	gt = &global_gt;
-	gt->regs = regs;
-
-	hose = &gt->hose;
-
-	hose->first_busno = 0;
-	hose->last_busno = 0;
-
-	/* System memory space */
-	pci_set_region(&hose->regions[0], sys_bus, sys_phys, sys_size,
-		       PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
-
-	/* PCI memory space */
-	pci_set_region(&hose->regions[1], mem_bus, mem_phys, mem_size,
-		       PCI_REGION_MEM);
-
-	/* PCI I/O space */
-	pci_set_region(&hose->regions[2], io_bus, io_phys, io_size,
-		       PCI_REGION_IO);
-
-	hose->region_count = 3;
-
-	pci_set_ops(hose,
-		    pci_hose_read_config_byte_via_dword,
-		    pci_hose_read_config_word_via_dword,
-		    gt_read_config_dword,
-		    pci_hose_write_config_byte_via_dword,
-		    pci_hose_write_config_word_via_dword,
-		    gt_write_config_dword);
-
-	pci_register_hose(hose);
-	hose->last_busno = pci_hose_scan(hose);
-}
-#else
 static int gt64120_pci_read_config(const struct udevice *dev, pci_dev_t bdf,
 				   uint where, ulong *val,
 				   enum pci_size_t size)
@@ -246,4 +183,3 @@ U_BOOT_DRIVER(gt64120_pci) = {
 	.probe		= gt64120_pci_probe,
 	.priv_auto	= sizeof(struct gt64120_pci_controller),
 };
-#endif
-- 
2.32.0.432.gabb21c7263-goog


  parent reply	other threads:[~2021-07-26 13:41 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 ` Simon Glass [this message]
2021-07-27  1:26   ` [PATCH 17/33] pci: gt64120: " 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 ` [PATCH 19/33] pci: imx: " Simon Glass
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-18-sjg@chromium.org \
    --to=sjg@chromium.org \
    --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.