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 04/33] pci: Drop old code from header file
Date: Mon, 26 Jul 2021 07:34:10 -0600	[thread overview]
Message-ID: <20210726133440.634682-5-sjg@chromium.org> (raw)
In-Reply-To: <20210726133440.634682-1-sjg@chromium.org>

We don't need this code anymore since when PCI is enabled, driver model is
always used.

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

 include/pci.h | 60 +++------------------------------------------------
 1 file changed, 3 insertions(+), 57 deletions(-)

diff --git a/include/pci.h b/include/pci.h
index 258c8f831ce..e07d6c31bc1 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -623,13 +623,9 @@ extern void pci_cfgfunc_config_device(struct pci_controller* hose, pci_dev_t dev
  *	about a small subset of PCI devices. This is normally false.
  */
 struct pci_controller {
-#ifdef CONFIG_DM_PCI
 	struct udevice *bus;
 	struct udevice *ctlr;
 	bool skip_auto_config_until_reloc;
-#else
-	struct pci_controller *next;
-#endif
 
 	int first_busno;
 	int last_busno;
@@ -655,54 +651,16 @@ struct pci_controller {
 	struct pci_config_table *config_table;
 
 	void (*fixup_irq)(struct pci_controller *, pci_dev_t);
-#ifndef CONFIG_DM_PCI
-	/* Low-level architecture-dependent routines */
-	int (*read_byte)(struct pci_controller*, pci_dev_t, int where, u8 *);
-	int (*read_word)(struct pci_controller*, pci_dev_t, int where, u16 *);
-	int (*read_dword)(struct pci_controller*, pci_dev_t, int where, u32 *);
-	int (*write_byte)(struct pci_controller*, pci_dev_t, int where, u8);
-	int (*write_word)(struct pci_controller*, pci_dev_t, int where, u16);
-	int (*write_dword)(struct pci_controller*, pci_dev_t, int where, u32);
-#endif
 
 	/* Used by auto config */
 	struct pci_region *pci_mem, *pci_io, *pci_prefetch;
-
-#ifndef CONFIG_DM_PCI
-	int current_busno;
-
-	void *priv_data;
-#endif
 };
 
-#ifndef CONFIG_DM_PCI
-static inline void pci_set_ops(struct pci_controller *hose,
-				   int (*read_byte)(struct pci_controller*,
-						    pci_dev_t, int where, u8 *),
-				   int (*read_word)(struct pci_controller*,
-						    pci_dev_t, int where, u16 *),
-				   int (*read_dword)(struct pci_controller*,
-						     pci_dev_t, int where, u32 *),
-				   int (*write_byte)(struct pci_controller*,
-						     pci_dev_t, int where, u8),
-				   int (*write_word)(struct pci_controller*,
-						     pci_dev_t, int where, u16),
-				   int (*write_dword)(struct pci_controller*,
-						      pci_dev_t, int where, u32)) {
-	hose->read_byte   = read_byte;
-	hose->read_word   = read_word;
-	hose->read_dword  = read_dword;
-	hose->write_byte  = write_byte;
-	hose->write_word  = write_word;
-	hose->write_dword = write_dword;
-}
-#endif
-
 #ifdef CONFIG_PCI_INDIRECT_BRIDGE
 extern void pci_setup_indirect(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data);
 #endif
 
-#if !defined(CONFIG_DM_PCI) || defined(CONFIG_DM_PCI_COMPAT)
+#if defined(CONFIG_DM_PCI_COMPAT)
 extern phys_addr_t pci_hose_bus_to_phys(struct pci_controller* hose,
 					pci_addr_t addr, unsigned long flags);
 extern pci_addr_t pci_hose_phys_to_bus(struct pci_controller* hose,
@@ -752,15 +710,6 @@ extern int pci_hose_write_config_dword(struct pci_controller *hose,
 				       pci_dev_t dev, int where, u32 val);
 #endif
 
-#ifndef CONFIG_DM_PCI
-extern int pci_read_config_byte(pci_dev_t dev, int where, u8 *val);
-extern int pci_read_config_word(pci_dev_t dev, int where, u16 *val);
-extern int pci_read_config_dword(pci_dev_t dev, int where, u32 *val);
-extern int pci_write_config_byte(pci_dev_t dev, int where, u8 val);
-extern int pci_write_config_word(pci_dev_t dev, int where, u16 val);
-extern int pci_write_config_dword(pci_dev_t dev, int where, u32 val);
-#endif
-
 void pciauto_region_init(struct pci_region *res);
 void pciauto_region_align(struct pci_region *res, pci_size_t size);
 void pciauto_config_init(struct pci_controller *hose);
@@ -780,7 +729,7 @@ void pciauto_config_init(struct pci_controller *hose);
 int pciauto_region_allocate(struct pci_region *res, pci_size_t size,
 			    pci_addr_t *bar, bool supports_64bit);
 
-#if !defined(CONFIG_DM_PCI) || defined(CONFIG_DM_PCI_COMPAT)
+#if defined(CONFIG_DM_PCI_COMPAT)
 extern int pci_hose_read_config_byte_via_dword(struct pci_controller *hose,
 					       pci_dev_t dev, int where, u8 *val);
 extern int pci_hose_read_config_word_via_dword(struct pci_controller *hose,
@@ -827,7 +776,7 @@ int pci_find_next_ext_capability(struct pci_controller *hose,
 int pci_hose_find_ext_capability(struct pci_controller *hose,
 				 pci_dev_t dev, int cap);
 
-#endif /* !defined(CONFIG_DM_PCI) || defined(CONFIG_DM_PCI_COMPAT) */
+#endif /* defined(CONFIG_DM_PCI_COMPAT) */
 
 const char * pci_class_str(u8 class);
 int pci_last_busno(void);
@@ -890,7 +839,6 @@ enum pci_size_t {
 
 struct udevice;
 
-#ifdef CONFIG_DM_PCI
 /**
  * struct pci_child_plat - information stored about each PCI device
  *
@@ -1691,8 +1639,6 @@ int sandbox_pci_get_client(struct udevice *emul, struct udevice **devp);
  */
 extern void board_pci_fixup_dev(struct udevice *bus, struct udevice *dev);
 
-#endif /* CONFIG_DM_PCI */
-
 /**
  * PCI_DEVICE - macro used to describe a specific pci device
  * @vend: the 16 bit PCI Vendor ID
-- 
2.32.0.432.gabb21c7263-goog


  parent reply	other threads:[~2021-07-26 13:35 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 ` Simon Glass [this message]
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 ` [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-5-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.