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 v2 30/32] pci: Drop PCI_INDIRECT_BRIDGE
Date: Sun,  1 Aug 2021 18:54:43 -0600	[thread overview]
Message-ID: <20210802005446.2267075-31-sjg@chromium.org> (raw)
In-Reply-To: <20210802005446.2267075-1-sjg@chromium.org>

This does not work with driver model so can be removed.

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

(no changes since v1)

 README                              |  3 --
 drivers/pci/Makefile                |  1 -
 drivers/pci/pci_indirect.c          | 71 -----------------------------
 include/configs/MPC8349EMDS.h       |  4 --
 include/configs/MPC8349EMDS_SDRAM.h |  4 --
 include/configs/MPC837XERDB.h       |  2 -
 include/configs/MPC8540ADS.h        |  1 -
 include/configs/MPC8560ADS.h        |  1 -
 include/pci.h                       |  4 --
 scripts/config_whitelist.txt        |  1 -
 10 files changed, 92 deletions(-)
 delete mode 100644 drivers/pci/pci_indirect.c

diff --git a/README b/README
index 4fdc49fbb9c..daa274d0fc7 100644
--- a/README
+++ b/README
@@ -2776,9 +2776,6 @@ Low Level (hardware related) configuration options:
   CONFIG_SYS_OR3_PRELIM, CONFIG_SYS_BR3_PRELIM:
 		Memory Controller Definitions: BR2/3 and OR2/3 (SDRAM)
 
-- CONFIG_PCI_INDIRECT_BRIDGE:
-		Enable support for indirect PCI bridges.
-
 - CONFIG_SYS_SRIO:
 		Chip has SRIO or not
 
diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile
index bdfdec98a08..4a131bf5ca4 100644
--- a/drivers/pci/Makefile
+++ b/drivers/pci/Makefile
@@ -14,7 +14,6 @@ obj-$(CONFIG_PCI) += pci_auto_common.o pci_common.o
 obj-$(CONFIG_PCIE_ECAM_GENERIC) += pcie_ecam_generic.o
 obj-$(CONFIG_PCIE_ECAM_SYNQUACER) += pcie_ecam_synquacer.o
 obj-$(CONFIG_FSL_PCI_INIT) += fsl_pci_init.o
-obj-$(CONFIG_PCI_INDIRECT_BRIDGE) += pci_indirect.o
 obj-$(CONFIG_PCI_GT64120) += pci_gt64120.o
 obj-$(CONFIG_PCI_MPC85XX) += pci_mpc85xx.o
 obj-$(CONFIG_PCI_MSC01) += pci_msc01.o
diff --git a/drivers/pci/pci_indirect.c b/drivers/pci/pci_indirect.c
deleted file mode 100644
index 6134c22d1bc..00000000000
--- a/drivers/pci/pci_indirect.c
+++ /dev/null
@@ -1,71 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Support for indirect PCI bridges.
- *
- * Copyright (C) 1998 Gabriel Paubert.
- */
-
-#include <common.h>
-
-#if !defined(__I386__) && !defined(CONFIG_DM_PCI)
-
-#include <asm/processor.h>
-#include <asm/io.h>
-#include <pci.h>
-
-#define cfg_read(val, addr, type, op)	*val = op((type)(addr))
-#define cfg_write(val, addr, type, op)	op((type *)(addr), (val))
-
-#if defined(CONFIG_E500) || defined(CONFIG_MPC86xx)
-#define INDIRECT_PCI_OP(rw, size, type, op, mask)                        \
-static int                                                               \
-indirect_##rw##_config_##size(struct pci_controller *hose,               \
-			      pci_dev_t dev, int offset, type val)       \
-{                                                                        \
-	u32 b, d,f;							 \
-	b = PCI_BUS(dev); d = PCI_DEV(dev); f = PCI_FUNC(dev);		 \
-	b = b - hose->first_busno;					 \
-	dev = PCI_BDF(b, d, f);						 \
-	*(hose->cfg_addr) = dev | (offset & 0xfc) | ((offset & 0xf00) << 16) | 0x80000000; \
-	sync();                                                          \
-	cfg_##rw(val, hose->cfg_data + (offset & mask), type, op);       \
-	return 0;                                                        \
-}
-#else
-#define INDIRECT_PCI_OP(rw, size, type, op, mask)			 \
-static int								 \
-indirect_##rw##_config_##size(struct pci_controller *hose,		 \
-			      pci_dev_t dev, int offset, type val)	 \
-{									 \
-	u32 b, d,f;							 \
-	b = PCI_BUS(dev); d = PCI_DEV(dev); f = PCI_FUNC(dev);		 \
-	b = b - hose->first_busno;					 \
-	dev = PCI_BDF(b, d, f);						 \
-	out_le32(hose->cfg_addr, dev | (offset & 0xfc) | 0x80000000);	 \
-	cfg_##rw(val, hose->cfg_data + (offset & mask), type, op);	 \
-	return 0;							 \
-}
-#endif
-
-INDIRECT_PCI_OP(read, byte, u8 *, in_8, 3)
-INDIRECT_PCI_OP(read, word, u16 *, in_le16, 2)
-INDIRECT_PCI_OP(read, dword, u32 *, in_le32, 0)
-INDIRECT_PCI_OP(write, byte, u8, out_8, 3)
-INDIRECT_PCI_OP(write, word, u16, out_le16, 2)
-INDIRECT_PCI_OP(write, dword, u32, out_le32, 0)
-
-void pci_setup_indirect(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data)
-{
-	pci_set_ops(hose,
-		    indirect_read_config_byte,
-		    indirect_read_config_word,
-		    indirect_read_config_dword,
-		    indirect_write_config_byte,
-		    indirect_write_config_word,
-		    indirect_write_config_dword);
-
-	hose->cfg_addr = (unsigned int *) cfg_addr;
-	hose->cfg_data = (unsigned char *) cfg_data;
-}
-
-#endif	/* !__I386__ */
diff --git a/include/configs/MPC8349EMDS.h b/include/configs/MPC8349EMDS.h
index d6ae419456a..b4e1cae8938 100644
--- a/include/configs/MPC8349EMDS.h
+++ b/include/configs/MPC8349EMDS.h
@@ -303,10 +303,6 @@
 #define CONFIG_SYS_SICRH 0
 #define CONFIG_SYS_SICRL SICRL_LDP_A
 
-#ifdef CONFIG_PCI
-#define CONFIG_PCI_INDIRECT_BRIDGE
-#endif
-
 #if defined(CONFIG_CMD_KGDB)
 #define CONFIG_KGDB_BAUDRATE	230400	/* speed of kgdb serial port */
 #endif
diff --git a/include/configs/MPC8349EMDS_SDRAM.h b/include/configs/MPC8349EMDS_SDRAM.h
index 8ebca99d98b..7924cbc8a3e 100644
--- a/include/configs/MPC8349EMDS_SDRAM.h
+++ b/include/configs/MPC8349EMDS_SDRAM.h
@@ -360,10 +360,6 @@
 #define CONFIG_SYS_SICRH 0
 #define CONFIG_SYS_SICRL SICRL_LDP_A
 
-#ifdef CONFIG_PCI
-#define CONFIG_PCI_INDIRECT_BRIDGE
-#endif
-
 #if defined(CONFIG_CMD_KGDB)
 #define CONFIG_KGDB_BAUDRATE	230400	/* speed of kgdb serial port */
 #endif
diff --git a/include/configs/MPC837XERDB.h b/include/configs/MPC837XERDB.h
index 0a136b4f92f..a13b178d6af 100644
--- a/include/configs/MPC837XERDB.h
+++ b/include/configs/MPC837XERDB.h
@@ -255,8 +255,6 @@
 #define CONFIG_SYS_PCIE2_IO_SIZE	0x00800000
 
 #ifdef CONFIG_PCI
-#define CONFIG_PCI_INDIRECT_BRIDGE
-
 #undef CONFIG_PCI_SCAN_SHOW	/* show pci devices on startup */
 #endif	/* CONFIG_PCI */
 
diff --git a/include/configs/MPC8540ADS.h b/include/configs/MPC8540ADS.h
index ac9afa179a5..549fbfa65c7 100644
--- a/include/configs/MPC8540ADS.h
+++ b/include/configs/MPC8540ADS.h
@@ -26,7 +26,6 @@
 #define CONFIG_HAS_FEC		1	/* 8540 has FEC */
 #endif
 
-#define CONFIG_PCI_INDIRECT_BRIDGE
 #define CONFIG_SYS_PCI_64BIT	1	/* enable 64-bit PCI resources */
 
 /*
diff --git a/include/configs/MPC8560ADS.h b/include/configs/MPC8560ADS.h
index 02aeb6f3d53..5254936a4b2 100644
--- a/include/configs/MPC8560ADS.h
+++ b/include/configs/MPC8560ADS.h
@@ -27,7 +27,6 @@
  * assume U-Boot is less than 0.5MB
  */
 
-#define CONFIG_PCI_INDIRECT_BRIDGE
 #define CONFIG_SYS_PCI_64BIT	1	/* enable 64-bit PCI resources */
 #undef CONFIG_ETHER_ON_FCC             /* cpm FCC ethernet support */
 #define CONFIG_RESET_PHY_R	1	/* Call reset_phy() */
diff --git a/include/pci.h b/include/pci.h
index 2c2930e7a74..0fc22adffd0 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -656,10 +656,6 @@ struct pci_controller {
 	struct pci_region *pci_mem, *pci_io, *pci_prefetch;
 };
 
-#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_COMPAT)
 extern phys_addr_t pci_hose_bus_to_phys(struct pci_controller* hose,
 					pci_addr_t addr, unsigned long flags);
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index e6bddf15b88..33345358085 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -1091,7 +1091,6 @@ CONFIG_PCI_CONFIG_HOST_BRIDGE
 CONFIG_PCI_EHCI_DEVICE
 CONFIG_PCI_EHCI_DEVNO
 CONFIG_PCI_GT64120
-CONFIG_PCI_INDIRECT_BRIDGE
 CONFIG_PCI_IO_BUS
 CONFIG_PCI_IO_PHYS
 CONFIG_PCI_IO_SIZE
-- 
2.32.0.554.ge1b32706d8-goog


  parent reply	other threads:[~2021-08-02  1:09 UTC|newest]

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