Skip to contentSkip to conversation

pci: Drop all pre-driver model code

PATCH In review Simon Glass 3 participants 73 messages Aug 2, 2021 – Sep 14, 2021

Subsystems (18)
Network drivers Arm (32-bit) SCSI USB +14 more subsystems
lore
Share & tools
lore
#0 lore raw

v2 cover pci: Drop all pre-driver model code

The hard work to actually enable DM_PCI everywhere was done recently. This series attempts to drop most of the code that it no-longer needed now that PCI has been converted to driver model.

It also drops the UCP1020 board since it has various unique build issues. It doesn't even support driver model so it seems reasonable to just remove it.

The DM_PCI option disappears and only PCI is left.

We can drop about 50 ad-hoc CONFIGs also, but this series doesn't do that since it is probably best done when the CONFIGs are resynced. It does include a CONFIG resync patch which can be dropped if that is done separately.

Changes in v2:
- Update to mention DM_PCI instead
- Fix tag to 'mips' from 'ppc'

Simon Glass (32):
pci: Drop old code from pci command
ppc: Remove UCP1020 board
pci: Drop old code from header file
pci: Remove guard around compatibility functions
pci: Drop DM_PCI check from fdtdec
pci: Drop DM_PCI check from pci_common
ppc: Drop CONFIG_SYS_PCI_SUBSYS_VENDORID
pci: powerpc: Drop old code
pci: freescale: Drop old code
pci: dm: core: Drop DM_PCI check from devfdt_get_addr_pci()
ppc: Drop DM_PCI from config files
pci: acpi: Drop DM_PCI check from ahci
pci: usb: Drop DM_PCI from ohci
ppc: malta: Drop use of DM_PCI
ppc: socrates: Drop use of DM_PCI
pci: gt64120: Drop use of DM_PCI
pci: msc01: Drop use of DM_PCI
pci: imx: Drop use of DM_PCI
pci: scsi: pci: Drop DM_PCI check from scsi
pci: Drop DM_PCI check from bios_emul
net: Drop DM_PCI check from designware driver
pci: imx: Drop DM_PCI check from cpu driver
pci: arm: mvebu: Drop DM_PCI check from
pci: sata_sil: Drop DM_PCI checks
distro_bootcmd: Drop DM_PCI check
pci: Drop pci_init_board()
pci: ppc: Drop ftpci100 driver
ppc: Drop idt8t49n222a_serdes_clk driver
ppc: Drop t4qds and b4860qds references
pci: Drop PCI_INDIRECT_BRIDGE
pci: Drop DM_PCI
pci: Drop migration method

 .azure-pipelines.yml                          |   4 +-
 README                                        |   3 -
 arch/Kconfig                                  |   1 -
 arch/arm/Kconfig                              |   2 +-
 arch/arm/mach-imx/cpu.c                       |   4 -
 arch/arm/mach-imx/mx6/Kconfig                 |   2 +-
 arch/arm/mach-mvebu/arm64-common.c            |   5 +-
 arch/mips/Kconfig                             |   2 +-
 arch/nds32/include/asm/arch-ag102/ag102.h     |   2 -
 arch/powerpc/cpu/mpc83xx/pci.c                | 160 ----
 arch/powerpc/cpu/mpc85xx/Makefile             |   1 -
 arch/powerpc/cpu/mpc85xx/pci.c                | 191 ----
 board/Arcturus/ucp1020/Kconfig                |  28 +-
 board/Arcturus/ucp1020/MAINTAINERS            |   7 -
 board/Arcturus/ucp1020/Makefile               |  31 -
 board/Arcturus/ucp1020/README                 |  54 --
 board/Arcturus/ucp1020/cmd_arc.c              | 408 ---------
 board/Arcturus/ucp1020/ddr.c                  | 161 ----
 board/Arcturus/ucp1020/law.c                  |  24 -
 board/Arcturus/ucp1020/spl.c                  | 127 ---
 board/Arcturus/ucp1020/spl_minimal.c          |  67 --
 board/Arcturus/ucp1020/tlb.c                  | 100 ---
 board/Arcturus/ucp1020/ucp1020.c              | 372 --------
 board/Arcturus/ucp1020/ucp1020.h              |  45 -
 board/cavium/thunderx/thunderx.c              |   7 -
 board/emulation/qemu-riscv/Kconfig            |   1 -
 board/freescale/common/Makefile               |   1 -
 board/freescale/common/cds_pci_ft.c           |  59 --
 .../common/idt8t49n222a_serdes_clk.c          | 208 -----
 .../common/idt8t49n222a_serdes_clk.h          | 106 ---
 board/freescale/common/p_corenet/Makefile     |   1 -
 board/freescale/common/p_corenet/pci.c        |  25 -
 board/freescale/mpc8349emds/pci.c             |  73 --
 board/freescale/mpc837xerdb/Makefile          |   1 -
 board/freescale/mpc837xerdb/pci.c             | 109 ---
 board/freescale/mpc8548cds/mpc8548cds.c       | 114 ---
 board/freescale/p1010rdb/p1010rdb.c           |  11 -
 board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c   |  11 -
 board/freescale/t102xrdb/Makefile             |   1 -
 board/freescale/t102xrdb/pci.c                |  25 -
 board/freescale/t104xrdb/Makefile             |   1 -
 board/freescale/t104xrdb/pci.c                |  25 -
 board/freescale/t208xqds/Makefile             |   1 -
 board/freescale/t208xqds/pci.c                |  25 -
 board/freescale/t208xrdb/Makefile             |   1 -
 board/freescale/t208xrdb/pci.c                |  25 -
 board/freescale/t4rdb/Makefile                |   1 -
 board/freescale/t4rdb/pci.c                   |  25 -
 board/imgtec/malta/malta.c                    |  67 --
 board/socionext/developerbox/Kconfig          |   1 -
 board/socrates/socrates.c                     |   4 +-
 board/xes/common/fsl_8xxx_pci.c               |  50 --
 cmd/pci.c                                     | 212 -----
 common/Kconfig                                |   1 -
 configs/UCP1020_defconfig                     |  58 --
 doc/board/freescale/b4860qds.rst              | 453 ----------
 doc/board/freescale/index.rst                 |   1 -
 doc/develop/driver-model/migration.rst        |   9 -
 drivers/ata/ahci.c                            |  55 --
 drivers/ata/sata_sil.c                        |   8 -
 drivers/ata/sata_sil.h                        |   4 -
 drivers/bios_emulator/atibios.c               |  98 ---
 drivers/bios_emulator/bios.c                  |  39 -
 drivers/core/fdtaddr.c                        |   3 +-
 drivers/gpio/Kconfig                          |   2 +-
 drivers/i2c/Makefile                          |   2 +-
 drivers/net/Kconfig                           |   6 +-
 drivers/net/designware.c                      |  22 +-
 drivers/net/mscc_eswitch/Kconfig              |   2 +-
 drivers/pci/Kconfig                           |  40 +-
 drivers/pci/Makefile                          |   2 -
 drivers/pci/pci_common.c                      |   4 +-
 drivers/pci/pci_ftpci100.c                    | 319 -------
 drivers/pci/pci_gt64120.c                     |  64 --
 drivers/pci/pci_indirect.c                    |  71 --
 drivers/pci/pci_msc01.c                       |  64 --
 drivers/pci/pcie_imx.c                        |  81 --
 drivers/scsi/scsi.c                           |   6 -
 drivers/spi/Kconfig                           |   2 +-
 drivers/usb/host/ohci-hcd.c                   |  15 +-
 drivers/virtio/Kconfig                        |   2 +-
 include/ahci.h                                |   4 -
 include/bios_emul.h                           |  16 -
 include/config_distro_bootcmd.h               |   5 -
 include/configs/MPC8349EMDS.h                 |   5 -
 include/configs/MPC8349EMDS_SDRAM.h           |   5 -
 include/configs/MPC837XERDB.h                 |   3 -
 include/configs/MPC8540ADS.h                  |   2 -
 include/configs/MPC8548CDS.h                  |  16 -
 include/configs/MPC8560ADS.h                  |   2 -
 include/configs/P1010RDB.h                    |  28 -
 include/configs/P2041RDB.h                    |  17 -
 include/configs/T102xRDB.h                    |  17 -
 include/configs/T104xRDB.h                    |  20 -
 include/configs/T208xQDS.h                    |  20 -
 include/configs/T208xRDB.h                    |  20 -
 include/configs/T4240RDB.h                    |  21 -
 include/configs/UCP1020.h                     | 832 ------------------
 include/configs/corenet_ds.h                  |  21 -
 include/configs/p1_p2_rdb_pc.h                |  24 -
 include/configs/t4qds.h                       | 240 -----
 include/init.h                                |   3 -
 include/pci.h                                 |  76 +-
 lib/fdtdec.c                                  |  10 +-
 scripts/config_whitelist.txt                  |   6 -
 test/dm/Makefile                              |   2 +-
 106 files changed, 55 insertions(+), 5785 deletions(-)
 delete mode 100644 arch/powerpc/cpu/mpc85xx/pci.c
 delete mode 100644 board/Arcturus/ucp1020/MAINTAINERS
 delete mode 100644 board/Arcturus/ucp1020/Makefile
 delete mode 100644 board/Arcturus/ucp1020/README
 delete mode 100644 board/Arcturus/ucp1020/cmd_arc.c
 delete mode 100644 board/Arcturus/ucp1020/ddr.c
 delete mode 100644 board/Arcturus/ucp1020/law.c
 delete mode 100644 board/Arcturus/ucp1020/spl.c
 delete mode 100644 board/Arcturus/ucp1020/spl_minimal.c
 delete mode 100644 board/Arcturus/ucp1020/tlb.c
 delete mode 100644 board/Arcturus/ucp1020/ucp1020.c
 delete mode 100644 board/Arcturus/ucp1020/ucp1020.h
 delete mode 100644 board/freescale/common/idt8t49n222a_serdes_clk.c
 delete mode 100644 board/freescale/common/idt8t49n222a_serdes_clk.h
 delete mode 100644 board/freescale/common/p_corenet/pci.c
 delete mode 100644 board/freescale/mpc837xerdb/pci.c
 delete mode 100644 board/freescale/t102xrdb/pci.c
 delete mode 100644 board/freescale/t104xrdb/pci.c
 delete mode 100644 board/freescale/t208xqds/pci.c
 delete mode 100644 board/freescale/t208xrdb/pci.c
 delete mode 100644 board/freescale/t4rdb/pci.c
 delete mode 100644 configs/UCP1020_defconfig
 delete mode 100644 doc/board/freescale/b4860qds.rst
 delete mode 100644 drivers/pci/pci_ftpci100.c
 delete mode 100644 drivers/pci/pci_indirect.c
 delete mode 100644 include/configs/UCP1020.h
 delete mode 100644 include/configs/t4qds.h
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#1 lore raw

PATCH v2 1/32 pci: Drop old code from pci command

Drop the pre-driver model code from this file.

---

(no changes since v1)

 cmd/pci.c | 212 ------------------------------------------------------
 1 file changed, 212 deletions(-)
cmd/pci.c +0 -212
index e53b7c858c6..8cfa5bbdaa7 100644
@@ -47,7 +47,6 @@ static int pci_field_width(enum pci_size_t size)
 	return pci_byte_size(size) * 2;
 }
 
-#ifdef CONFIG_DM_PCI
 static void pci_show_regs(struct udevice *dev, struct pci_reg_info *regs)
 {
 	for (; regs->name; regs++) {
@@ -59,40 +58,7 @@ static void pci_show_regs(struct udevice *dev, struct pci_reg_info *regs)
 		       pci_field_width(regs->size), val);
 	}
 }
-#else
-static unsigned long pci_read_config(pci_dev_t dev, int offset,
-				     enum pci_size_t size)
-{
-	u32 val32;
-	u16 val16;
-	u8 val8;
 
-	switch (size) {
-	case PCI_SIZE_8:
-		pci_read_config_byte(dev, offset, &val8);
-		return val8;
-	case PCI_SIZE_16:
-		pci_read_config_word(dev, offset, &val16);
-		return val16;
-	case PCI_SIZE_32:
-	default:
-		pci_read_config_dword(dev, offset, &val32);
-		return val32;
-	}
-}
-
-static void pci_show_regs(pci_dev_t dev, struct pci_reg_info *regs)
-{
-	for (; regs->name; regs++) {
-		printf("  %s =%*s%#.*lx\n", regs->name,
-		       (int)(28 - strlen(regs->name)), "",
-		       pci_field_width(regs->size),
-		       pci_read_config(dev, regs->offset, regs->size));
-	}
-}
-#endif
-
-#ifdef CONFIG_DM_PCI
 int pci_bar_show(struct udevice *dev)
 {
 	u8 header_type;
@@ -162,7 +128,6 @@ int pci_bar_show(struct udevice *dev)
 
 	return 0;
 }
-#endif
 
 static struct pci_reg_info regs_start[] = {
 	{ "vendor ID", PCI_SIZE_16, PCI_VENDOR_ID },
@@ -258,23 +223,12 @@ static struct pci_reg_info regs_cardbus[] = {
  *
  * @dev: Bus+Device+Function number
  */
-#ifdef CONFIG_DM_PCI
 void pci_header_show(struct udevice *dev)
-#else
-void pci_header_show(pci_dev_t dev)
-#endif
 {
-#ifdef CONFIG_DM_PCI
 	unsigned long class, header_type;
 
 	dm_pci_read_config(dev, PCI_CLASS_CODE, &class, PCI_SIZE_8);
 	dm_pci_read_config(dev, PCI_HEADER_TYPE, &header_type, PCI_SIZE_8);
-#else
-	u8 class, header_type;
-
-	pci_read_config_byte(dev, PCI_CLASS_CODE, &class);
-	pci_read_config_byte(dev, PCI_HEADER_TYPE, &header_type);
-#endif
 	pci_show_regs(dev, regs_start);
 	printf("  class code =                  0x%.2x (%s)\n", (int)class,
 	       pci_class_str(class));
@@ -307,7 +261,6 @@ void pciinfo_header(int busnum, bool short_listing)
 	}
 }
 
-#ifdef CONFIG_DM_PCI
 /**
  * pci_header_show_brief() - Show the short-form PCI device header
  *
@@ -355,102 +308,6 @@ static void pciinfo(struct udevice *bus, bool short_listing)
 	}
 }
 
-#else
-
-/**
- * pci_header_show_brief() - Show the short-form PCI device header
- *
- * Reads and prints the header of the specified PCI device in short form.
- *
- * @dev: Bus+Device+Function number
- */
-void pci_header_show_brief(pci_dev_t dev)
-{
-	u16 vendor, device;
-	u8 class, subclass;
-
-	pci_read_config_word(dev, PCI_VENDOR_ID, &vendor);
-	pci_read_config_word(dev, PCI_DEVICE_ID, &device);
-	pci_read_config_byte(dev, PCI_CLASS_CODE, &class);
-	pci_read_config_byte(dev, PCI_CLASS_SUB_CODE, &subclass);
-
-	printf("0x%.4x     0x%.4x     %-23s 0x%.2x\n",
-	       vendor, device,
-	       pci_class_str(class), subclass);
-}
-
-/**
- * pciinfo() - Show a list of devices on the PCI bus
- *
- * Show information about devices on PCI bus. Depending on @short_pci_listing
- * the output will be more or less exhaustive.
- *
- * @bus_num: The number of the bus to be scanned
- * @short_pci_listing: true to use short form, showing only a brief header
- * for each device
- */
-void pciinfo(int bus_num, int short_pci_listing)
-{
-	struct pci_controller *hose = pci_bus_to_hose(bus_num);
-	int device;
-	int function;
-	unsigned char header_type;
-	unsigned short vendor_id;
-	pci_dev_t dev;
-	int ret;
-
-	if (!hose)
-		return;
-
-	pciinfo_header(bus_num, short_pci_listing);
-
-	for (device = 0; device < PCI_MAX_PCI_DEVICES; device++) {
-		header_type = 0;
-		vendor_id = 0;
-		for (function = 0; function < PCI_MAX_PCI_FUNCTIONS;
-		     function++) {
-			/*
-			 * If this is not a multi-function device, we skip
-			 * the rest.
-			 */
-			if (function && !(header_type & 0x80))
-				break;
-
-			dev = PCI_BDF(bus_num, device, function);
-
-			if (pci_skip_dev(hose, dev))
-				continue;
-
-			ret = pci_read_config_word(dev, PCI_VENDOR_ID,
-						   &vendor_id);
-			if (ret)
-				goto error;
-			if ((vendor_id == 0xFFFF) || (vendor_id == 0x0000))
-				continue;
-
-			if (!function) {
-				pci_read_config_byte(dev, PCI_HEADER_TYPE,
-						     &header_type);
-			}
-
-			if (short_pci_listing) {
-				printf("%02x.%02x.%02x   ", bus_num, device,
-				       function);
-				pci_header_show_brief(dev);
-			} else {
-				printf("\nFound PCI device %02x.%02x.%02x:\n",
-				       bus_num, device, function);
-				pci_header_show(dev);
-			}
-		}
-	}
-
-	return;
-error:
-	printf("Cannot read bus configuration: %d\n", ret);
-}
-#endif
-
 /**
  * get_pci_dev() - Convert the "bus.device.function" identifier into a number
  *
@@ -482,13 +339,8 @@ static pci_dev_t get_pci_dev(char *name)
 	return PCI_BDF(bdfs[0], bdfs[1], bdfs[2]);
 }
 
-#ifdef CONFIG_DM_PCI
 static int pci_cfg_display(struct udevice *dev, ulong addr,
 			   enum pci_size_t size, ulong length)
-#else
-static int pci_cfg_display(pci_dev_t bdf, ulong addr, enum pci_size_t size,
-			   ulong length)
-#endif
 {
 #define DISP_LINE_LEN	16
 	ulong i, nbytes, linebytes;
@@ -509,11 +361,7 @@ static int pci_cfg_display(pci_dev_t bdf, ulong addr, enum pci_size_t size,
 		for (i = 0; i < linebytes; i += byte_size) {
 			unsigned long val;
 
-#ifdef CONFIG_DM_PCI
 			dm_pci_read_config(dev, addr, &val, size);
-#else
-			val = pci_read_config(bdf, addr, size);
-#endif
 			printf(" %0*lx", pci_field_width(size), val);
 			addr += byte_size;
 		}
@@ -528,31 +376,8 @@ static int pci_cfg_display(pci_dev_t bdf, ulong addr, enum pci_size_t size,
 	return (rc);
 }
 
-#ifndef CONFIG_DM_PCI
-static int pci_cfg_write (pci_dev_t bdf, ulong addr, ulong size, ulong value)
-{
-	if (size == 4) {
-		pci_write_config_dword(bdf, addr, value);
-	}
-	else if (size == 2) {
-		ushort val = value & 0xffff;
-		pci_write_config_word(bdf, addr, val);
-	}
-	else {
-		u_char val = value & 0xff;
-		pci_write_config_byte(bdf, addr, val);
-	}
-	return 0;
-}
-#endif
-
-#ifdef CONFIG_DM_PCI
 static int pci_cfg_modify(struct udevice *dev, ulong addr, ulong size,
 			  ulong value, int incrflag)
-#else
-static int pci_cfg_modify(pci_dev_t bdf, ulong addr, ulong size, ulong value,
-			  int incrflag)
-#endif
 {
 	ulong	i;
 	int	nbytes;
@@ -563,11 +388,7 @@ static int pci_cfg_modify(pci_dev_t bdf, ulong addr, ulong size, ulong value,
 	 */
 	do {
 		printf("%08lx:", addr);
-#ifdef CONFIG_DM_PCI
 		dm_pci_read_config(dev, addr, &val, size);
-#else
-		val = pci_read_config(bdf, addr, size);
-#endif
 		printf(" %0*lx", pci_field_width(size), val);
 
 		nbytes = cli_readline(" ? ");
@@ -594,11 +415,7 @@ static int pci_cfg_modify(pci_dev_t bdf, ulong addr, ulong size, ulong value,
 				/* good enough to not time out
 				 */
 				bootretry_reset_cmd_timeout();
-#ifdef CONFIG_DM_PCI
 				dm_pci_write_config(dev, addr, i, size);
-#else
-				pci_cfg_write(bdf, addr, size, i);
-#endif
 				if (incrflag)
 					addr += size;
 			}
@@ -608,7 +425,6 @@ static int pci_cfg_modify(pci_dev_t bdf, ulong addr, ulong size, ulong value,
 	return 0;
 }
 
-#ifdef CONFIG_DM_PCI
 static const struct pci_flag_info {
 	uint flag;
 	const char *name;
@@ -647,7 +463,6 @@ static void pci_show_regions(struct udevice *bus)
 		printf("\n");
 	}
 }
-#endif
 
 /* PCI Configuration Space access commands
  *
@@ -661,11 +476,7 @@ static int do_pci(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	ulong addr = 0, value = 0, cmd_size = 0;
 	enum pci_size_t size = PCI_SIZE_32;
-#ifdef CONFIG_DM_PCI
 	struct udevice *dev, *bus;
-#else
-	pci_dev_t dev;
-#endif
 	int busnum = 0;
 	pci_dev_t bdf = 0;
 	char cmd = 's';
@@ -687,19 +498,15 @@ static int do_pci(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 		if (argc > 4)
 			value = simple_strtoul(argv[4], NULL, 16);
 	case 'h':		/* header */
-#ifdef CONFIG_DM_PCI
 	case 'b':		/* bars */
-#endif
 		if (argc < 3)
 			goto usage;
 		if ((bdf = get_pci_dev(argv[2])) == -1)
 			return 1;
 		break;
-#if defined(CONFIG_DM_PCI)
 	case 'e':
 		pci_init();
 		return 0;
-#endif
 	case 'r': /* no break */
 	default:		/* scan bus */
 		value = 1; /* short listing */
@@ -711,7 +518,6 @@ static int do_pci(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 			if (argc > 1)
 				busnum = simple_strtoul(argv[1], NULL, 16);
 		}
-#ifdef CONFIG_DM_PCI
 		ret = uclass_get_device_by_seq(UCLASS_PCI, busnum, &bus);
 		if (ret) {
 			printf("No such bus\n");
@@ -721,21 +527,14 @@ static int do_pci(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 			pci_show_regions(bus);
 		else
 			pciinfo(bus, value);
-#else
-		pciinfo(busnum, value);
-#endif
 		return 0;
 	}
 
-#ifdef CONFIG_DM_PCI
 	ret = dm_pci_bus_find_bdf(bdf, &dev);
 	if (ret) {
 		printf("No such device\n");
 		return CMD_RET_FAILURE;
 	}
-#else
-	dev = bdf;
-#endif
 
 	switch (argv[1][0]) {
 	case 'h':		/* header */
@@ -756,17 +555,10 @@ static int do_pci(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 	case 'w':		/* write */
 		if (argc < 5)
 			goto usage;
-#ifdef CONFIG_DM_PCI
 		ret = dm_pci_write_config(dev, addr, value, size);
-#else
-		ret = pci_cfg_write(dev, addr, size, value);
-#endif
 		break;
-#ifdef CONFIG_DM_PCI
-
 	case 'b':		/* bars */
 		return pci_bar_show(dev);
-#endif
 	default:
 		ret = CMD_RET_USAGE;
 		break;
@@ -783,18 +575,14 @@ static int do_pci(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 static char pci_help_text[] =
 	"[bus] [long]\n"
 	"    - short or long list of PCI devices on bus 'bus'\n"
-#if defined(CONFIG_DM_PCI)
 	"pci enum\n"
 	"    - Enumerate PCI buses\n"
-#endif
 	"pci header b.d.f\n"
 	"    - show header of PCI device 'bus.device.function'\n"
-#ifdef CONFIG_DM_PCI
 	"pci bar b.d.f\n"
 	"    - show BARs base and size for device b.d.f'\n"
 	"pci regions\n"
 	"    - show PCI regions\n"
-#endif
 	"pci display[.b, .w, .l] b.d.f [address] [# of objects]\n"
 	"    - display PCI configuration space (CFG)\n"
 	"pci next[.b, .w, .l] b.d.f address\n"
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#2 lore raw

Re: [PATCH v2 01/32] pci: Drop old code from pci command

Quoted 3 lines · Simon Glass

Drop the pre-driver model code from this file.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#3 lore raw

PATCH v2 2/32 ppc: Remove UCP1020 board

In reply to Simon Glass

This board has not been converted to CONFIG_DM_PCI by the deadline. Remove it.

Leave the Kconfig options to avoid warnings on other boards.

---

Changes in v2:
- Update to mention DM_PCI instead

 board/Arcturus/ucp1020/Kconfig       |  28 +-
 board/Arcturus/ucp1020/MAINTAINERS   |   7 -
 board/Arcturus/ucp1020/Makefile      |  31 -
 board/Arcturus/ucp1020/README        |  54 --
 board/Arcturus/ucp1020/cmd_arc.c     | 408 -------------
 board/Arcturus/ucp1020/ddr.c         | 161 ------
 board/Arcturus/ucp1020/law.c         |  24 -
 board/Arcturus/ucp1020/spl.c         | 127 ----
 board/Arcturus/ucp1020/spl_minimal.c |  67 ---
 board/Arcturus/ucp1020/tlb.c         | 100 ----
 board/Arcturus/ucp1020/ucp1020.c     | 372 ------------
 board/Arcturus/ucp1020/ucp1020.h     |  45 --
 configs/UCP1020_defconfig            |  58 --
 include/configs/UCP1020.h            | 832 ---------------------------
 14 files changed, 1 insertion(+), 2313 deletions(-)
 delete mode 100644 board/Arcturus/ucp1020/MAINTAINERS
 delete mode 100644 board/Arcturus/ucp1020/Makefile
 delete mode 100644 board/Arcturus/ucp1020/README
 delete mode 100644 board/Arcturus/ucp1020/cmd_arc.c
 delete mode 100644 board/Arcturus/ucp1020/ddr.c
 delete mode 100644 board/Arcturus/ucp1020/law.c
 delete mode 100644 board/Arcturus/ucp1020/spl.c
 delete mode 100644 board/Arcturus/ucp1020/spl_minimal.c
 delete mode 100644 board/Arcturus/ucp1020/tlb.c
 delete mode 100644 board/Arcturus/ucp1020/ucp1020.c
 delete mode 100644 board/Arcturus/ucp1020/ucp1020.h
 delete mode 100644 configs/UCP1020_defconfig
 delete mode 100644 include/configs/UCP1020.h
board/Arcturus/ucp1020/Kconfig +1 -27
index fe2c3be1b7a..60d80bab822 100644
@@ -1,28 +1,4 @@
-if TARGET_UCP1020
-
-config SYS_BOARD
-	string
-	default "ucp1020"
-
-config SYS_VENDOR
-	string
-	default "Arcturus"
-
-config SYS_CONFIG_NAME
-	string
-	default "UCP1020"
-
-choice
-	prompt "Target image select"
-
-config TARGET_UCP1020_NOR
-	bool "NOR flash u-boot image"
-
-config TARGET_UCP1020_SPIFLASH
-	bool "SPI flash u-boot image"
-
-endchoice
-
+# This exists only to avoid a warning for an unconverted value
 if TARGET_UCP1020_SPIFLASH
 config UCBOOT
 	bool
@@ -32,5 +8,3 @@ config SPIFLASH
 	bool
 	default y
 endif
-
-endif
board/Arcturus/ucp1020/MAINTAINERS deleted +0 -7
deleted file mode 100644
index e4a4718188f..00000000000
@@ -1,7 +0,0 @@
-UCP1020 BOARD
-M:	Oleksandr Zhadan and Michael Durrant <[email protected]>
-S:	Maintained
-F:	board/Arcturus/ucp1020/
-F:	include/configs/UCP1020.h
-F:	configs/UCP1020_defconfig
-F:	configs/UCP1020_SPIFLASH_defconfig
board/Arcturus/ucp1020/Makefile deleted +0 -31
deleted file mode 100644
index 46d04fb78c1..00000000000
@@ -1,31 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-#
-# Copyright 2013-2015 Arcturus Networks, Inc.
-# based on board/freescale/p1_p2_rdb_pc/Makefile
-# original copyright follows:
-# Copyright 2010-2011 Freescale Semiconductor, Inc.
-
-MINIMAL=
-
-ifdef CONFIG_SPL_BUILD
-ifdef CONFIG_SPL_INIT_MINIMAL
-MINIMAL=y
-endif
-endif
-
-ifdef MINIMAL
-
-obj-y	+= spl_minimal.o tlb.o law.o
-
-else
-ifdef CONFIG_SPL_BUILD
-obj-y += spl.o
-endif
-
-obj-y        += ucp1020.o
-obj-y        += ddr.o
-obj-y        += law.o
-obj-y        += tlb.o
-obj-y        += cmd_arc.o
-
-endif
board/Arcturus/ucp1020/README deleted +0 -54

54 lines not on this page · raw message

board/Arcturus/ucp1020/cmd_arc.c deleted +0 -408

408 lines not on this page · raw message

board/Arcturus/ucp1020/ddr.c deleted +0 -161

161 lines not on this page · raw message

board/Arcturus/ucp1020/law.c deleted +0 -24
deleted file mode 100644
index cb53692a32b..00000000000
@@ -1,24 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright 2013-2015 Arcturus Networks, Inc.
- *           http://www.arcturusnetworks.com/products/ucp1020/
- * based on board/freescale/p1_p2_rdb_pc/spl.c
- * original copyright follows:
- * Copyright 2013 Freescale Semiconductor, Inc.
- */
-
-#include <common.h>
-#include <asm/fsl_law.h>
-#include <asm/mmu.h>
-
-struct law_entry law_table[] = {
-#ifdef CONFIG_VSC7385_ENET
-	SET_LAW(CONFIG_SYS_VSC7385_BASE_PHYS, LAW_SIZE_1M, LAW_TRGT_IF_LBC),
-#endif
-	SET_LAW(CONFIG_SYS_FLASH_BASE_PHYS, LAW_SIZE_64M, LAW_TRGT_IF_LBC),
-#ifdef CONFIG_SYS_NAND_BASE_PHYS
-	SET_LAW(CONFIG_SYS_NAND_BASE_PHYS, LAW_SIZE_32K, LAW_TRGT_IF_LBC),
-#endif
-};
-
-int num_law_entries = ARRAY_SIZE(law_table);
board/Arcturus/ucp1020/spl.c deleted +0 -127

127 lines not on this page · raw message

board/Arcturus/ucp1020/spl_minimal.c deleted +0 -67

67 lines not on this page · raw message

board/Arcturus/ucp1020/tlb.c deleted +0 -100

100 lines not on this page · raw message

board/Arcturus/ucp1020/ucp1020.c deleted +0 -372

372 lines not on this page · raw message

board/Arcturus/ucp1020/ucp1020.h deleted +0 -45

45 lines not on this page · raw message

configs/UCP1020_defconfig deleted +0 -58

58 lines not on this page · raw message

include/configs/UCP1020.h deleted +0 -832

832 lines not on this page · raw message

Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#4 lore raw

Re: [PATCH v2 02/32] ppc: Remove UCP1020 board

Quoted 10 lines · Simon Glass

This board has not been converted to CONFIG_DM_PCI by the deadline. Remove it.

Leave the Kconfig options to avoid warnings on other boards.

---

Changes in v2:
- Update to mention DM_PCI instead

Again, note that an alternative here would be to disable PCI, and other non-required on the board features and enable DM as soon as possible.

Signature · 1 line
Tom
Acked-by Michael Durrant Acked-by Oleksandr Zhadan Acked-by Oleksandr Zhadan and Michael Durrant on v2 2/32
#5 lore raw

Re: [PATCH v2 02/32] ppc: Remove UCP1020 board

In reply to Simon Glass

This board has not been converted to CONFIG_DM_PCI by the deadline.

Remove it.

Leave the Kconfig options to avoid warnings on other boards.

Acked-by Oleksandr Zhadan and Michael Durrant

<[email protected]>
---

Changes in v2:
- Update to mention DM_PCI instead

board/Arcturus/ucp1020/Kconfig | 28 +- board/Arcturus/ucp1020/MAINTAINERS | 7 - board/Arcturus/ucp1020/Makefile | 31 - board/Arcturus/ucp1020/README | 54 -- board/Arcturus/ucp1020/cmd_arc.c | 408 -------------

board/Arcturus/ucp1020/ddr.c | 161 ------
board/Arcturus/ucp1020/law.c | 24 -
board/Arcturus/ucp1020/spl.c | 127 ----

board/Arcturus/ucp1020/spl_minimal.c | 67 --- board/Arcturus/ucp1020/tlb.c | 100 ---- board/Arcturus/ucp1020/ucp1020.c | 372 ------------ board/Arcturus/ucp1020/ucp1020.h | 45 -- configs/UCP1020_defconfig | 58 -- include/configs/UCP1020.h | 832 ---------------------------

14 files changed, 1 insertion(+), 2313 deletions(-)

delete mode 100644 board/Arcturus/ucp1020/MAINTAINERS delete mode 100644 board/Arcturus/ucp1020/Makefile delete mode 100644 board/Arcturus/ucp1020/README delete mode 100644 board/Arcturus/ucp1020/cmd_arc.c delete mode 100644 board/Arcturus/ucp1020/ddr.c delete mode 100644 board/Arcturus/ucp1020/law.c delete mode 100644 board/Arcturus/ucp1020/spl.c delete mode 100644 board/Arcturus/ucp1020/spl_minimal.c delete mode 100644 board/Arcturus/ucp1020/tlb.c delete mode 100644 board/Arcturus/ucp1020/ucp1020.c delete mode 100644 board/Arcturus/ucp1020/ucp1020.h delete mode 100644 configs/UCP1020_defconfig delete mode 100644 include/configs/UCP1020.h

board/Arcturus/ucp1020/Kconfig +1 -25
index fe2c3be1b7a..60d80bab822 100644
@@ -1,28 +1,4 @@
-if TARGET_UCP1020
-
-config SYS_BOARD
- string
- default "ucp1020"
-
-config SYS_VENDOR
- string
- default "Arcturus"
-
-config SYS_CONFIG_NAME
- string
- default "UCP1020"
-
-choice
- prompt "Target image select"
-
-config TARGET_UCP1020_NOR
- bool "NOR flash u-boot image"
-
-config TARGET_UCP1020_SPIFLASH
- bool "SPI flash u-boot image"
-
-endchoice
-
+# This exists only to avoid a warning for an unconverted value

if TARGET_UCP1020_SPIFLASH
config UCBOOT
bool
@@ -32,5 +8,3 @@ config SPIFLASH
bool
default y
endif
-
-endif

(quoted diff) +0 -0

b/board/Arcturus/ucp1020/MAINTAINERS
deleted file mode 100644
index e4a4718188f..00000000000

board/Arcturus/ucp1020/MAINTAINERS deleted +0 -7
@@ -1,7 +0,0 @@
-UCP1020 BOARD
-M: Oleksandr Zhadan and Michael Durrant <[email protected]>
-S: Maintained
-F: board/Arcturus/ucp1020/
-F: include/configs/UCP1020.h
-F: configs/UCP1020_defconfig
-F: configs/UCP1020_SPIFLASH_defconfig
(quoted diff) +0 -0

b/board/Arcturus/ucp1020/Makefile
deleted file mode 100644
index 46d04fb78c1..00000000000

board/Arcturus/ucp1020/Makefile deleted +0 -31
@@ -1,31 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-#
-# Copyright 2013-2015 Arcturus Networks, Inc.
-# based on board/freescale/p1_p2_rdb_pc/Makefile
-# original copyright follows:
-# Copyright 2010-2011 Freescale Semiconductor, Inc.
-
-MINIMAL=
-
-ifdef CONFIG_SPL_BUILD
-ifdef CONFIG_SPL_INIT_MINIMAL
-MINIMAL=y
-endif
-endif
-
-ifdef MINIMAL
-
-obj-y += spl_minimal.o tlb.o law.o
-
-else
-ifdef CONFIG_SPL_BUILD
-obj-y += spl.o
-endif
-
-obj-y += ucp1020.o
-obj-y += ddr.o
-obj-y += law.o
-obj-y += tlb.o
-obj-y += cmd_arc.o
-
-endif
board/Arcturus/ucp1020/README deleted +0 -1
deleted file mode 100644
index 555c4ef79fe..00000000000
@@ -1,54 +0,0 @@
-The uCP1020 product family (ucp1020) is an Arcturus Networks Inc.

System on Modules
-product featuring a Freescale P1020 CPU, optionally populated with 1, 2 or 3 Gig-Ethernet PHYs,
-DDR3, NOR Flash, eMMC NAND Flash and/or SPI Flash.
-
-Information on the generic product family can be found here:
- http://www.arcturusnetworks.com/products/ucp1020
-
-The UCP1020 several configurable options
-========================================
-
-- the selection of populated phy(s):
- KSZ9031 (current default for eTSEC 1 and 3)
-
-- the selection of boot location:
- SPI Flash or NOR flash
-
-The UCP1020 includes 2 default configurations
-=============================================
-NOR boot image:
- configs/UCP1020_defconfig
-SPI boot image:
- configs/UCP1020_SPIFLASH_defconfig
-
-The UCP1020 adds an additional command in cmd_arc.c to access and program -SPI resident factory defaults for serial number, and 1, 2 or 3 Ethernet -HW Addresses.
-
-
-Build example
-=============
-
-make distclean
-make UCP1020_defconfig
-make
-
-Default Scripts
-===============
-A default upgrade scripts is included in the default environment variable example:
-
-B$ run tftpflash
-
-Dual Environment
-================
-
-This build enables dual / failover environment environment.
-
-NOR Flash Partition declarations and scripts
-============================================
-Several scripts are available to allow TFTP of images and programming directly
-into defined NOR flash partitions. Examples:
-
-B$ run program0
-B$ run program1
-B$ run program2

(quoted diff) +0 -0

b/board/Arcturus/ucp1020/cmd_arc.c
deleted file mode 100644
index 4b30b66e208..00000000000

board/Arcturus/ucp1020/cmd_arc.c deleted +0 -41

41 lines not on this page · raw message

block is 512 bytes */
-
-int set_mmc_arc_product(int argc, char *const argv[])
-{
- struct mmc *mmc;
- u32 blk, cnt, n;
- int i, err = 1;
- void *addr;
- const u8 mmc_dev_num = CONFIG_SYS_MMC_ENV_DEV;
-
- mmc = find_mmc_device(mmc_dev_num);
- if (!mmc) {
- printf("No SD/MMC/eMMC card found\n");
- return 0;
- }
- if (mmc_init(mmc)) {
- printf("%s(%d) init failed\n", IS_SD(mmc) ? "SD" : "MMC",
- mmc_dev_num);
- return 0;
- }
- if (mmc_getwp(mmc) == 1) {
- printf("Error: card is write protected!\n");
- return CMD_RET_FAILURE;
- }
-
- /* Save factory defaults */
- addr = (void *)smac;
- cnt = 1; /* One 512 bytes block */
-
- for (i = 0; i < MAX_FWENV_ADDR; i++)
- if (fwenv_addr[i] != -1) {
- blk = fwenv_addr[i] / 512;
- n = blk_dwrite(mmc_get_blk_desc(mmc), blk, cnt, addr);
- if (n != cnt)
- printf("%s: %s [%d]\n", __func__, mystrerr, i);
- else
- err = 0;
- }
- if (err)
- return -2;
-
- return err;
-}
-
-static int read_mmc_arc_info(void)
-{
- struct mmc *mmc;
- u32 blk, cnt, n;
- int i;
- void *addr;
- const u8 mmc_dev_num = CONFIG_SYS_MMC_ENV_DEV;
-
- mmc = find_mmc_device(mmc_dev_num);
- if (!mmc) {
- printf("No SD/MMC/eMMC card found\n");
- return 0;
- }
- if (mmc_init(mmc)) {
- printf("%s(%d) init failed\n", IS_SD(mmc) ? "SD" : "MMC",
- mmc_dev_num);
- return 0;
- }
-
- addr = (void *)smac;
- cnt = 1; /* One 512 bytes block */
-
- for (i = 0; i < MAX_FWENV_ADDR; i++)
- if (fwenv_addr[i] != -1) {
- blk = fwenv_addr[i] / 512;
- n = blk_dread(mmc_get_blk_desc(mmc), blk, cnt, addr);
- flush_cache((ulong) addr, 512);
- if (n == cnt)
- return (i + 1);
- }
- return 0;
-}
-#endif
-
-#if (FWENV_TYPE == FWENV_SPI_FLASH)
-
-static struct spi_flash *flash;
-static char smac[4][18];
-
-int set_spi_arc_product(int argc, char *const argv[])
-{
- int i, err = 1;
-
- flash = spi_flash_probe(CONFIG_ENV_SPI_BUS, CONFIG_ENV_SPI_CS,
- CONFIG_ENV_SPI_MAX_HZ, CONFIG_ENV_SPI_MODE);
- if (!flash) {
- printf("Failed to initialize SPI flash at %u:%u\n",
- CONFIG_ENV_SPI_BUS, CONFIG_ENV_SPI_CS);
- return -1;
- }
-
- /* Save factory defaults */
- for (i = 0; i < MAX_FWENV_ADDR; i++)
- if (fwenv_addr[i] != -1)
- if (spi_flash_write
- (flash, fwenv_addr[i], sizeof(smac), smac))
- printf("%s: %s [%d]\n", __func__, mystrerr, i);
- else
- err = 0;
- if (err)
- return -2;
-
- return err;
-}
-
-static int read_spi_arc_info(void)
-{
- int i;
-
- flash = spi_flash_probe(CONFIG_ENV_SPI_BUS, CONFIG_ENV_SPI_CS,
- CONFIG_ENV_SPI_MAX_HZ, CONFIG_ENV_SPI_MODE);
- if (!flash) {
- printf("Failed to initialize SPI flash at %u:%u\n",
- CONFIG_ENV_SPI_BUS, CONFIG_ENV_SPI_CS);
- return 0;
- }
- for (i = 0; i < MAX_FWENV_ADDR; i++)
- if (fwenv_addr[i] != -1)
- if (!spi_flash_read
- (flash, fwenv_addr[i], sizeof(smac), smac))
- return (i + 1);
- return 0;
-}
-#endif
-
-#if (FWENV_TYPE == FWENV_NOR_FLASH)
-
-static char smac[4][18];
-
-int set_nor_arc_product(int argc, char *const argv[])
-{
- int i, err = 1;
-
- /* Save factory defaults */
- for (i = 0; i < MAX_FWENV_ADDR; i++)
- if (fwenv_addr[i] != -1) {
- ulong fwenv_end = fwenv_addr[i] + 4;
-
- flash_sect_roundb(&fwenv_end);
- flash_sect_protect(0, fwenv_addr[i], fwenv_end);
- if (flash_write
- ((char *)smac, fwenv_addr[i], sizeof(smac)))
- printf("%s: %s [%d]\n", __func__, mystrerr, i);
- else
- err = 0;
- flash_sect_protect(1, fwenv_addr[i], fwenv_end);
- }
- if (err)
- return -2;
-
- return err;
-}
-
-static int read_nor_arc_info(void)
-{
- int i;
-
- for (i = 0; i < MAX_FWENV_ADDR; i++)
- if (fwenv_addr[i] != -1) {
- memcpy(smac, (void *)fwenv_addr[i], sizeof(smac));
- return (i + 1);
- }
-
- return 0;
-}
-#endif
-
-int set_arc_product(int argc, char *const argv[])
-{
- if (argc != 5)
- return -1;
-
- /* Check serial number */
- if (strlen(argv[1]) != MAX_SERIAL_SIZE)
- return -1;
-
- /* Check HWaddrs */
- if (ishwaddr(argv[2]) || ishwaddr(argv[3]) || ishwaddr(argv[4]))
- return -1;
-
- strcpy(smac[0], argv[1]);
- strcpy(smac[1], argv[2]);
- strcpy(smac[2], argv[3]);
- strcpy(smac[3], argv[4]);
-
-#if (FWENV_TYPE == FWENV_NOR_FLASH)
- return set_nor_arc_product(argc, argv);
-#endif
-#if (FWENV_TYPE == FWENV_SPI_FLASH)
- return set_spi_arc_product(argc, argv);
-#endif
-#if (FWENV_TYPE == FWENV_MMC)
- return set_mmc_arc_product(argc, argv);
-#endif
- return -2;
-}
-
-static int read_arc_info(void)
-{
-#if (FWENV_TYPE == FWENV_NOR_FLASH)
- return read_nor_arc_info();
-#endif
-#if (FWENV_TYPE == FWENV_SPI_FLASH)
- return read_spi_arc_info();
-#endif
-#if (FWENV_TYPE == FWENV_MMC)
- return read_mmc_arc_info();
-#endif
- return 0;
-}
-
-static int do_get_arc_info(void)
-{
- int l = read_arc_info();
- char *oldserial = env_get("SERIAL");
- char *oldversion = env_get("VERSION");
-
- if (oldversion != NULL)
- if (strcmp(oldversion, U_BOOT_VERSION) != 0)
- oldversion = NULL;
-
- if (l == 0) {
- printf("%s: failed to read factory info\n", __func__);
- return -2;
- }
-
- printf("\rSERIAL: ");
- if (smac[0][0] == EMPY_CHAR) {
- printf("<not found>\n");
- } else {
- printf("%s\n", smac[0]);
- env_set("SERIAL", smac[0]);
- }
-
- if (strcmp(smac[1], "00:00:00:00:00:00") == 0) {
- env_set("ethaddr", NULL);
- env_set("eth1addr", NULL);
- env_set("eth2addr", NULL);
- goto done;
- }
-
- printf("HWADDR0: ");
- if (smac[1][0] == EMPY_CHAR) {
- printf("<not found>\n");
- } else {
- char *ret = env_get("ethaddr");
-
- if (ret == NULL) {
- env_set("ethaddr", smac[1]);
- printf("%s\n", smac[1]);
- } else if (strcmp(ret, __stringify(CONFIG_ETHADDR)) == 0) {
- env_set("ethaddr", smac[1]);
- printf("%s (factory)\n", smac[1]);
- } else {
- printf("%s\n", ret);
- }
- }
-
- if (strcmp(smac[2], "00:00:00:00:00:00") == 0) {
- env_set("eth1addr", NULL);
- env_set("eth2addr", NULL);
- goto done;
- }
-
- printf("HWADDR1: ");
- if (smac[2][0] == EMPY_CHAR) {
- printf("<not found>\n");
- } else {
- char *ret = env_get("eth1addr");
-
- if (ret == NULL) {
- env_set("ethaddr", smac[2]);
- printf("%s\n", smac[2]);
- } else if (strcmp(ret, __stringify(CONFIG_ETH1ADDR)) == 0) {
- env_set("eth1addr", smac[2]);
- printf("%s (factory)\n", smac[2]);
- } else {
- printf("%s\n", ret);
- }
- }
-
- if (strcmp(smac[3], "00:00:00:00:00:00") == 0) {
- env_set("eth2addr", NULL);
- goto done;
- }
-
- printf("HWADDR2: ");
- if (smac[3][0] == EMPY_CHAR) {
- printf("<not found>\n");
- } else {
- char *ret = env_get("eth2addr");
-
- if (ret == NULL) {
- env_set("ethaddr", smac[3]);
- printf("%s\n", smac[3]);
- } else if (strcmp(ret, __stringify(CONFIG_ETH2ADDR)) == 0) {
- env_set("eth2addr", smac[3]);
- printf("%s (factory)\n", smac[3]);
- } else {
- printf("%s\n", ret);
- }
- }
-done:
- if (oldserial == NULL || oldversion == NULL) {
- if (oldversion == NULL)
- env_set("VERSION", U_BOOT_VERSION);
- env_save();
- }
-
- return 0;
-}
-
-static int init_fwenv(void)
-{
- int i, ret = -1;
-
- fwenv_addr[0] = FWENV_ADDR1;
- fwenv_addr[1] = FWENV_ADDR2;
- fwenv_addr[2] = FWENV_ADDR3;
- fwenv_addr[3] = FWENV_ADDR4;
-
- for (i = 0; i < MAX_FWENV_ADDR; i++)
- if (fwenv_addr[i] != -1)
- ret = 0;
- if (ret)
- printf("%s: No firmfare info storage address is defined\n",
- __func__);
- return ret;
-}
-
-void get_arc_info(void)
-{
- if (!init_fwenv())
- do_get_arc_info();
-}
-
-static int do_arc_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
- char *const argv[])
-{
- const char *cmd;
- int ret = -1;
-
- cmd = argv[1];
- --argc;
- ++argv;
-
- if (init_fwenv())
- return ret;
-
- if (strcmp(cmd, "product") == 0)
- ret = set_arc_product(argc, argv);
- else if (strcmp(cmd, "info") == 0)
- ret = do_get_arc_info();
-
- if (ret == -1)
- return CMD_RET_USAGE;
-
- return ret;
-}
-
-U_BOOT_CMD(arc, 6, 1, do_arc_cmd,
- "Arcturus product command sub-system",
- "product serial hwaddr0 hwaddr1 hwaddr2 - save Arcturus factory env\n"
- "info - show Arcturus factory env\n\n");

board/Arcturus/ucp1020/ddr.c deleted +0 -161

161 lines not on this page · raw message

board/Arcturus/ucp1020/law.c deleted +0 -24
deleted file mode 100644
index cb53692a32b..00000000000
@@ -1,24 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright 2013-2015 Arcturus Networks, Inc.
- * http://www.arcturusnetworks.com/products/ucp1020/
- * based on board/freescale/p1_p2_rdb_pc/spl.c
- * original copyright follows:
- * Copyright 2013 Freescale Semiconductor, Inc.
- */
-
-#include <common.h>
-#include <asm/fsl_law.h>
-#include <asm/mmu.h>
-
-struct law_entry law_table[] = {
-#ifdef CONFIG_VSC7385_ENET
- SET_LAW(CONFIG_SYS_VSC7385_BASE_PHYS, LAW_SIZE_1M, LAW_TRGT_IF_LBC),
-#endif
- SET_LAW(CONFIG_SYS_FLASH_BASE_PHYS, LAW_SIZE_64M, LAW_TRGT_IF_LBC),
-#ifdef CONFIG_SYS_NAND_BASE_PHYS
- SET_LAW(CONFIG_SYS_NAND_BASE_PHYS, LAW_SIZE_32K, LAW_TRGT_IF_LBC),
-#endif
-};
-
-int num_law_entries = ARRAY_SIZE(law_table);
board/Arcturus/ucp1020/spl.c deleted +0 -127

127 lines not on this page · raw message

(quoted diff) +0 -0

b/board/Arcturus/ucp1020/spl_minimal.c
deleted file mode 100644
index 90abec9cce5..00000000000

board/Arcturus/ucp1020/spl_minimal.c deleted +0 -27
@@ -1,67 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright 2013-2015 Arcturus Networks, Inc.
- * http://www.arcturusnetworks.com/products/ucp1020/
- * based on board/freescale/p1_p2_rdb_pc/spl_minimal.c
- * original copyright follows:
- * Copyright 2011 Freescale Semiconductor, Inc.
- */
-
-#include <common.h>
-#include <init.h>
-#include <ns16550.h>
-#include <asm/io.h>
-#include <nand.h>
-#include <linux/compiler.h>
-#include <asm/fsl_law.h>
-#include <fsl_ddr_sdram.h>
-#include <asm/global_data.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-void board_init_f(ulong bootflag)
-{
- u32 plat_ratio;
- ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR;
-
-#if defined(CONFIG_SYS_NAND_BR_PRELIM) &&

defined(CONFIG_SYS_NAND_OR_PRELIM)
- set_lbc_br(0, CONFIG_SYS_NAND_BR_PRELIM);
- set_lbc_or(0, CONFIG_SYS_NAND_OR_PRELIM);
-#endif
-
- /* initialize selected port with appropriate baud rate */
- plat_ratio = in_be32(&gur->porpllsr) & MPC85xx_PORPLLSR_PLAT_RATIO;
- plat_ratio >>= 1;
- gd->bus_clk = CONFIG_SYS_CLK_FREQ * plat_ratio;
-
- ns16550_init((struct ns16550 *)CONFIG_SYS_NS16550_COM1,
- gd->bus_clk / 16 / CONFIG_BAUDRATE);
-
- puts("\nNAND boot... ");
-
- /* copy code to RAM and jump to it - this should not return */
- /* NOTE - code has to be copied out of NAND buffer before
- * other blocks can be read.
- */
- relocate_code(CONFIG_SPL_RELOC_STACK, 0, CONFIG_SPL_RELOC_TEXT_BASE); -}
-
-void board_init_r(gd_t *gd, ulong dest_addr)
-{
- puts("\nSecond program loader running in sram...");
- nand_boot();
-}
-
-void putc(char c)
-{
- if (c == '\n')
- ns16550_putc((struct ns16550 *)CONFIG_SYS_NS16550_COM1, '\r'); -
- ns16550_putc((struct ns16550 *)CONFIG_SYS_NS16550_COM1, c); -}
-
-void puts(const char *str)
-{
- while (*str)
- putc(*str++);
-}

board/Arcturus/ucp1020/tlb.c deleted +0 -100

100 lines not on this page · raw message

(quoted diff) +0 -0

b/board/Arcturus/ucp1020/ucp1020.c
deleted file mode 100644
index 24d1d57ec4b..00000000000

board/Arcturus/ucp1020/ucp1020.c deleted +0 -372

372 lines not on this page · raw message

(quoted diff) +0 -0

b/board/Arcturus/ucp1020/ucp1020.h
deleted file mode 100644
index 1b527cdb1cf..00000000000

board/Arcturus/ucp1020/ucp1020.h deleted +0 -45

45 lines not on this page · raw message

configs/UCP1020_defconfig deleted +0 -12
deleted file mode 100644
index 1fdb1952c8f..00000000000
@@ -1,58 +0,0 @@
-CONFIG_PPC=y
-CONFIG_SYS_TEXT_BASE=0xEFF80000
-CONFIG_ENV_SIZE=0x20000
-CONFIG_ENV_SECT_SIZE=0x20000
-CONFIG_MPC85xx=y
-CONFIG_TARGET_UCP1020=y
-CONFIG_FIT=y
-CONFIG_FIT_VERBOSE=y
-CONFIG_OF_BOARD_SETUP=y
-CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_AUTOBOOT_KEYED=y
-CONFIG_AUTOBOOT_PROMPT="Autobooting in %d seconds, press \"<Esc>\" to

stop\n"
-CONFIG_AUTOBOOT_STOP_STR="\x1b"
-CONFIG_BOARD_EARLY_INIT_F=y
-CONFIG_BOARD_EARLY_INIT_R=y
-CONFIG_LAST_STAGE_INIT=y
-# CONFIG_MISC_INIT_R is not set
-CONFIG_HUSH_PARSER=y
-# CONFIG_AUTO_COMPLETE is not set
-CONFIG_SYS_PROMPT="B$ "
-CONFIG_CMD_IMLS=y
-CONFIG_CMD_GPIO=y
-CONFIG_CMD_I2C=y
-# CONFIG_CMD_PCI is not set
-# CONFIG_CMD_SATA is not set
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_MII=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_DATE=y
-CONFIG_MP=y
-# CONFIG_CMD_HASH is not set
-CONFIG_CMD_CRAMFS=y
-CONFIG_CMD_EXT2=y
-CONFIG_CMD_FAT=y
-CONFIG_ENV_OVERWRITE=y
-CONFIG_ENV_IS_IN_FLASH=y
-CONFIG_ENV_ADDR=0xEC0C0000
-# CONFIG_MMC is not set
-CONFIG_MTD_NOR_FLASH=y
-CONFIG_FLASH_CFI_DRIVER=y
-CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
-CONFIG_SYS_FLASH_CFI=y
-CONFIG_PHY_ATHEROS=y
-CONFIG_PHY_BROADCOM=y
-CONFIG_PHY_DAVICOM=y
-CONFIG_PHY_LXT=y
-CONFIG_PHY_MARVELL=y
-CONFIG_PHY_NATSEMI=y
-CONFIG_PHY_REALTEK=y
-CONFIG_PHY_SMSC=y
-CONFIG_PHY_VITESSE=y
-CONFIG_PHY_GIGE=y
-CONFIG_E1000=y
-CONFIG_MII=y
-CONFIG_TSEC_ENET=y
-CONFIG_SYS_NS16550=y
-CONFIG_FS_CRAMFS=y
-CONFIG_OF_LIBFDT=y

include/configs/UCP1020.h deleted +0 -167

167 lines not on this page · raw message

the 4k
- SPL code*/
-#ifdef CONFIG_SPL_BUILD
-#define CONFIG_SYS_CCSR_DO_NOT_RELOCATE
-#endif
-
-/* DDR Setup */
-#define CONFIG_DDR_ECC_ENABLE
-#ifndef CONFIG_DDR_ECC_ENABLE
-#define CONFIG_SYS_DDR_RAW_TIMING
-#define CONFIG_DDR_SPD
-#endif
-#define CONFIG_SYS_SPD_BUS_NUM 1
-
-#define CONFIG_SYS_SDRAM_SIZE_LAW LAW_SIZE_512M
-#define CONFIG_CHIP_SELECTS_PER_CTRL 1
-#define CONFIG_SYS_SDRAM_SIZE (1u << (CONFIG_SYS_SDRAM_SIZE_LAW - 19)) -#define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000
-#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE
-
-#define CONFIG_DIMM_SLOTS_PER_CTLR 1
-
-/* Default settings for DDR3 */
-#define CONFIG_SYS_DDR_CS0_BNDS 0x0000003f
-#define CONFIG_SYS_DDR_CS0_CONFIG 0x80014302
-#define CONFIG_SYS_DDR_CS0_CONFIG_2 0x00000000
-#define CONFIG_SYS_DDR_CS1_BNDS 0x0040007f
-#define CONFIG_SYS_DDR_CS1_CONFIG 0x80014302
-#define CONFIG_SYS_DDR_CS1_CONFIG_2 0x00000000
-
-#define CONFIG_SYS_DDR_DATA_INIT 0xdeadbeef
-#define CONFIG_SYS_DDR_INIT_ADDR 0x00000000
-#define CONFIG_SYS_DDR_INIT_EXT_ADDR 0x00000000
-#define CONFIG_SYS_DDR_MODE_CONTROL 0x00000000
-
-#define CONFIG_SYS_DDR_ZQ_CONTROL 0x89080600
-#define CONFIG_SYS_DDR_WRLVL_CONTROL 0x8655A608
-#define CONFIG_SYS_DDR_SR_CNTR 0x00000000
-#define CONFIG_SYS_DDR_RCW_1 0x00000000
-#define CONFIG_SYS_DDR_RCW_2 0x00000000
-#ifdef CONFIG_DDR_ECC_ENABLE
-#define CONFIG_SYS_DDR_CONTROL 0xE70C0000 /* Type = DDR3 & ECC */ -#else
-#define CONFIG_SYS_DDR_CONTROL 0xC70C0000 /* Type = DDR3 */ -#endif
-#define CONFIG_SYS_DDR_CONTROL_2 0x04401050
-#define CONFIG_SYS_DDR_TIMING_4 0x00220001
-#define CONFIG_SYS_DDR_TIMING_5 0x03402400
-
-#define CONFIG_SYS_DDR_TIMING_3 0x00020000
-#define CONFIG_SYS_DDR_TIMING_0 0x00330004
-#define CONFIG_SYS_DDR_TIMING_1 0x6f6B4846
-#define CONFIG_SYS_DDR_TIMING_2 0x0FA8C8CF
-#define CONFIG_SYS_DDR_CLK_CTRL 0x03000000
-#define CONFIG_SYS_DDR_MODE_1 0x40461520
-#define CONFIG_SYS_DDR_MODE_2 0x8000c000
-#define CONFIG_SYS_DDR_INTERVAL 0x0C300000
-
-/*
- * Memory map
- *
- * 0x0000_0000 0x7fff_ffff DDR Up to 2GB cacheable
- * 0x8000_0000 0xdfff_ffff PCI Express Mem 1G non-cacheable(PCIe * 2)
- * 0xec00_0000 0xefff_ffff NOR flash Up to 64M non-cacheable CS0/1
- * 0xf8f8_0000 0xf8ff_ffff L2 SRAM Up to 256K cacheable
- * (early boot only)
- * 0xffc0_0000 0xffc3_ffff PCI IO range 256k non-cacheable
- * 0xffd0_0000 0xffd0_3fff L1 for stack 16K cacheable
- * 0xffe0_0000 0xffef_ffff CCSR 1M non-cacheable
- */
-
-/*
- * Local Bus Definitions
- */
-#define CONFIG_SYS_MAX_FLASH_SECT 512 /* 64M */
-#define CONFIG_SYS_FLASH_BASE 0xec000000
-
-#define CONFIG_SYS_FLASH_BASE_PHYS CONFIG_SYS_FLASH_BASE
-
-#define CONFIG_FLASH_BR_PRELIM (BR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS) \
- | BR_PS_16 | BR_V)
-
-#define CONFIG_FLASH_OR_PRELIM 0xfc000ff7
-
-#define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE_PHYS} -#define CONFIG_SYS_FLASH_QUIET_TEST
-#define CONFIG_FLASH_SHOW_PROGRESS 45 /* count down from 45/5: 9..1 */ -
-#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */
-
-#undef CONFIG_SYS_FLASH_CHECKSUM
-#define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ -#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ -
-#define CONFIG_SYS_FLASH_EMPTY_INFO
-
-#define CONFIG_SYS_INIT_RAM_LOCK
-#define CONFIG_SYS_INIT_RAM_ADDR 0xffd00000 /* stack in RAM */ -/* Initial L1 address */
-#define CONFIG_SYS_INIT_RAM_ADDR_PHYS CONFIG_SYS_INIT_RAM_ADDR -#define CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH 0
-#define CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW CONFIG_SYS_INIT_RAM_ADDR_PHYS -/* Size of used area in RAM */
-#define CONFIG_SYS_INIT_RAM_SIZE 0x00004000
-
-#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \
- GENERATED_GBL_DATA_SIZE)
-#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
-
-#define CONFIG_SYS_MONITOR_LEN (256 * 1024)/* Reserve 256 kB for Mon */ -#define CONFIG_SYS_MALLOC_LEN (1024 * 1024)/* Reserved for malloc */ -
-#define CONFIG_SYS_PMC_BASE 0xff980000
-#define CONFIG_SYS_PMC_BASE_PHYS CONFIG_SYS_PMC_BASE
-#define CONFIG_PMC_BR_PRELIM (BR_PHYS_ADDR(CONFIG_SYS_PMC_BASE_PHYS) | \
- BR_PS_8 | BR_V)
-#define CONFIG_PMC_OR_PRELIM (OR_AM_64KB | OR_GPCM_CSNT | OR_GPCM_XACS | \
- OR_GPCM_SCY | OR_GPCM_TRLX | OR_GPCM_EHTR | \
- OR_GPCM_EAD)
-
-#define CONFIG_SYS_BR0_PRELIM CONFIG_FLASH_BR_PRELIM /* NOR Base Address */ -#define CONFIG_SYS_OR0_PRELIM CONFIG_FLASH_OR_PRELIM /* NOR Options */ -#ifdef CONFIG_NAND_FSL_ELBC
-#define CONFIG_SYS_BR1_PRELIM CONFIG_SYS_NAND_BR_PRELIM /* NAND Base Addr */
-#define CONFIG_SYS_OR1_PRELIM CONFIG_SYS_NAND_OR_PRELIM /* NAND Options */ -#endif
-
-/* Serial Port - controlled on board with jumper J8
- * open - index 2
- * shorted - index 1
- */
-#undef CONFIG_SERIAL_SOFTWARE_FIFO
-#define CONFIG_SYS_NS16550_SERIAL
-#define CONFIG_SYS_NS16550_REG_SIZE 1
-#define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
-#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_INIT_MINIMAL) -#define CONFIG_NS16550_MIN_FUNCTIONS
-#endif
-
-#define CONFIG_SYS_BAUDRATE_TABLE \
- {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200} -
-#define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR + 0x4500) -#define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR + 0x4600)
-
-/* I2C */
-#define CONFIG_SYS_I2C_LEGACY
-#define CONFIG_SYS_I2C_FSL
-#define CONFIG_SYS_FSL_I2C_SPEED 400000
-#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F
-#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000
-#define CONFIG_SYS_FSL_I2C2_SPEED 400000
-#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F
-#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100
-#define CONFIG_SYS_I2C_NOPROBES { {0, 0x29} }
-#define CONFIG_SYS_SPD_BUS_NUM 1 /* For rom_loc and flash bank */ -
-#define CONFIG_RTC_DS1337
-#define CONFIG_RTC_DS1337_NOOSC
-#define CONFIG_SYS_I2C_RTC_ADDR 0x68
-#define CONFIG_SYS_I2C_PCA9557_ADDR 0x18
-#define CONFIG_SYS_I2C_NCT72_ADDR 0x4C
-#define CONFIG_SYS_I2C_IDT6V49205B 0x69
-
-#if defined(CONFIG_PCI)
-/*
- * General PCI
- * Memory space is mapped 1-1, but I/O space must start from 0.
- */
-
-/* controller 2, direct to uli, tgtid 2, Base address 9000 */ -#define CONFIG_SYS_PCIE2_NAME "PCIe SLOT CON9"
-#define CONFIG_SYS_PCIE2_MEM_VIRT 0xa0000000
-#define CONFIG_SYS_PCIE2_MEM_BUS 0xa0000000
-#define CONFIG_SYS_PCIE2_MEM_PHYS 0xa0000000
-#define CONFIG_SYS_PCIE2_MEM_SIZE 0x20000000 /* 512M */ -#define CONFIG_SYS_PCIE2_IO_VIRT 0xffc10000
-#define CONFIG_SYS_PCIE2_IO_BUS 0x00000000
-#define CONFIG_SYS_PCIE2_IO_PHYS 0xffc10000
-#define CONFIG_SYS_PCIE2_IO_SIZE 0x00010000 /* 64k */
-
-/* controller 1, Slot 2, tgtid 1, Base address a000 */
-#define CONFIG_SYS_PCIE1_NAME "PCIe SLOT CON10"
-#define CONFIG_SYS_PCIE1_MEM_VIRT 0x80000000
-#define CONFIG_SYS_PCIE1_MEM_BUS 0x80000000
-#define CONFIG_SYS_PCIE1_MEM_PHYS 0x80000000
-#define CONFIG_SYS_PCIE1_MEM_SIZE 0x20000000 /* 512M */ -#define CONFIG_SYS_PCIE1_IO_VIRT 0xffc00000
-#define CONFIG_SYS_PCIE1_IO_BUS 0x00000000
-#define CONFIG_SYS_PCIE1_IO_PHYS 0xffc00000
-#define CONFIG_SYS_PCIE1_IO_SIZE 0x00010000 /* 64k */
-
-#define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ -#endif /* CONFIG_PCI */
-
-/*
- * Environment
- */
-#if !defined(CONFIG_ENV_FIT_UCBOOT) && defined(CONFIG_RAMBOOT_SDCARD) -#define CONFIG_FSL_FIXED_MMC_LOCATION
-#endif
-
-#define CONFIG_LOADS_ECHO /* echo on for serial download */ -#define CONFIG_SYS_LOADS_BAUD_CHANGE /* allow baudrate change */ -
-/*
- * USB
- */
-#define CONFIG_HAS_FSL_DR_USB
-
-#if defined(CONFIG_HAS_FSL_DR_USB)
-#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
-
-#ifdef CONFIG_USB_EHCI_HCD
-#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
-#define CONFIG_USB_EHCI_FSL
-#endif
-#endif
-
-#undef CONFIG_WATCHDOG /* watchdog disabled */
-
-#ifdef CONFIG_MMC
-#define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC85xx_ESDHC_ADDR -#endif
-
-/* Misc Extra Settings */
-#undef CONFIG_WATCHDOG /* watchdog disabled */
-
-/*
- * Miscellaneous configurable options
- */
-#define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ -#define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms tick */
-
-/*
- * For booting Linux, the board info and command line data
- * have to be in the first 64 MB of memory, since this is
- * the maximum mapped by the Linux kernel during initialization.
- */
-#define CONFIG_SYS_BOOTMAPSZ (64 << 20) /* Initial Memory for Linux*/ -#define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Increase max gunzip size */ -
-#if defined(CONFIG_CMD_KGDB)
-#define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */ -#define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ -#endif
-
-/*
- * Environment Configuration
- */
-
-#if defined(CONFIG_TSEC_ENET)
-
-#if defined(CONFIG_UCP1020_REV_1_2) || defined(CONFIG_UCP1020_REV_1_3) -#else
-#error "UCP1020 module revision is not defined !!!"
-#endif
-
-#define CONFIG_BOOTP_SERVERIP
-
-#define CONFIG_TSEC1_NAME "eTSEC1"
-#define CONFIG_TSEC2_NAME "eTSEC2"
-#define CONFIG_TSEC3_NAME "eTSEC3"
-
-#define TSEC1_PHY_ADDR 4
-#define TSEC2_PHY_ADDR 0
-#define TSEC2_PHY_ADDR_SGMII 0x00
-#define TSEC3_PHY_ADDR 6
-

-#define TSEC1_FLAGS (TSEC_GIGABIT | TSEC_REDUCED)
-#define TSEC2_FLAGS (TSEC_GIGABIT | TSEC_REDUCED)
-#define TSEC3_FLAGS (TSEC_GIGABIT | TSEC_REDUCED)

-
-#define TSEC1_PHYIDX 0
-#define TSEC2_PHYIDX 0
-#define TSEC3_PHYIDX 0
-
-#endif
-
-#define CONFIG_HOSTNAME "UCP1020"
-#define CONFIG_ROOTPATH "/opt/nfsroot"
-#define CONFIG_BOOTFILE "uImage"
-#define CONFIG_UBOOTPATH u-boot.bin /* U-Boot image on TFTP server */ -
-/* default location for tftp and bootm */
-#define CONFIG_LOADADDR 1000000
-
-#if defined(CONFIG_DONGLE)
-
-#define CONFIG_EXTRA_ENV_SETTINGS \
-"bootcmd=run prog_spi_mbrbootcramfs\0" \
-"bootfile=uImage\0" \
-"consoledev=ttyS0\0" \
-"cramfsfile=image.cramfs\0" \
-"dtbaddr=0x00c00000\0" \
-"dtbfile=image.dtb\0" \
-"ethaddr=" __stringify(CONFIG_ETHADDR) "\0" \
-"eth1addr=" __stringify(CONFIG_ETH1ADDR) "\0" \
-"eth2addr=" __stringify(CONFIG_ETH2ADDR) "\0" \
-"fileaddr=0x01000000\0" \
-"filesize=0x00080000\0" \
-"flashmbr=sf probe 0; " \
- "tftp $loadaddr $mbr; " \
- "sf erase $mbr_offset +$filesize; " \
- "sf write $loadaddr $mbr_offset $filesize\0" \
-"flashrecovery=tftp $recoveryaddr $cramfsfile; " \
- "protect off $nor_recoveryaddr +$filesize; " \
- "erase $nor_recoveryaddr +$filesize; " \
- "cp.b $recoveryaddr $nor_recoveryaddr $filesize; " \
- "protect on $nor_recoveryaddr +$filesize\0 " \
-"flashuboot=tftp $ubootaddr $ubootfile; " \
- "protect off $nor_ubootaddr +$filesize; " \
- "erase $nor_ubootaddr +$filesize; " \
- "cp.b $ubootaddr $nor_ubootaddr $filesize; " \
- "protect on $nor_ubootaddr +$filesize\0 " \
-"flashworking=tftp $workingaddr $cramfsfile; " \
- "protect off $nor_workingaddr +$filesize; " \
- "erase $nor_workingaddr +$filesize; " \
- "cp.b $workingaddr $nor_workingaddr $filesize; " \
- "protect on $nor_workingaddr +$filesize\0 " \
-"hwconfig=usb1:dr_mode=host,phy_type=ulpi\0 " \
-"kerneladdr=0x01100000\0" \
-"kernelfile=uImage\0" \
-"loadaddr=0x01000000\0" \
-"mbr=uCP1020d.mbr\0" \
-"mbr_offset=0x00000000\0" \
-"mmbr=uCP1020Quiet.mbr\0" \
-"mmcpart=0:2\0" \
-"mmc__mbrd=fatload mmc $mmcpart $loadaddr $mbr; " \
- "mmc erase 1 1; " \
- "mmc write $loadaddr 1 1\0" \
-"mmc__uboot=fatload mmc $mmcpart $loadaddr $ubootfile; " \
- "mmc erase 0x40 0x400; " \
- "mmc write $loadaddr 0x40 0x400\0" \
-"netdev=eth0\0" \
-"nor_recoveryaddr=0xEC0A0000\0" \
-"nor_ubootaddr=0xEFF80000\0" \
-"nor_workingaddr=0xECFA0000\0" \
-"norbootrecovery=setenv bootargs $recoverybootargs" \
- " console=$consoledev,$baudrate $othbootargs; " \
- "run norloadrecovery; " \
- "bootm $kerneladdr - $dtbaddr\0" \
-"norbootworking=setenv bootargs $workingbootargs" \
- " console=$consoledev,$baudrate $othbootargs; " \
- "run norloadworking; " \
- "bootm $kerneladdr - $dtbaddr\0" \
-"norloadrecovery=mw.l $kerneladdr 0x0 0x00a00000; " \
- "setenv cramfsaddr $nor_recoveryaddr; " \
- "cramfsload $dtbaddr $dtbfile; " \
- "cramfsload $kerneladdr $kernelfile\0" \
-"norloadworking=mw.l $kerneladdr 0x0 0x00a00000; " \
- "setenv cramfsaddr $nor_workingaddr; " \
- "cramfsload $dtbaddr $dtbfile; " \
- "cramfsload $kerneladdr $kernelfile\0" \
-"prog_spi_mbr=run spi__mbr\0" \
-"prog_spi_mbrboot=run spi__mbr; run spi__boot1; run spi__boot2\0" \
-"prog_spi_mbrbootcramfs=run spi__mbr; run spi__boot1; run spi__boot2; " \
- "run spi__cramfs\0" \
-"ramboot=setenv bootargs root=/dev/ram ramdisk_size=$ramdisk_size ro" \
- " console=$consoledev,$baudrate $othbootargs; " \
- "tftp $rootfsaddr $rootfsfile; " \
- "tftp $loadaddr $kernelfile; " \
- "tftp $dtbaddr $dtbfile; " \
- "bootm $loadaddr $rootfsaddr $dtbaddr\0" \
-"ramdisk_size=120000\0" \
-"ramdiskfile=rootfs.ext2.gz.uboot\0" \
-"recoveryaddr=0x02F00000\0" \
-"recoverybootargs=root=/dev/mtdblock0 rootfstype=cramfs ro\0" \
-"releasefpga=mw.l 0xffe0f000 0x00400000; mw.l 0xffe0f004 0x00000000; " \
- "mw.l 0xffe0f008 0x00400000\0" \
-"rootfsaddr=0x02F00000\0" \
-"rootfsfile=rootfs.ext2.gz.uboot\0" \
-"rootpath=/opt/nfsroot\0" \
-"spi__boot1=fatload mmc $mmcpart $loadaddr u-boot.bin; " \
- "protect off 0xeC000000 +$filesize; " \
- "erase 0xEC000000 +$filesize; " \
- "cp.b $loadaddr 0xEC000000 $filesize; " \
- "cmp.b $loadaddr 0xEC000000 $filesize; " \
- "protect on 0xeC000000 +$filesize\0" \
-"spi__boot2=fatload mmc $mmcpart $loadaddr u-boot.bin; " \
- "protect off 0xeFF80000 +$filesize; " \
- "erase 0xEFF80000 +$filesize; " \
- "cp.b $loadaddr 0xEFF80000 $filesize; " \
- "cmp.b $loadaddr 0xEFF80000 $filesize; " \
- "protect on 0xeFF80000 +$filesize\0" \
-"spi__bootd=fatload mmc $mmcpart $loadaddr $ubootd; " \
- "sf probe 0; sf erase 0x8000 +$filesize; " \
- "sf write $loadaddr 0x8000 $filesize\0" \
-"spi__cramfs=fatload mmc $mmcpart $loadaddr image.cramfs; " \
- "protect off 0xec0a0000 +$filesize; " \
- "erase 0xeC0A0000 +$filesize; " \
- "cp.b $loadaddr 0xeC0A0000 $filesize; " \
- "protect on 0xec0a0000 +$filesize\0" \
-"spi__mbr=fatload mmc $mmcpart $loadaddr $mmbr; " \
- "sf probe 1; sf erase 0 +$filesize; " \
- "sf write $loadaddr 0 $filesize\0" \
-"spi__mbrd=fatload mmc $mmcpart $loadaddr $mbr; " \
- "sf probe 0; sf erase 0 +$filesize; " \
- "sf write $loadaddr 0 $filesize\0" \
-"tftpflash=tftpboot $loadaddr $uboot; " \
- "protect off " __stringify(CONFIG_SYS_TEXT_BASE_NOR) " +$filesize; " \
- "erase " __stringify(CONFIG_SYS_TEXT_BASE_NOR) " +$filesize; " \
- "cp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE_NOR) " $filesize; " \
- "protect on " __stringify(CONFIG_SYS_TEXT_BASE_NOR) " +$filesize; " \
- "cmp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE_NOR) " $filesize\0"\
-"uboot= " __stringify(CONFIG_UBOOTPATH) "\0" \
-"ubootaddr=0x01000000\0" \
-"ubootfile=u-boot.bin\0" \
-"ubootd=u-boot4dongle.bin\0" \
-"upgrade=run flashworking\0" \
-"usb_phy_type=ulpi\0 " \
-"workingaddr=0x02F00000\0" \
-"workingbootargs=root=/dev/mtdblock1 rootfstype=cramfs ro\0" -
-#else
-
-#if defined(CONFIG_UCP1020T1)
-
-#define CONFIG_EXTRA_ENV_SETTINGS \
-"bootcmd=run releasefpga; run norbootworking || run norbootrecovery\0" \
-"bootfile=uImage\0" \
-"consoledev=ttyS0\0" \
-"cramfsfile=image.cramfs\0" \
-"dtbaddr=0x00c00000\0" \
-"dtbfile=image.dtb\0" \
-"ethaddr=" __stringify(CONFIG_ETHADDR) "\0" \
-"eth1addr=" __stringify(CONFIG_ETH1ADDR) "\0" \
-"eth2addr=" __stringify(CONFIG_ETH2ADDR) "\0" \
-"fileaddr=0x01000000\0" \
-"filesize=0x00080000\0" \
-"flashmbr=sf probe 0; " \
- "tftp $loadaddr $mbr; " \
- "sf erase $mbr_offset +$filesize; " \
- "sf write $loadaddr $mbr_offset $filesize\0" \
-"flashrecovery=tftp $recoveryaddr $cramfsfile; " \
- "protect off $nor_recoveryaddr +$filesize; " \
- "erase $nor_recoveryaddr +$filesize; " \
- "cp.b $recoveryaddr $nor_recoveryaddr $filesize; " \
- "protect on $nor_recoveryaddr +$filesize\0 " \
-"flashuboot=tftp $ubootaddr $ubootfile; " \
- "protect off $nor_ubootaddr +$filesize; " \
- "erase $nor_ubootaddr +$filesize; " \
- "cp.b $ubootaddr $nor_ubootaddr $filesize; " \
- "protect on $nor_ubootaddr +$filesize\0 " \
-"flashworking=tftp $workingaddr $cramfsfile; " \
- "protect off $nor_workingaddr +$filesize; " \
- "erase $nor_workingaddr +$filesize; " \
- "cp.b $workingaddr $nor_workingaddr $filesize; " \
- "protect on $nor_workingaddr +$filesize\0 " \
-"hwconfig=usb1:dr_mode=host,phy_type=ulpi\0 " \
-"kerneladdr=0x01100000\0" \
-"kernelfile=uImage\0" \
-"loadaddr=0x01000000\0" \
-"mbr=uCP1020.mbr\0" \
-"mbr_offset=0x00000000\0" \
-"netdev=eth0\0" \
-"nor_recoveryaddr=0xEC0A0000\0" \
-"nor_ubootaddr=0xEFF80000\0" \
-"nor_workingaddr=0xECFA0000\0" \
-"norbootrecovery=setenv bootargs $recoverybootargs" \
- " console=$consoledev,$baudrate $othbootargs; " \
- "run norloadrecovery; " \
- "bootm $kerneladdr - $dtbaddr\0" \
-"norbootworking=setenv bootargs $workingbootargs" \
- " console=$consoledev,$baudrate $othbootargs; " \
- "run norloadworking; " \
- "bootm $kerneladdr - $dtbaddr\0" \
-"norloadrecovery=mw.l $kerneladdr 0x0 0x00a00000; " \
- "setenv cramfsaddr $nor_recoveryaddr; " \
- "cramfsload $dtbaddr $dtbfile; " \
- "cramfsload $kerneladdr $kernelfile\0" \
-"norloadworking=mw.l $kerneladdr 0x0 0x00a00000; " \
- "setenv cramfsaddr $nor_workingaddr; " \
- "cramfsload $dtbaddr $dtbfile; " \
- "cramfsload $kerneladdr $kernelfile\0" \
-"othbootargs=quiet\0" \
-"ramboot=setenv bootargs root=/dev/ram ramdisk_size=$ramdisk_size ro" \
- " console=$consoledev,$baudrate $othbootargs; " \
- "tftp $rootfsaddr $rootfsfile; " \
- "tftp $loadaddr $kernelfile; " \
- "tftp $dtbaddr $dtbfile; " \
- "bootm $loadaddr $rootfsaddr $dtbaddr\0" \
-"ramdisk_size=120000\0" \
-"ramdiskfile=rootfs.ext2.gz.uboot\0" \
-"recoveryaddr=0x02F00000\0" \
-"recoverybootargs=root=/dev/mtdblock0 rootfstype=cramfs ro\0" \
-"releasefpga=mw.l 0xffe0f000 0x00400000; mw.l 0xffe0f004 0x00000000; " \
- "mw.l 0xffe0f008 0x00400000\0" \
-"rootfsaddr=0x02F00000\0" \
-"rootfsfile=rootfs.ext2.gz.uboot\0" \
-"rootpath=/opt/nfsroot\0" \
-"silent=1\0" \
-"tftpflash=tftpboot $loadaddr $uboot; " \
- "protect off " __stringify(CONFIG_SYS_TEXT_BASE_NOR) " +$filesize; " \
- "erase " __stringify(CONFIG_SYS_TEXT_BASE_NOR) " +$filesize; " \
- "cp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE_NOR) " $filesize; " \
- "protect on " __stringify(CONFIG_SYS_TEXT_BASE_NOR) " +$filesize; " \
- "cmp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE_NOR) " $filesize\0"\
-"uboot= " __stringify(CONFIG_UBOOTPATH) "\0" \
-"ubootaddr=0x01000000\0" \
-"ubootfile=u-boot.bin\0" \
-"upgrade=run flashworking\0" \
-"workingaddr=0x02F00000\0" \
-"workingbootargs=root=/dev/mtdblock1 rootfstype=cramfs ro\0" -
-#else /* For Arcturus Modules */
-
-#define CONFIG_EXTRA_ENV_SETTINGS \
-"bootcmd=run norkernel\0" \
-"bootfile=uImage\0" \
-"consoledev=ttyS0\0" \
-"dtbaddr=0x00c00000\0" \
-"dtbfile=image.dtb\0" \
-"ethaddr=" __stringify(CONFIG_ETHADDR) "\0" \
-"eth1addr=" __stringify(CONFIG_ETH1ADDR) "\0" \
-"eth2addr=" __stringify(CONFIG_ETH2ADDR) "\0" \
-"fileaddr=0x01000000\0" \
-"filesize=0x00080000\0" \
-"flashmbr=sf probe 0; " \
- "tftp $loadaddr $mbr; " \
- "sf erase $mbr_offset +$filesize; " \
- "sf write $loadaddr $mbr_offset $filesize\0" \
-"flashuboot=tftp $loadaddr $ubootfile; " \
- "protect off $nor_ubootaddr0 +$filesize; " \
- "erase $nor_ubootaddr0 +$filesize; " \
- "cp.b $loadaddr $nor_ubootaddr0 $filesize; " \
- "protect on $nor_ubootaddr0 +$filesize; " \
- "protect off $nor_ubootaddr1 +$filesize; " \
- "erase $nor_ubootaddr1 +$filesize; " \
- "cp.b $loadaddr $nor_ubootaddr1 $filesize; " \
- "protect on $nor_ubootaddr1 +$filesize\0 " \
-"format0=protect off $part0base +$part0size; " \
- "erase $part0base +$part0size\0" \
-"format1=protect off $part1base +$part1size; " \
- "erase $part1base +$part1size\0" \
-"format2=protect off $part2base +$part2size; " \
- "erase $part2base +$part2size\0" \
-"format3=protect off $part3base +$part3size; " \
- "erase $part3base +$part3size\0" \
-"hwconfig=usb1:dr_mode=host,phy_type=ulpi\0 " \
-"kerneladdr=0x01100000\0" \
-"kernelargs=root=/dev/mtdblock1 rootfstype=cramfs ro\0" \
-"kernelfile=uImage\0" \
-"loadaddr=0x01000000\0" \
-"mbr=uCP1020.mbr\0" \
-"mbr_offset=0x00000000\0" \
-"netdev=eth0\0" \
-"nor_ubootaddr0=0xEC000000\0" \
-"nor_ubootaddr1=0xEFF80000\0" \
-"norkernel=setenv bootargs $kernelargs console=$consoledev,$baudrate; " \
- "run norkernelload; " \
- "bootm $kerneladdr - $dtbaddr\0" \
-"norkernelload=mw.l $kerneladdr 0x0 0x00a00000; " \
- "setenv cramfsaddr $part0base; " \
- "cramfsload $dtbaddr $dtbfile; " \
- "cramfsload $kerneladdr $kernelfile\0" \
-"part0base=0xEC100000\0" \
-"part0size=0x00700000\0" \
-"part1base=0xEC800000\0" \
-"part1size=0x02000000\0" \
-"part2base=0xEE800000\0" \
-"part2size=0x00800000\0" \
-"part3base=0xEF000000\0" \
-"part3size=0x00F80000\0" \
-"partENVbase=0xEC080000\0" \
-"partENVsize=0x00080000\0" \
-"program0=tftp part0-000000.bin; " \
- "protect off $part0base +$filesize; " \
- "erase $part0base +$filesize; " \
- "cp.b $loadaddr $part0base $filesize; " \
- "echo Verifying...; " \
- "cmp.b $loadaddr $part0base $filesize\0" \
-"program1=tftp part1-000000.bin; " \
- "protect off $part1base +$filesize; " \
- "erase $part1base +$filesize; " \
- "cp.b $loadaddr $part1base $filesize; " \
- "echo Verifying...; " \
- "cmp.b $loadaddr $part1base $filesize\0" \
-"program2=tftp part2-000000.bin; " \
- "protect off $part2base +$filesize; " \
- "erase $part2base +$filesize; " \
- "cp.b $loadaddr $part2base $filesize; " \
- "echo Verifying...; " \
- "cmp.b $loadaddr $part2base $filesize\0" \
-"ramboot=setenv bootargs root=/dev/ram ramdisk_size=$ramdisk_size ro" \
- " console=$consoledev,$baudrate $othbootargs; " \
- "tftp $rootfsaddr $rootfsfile; " \
- "tftp $loadaddr $kernelfile; " \
- "tftp $dtbaddr $dtbfile; " \
- "bootm $loadaddr $rootfsaddr $dtbaddr\0" \
-"ramdisk_size=120000\0" \
-"ramdiskfile=rootfs.ext2.gz.uboot\0" \
-"releasefpga=mw.l 0xffe0f000 0x00400000; mw.l 0xffe0f004 0x00000000; " \
- "mw.l 0xffe0f008 0x00400000\0" \
-"rootfsaddr=0x02F00000\0" \
-"rootfsfile=rootfs.ext2.gz.uboot\0" \
-"rootpath=/opt/nfsroot\0" \
-"spi__mbr=fatload mmc $mmcpart $loadaddr $mmbr; " \
- "sf probe 0; sf erase 0 +$filesize; " \
- "sf write $loadaddr 0 $filesize\0" \
-"spi__boot=fatload mmc $mmcpart $loadaddr u-boot.bin; " \
- "protect off 0xeC000000 +$filesize; " \
- "erase 0xEC000000 +$filesize; " \
- "cp.b $loadaddr 0xEC000000 $filesize; " \
- "cmp.b $loadaddr 0xEC000000 $filesize; " \
- "protect on 0xeC000000 +$filesize\0" \
-"tftpflash=tftpboot $loadaddr $uboot; " \
- "protect off " __stringify(CONFIG_SYS_TEXT_BASE_NOR) " +$filesize; " \
- "erase " __stringify(CONFIG_SYS_TEXT_BASE_NOR) " +$filesize; " \
- "cp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE_NOR) " $filesize; " \
- "protect on " __stringify(CONFIG_SYS_TEXT_BASE_NOR) " +$filesize; " \
- "cmp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE_NOR) " $filesize\0"\
-"uboot= " __stringify(CONFIG_UBOOTPATH) "\0" \
-"ubootfile=u-boot.bin\0" \
-"upgrade=run flashuboot\0" \
-"usb_phy_type=ulpi\0 " \
-"boot_nfs= " \
- "setenv bootargs root=/dev/nfs rw " \
- "nfsroot=$serverip:$rootpath " \
- "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
- "console=$consoledev,$baudrate $othbootargs;" \
- "tftp $loadaddr $bootfile;" \
- "tftp $fdtaddr $fdtfile;" \
- "bootm $loadaddr - $fdtaddr\0" \
-"boot_hd = " \
- "setenv bootargs root=/dev/$bdev rw rootdelay=30 " \
- "console=$consoledev,$baudrate $othbootargs;" \
- "usb start;" \
- "ext2load usb 0:1 $loadaddr /boot/$bootfile;" \
- "ext2load usb 0:1 $fdtaddr /boot/$fdtfile;" \
- "bootm $loadaddr - $fdtaddr\0" \
-"boot_usb_fat = " \
- "setenv bootargs root=/dev/ram rw " \
- "console=$consoledev,$baudrate $othbootargs " \
- "ramdisk_size=$ramdisk_size;" \
- "usb start;" \
- "fatload usb 0:2 $loadaddr $bootfile;" \
- "fatload usb 0:2 $fdtaddr $fdtfile;" \
- "fatload usb 0:2 $ramdiskaddr $ramdiskfile;" \
- "bootm $loadaddr $ramdiskaddr $fdtaddr\0 " \
-"boot_usb_ext2 = " \
- "setenv bootargs root=/dev/ram rw " \
- "console=$consoledev,$baudrate $othbootargs " \
- "ramdisk_size=$ramdisk_size;" \
- "usb start;" \
- "ext2load usb 0:4 $loadaddr $bootfile;" \
- "ext2load usb 0:4 $fdtaddr $fdtfile;" \
- "ext2load usb 0:4 $ramdiskaddr $ramdiskfile;" \
- "bootm $loadaddr $ramdiskaddr $fdtaddr\0 " \
-"boot_nor = " \
- "setenv bootargs root=/dev/$jffs2nor rw " \
- "console=$consoledev,$baudrate rootfstype=jffs2 $othbootargs;" \
- "bootm $norbootaddr - $norfdtaddr\0 " \
-"boot_ram = " \
- "setenv bootargs root=/dev/ram rw " \
- "console=$consoledev,$baudrate $othbootargs " \
- "ramdisk_size=$ramdisk_size;" \
- "tftp $ramdiskaddr $ramdiskfile;" \
- "tftp $loadaddr $bootfile;" \
- "tftp $fdtaddr $fdtfile;" \
- "bootm $loadaddr $ramdiskaddr $fdtaddr\0"
-
-#endif
-#endif
-
-#endif /* __CONFIG_H */

#6 lore raw

Re: [PATCH v2 02/32] ppc: Remove UCP1020 board

In reply to Simon Glass
Quoted 6 lines · Simon Glass

This board has not been converted to CONFIG_DM_PCI by the deadline. Remove it.

Note that we have to add CONFIG_SPIFLASH to scripts/config_whitelist.txt because it's not really migrated at this point.

Quoted 7 lines

[trini: Handle CONFIG_SPIFLASH differently and
delete Kconfig file]

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#7 lore raw

PATCH v2 3/32 pci: Drop old code from header file

In reply to Simon Glass

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

---

(no changes since v1)

 include/pci.h | 60 +++------------------------------------------------
 1 file changed, 3 insertions(+), 57 deletions(-)
include/pci.h +3 -57
index 258c8f831ce..e07d6c31bc1 100644
@@ -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
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#8 lore raw

Re: [PATCH v2 03/32] pci: Drop old code from header file

Quoted 4 lines · Simon Glass

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

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#9 lore raw

PATCH v2 4/32 pci: Remove guard around compatibility functions

In reply to Simon Glass

This prevents use of IS_ENABLED() in other files. Functions should be visible in headers even if they are not available at link time.

Fix it.

---

(no changes since v1)

 include/pci.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
include/pci.h +6 -2
index e07d6c31bc1..ca086420ff2 100644
@@ -789,7 +789,6 @@ extern void pci_mpc85xx_init (struct pci_controller *hose);
 extern void imx_pcie_remove(void);
 #endif
 
-#if !defined(CONFIG_DM_PCI) || defined(CONFIG_DM_PCI_COMPAT)
 /**
  * pci_write_bar32() - Write the address of a BAR including control bits
  *
@@ -797,6 +796,8 @@ extern void imx_pcie_remove(void);
  * with devices which require hard-coded addresses, not part of the normal
  * PCI enumeration process.
  *
+ * This is only available if CONFIG_DM_PCI_COMPAT is enabled
+ *
  * @hose:	PCI hose to use
  * @dev:	PCI device to update
  * @barnum:	BAR number (0-5)
@@ -808,6 +809,8 @@ void pci_write_bar32(struct pci_controller *hose, pci_dev_t dev, int barnum,
 /**
  * pci_read_bar32() - read the address of a bar
  *
+ * This is only available if CONFIG_DM_PCI_COMPAT is enabled
+ *
  * @hose:	PCI hose to use
  * @dev:	PCI device to inspect
  * @barnum:	BAR number (0-5)
@@ -818,6 +821,8 @@ u32 pci_read_bar32(struct pci_controller *hose, pci_dev_t dev, int barnum);
 /**
  * pci_hose_find_devices() - Find devices by vendor/device ID
  *
+ * This is only available if CONFIG_DM_PCI_COMPAT is enabled
+ *
  * @hose:	PCI hose to search
  * @busnum:	Bus number to search
  * @ids:	PCI vendor/device IDs to look for, terminated by 0, 0 record
@@ -828,7 +833,6 @@ u32 pci_read_bar32(struct pci_controller *hose, pci_dev_t dev, int barnum);
  */
 pci_dev_t pci_hose_find_devices(struct pci_controller *hose, int busnum,
 				struct pci_device_id *ids, int *indexp);
-#endif /* !CONFIG_DM_PCI || CONFIG_DM_PCI_COMPAT */
 
 /* Access sizes for PCI reads and writes */
 enum pci_size_t {
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#10 lore raw

Re: [PATCH v2 04/32] pci: Remove guard around compatibility functions

Quoted 6 lines · Simon Glass

This prevents use of IS_ENABLED() in other files. Functions should be visible in headers even if they are not available at link time.

Fix it.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#11 lore raw

PATCH v2 5/32 pci: Drop DM_PCI check from fdtdec

In reply to Simon Glass

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

Sadly this doesn't work with nds32 for some reason to do with the toolchain. Add a work-around for that.

---

(no changes since v1)

 lib/fdtdec.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
lib/fdtdec.c +8 -2
index 4b097fb588e..d12c6d340a0 100644
@@ -192,7 +192,6 @@ fdt_addr_t fdtdec_get_addr(const void *blob, int node, const char *prop_name)
 	return fdtdec_get_addr_size(blob, node, prop_name, NULL);
 }
 
-#if CONFIG_IS_ENABLED(PCI) && defined(CONFIG_DM_PCI)
 int fdtdec_get_pci_vendev(const void *blob, int node, u16 *vendor, u16 *device)
 {
 	const char *list, *end;
@@ -240,7 +239,15 @@ int fdtdec_get_pci_bar32(const struct udevice *dev, struct fdt_pci_addr *addr,
 		return -EINVAL;
 
 	barnum = (barnum - PCI_BASE_ADDRESS_0) / 4;
+
+	/*
+	 * There is a strange toolchain bug with nds32 which complains about
+	 * an undefined reference here, even if fdtdec_get_pci_bar32() is never
+	 * called. An #ifdef seems to be the only fix!
+	 */
+#if !IS_ENABLED(CONFIG_NDS32)
 	*bar = dm_pci_read_bar32(dev, barnum);
+#endif
 
 	return 0;
 }
@@ -260,7 +267,6 @@ int fdtdec_get_pci_bus_range(const void *blob, int node,
 
 	return 0;
 }
-#endif
 
 uint64_t fdtdec_get_uint64(const void *blob, int node, const char *prop_name,
 			   uint64_t default_val)
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#12 lore raw

Re: [PATCH v2 05/32] pci: Drop DM_PCI check from fdtdec

Quoted 7 lines · Simon Glass

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

Sadly this doesn't work with nds32 for some reason to do with the toolchain. Add a work-around for that.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#13 lore raw

PATCH v2 6/32 pci: Drop DM_PCI check from pci_common

In reply to Simon Glass

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

---

(no changes since v1)

 drivers/pci/pci_common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/pci_common.c +2 -2
index 5231b69dc9a..02a71da30fa 100644
@@ -99,7 +99,7 @@ __weak int pci_skip_dev(struct pci_controller *hose, pci_dev_t dev)
 	return 0;
 }
 
-#if !defined(CONFIG_DM_PCI) || defined(CONFIG_DM_PCI_COMPAT)
+#if defined(CONFIG_DM_PCI_COMPAT)
 /* Get a virtual address associated with a BAR region */
 void *pci_map_bar(pci_dev_t pdev, int bar, int flags)
 {
@@ -361,4 +361,4 @@ pci_dev_t pci_find_class(uint find_class, int index)
 
 	return -ENODEV;
 }
-#endif /* !CONFIG_DM_PCI || CONFIG_DM_PCI_COMPAT */
+#endif /* CONFIG_DM_PCI_COMPAT */
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#14 lore raw

Re: [PATCH v2 06/32] pci: Drop DM_PCI check from pci_common

Quoted 4 lines · Simon Glass

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

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#15 lore raw

PATCH v2 7/32 ppc: Drop CONFIG_SYS_PCI_SUBSYS_VENDORID

In reply to Simon Glass

This is not used. Drop it.

---

(no changes since v1)

 include/configs/MPC8349EMDS.h       | 1 -
 include/configs/MPC8349EMDS_SDRAM.h | 1 -
 include/configs/MPC837XERDB.h       | 1 -
 include/configs/MPC8540ADS.h        | 1 -
 include/configs/MPC8560ADS.h        | 1 -
 scripts/config_whitelist.txt        | 1 -
 6 files changed, 6 deletions(-)
include/configs/MPC8349EMDS.h +0 -1
index 4dad6a58ff5..d6ae419456a 100644
@@ -228,7 +228,6 @@
 #endif
 
 #undef CONFIG_PCI_SCAN_SHOW		/* show pci devices on startup */
-#define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1957  /* Freescale */
 
 #endif	/* CONFIG_PCI */
 
include/configs/MPC8349EMDS_SDRAM.h +0 -1
index f7c13d417f8..8ebca99d98b 100644
@@ -283,7 +283,6 @@
 #endif
 
 #undef CONFIG_PCI_SCAN_SHOW		/* show pci devices on startup */
-#define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1957  /* Freescale */
 
 #endif	/* CONFIG_PCI */
 
include/configs/MPC837XERDB.h +0 -1
index e16a5930ad8..0a136b4f92f 100644
@@ -258,7 +258,6 @@
 #define CONFIG_PCI_INDIRECT_BRIDGE
 
 #undef CONFIG_PCI_SCAN_SHOW	/* show pci devices on startup */
-#define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1957	/* Freescale */
 #endif	/* CONFIG_PCI */
 
 /*
include/configs/MPC8540ADS.h +0 -1
index d843ba1ff78..ac9afa179a5 100644
@@ -241,7 +241,6 @@
 #endif
 
 #undef CONFIG_PCI_SCAN_SHOW		/* show pci devices on startup */
-#define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1057  /* Motorola */
 
 #endif	/* CONFIG_PCI */
 
include/configs/MPC8560ADS.h +0 -1
index 464e7c72844..02aeb6f3d53 100644
@@ -238,7 +238,6 @@
 #endif
 
 #undef CONFIG_PCI_SCAN_SHOW		/* show pci devices on startup */
-#define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1057  /* Motorola */
 
 #endif	/* CONFIG_PCI */
 
scripts/config_whitelist.txt +0 -1
index 812d8f2836f..17615226d5b 100644
@@ -2937,7 +2937,6 @@ CONFIG_SYS_PCI_NR_INBOUND_WIN
 CONFIG_SYS_PCI_SLV_MEM_BUS
 CONFIG_SYS_PCI_SLV_MEM_LOCAL
 CONFIG_SYS_PCI_SLV_MEM_SIZE
-CONFIG_SYS_PCI_SUBSYS_VENDORID
 CONFIG_SYS_PCI_SYS_MEM_BUS
 CONFIG_SYS_PCI_SYS_MEM_PHYS
 CONFIG_SYS_PCI_SYS_MEM_SIZE
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#16 lore raw

Re: [PATCH v2 07/32] ppc: Drop CONFIG_SYS_PCI_SUBSYS_VENDORID

Quoted 3 lines · Simon Glass

This is not used. Drop it.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#17 lore raw

PATCH v2 8/32 pci: powerpc: Drop old code

In reply to Simon Glass

Drop the old pre-driver model code from these drivers.

---

(no changes since v1)

 arch/powerpc/cpu/mpc83xx/pci.c    | 160 -------------------------
 arch/powerpc/cpu/mpc85xx/Makefile |   1 -
 arch/powerpc/cpu/mpc85xx/pci.c    | 191 ------------------------------
 3 files changed, 352 deletions(-)
 delete mode 100644 arch/powerpc/cpu/mpc85xx/pci.c
arch/powerpc/cpu/mpc83xx/pci.c +0 -160
index 507ab3417b3..65ef0497c2a 100644
@@ -27,166 +27,6 @@ DECLARE_GLOBAL_DATA_PTR;
 static struct pci_controller pci_hose[MAX_BUSES];
 static int pci_num_buses;
 
-#if !defined(CONFIG_DM_PCI)
-static void pci_init_bus(int bus, struct pci_region *reg)
-{
-	volatile immap_t *immr = (volatile immap_t *)CONFIG_SYS_IMMR;
-	volatile pot83xx_t *pot = immr->ios.pot;
-	volatile pcictrl83xx_t *pci_ctrl = &immr->pci_ctrl[bus];
-	struct pci_controller *hose = &pci_hose[bus];
-	u32 dev;
-	u16 reg16;
-	int i;
-
-	if (bus == 1)
-		pot += 3;
-
-	/* Setup outbound translation windows */
-	for (i = 0; i < 3; i++, reg++, pot++) {
-		if (reg->size == 0)
-			break;
-
-		hose->regions[i] = *reg;
-		hose->region_count++;
-
-		pot->potar = reg->bus_start >> 12;
-		pot->pobar = reg->phys_start >> 12;
-		pot->pocmr = ~(reg->size - 1) >> 12;
-
-		if (reg->flags & PCI_REGION_IO)
-			pot->pocmr |= POCMR_IO;
-#ifdef CONFIG_83XX_PCI_STREAMING
-		else if (reg->flags & PCI_REGION_PREFETCH)
-			pot->pocmr |= POCMR_SE;
-#endif
-
-		if (bus == 1)
-			pot->pocmr |= POCMR_DST;
-
-		pot->pocmr |= POCMR_EN;
-	}
-
-	/* Point inbound translation at RAM */
-	pci_ctrl->pitar1 = 0;
-	pci_ctrl->pibar1 = 0;
-	pci_ctrl->piebar1 = 0;
-	pci_ctrl->piwar1 = PIWAR_EN | PIWAR_PF | PIWAR_RTT_SNOOP |
-			   PIWAR_WTT_SNOOP | (__ilog2(gd->ram_size - 1));
-
-	i = hose->region_count++;
-	hose->regions[i].bus_start = 0;
-	hose->regions[i].phys_start = 0;
-	hose->regions[i].size = gd->ram_size;
-	hose->regions[i].flags = PCI_REGION_MEM | PCI_REGION_SYS_MEMORY;
-
-	hose->first_busno = pci_last_busno() + 1;
-	hose->last_busno = 0xff;
-
-	pci_setup_indirect(hose, CONFIG_SYS_IMMR + 0x8300 + bus * 0x80,
-				 CONFIG_SYS_IMMR + 0x8304 + bus * 0x80);
-
-	pci_register_hose(hose);
-
-	/*
-	 * Write to Command register
-	 */
-	reg16 = 0xff;
-	dev = PCI_BDF(hose->first_busno, 0, 0);
-	pci_hose_read_config_word(hose, dev, PCI_COMMAND, &reg16);
-	reg16 |= PCI_COMMAND_SERR | PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
-	pci_hose_write_config_word(hose, dev, PCI_COMMAND, reg16);
-
-	/*
-	 * Clear non-reserved bits in status register.
-	 */
-	pci_hose_write_config_word(hose, dev, PCI_STATUS, 0xffff);
-	pci_hose_write_config_byte(hose, dev, PCI_LATENCY_TIMER, 0x80);
-	pci_hose_write_config_byte(hose, dev, PCI_CACHE_LINE_SIZE, 0x08);
-
-#ifdef CONFIG_PCI_SCAN_SHOW
-	printf("PCI:   Bus Dev VenId DevId Class Int\n");
-#endif
-#ifndef CONFIG_PCISLAVE
-	/*
-	 * Hose scan.
-	 */
-	hose->last_busno = pci_hose_scan(hose);
-#endif
-}
-
-/*
- * The caller must have already set OCCR, and the PCI_LAW BARs
- * must have been set to cover all of the requested regions.
- *
- * If fewer than three regions are requested, then the region
- * list is terminated with a region of size 0.
- */
-void mpc83xx_pci_init(int num_buses, struct pci_region **reg)
-{
-	volatile immap_t *immr = (volatile immap_t *)CONFIG_SYS_IMMR;
-	int i;
-
-	if (num_buses > MAX_BUSES) {
-		printf("%d PCI buses requested, %d supported\n",
-		       num_buses, MAX_BUSES);
-
-		num_buses = MAX_BUSES;
-	}
-
-	pci_num_buses = num_buses;
-
-	/*
-	 * Release PCI RST Output signal.
-	 * Power on to RST high must be at least 100 ms as per PCI spec.
-	 * On warm boots only 1 ms is required, but we play it safe.
-	 */
-	udelay(100000);
-
-	for (i = 0; i < num_buses; i++)
-		immr->pci_ctrl[i].gcr = 1;
-
-	/*
-	 * RST high to first config access must be at least 2^25 cycles
-	 * as per PCI spec.  This could be cut in half if we know we're
-	 * running at 66MHz.  This could be insufficiently long if we're
-	 * running the PCI bus at significantly less than 33MHz.
-	 */
-	udelay(1020000);
-
-	for (i = 0; i < num_buses; i++)
-		pci_init_bus(i, reg[i]);
-}
-
-#ifdef CONFIG_PCISLAVE
-
-#define PCI_FUNCTION_CONFIG	0x44
-#define PCI_FUNCTION_CFG_LOCK	0x20
-
-/*
- * Unlock the configuration bit so that the host system can begin booting
- *
- * This should be used after you have:
- * 1) Called mpc83xx_pci_init()
- * 2) Set up your inbound translation windows to the appropriate size
- */
-void mpc83xx_pcislave_unlock(int bus)
-{
-	struct pci_controller *hose = &pci_hose[bus];
-	u32 dev;
-	u16 reg16;
-
-	/* Unlock configuration lock in PCI function configuration register */
-	dev = PCI_BDF(hose->first_busno, 0, 0);
-	pci_hose_read_config_word (hose, dev, PCI_FUNCTION_CONFIG, &reg16);
-	reg16 &= ~(PCI_FUNCTION_CFG_LOCK);
-	pci_hose_write_config_word (hose, dev, PCI_FUNCTION_CONFIG, reg16);
-
-	/* The configuration bit is now unlocked, so we can scan the bus */
-	hose->last_busno = pci_hose_scan(hose);
-}
-#endif
-#endif /* CONFIG_DM_PCI */
-
 #if defined(CONFIG_OF_LIBFDT)
 void ft_pci_setup(void *blob, struct bd_info *bd)
 {
arch/powerpc/cpu/mpc85xx/Makefile +0 -1
index 993e4873184..15248a40824 100644
@@ -33,7 +33,6 @@ obj-$(CONFIG_CPM2)	+= ether_fcc.o
 obj-$(CONFIG_OF_LIBFDT) += fdt.o
 obj-$(CONFIG_FSL_CORENET) += liodn.o
 obj-$(CONFIG_MP)	+= mp.o
-obj-$(CONFIG_PCI)	+= pci.o
 obj-$(CONFIG_SYS_DPAA_QBMAN) += portals.o
 
 # various SoC specific assignments
arch/powerpc/cpu/mpc85xx/pci.c deleted +0 -191

191 lines not on this page · raw message

Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#18 lore raw

Re: [PATCH v2 08/32] pci: powerpc: Drop old code

Quoted 3 lines · Simon Glass

Drop the old pre-driver model code from these drivers.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#19 lore raw

PATCH v2 9/32 pci: freescale: Drop old code

In reply to Simon Glass

Drop this old pre-driver model code.

---

(no changes since v1)

 board/freescale/common/cds_pci_ft.c         |  59 ----------
 board/freescale/common/p_corenet/Makefile   |   1 -
 board/freescale/common/p_corenet/pci.c      |  25 -----
 board/freescale/mpc8548cds/mpc8548cds.c     | 114 --------------------
 board/freescale/p1010rdb/p1010rdb.c         |  11 --
 board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c |  11 --
 board/freescale/t102xrdb/Makefile           |   1 -
 board/freescale/t102xrdb/pci.c              |  25 -----
 board/freescale/t104xrdb/Makefile           |   1 -
 board/freescale/t104xrdb/pci.c              |  25 -----
 board/freescale/t208xqds/Makefile           |   1 -
 board/freescale/t208xqds/pci.c              |  25 -----
 board/freescale/t208xrdb/Makefile           |   1 -
 board/freescale/t208xrdb/pci.c              |  25 -----
 board/freescale/t4rdb/Makefile              |   1 -
 board/freescale/t4rdb/pci.c                 |  25 -----
 16 files changed, 351 deletions(-)
 delete mode 100644 board/freescale/common/p_corenet/pci.c
 delete mode 100644 board/freescale/t102xrdb/pci.c
 delete mode 100644 board/freescale/t104xrdb/pci.c
 delete mode 100644 board/freescale/t208xqds/pci.c
 delete mode 100644 board/freescale/t208xrdb/pci.c
 delete mode 100644 board/freescale/t4rdb/pci.c
board/freescale/common/cds_pci_ft.c +0 -59
index be97a28ed25..dc2d62850d1 100644
@@ -9,68 +9,9 @@
 #include "cadmus.h"
 
 #if defined(CONFIG_OF_BOARD_SETUP)
-#if defined(CONFIG_PCI) && !defined(CONFIG_DM_PCI)
-static void cds_pci_fixup(void *blob)
-{
-	int node;
-	const char *path;
-	int len, slot, i;
-	u32 *map = NULL, *piccells = NULL;
-	int off, cells;
-
-	node = fdt_path_offset(blob, "/aliases");
-	if (node >= 0) {
-		path = fdt_getprop(blob, node, "pci0", NULL);
-		if (path) {
-			node = fdt_path_offset(blob, path);
-			if (node >= 0) {
-				map = fdt_getprop_w(blob, node, "interrupt-map", &len);
-			}
-			/* Each item in "interrupt-map" property is translated with
-			 * following cells:
-			 * PCI #address-cells, PCI #interrupt-cells,
-			 * PIC address, PIC #address-cells, PIC #interrupt-cells.
-			 */
-			cells = fdt_getprop_u32_default(blob, path, "#address-cells", 1);
-			cells += fdt_getprop_u32_default(blob, path, "#interrupt-cells", 1);
-			off = fdt_node_offset_by_phandle(blob, fdt32_to_cpu(*(map+cells)));
-			if (off <= 0)
-				return;
-			cells += 1;
-			piccells = (u32 *)fdt_getprop(blob, off, "#address-cells", NULL);
-			if (piccells == NULL)
-				return;
-			cells += *piccells;
-			piccells = (u32 *)fdt_getprop(blob, off, "#interrupt-cells", NULL);
-			if (piccells == NULL)
-				return;
-			cells += *piccells;
-		}
-	}
-
-	if (map) {
-		len /= sizeof(u32);
-
-		slot = get_pci_slot();
-
-		for (i=0;i<len;i+=cells) {
-			/* We rotate the interrupt pins so that the mapping
-			 * changes depending on the slot the carrier card is in.
-			 */
-			map[3] = ((map[3] + slot - 2) % 4) + 1;
-			map+=cells;
-		}
-	}
-}
-#endif
-
 int ft_board_setup(void *blob, struct bd_info *bd)
 {
 	ft_cpu_setup(blob, bd);
-#if defined(CONFIG_PCI) && !defined(CONFIG_DM_PCI)
-	ft_pci_setup(blob, bd);
-	cds_pci_fixup(blob);
-#endif
 
 	return 0;
 }
board/freescale/common/p_corenet/Makefile +0 -1
index 29c9d544ae5..ce156018a06 100644
@@ -4,5 +4,4 @@
 # Wolfgang Denk, DENX Software Engineering, [email protected].
 
 obj-y			+= law.o
-obj-$(CONFIG_PCI)	+= pci.o
 obj-y			+= tlb.o
board/freescale/common/p_corenet/pci.c deleted +0 -25
deleted file mode 100644
index 636334863e1..00000000000
@@ -1,25 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright 2007-2011 Freescale Semiconductor, Inc.
- */
-
-#include <common.h>
-#include <command.h>
-#include <init.h>
-#include <pci.h>
-#include <asm/fsl_pci.h>
-#include <linux/libfdt.h>
-#include <fdt_support.h>
-#include <asm/fsl_serdes.h>
-
-#if !defined(CONFIG_DM_PCI)
-void pci_init_board(void)
-{
-	fsl_pcie_init_board(0);
-}
-
-void pci_of_setup(void *blob, struct bd_info *bd)
-{
-	FT_FSL_PCI_SETUP;
-}
-#endif
board/freescale/mpc8548cds/mpc8548cds.c +0 -114

123 lines not on this page · raw message

board/freescale/p1010rdb/p1010rdb.c +0 -11
index 90436337df1..84fc891b67c 100644
@@ -129,13 +129,6 @@ int board_early_init_r(void)
 	return 0;
 }
 
-#if defined(CONFIG_PCI) && !defined(CONFIG_DM_PCI)
-void pci_init_board(void)
-{
-	fsl_pcie_init_board(0);
-}
-#endif /* ifdef CONFIG_PCI */
-
 int config_board_mux(int ctrl_type)
 {
 	ccsr_gur_t __iomem *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
@@ -617,10 +610,6 @@ int ft_board_setup(void *blob, struct bd_info *bd)
 	base = env_get_bootm_low();
 	size = env_get_bootm_size();
 
-#if defined(CONFIG_PCI) && !defined(CONFIG_DM_PCI)
-	FT_FSL_PCI_SETUP;
-#endif
-
 	fdt_fixup_memory(blob, (u64)base, (u64)size);
 
 #if defined(CONFIG_HAS_FSL_DR_USB)
board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c +0 -11
index 8273384f2d5..fb9bf795e30 100644
@@ -239,13 +239,6 @@ int checkboard(void)
 	return 0;
 }
 
-#if defined(CONFIG_PCI) && !defined(CONFIG_DM_PCI)
-void pci_init_board(void)
-{
-	fsl_pcie_init_board(0);
-}
-#endif
-
 int board_early_init_r(void)
 {
 	const unsigned int flashbase = CONFIG_SYS_FLASH_BASE;
@@ -363,10 +356,6 @@ int ft_board_setup(void *blob, struct bd_info *bd)
 
 	fdt_fixup_memory(blob, (u64)base, (u64)size);
 
-#if !defined(CONFIG_DM_PCI)
-	FT_FSL_PCI_SETUP;
-#endif
-
 #ifdef CONFIG_QE
 	do_fixup_by_compat(blob, "fsl,qe", "status", "okay",
 			sizeof("okay"), 0);
board/freescale/t102xrdb/Makefile +0 -1
index ddeb44f36e2..e597486c940 100644
@@ -10,7 +10,6 @@ else
 obj-y   += t102xrdb.o
 obj-$(CONFIG_TARGET_T1024RDB)   += cpld.o
 obj-y   += eth_t102xrdb.o
-obj-$(CONFIG_PCI)       += pci.o
 endif
 obj-y   += ddr.o
 obj-y   += law.o
board/freescale/t102xrdb/pci.c deleted +0 -25
deleted file mode 100644
index 45ab9223ae1..00000000000
@@ -1,25 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright 2007-2014 Freescale Semiconductor, Inc.
- */
-
-#include <common.h>
-#include <command.h>
-#include <init.h>
-#include <pci.h>
-#include <asm/fsl_pci.h>
-#include <linux/libfdt.h>
-#include <fdt_support.h>
-#include <asm/fsl_serdes.h>
-
-#if !defined(CONFIG_DM_PCI)
-void pci_init_board(void)
-{
-	fsl_pcie_init_board(0);
-}
-
-void pci_of_setup(void *blob, struct bd_info *bd)
-{
-	FT_FSL_PCI_SETUP;
-}
-#endif
board/freescale/t104xrdb/Makefile +0 -1
index 31abbd9aca0..d67e9412ecd 100644
@@ -8,7 +8,6 @@ else
 obj-y	+= t104xrdb.o
 obj-y	+= cpld.o
 obj-y	+= eth.o
-obj-$(CONFIG_PCI)	+= pci.o
 obj-$(CONFIG_FSL_DIU_FB)+= diu.o
 endif
 obj-y	+= ddr.o
board/freescale/t104xrdb/pci.c deleted +0 -25
deleted file mode 100644
index 1fd24027000..00000000000
@@ -1,25 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright 2013 Freescale Semiconductor, Inc.
- */
-
-#include <common.h>
-#include <command.h>
-#include <init.h>
-#include <pci.h>
-#include <asm/fsl_pci.h>
-#include <linux/libfdt.h>
-#include <fdt_support.h>
-#include <asm/fsl_serdes.h>
-
-#if !defined(CONFIG_DM_PCI)
-void pci_init_board(void)
-{
-	fsl_pcie_init_board(0);
-}
-
-void pci_of_setup(void *blob, struct bd_info *bd)
-{
-	FT_FSL_PCI_SETUP;
-}
-#endif
board/freescale/t208xqds/Makefile +0 -1
index 55b1e7390a0..de8613058de 100644
@@ -8,7 +8,6 @@ ifdef CONFIG_SPL_BUILD
 obj-y += spl.o
 else
 obj-$(CONFIG_TARGET_T2080QDS) += t208xqds.o eth_t208xqds.o
-obj-$(CONFIG_PCI)      += pci.o
 endif
 
 obj-y   += ddr.o
board/freescale/t208xqds/pci.c deleted +0 -25
deleted file mode 100644
index a03b11ccb50..00000000000
@@ -1,25 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright 2007-2013 Freescale Semiconductor, Inc.
- */
-
-#include <common.h>
-#include <command.h>
-#include <init.h>
-#include <pci.h>
-#include <asm/fsl_pci.h>
-#include <linux/libfdt.h>
-#include <fdt_support.h>
-#include <asm/fsl_serdes.h>
-
-#if !defined(CONFIG_DM_PCI)
-void pci_init_board(void)
-{
-	fsl_pcie_init_board(0);
-}
-
-void pci_of_setup(void *blob, struct bd_info *bd)
-{
-	FT_FSL_PCI_SETUP;
-}
-#endif
board/freescale/t208xrdb/Makefile +0 -1
index 25ea66a0248..7af3cd0ac4c 100644
@@ -8,7 +8,6 @@ ifdef CONFIG_SPL_BUILD
 obj-y	+= spl.o
 else
 obj-$(CONFIG_TARGET_T2080RDB) += t208xrdb.o eth_t208xrdb.o cpld.o
-obj-$(CONFIG_PCI)      += pci.o
 endif
 
 obj-y   += ddr.o
board/freescale/t208xrdb/pci.c deleted +0 -25
deleted file mode 100644
index 45ab9223ae1..00000000000
@@ -1,25 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright 2007-2014 Freescale Semiconductor, Inc.
- */
-
-#include <common.h>
-#include <command.h>
-#include <init.h>
-#include <pci.h>
-#include <asm/fsl_pci.h>
-#include <linux/libfdt.h>
-#include <fdt_support.h>
-#include <asm/fsl_serdes.h>
-
-#if !defined(CONFIG_DM_PCI)
-void pci_init_board(void)
-{
-	fsl_pcie_init_board(0);
-}
-
-void pci_of_setup(void *blob, struct bd_info *bd)
-{
-	FT_FSL_PCI_SETUP;
-}
-#endif
board/freescale/t4rdb/Makefile +0 -1
index f1fd623339c..3106848639c 100644
@@ -10,7 +10,6 @@ else
 obj-$(CONFIG_TARGET_T4240RDB)	+= t4240rdb.o
 obj-y			+= cpld.o
 obj-y			+= eth.o
-obj-$(CONFIG_PCI)	+= pci.o
 endif
 
 obj-y	+= ddr.o
board/freescale/t4rdb/pci.c deleted +0 -25
deleted file mode 100644
index c2bc05164dd..00000000000
@@ -1,25 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright 2014 Freescale Semiconductor, Inc.
- */
-
-#include <common.h>
-#include <command.h>
-#include <init.h>
-#include <pci.h>
-#include <asm/fsl_pci.h>
-#include <linux/libfdt.h>
-#include <fdt_support.h>
-#include <asm/fsl_serdes.h>
-
-#if !defined(CONFIG_DM_PCI)
-void pci_init_board(void)
-{
-	fsl_pcie_init_board(0);
-}
-
-void pci_of_setup(void *blob, struct bd_info *bd)
-{
-	FT_FSL_PCI_SETUP;
-}
-#endif
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#20 lore raw

Re: [PATCH v2 09/32] pci: freescale: Drop old code

Quoted 3 lines · Simon Glass

Drop this old pre-driver model code.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#21 lore raw

PATCH v2 10/32 pci: dm: core: Drop DM_PCI check from devfdt_get_addr_pci()

In reply to Simon Glass

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

---

(no changes since v1)

 drivers/core/fdtaddr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/core/fdtaddr.c +1 -2
index b9874c743d1..4ffbd6b2ebc 100644
@@ -200,8 +200,7 @@ fdt_addr_t devfdt_get_addr_pci(const struct udevice *dev)
 	ulong addr;
 
 	addr = devfdt_get_addr(dev);
-	if (CONFIG_IS_ENABLED(PCI) && IS_ENABLED(CONFIG_DM_PCI) &&
-	    addr == FDT_ADDR_T_NONE) {
+	if (CONFIG_IS_ENABLED(PCI) && addr == FDT_ADDR_T_NONE) {
 		struct fdt_pci_addr pci_addr;
 		u32 bar;
 		int ret;
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#22 lore raw

Re: [PATCH v2 10/32] pci: dm: core: Drop DM_PCI check from devfdt_get_addr_pci()

Quoted 4 lines · Simon Glass

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

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#23 lore raw

PATCH v2 11/32 ppc: Drop DM_PCI from config files

In reply to Simon Glass

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

---

(no changes since v1)

 include/configs/MPC8548CDS.h   | 16 ----------------
 include/configs/P1010RDB.h     | 28 ----------------------------
 include/configs/P2041RDB.h     | 17 -----------------
 include/configs/T102xRDB.h     | 17 -----------------
 include/configs/T104xRDB.h     | 20 --------------------
 include/configs/T208xQDS.h     | 20 --------------------
 include/configs/T208xRDB.h     | 20 --------------------
 include/configs/T4240RDB.h     | 21 ---------------------
 include/configs/corenet_ds.h   | 21 ---------------------
 include/configs/p1_p2_rdb_pc.h | 24 ------------------------
 10 files changed, 204 deletions(-)
include/configs/MPC8548CDS.h +0 -16
index 2046bf215b2..d8e57fd0997 100644
@@ -371,23 +371,7 @@ extern unsigned long get_clock_freq(void);
 #endif
 
 #if defined(CONFIG_PCI)
-
-#if !defined(CONFIG_DM_PCI)
-#define CONFIG_FSL_PCI_INIT		1	/* Use common FSL init code */
-#define CONFIG_PCI_INDIRECT_BRIDGE	1
-#define CONFIG_SYS_PCIE1_NAME		"Slot"
-#ifdef CONFIG_PHYS_64BIT
-#define CONFIG_SYS_PCIE1_MEM_BUS	0xe0000000
-#else
-#define CONFIG_SYS_PCIE1_MEM_BUS	0xa0000000
-#endif
-#define CONFIG_SYS_PCIE1_MEM_SIZE	0x20000000      /* 512M */
-#define CONFIG_SYS_PCIE1_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE1_IO_SIZE	0x00100000	/*   1M */
-#endif
-
 #define CONFIG_PCI_SCAN_SHOW		/* show pci devices on startup */
-
 #endif	/* CONFIG_PCI */
 
 #if defined(CONFIG_TSEC_ENET)
include/configs/P1010RDB.h +0 -28
index f5209e17964..b7e44d17373 100644
@@ -150,34 +150,6 @@
 #define CONFIG_SYS_PCIE2_IO_PHYS	0xffc10000
 #endif
 
-#if !defined(CONFIG_DM_PCI)
-#define CONFIG_FSL_PCI_INIT		/* Use common FSL init code */
-#define CONFIG_PCI_INDIRECT_BRIDGE	/* indirect PCI bridge support */
-#define CONFIG_SYS_PCIE1_NAME		"mini PCIe Slot"
-#ifdef CONFIG_PHYS_64BIT
-#define CONFIG_SYS_PCIE1_MEM_BUS	0x80000000
-#else
-#define CONFIG_SYS_PCIE1_MEM_BUS	0x80000000
-#endif
-#define CONFIG_SYS_PCIE1_MEM_SIZE	0x20000000	/* 512M */
-#define CONFIG_SYS_PCIE1_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE1_IO_SIZE	0x00010000	/* 64k */
-
-#if defined(CONFIG_TARGET_P1010RDB_PA)
-#define CONFIG_SYS_PCIE2_NAME		"PCIe Slot"
-#elif defined(CONFIG_TARGET_P1010RDB_PB)
-#define CONFIG_SYS_PCIE2_NAME		"mini PCIe Slot"
-#endif
-#ifdef CONFIG_PHYS_64BIT
-#define CONFIG_SYS_PCIE2_MEM_BUS	0xc0000000
-#else
-#define CONFIG_SYS_PCIE2_MEM_BUS	0xa0000000
-#endif
-#define CONFIG_SYS_PCIE2_MEM_SIZE	0x20000000	/* 512M */
-#define CONFIG_SYS_PCIE2_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE2_IO_SIZE	0x00010000	/* 64k */
-#endif
-
 #define CONFIG_PCI_SCAN_SHOW		/* show pci devices on startup */
 #endif
 
include/configs/P2041RDB.h +0 -17
index b5b159406a4..4ef061343c1 100644
@@ -417,23 +417,6 @@ unsigned long get_board_sys_clk(unsigned long dummy);
 #define CONFIG_SYS_FDT_PAD		(0x3000 + CONFIG_SYS_QE_FMAN_FW_LENGTH)
 
 #ifdef CONFIG_PCI
-#if !defined(CONFIG_DM_PCI)
-#define CONFIG_FSL_PCI_INIT	/* Use common FSL init code */
-#define CONFIG_PCI_INDIRECT_BRIDGE
-#define CONFIG_SYS_PCIE1_MEM_BUS	0xe0000000
-#define CONFIG_SYS_PCIE1_MEM_SIZE	0x20000000      /* 512M */
-#define CONFIG_SYS_PCIE1_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE1_IO_SIZE	0x00010000	/* 64k */
-#define CONFIG_SYS_PCIE2_MEM_BUS	0xe0000000
-#define CONFIG_SYS_PCIE2_MEM_SIZE	0x20000000	/* 512M */
-#define CONFIG_SYS_PCIE2_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE2_IO_SIZE	0x00010000	/* 64k */
-#define CONFIG_SYS_PCIE3_MEM_BUS	0xe0000000
-#define CONFIG_SYS_PCIE3_MEM_SIZE	0x20000000	/* 512M */
-#define CONFIG_SYS_PCIE3_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE3_IO_SIZE	0x00010000	/* 64k */
-#endif
-
 #define CONFIG_PCI_SCAN_SHOW		/* show pci devices on startup */
 #endif	/* CONFIG_PCI */
 
include/configs/T102xRDB.h +0 -17
index 1b4720db5c8..187304419e6 100644
@@ -487,23 +487,6 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_SYS_PCIE3_IO_PHYS	0xff8020000ull
 #endif
 
-#if !defined(CONFIG_DM_PCI)
-#define CONFIG_FSL_PCI_INIT	/* Use common FSL init code */
-#define CONFIG_SYS_PCIE1_MEM_BUS	0xe0000000
-#define CONFIG_SYS_PCIE1_MEM_SIZE	0x10000000	/* 256M */
-#define CONFIG_SYS_PCIE1_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE1_IO_SIZE	0x00010000	/* 64k */
-#define CONFIG_SYS_PCIE2_MEM_BUS	0xe0000000
-#define CONFIG_SYS_PCIE2_MEM_SIZE	0x10000000 /* 256M */
-#define CONFIG_SYS_PCIE2_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE2_IO_SIZE	0x00010000	/* 64k */
-#define CONFIG_SYS_PCIE3_MEM_BUS	0xe0000000
-#define CONFIG_SYS_PCIE3_MEM_SIZE	0x10000000	/* 256M */
-#define CONFIG_SYS_PCIE3_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE3_IO_SIZE	0x00010000	/* 64k */
-#define CONFIG_PCI_INDIRECT_BRIDGE
-#endif
-
 #define CONFIG_PCI_SCAN_SHOW		/* show pci devices on startup */
 #endif	/* CONFIG_PCI */
 
include/configs/T104xRDB.h +0 -20
index 57a0bf5287e..fb215bb05fb 100644
@@ -537,26 +537,6 @@ $(SRCTREE)/board/freescale/t104xrdb/t1042d4_sd_rcw.cfg
 #define CONFIG_SYS_PCIE4_IO_PHYS	0xff8030000ull
 #endif
 
-#if !defined(CONFIG_DM_PCI)
-#define CONFIG_FSL_PCI_INIT	/* Use common FSL init code */
-#define CONFIG_SYS_PCIE1_MEM_BUS	0xe0000000
-#define CONFIG_SYS_PCIE1_MEM_SIZE	0x10000000	/* 256M */
-#define CONFIG_SYS_PCIE1_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE1_IO_SIZE	0x00010000	/* 64k */
-#define CONFIG_SYS_PCIE2_MEM_BUS	0xe0000000
-#define CONFIG_SYS_PCIE2_MEM_SIZE	0x10000000	/* 256M */
-#define CONFIG_SYS_PCIE2_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE2_IO_SIZE	0x00010000	/* 64k */
-#define CONFIG_SYS_PCIE3_MEM_BUS	0xe0000000
-#define CONFIG_SYS_PCIE3_MEM_SIZE	0x10000000	/* 256M */
-#define CONFIG_SYS_PCIE3_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE3_IO_SIZE	0x00010000	/* 64k */
-#define CONFIG_SYS_PCIE4_MEM_BUS	0xe0000000
-#define CONFIG_SYS_PCIE4_MEM_SIZE	0x10000000	/* 256M */
-#define CONFIG_SYS_PCIE4_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE4_IO_SIZE	0x00010000	/* 64k */
-#define CONFIG_PCI_INDIRECT_BRIDGE
-#endif
 #define CONFIG_PCI_SCAN_SHOW		/* show pci devices on startup */
 #endif	/* CONFIG_PCI */
 
include/configs/T208xQDS.h +0 -20
index b8d1693017e..f61b40fb3bd 100644
@@ -486,26 +486,6 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_SYS_PCIE4_IO_PHYS	0xff8030000ull
 
 #ifdef CONFIG_PCI
-#if !defined(CONFIG_DM_PCI)
-#define CONFIG_FSL_PCI_INIT	/* Use common FSL init code */
-#define CONFIG_SYS_PCIE1_MEM_BUS	0xe0000000
-#define CONFIG_SYS_PCIE1_MEM_SIZE	0x20000000      /* 512M */
-#define CONFIG_SYS_PCIE1_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE1_IO_SIZE	0x00010000	/* 64k */
-#define CONFIG_SYS_PCIE2_MEM_BUS	0xe0000000
-#define CONFIG_SYS_PCIE2_MEM_SIZE	0x10000000 /* 256M */
-#define CONFIG_SYS_PCIE2_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE2_IO_SIZE	0x00010000	/* 64k */
-#define CONFIG_SYS_PCIE3_MEM_BUS	0xe0000000
-#define CONFIG_SYS_PCIE3_MEM_SIZE	0x10000000	/* 256M */
-#define CONFIG_SYS_PCIE3_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE3_IO_SIZE	0x00010000	/* 64k */
-#define CONFIG_SYS_PCIE4_MEM_BUS	0xe0000000
-#define CONFIG_SYS_PCIE4_MEM_SIZE	0x10000000	/* 256M */
-#define CONFIG_SYS_PCIE4_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE4_IO_SIZE	0x00010000	/* 64k */
-#define CONFIG_PCI_INDIRECT_BRIDGE
-#endif
 #define CONFIG_PCI_SCAN_SHOW	/* show pci devices on startup */
 #endif
 
include/configs/T208xRDB.h +0 -20
index a04a49d0339..63cc5af2c6d 100644
@@ -435,26 +435,6 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_SYS_PCIE4_IO_PHYS	0xff8030000ull
 
 #ifdef CONFIG_PCI
-#if !defined(CONFIG_DM_PCI)
-#define CONFIG_FSL_PCI_INIT	/* Use common FSL init code */
-#define CONFIG_SYS_PCIE1_MEM_BUS	0xe0000000
-#define CONFIG_SYS_PCIE1_MEM_SIZE	0x20000000      /* 512M */
-#define CONFIG_SYS_PCIE1_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE1_IO_SIZE	0x00010000	/* 64k */
-#define CONFIG_SYS_PCIE2_MEM_BUS	0xe0000000
-#define CONFIG_SYS_PCIE2_MEM_SIZE	0x10000000 /* 256M */
-#define CONFIG_SYS_PCIE2_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE2_IO_SIZE	0x00010000	/* 64k */
-#define CONFIG_SYS_PCIE3_MEM_BUS	0xe0000000
-#define CONFIG_SYS_PCIE3_MEM_SIZE	0x10000000	/* 256M */
-#define CONFIG_SYS_PCIE3_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE3_IO_SIZE	0x00010000	/* 64k */
-#define CONFIG_SYS_PCIE4_MEM_BUS	0xe0000000
-#define CONFIG_SYS_PCIE4_MEM_SIZE	0x10000000	/* 256M */
-#define CONFIG_SYS_PCIE4_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE4_IO_SIZE	0x00010000	/* 64k */
-#define CONFIG_PCI_INDIRECT_BRIDGE
-#endif
 #define CONFIG_PCI_SCAN_SHOW	/* show pci devices on startup */
 #endif
 
include/configs/T4240RDB.h +0 -21
index aa185be7411..57a39fa970f 100644
@@ -196,27 +196,6 @@
 #define CONFIG_SYS_PCIE4_IO_PHYS	0xff8030000ull
 
 #ifdef CONFIG_PCI
-#if !defined(CONFIG_DM_PCI)
-#define CONFIG_FSL_PCI_INIT	/* Use common FSL init code */
-#define CONFIG_SYS_PCIE1_MEM_BUS	0xe0000000
-#define CONFIG_SYS_PCIE1_MEM_SIZE	0x20000000      /* 512M */
-#define CONFIG_SYS_PCIE1_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE1_IO_SIZE	0x00010000	/* 64k */
-#define CONFIG_SYS_PCIE2_MEM_BUS	0xe0000000
-#define CONFIG_SYS_PCIE2_MEM_SIZE	0x20000000	/* 512M */
-#define CONFIG_SYS_PCIE2_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE2_IO_SIZE	0x00010000	/* 64k */
-#define CONFIG_SYS_PCIE3_MEM_BUS	0xe0000000
-#define CONFIG_SYS_PCIE3_MEM_SIZE	0x20000000	/* 512M */
-#define CONFIG_SYS_PCIE3_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE3_IO_SIZE	0x00010000	/* 64k */
-#define CONFIG_SYS_PCIE4_MEM_BUS	0xe0000000
-#define CONFIG_SYS_PCIE4_MEM_SIZE	0x20000000	/* 512M */
-#define CONFIG_SYS_PCIE4_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE4_IO_SIZE	0x00010000	/* 64k */
-#define CONFIG_PCI_INDIRECT_BRIDGE
-#endif
-
 #define CONFIG_PCI_SCAN_SHOW		/* show pci devices on startup */
 #endif	/* CONFIG_PCI */
 
include/configs/corenet_ds.h +0 -21
index 924093e6b05..c877f3c725e 100644
@@ -430,27 +430,6 @@
 #define CONFIG_SYS_FDT_PAD		(0x3000 + CONFIG_SYS_QE_FMAN_FW_LENGTH)
 
 #ifdef CONFIG_PCI
-#if !defined(CONFIG_DM_PCI)
-#define CONFIG_FSL_PCI_INIT	/* Use common FSL init code */
-#define CONFIG_PCI_INDIRECT_BRIDGE
-#define CONFIG_SYS_PCIE1_MEM_BUS	0xe0000000
-#define CONFIG_SYS_PCIE1_MEM_SIZE	0x20000000      /* 512M */
-#define CONFIG_SYS_PCIE1_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE1_IO_SIZE	0x00010000	/* 64k */
-#define CONFIG_SYS_PCIE2_MEM_BUS	0xe0000000
-#define CONFIG_SYS_PCIE2_MEM_SIZE	0x20000000	/* 512M */
-#define CONFIG_SYS_PCIE2_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE2_IO_SIZE	0x00010000	/* 64k */
-#define CONFIG_SYS_PCIE3_MEM_BUS	0xe0000000
-#define CONFIG_SYS_PCIE3_MEM_SIZE	0x20000000	/* 512M */
-#define CONFIG_SYS_PCIE3_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE3_IO_SIZE	0x00010000	/* 64k */
-#define CONFIG_SYS_PCIE4_MEM_BUS	0xe0000000
-#define CONFIG_SYS_PCIE4_MEM_SIZE	0x20000000	/* 512M */
-#define CONFIG_SYS_PCIE4_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE4_IO_SIZE	0x00010000	/* 64k */
-#endif
-
 #define CONFIG_PCI_SCAN_SHOW		/* show pci devices on startup */
 #endif	/* CONFIG_PCI */
 
include/configs/p1_p2_rdb_pc.h +0 -24
index ba5b649b971..54c82b4f335 100644
@@ -529,30 +529,6 @@
 #define CONFIG_SYS_PCIE1_IO_PHYS	0xffc00000
 #endif
 
-#if !defined(CONFIG_DM_PCI)
-#define CONFIG_FSL_PCI_INIT	/* Use common FSL init code */
-#define CONFIG_PCI_INDIRECT_BRIDGE
-#define CONFIG_SYS_PCIE2_NAME		"PCIe SLOT"
-#ifdef CONFIG_PHYS_64BIT
-#define CONFIG_SYS_PCIE2_MEM_BUS	0xc0000000
-#else
-#define CONFIG_SYS_PCIE2_MEM_BUS	0xa0000000
-#endif
-#define CONFIG_SYS_PCIE2_MEM_SIZE	0x20000000	/* 512M */
-#define CONFIG_SYS_PCIE2_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE2_IO_SIZE	0x00010000	/* 64k */
-
-#define CONFIG_SYS_PCIE1_NAME		"mini PCIe SLOT"
-#ifdef CONFIG_PHYS_64BIT
-#define CONFIG_SYS_PCIE1_MEM_BUS	0x80000000
-#else
-#define CONFIG_SYS_PCIE1_MEM_BUS	0x80000000
-#endif
-#define CONFIG_SYS_PCIE1_MEM_SIZE	0x20000000	/* 512M */
-#define CONFIG_SYS_PCIE1_IO_BUS		0x00000000
-#define CONFIG_SYS_PCIE1_IO_SIZE	0x00010000	/* 64k */
-#endif
-
 #define CONFIG_PCI_SCAN_SHOW	/* show pci devices on startup */
 #endif /* CONFIG_PCI */
 
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#24 lore raw

Re: [PATCH v2 11/32] ppc: Drop DM_PCI from config files

Quoted 4 lines · Simon Glass

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

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#25 lore raw

PATCH v2 12/32 pci: acpi: Drop DM_PCI check from ahci

In reply to Simon Glass

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

Drop them.

---

(no changes since v1)

 drivers/ata/ahci.c | 55 ----------------------------------------------
 include/ahci.h     |  4 ----
 2 files changed, 59 deletions(-)
drivers/ata/ahci.c +0 -55
index d4047c04f5d..2062197afcd 100644
@@ -170,13 +170,8 @@ int ahci_reset(void __iomem *base)
 static int ahci_host_init(struct ahci_uc_priv *uc_priv)
 {
 #if !defined(CONFIG_SCSI_AHCI_PLAT) && !defined(CONFIG_DM_SCSI)
-# ifdef CONFIG_DM_PCI
 	struct udevice *dev = uc_priv->dev;
 	struct pci_child_plat *pplat = dev_get_parent_plat(dev);
-# else
-	pci_dev_t pdev = uc_priv->dev;
-	unsigned short vendor;
-# endif
 	u16 tmp16;
 #endif
 	void __iomem *mmio = uc_priv->mmio_base;
@@ -200,23 +195,12 @@ static int ahci_host_init(struct ahci_uc_priv *uc_priv)
 	writel_with_flush(0xf, mmio + HOST_PORTS_IMPL);
 
 #if !defined(CONFIG_SCSI_AHCI_PLAT) && !defined(CONFIG_DM_SCSI)
-# ifdef CONFIG_DM_PCI
 	if (pplat->vendor == PCI_VENDOR_ID_INTEL) {
 		u16 tmp16;
 
 		dm_pci_read_config16(dev, 0x92, &tmp16);
 		dm_pci_write_config16(dev, 0x92, tmp16 | 0xf);
 	}
-# else
-	pci_read_config_word(pdev, PCI_VENDOR_ID, &vendor);
-
-	if (vendor == PCI_VENDOR_ID_INTEL) {
-		u16 tmp16;
-		pci_read_config_word(pdev, 0x92, &tmp16);
-		tmp16 |= 0xf;
-		pci_write_config_word(pdev, 0x92, tmp16);
-	}
-# endif
 #endif
 	uc_priv->cap = readl(mmio + HOST_CAP);
 	uc_priv->port_map = readl(mmio + HOST_PORTS_IMPL);
@@ -331,15 +315,9 @@ static int ahci_host_init(struct ahci_uc_priv *uc_priv)
 	debug("HOST_CTL 0x%x\n", tmp);
 #if !defined(CONFIG_DM_SCSI)
 #ifndef CONFIG_SCSI_AHCI_PLAT
-# ifdef CONFIG_DM_PCI
 	dm_pci_read_config16(dev, PCI_COMMAND, &tmp16);
 	tmp |= PCI_COMMAND_MASTER;
 	dm_pci_write_config16(dev, PCI_COMMAND, tmp16);
-# else
-	pci_read_config_word(pdev, PCI_COMMAND, &tmp16);
-	tmp |= PCI_COMMAND_MASTER;
-	pci_write_config_word(pdev, PCI_COMMAND, tmp16);
-# endif
 #endif
 #endif
 	return 0;
@@ -349,11 +327,7 @@ static int ahci_host_init(struct ahci_uc_priv *uc_priv)
 static void ahci_print_info(struct ahci_uc_priv *uc_priv)
 {
 #if !defined(CONFIG_SCSI_AHCI_PLAT) && !defined(CONFIG_DM_SCSI)
-# if defined(CONFIG_DM_PCI)
 	struct udevice *dev = uc_priv->dev;
-# else
-	pci_dev_t pdev = uc_priv->dev;
-# endif
 	u16 cc;
 #endif
 	void __iomem *mmio = uc_priv->mmio_base;
@@ -379,11 +353,7 @@ static void ahci_print_info(struct ahci_uc_priv *uc_priv)
 #if defined(CONFIG_SCSI_AHCI_PLAT) || defined(CONFIG_DM_SCSI)
 	scc_s = "SATA";
 #else
-# ifdef CONFIG_DM_PCI
 	dm_pci_read_config16(dev, 0x0a, &cc);
-# else
-	pci_read_config_word(pdev, 0x0a, &cc);
-# endif
 	if (cc == 0x0101)
 		scc_s = "IDE";
 	else if (cc == 0x0106)
@@ -428,11 +398,7 @@ static void ahci_print_info(struct ahci_uc_priv *uc_priv)
 }
 
 #if defined(CONFIG_DM_SCSI) || !defined(CONFIG_SCSI_AHCI_PLAT)
-# if defined(CONFIG_DM_PCI) || defined(CONFIG_DM_SCSI)
 static int ahci_init_one(struct ahci_uc_priv *uc_priv, struct udevice *dev)
-# else
-static int ahci_init_one(struct ahci_uc_priv *uc_priv, pci_dev_t dev)
-# endif
 {
 #if !defined(CONFIG_DM_SCSI)
 	u16 vendor;
@@ -450,7 +416,6 @@ static int ahci_init_one(struct ahci_uc_priv *uc_priv, pci_dev_t dev)
 	uc_priv->udma_mask = 0x7f;	/*Fixme,assume to support UDMA6 */
 
 #if !defined(CONFIG_DM_SCSI)
-#ifdef CONFIG_DM_PCI
 	uc_priv->mmio_base = dm_pci_map_bar(dev, PCI_BASE_ADDRESS_5,
 					      PCI_REGION_MEM);
 
@@ -461,18 +426,6 @@ static int ahci_init_one(struct ahci_uc_priv *uc_priv, pci_dev_t dev)
 	dm_pci_read_config16(dev, PCI_VENDOR_ID, &vendor);
 	if (vendor == 0x197b)
 		dm_pci_write_config8(dev, 0x41, 0xa1);
-#else
-	uc_priv->mmio_base = pci_map_bar(dev, PCI_BASE_ADDRESS_5,
-					   PCI_REGION_MEM);
-
-	/* Take from kernel:
-	 * JMicron-specific fixup:
-	 * make sure we're in AHCI mode
-	 */
-	pci_read_config_word(dev, PCI_VENDOR_ID, &vendor);
-	if (vendor == 0x197b)
-		pci_write_config_byte(dev, 0x41, 0xa1);
-#endif
 #else
 	struct scsi_plat *plat = dev_get_uclass_plat(dev);
 	uc_priv->mmio_base = (void *)plat->base;
@@ -1006,7 +959,6 @@ void scsi_low_level_init(int busdevfunc)
 		return;
 	}
 	uc_priv = probe_ent;
-# if defined(CONFIG_DM_PCI)
 	struct udevice *dev;
 	int ret;
 
@@ -1014,9 +966,6 @@ void scsi_low_level_init(int busdevfunc)
 	if (ret)
 		return;
 	ahci_init_one(uc_priv, dev);
-# else
-	ahci_init_one(uc_priv, busdevfunc);
-# endif
 #else
 	uc_priv = probe_ent;
 #endif
@@ -1026,7 +975,6 @@ void scsi_low_level_init(int busdevfunc)
 #endif
 
 #ifndef CONFIG_SCSI_AHCI_PLAT
-# if defined(CONFIG_DM_PCI) || defined(CONFIG_DM_SCSI)
 int ahci_init_one_dm(struct udevice *dev)
 {
 	struct ahci_uc_priv *uc_priv = dev_get_uclass_priv(dev);
@@ -1034,7 +982,6 @@ int ahci_init_one_dm(struct udevice *dev)
 	return ahci_init_one(uc_priv, dev);
 }
 #endif
-#endif
 
 int ahci_start_ports_dm(struct udevice *dev)
 {
@@ -1196,7 +1143,6 @@ int ahci_probe_scsi(struct udevice *ahci_dev, ulong base)
 	return 0;
 }
 
-#ifdef CONFIG_DM_PCI
 int ahci_probe_scsi_pci(struct udevice *ahci_dev)
 {
 	ulong base;
@@ -1221,7 +1167,6 @@ int ahci_probe_scsi_pci(struct udevice *ahci_dev)
 						 PCI_REGION_MEM);
 	return ahci_probe_scsi(ahci_dev, base);
 }
-#endif
 
 struct scsi_ops scsi_ops = {
 	.exec		= ahci_scsi_exec,
include/ahci.h +0 -4
index fb96dd88611..d5453042d15 100644
@@ -148,16 +148,12 @@ struct ahci_ioports {
  * where dev is the controller (although at present it sometimes stands alone).
  */
 struct ahci_uc_priv {
-#if defined(CONFIG_DM_PCI) || defined(CONFIG_DM_SCSI)
 	/*
 	 * TODO([email protected]): Drop this once this structure is only used
 	 * in a driver-model context (i.e. attached to a device with
 	 * dev_get_uclass_priv()
 	 */
 	struct udevice *dev;
-#else
-	pci_dev_t	dev;
-#endif
 	struct ahci_ioports	port[AHCI_MAX_PORTS];
 	u16 *ataid[AHCI_MAX_PORTS];
 	u32	n_ports;
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#26 lore raw

Re: [PATCH v2 12/32] pci: acpi: Drop DM_PCI check from ahci

Quoted 6 lines · Simon Glass

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

Drop them.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#27 lore raw

PATCH v2 13/32 pci: usb: Drop DM_PCI from ohci

In reply to Simon Glass

Now that DM_PCI is always enabled we don't need to check it. Drop this old condition and update the comment.

---

(no changes since v1)

 drivers/usb/host/ohci-hcd.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)
drivers/usb/host/ohci-hcd.c +5 -10
index c62d8feecce..7fa84f8bbe4 100644
@@ -52,13 +52,6 @@
 #include <asm/arch/hardware.h>	/* needed for AT91_USB_HOST_BASE */
 #endif
 
-#if defined(CONFIG_CPU_ARM920T) || \
-	defined(CONFIG_PCI_OHCI) || \
-	defined(CONFIG_DM_PCI) || \
-	defined(CONFIG_SYS_OHCI_USE_NPS)
-# define OHCI_USE_NPS		/* force NoPowerSwitching mode */
-#endif
-
 #undef OHCI_VERBOSE_DEBUG	/* not always helpful */
 #undef DEBUG
 #undef SHOW_INFO
@@ -1885,12 +1878,14 @@ static int hc_start(ohci_t *ohci)
 	mask = OHCI_INTR_RHSC | OHCI_INTR_UE | OHCI_INTR_WDH | OHCI_INTR_SO;
 	ohci_writel(mask, &ohci->regs->intrenable);
 
-#ifdef	OHCI_USE_NPS
-	/* required for AMD-756 and some Mac platforms */
+	/*
+	 * required for AMD-756 and some Mac platforms
+	 * Note: this is always enabled at present, since driver model is used
+	 * for PCI
+	 */
 	ohci_writel((roothub_a(ohci) | RH_A_NPS) & ~RH_A_PSM,
 		&ohci->regs->roothub.a);
 	ohci_writel(RH_HS_LPSC, &ohci->regs->roothub.status);
-#endif	/* OHCI_USE_NPS */
 
 	/* connect the virtual root hub */
 	ohci->rh.devnum = 0;
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#28 lore raw

Re: [PATCH v2 13/32] pci: usb: Drop DM_PCI from ohci

Quoted 37 lines · Simon Glass

Now that DM_PCI is always enabled we don't need to check it. Drop this old condition and update the comment.

---

(no changes since v1)

 drivers/usb/host/ohci-hcd.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)
drivers/usb/host/ohci-hcd.c +2 -9
index c62d8feecce..7fa84f8bbe4 100644
@@ -52,13 +52,6 @@
 #include <asm/arch/hardware.h>	/* needed for AT91_USB_HOST_BASE */
 #endif
 
-#if defined(CONFIG_CPU_ARM920T) || \
-	defined(CONFIG_PCI_OHCI) || \
-	defined(CONFIG_DM_PCI) || \
-	defined(CONFIG_SYS_OHCI_USE_NPS)
-# define OHCI_USE_NPS		/* force NoPowerSwitching mode */
-#endif
-
 #undef OHCI_VERBOSE_DEBUG	/* not always helpful */
 #undef DEBUG
 #undef SHOW_INFO
@@ -1885,12 +1878,14 @@ static int hc_start(ohci_t *ohci)
 	mask = OHCI_INTR_RHSC | OHCI_INTR_UE | OHCI_INTR_WDH | OHCI_INTR_SO;
 	ohci_writel(mask, &ohci->regs->intrenable);
 
-#ifdef	OHCI_USE_NPS
-	/* required for AMD-756 and some Mac platforms */
+	/*
+	 * required for AMD-756 and some Mac platforms

drivers/usb/host/ohci-hcd.c static int hc_start(ohci_t *ohci) · line 1891

Quoted 10 lines
drivers/usb/host/ohci-hcd.c +3 -1
+	 * Note: this is always enabled at present, since driver model is used
+	 * for PCI
+	 */
 	ohci_writel((roothub_a(ohci) | RH_A_NPS) & ~RH_A_PSM,
 		&ohci->regs->roothub.a);
 	ohci_writel(RH_HS_LPSC, &ohci->regs->roothub.status);
-#endif	/* OHCI_USE_NPS */
 
 	/* connect the virtual root hub */
 	ohci->rh.devnum = 0;

This is slightly wrong. We have non-PCI OHCI users, so the check needs to change from CONFIG_DM_PCI to CONFIG_PCI. I'll fix this up.

Signature · 1 line
Tom
#29 lore raw

Re: [PATCH v2 13/32] pci: usb: Drop DM_PCI from ohci

In reply to Simon Glass
Quoted 4 lines · Simon Glass

Now that DM_PCI is always enabled we don't need to check it. Drop this old condition and update the comment.

With the fix I noted, applied to u-boot/master, thanks!

Signature · 1 line
Tom
#30 lore raw

PATCH v2 14/32 ppc: malta: Drop use of DM_PCI

In reply to Simon Glass

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

---

Changes in v2:
- Fix tag to 'mips' from 'ppc'

 board/imgtec/malta/malta.c | 67 --------------------------------------
 1 file changed, 67 deletions(-)
board/imgtec/malta/malta.c +0 -67
index 9af1f92e5db..d2e2e4ae209 100644
@@ -196,7 +196,6 @@ int board_fix_fdt(void *rw_fdt_blob)
 }
 #endif
 
-#if IS_ENABLED(CONFIG_DM_PCI)
 int board_early_init_r(void)
 {
 	struct udevice *dev;
@@ -243,69 +242,3 @@ int board_early_init_r(void)
 
 	return 0;
 }
-#else
-void pci_init_board(void)
-{
-	pci_dev_t bdf;
-	u32 val32;
-	u8 val8;
-
-	switch (malta_sys_con()) {
-	case SYSCON_GT64120:
-		gt64120_pci_init((void *)CKSEG1ADDR(MALTA_GT_BASE),
-				 0x00000000, 0x00000000, CONFIG_SYS_MEM_SIZE,
-				 0x10000000, 0x10000000, 128 * 1024 * 1024,
-				 0x00000000, 0x00000000, 0x20000);
-		break;
-
-	default:
-	case SYSCON_MSC01:
-		msc01_pci_init((void *)CKSEG1ADDR(MALTA_MSC01_PCI_BASE),
-			       0x00000000, 0x00000000, CONFIG_SYS_MEM_SIZE,
-			       MALTA_MSC01_PCIMEM_MAP,
-			       CKSEG1ADDR(MALTA_MSC01_PCIMEM_BASE),
-			       MALTA_MSC01_PCIMEM_SIZE, MALTA_MSC01_PCIIO_MAP,
-			       0x00000000, MALTA_MSC01_PCIIO_SIZE);
-		break;
-	}
-
-	bdf = pci_find_device(PCI_VENDOR_ID_INTEL,
-			      PCI_DEVICE_ID_INTEL_82371AB_0, 0);
-	if (bdf == -1)
-		panic("Failed to find PIIX4 PCI bridge\n");
-
-	/* setup PCI interrupt routing */
-	pci_write_config_byte(bdf, PCI_CFG_PIIX4_PIRQRCA, 10);
-	pci_write_config_byte(bdf, PCI_CFG_PIIX4_PIRQRCB, 10);
-	pci_write_config_byte(bdf, PCI_CFG_PIIX4_PIRQRCC, 11);
-	pci_write_config_byte(bdf, PCI_CFG_PIIX4_PIRQRCD, 11);
-
-	/* mux SERIRQ onto SERIRQ pin */
-	pci_read_config_dword(bdf, PCI_CFG_PIIX4_GENCFG, &val32);
-	val32 |= PCI_CFG_PIIX4_GENCFG_SERIRQ;
-	pci_write_config_dword(bdf, PCI_CFG_PIIX4_GENCFG, val32);
-
-	/* enable SERIRQ - Linux currently depends upon this */
-	pci_read_config_byte(bdf, PCI_CFG_PIIX4_SERIRQC, &val8);
-	val8 |= PCI_CFG_PIIX4_SERIRQC_EN | PCI_CFG_PIIX4_SERIRQC_CONT;
-	pci_write_config_byte(bdf, PCI_CFG_PIIX4_SERIRQC, val8);
-
-	bdf = pci_find_device(PCI_VENDOR_ID_INTEL,
-			      PCI_DEVICE_ID_INTEL_82371AB, 0);
-	if (bdf == -1)
-		panic("Failed to find PIIX4 IDE controller\n");
-
-	/* enable bus master & IO access */
-	val32 |= PCI_COMMAND_MASTER | PCI_COMMAND_IO;
-	pci_write_config_dword(bdf, PCI_COMMAND, val32);
-
-	/* set latency */
-	pci_write_config_byte(bdf, PCI_LATENCY_TIMER, 0x40);
-
-	/* enable IDE/ATA */
-	pci_write_config_dword(bdf, PCI_CFG_PIIX4_IDETIM_PRI,
-			       PCI_CFG_PIIX4_IDETIM_IDE);
-	pci_write_config_dword(bdf, PCI_CFG_PIIX4_IDETIM_SEC,
-			       PCI_CFG_PIIX4_IDETIM_IDE);
-}
-#endif
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#31 lore raw

Re: [PATCH v2 14/32] ppc: malta: Drop use of DM_PCI

Quoted 4 lines · Simon Glass

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

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#32 lore raw

PATCH v2 15/32 ppc: socrates: Drop use of DM_PCI

In reply to Simon Glass

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

---

(no changes since v1)

 board/socrates/socrates.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
board/socrates/socrates.c +1 -3
index 3444af6a8c7..3ba2fbbd560 100644
@@ -53,7 +53,7 @@ int checkboard (void)
 	}
 	putc('\n');
 
-#if defined(CONFIG_PCI) || defined(CONFIG_DM_PCI)
+#if defined(CONFIG_PCI)
 	/* Check the PCI_clk sel bit */
 	if (in_be32(&gur->porpllsr) & (1<<15)) {
 		src = "SYSCLK";
@@ -130,9 +130,7 @@ int misc_init_r (void)
 			       &flash_info[CONFIG_SYS_MAX_FLASH_BANKS - 1]);
 	}
 
-#if defined(CONFIG_DM_PCI)
 	pci_init();
-#endif
 
 	return 0;
 }
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#33 lore raw

Re: [PATCH v2 15/32] ppc: socrates: Drop use of DM_PCI

Quoted 4 lines · Simon Glass

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

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#34 lore raw

PATCH v2 16/32 pci: gt64120: Drop use of DM_PCI

In reply to Simon Glass

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

---

(no changes since v1)

 drivers/pci/pci_gt64120.c | 64 ---------------------------------------
 1 file changed, 64 deletions(-)
drivers/pci/pci_gt64120.c +0 -64
index e57fedf036e..153c65b119a 100644
@@ -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
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#35 lore raw

Re: [PATCH v2 16/32] pci: gt64120: Drop use of DM_PCI

Quoted 4 lines · Simon Glass

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

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#36 lore raw

PATCH v2 17/32 pci: msc01: Drop use of DM_PCI

In reply to Simon Glass

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

---

(no changes since v1)

 drivers/pci/pci_msc01.c | 64 -----------------------------------------
 1 file changed, 64 deletions(-)
drivers/pci/pci_msc01.c +0 -64
index c17da475d01..2f1b688fc32 100644
@@ -62,69 +62,6 @@ static int msc01_config_access(struct msc01_pci_controller *msc01,
 	return 0;
 }
 
-#if !IS_ENABLED(CONFIG_DM_PCI)
-static int msc01_read_config_dword(struct pci_controller *hose, pci_dev_t dev,
-				   int where, u32 *value)
-{
-	struct msc01_pci_controller *msc01 = hose_to_msc01(hose);
-
-	*value = 0xffffffff;
-	return msc01_config_access(msc01, PCI_ACCESS_READ, dev, where, value);
-}
-
-static int msc01_write_config_dword(struct pci_controller *hose, pci_dev_t dev,
-				    int where, u32 value)
-{
-	struct msc01_pci_controller *gt = hose_to_msc01(hose);
-	u32 data = value;
-
-	return msc01_config_access(gt, PCI_ACCESS_WRITE, dev, where, &data);
-}
-
-void msc01_pci_init(void *base, 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 msc01_pci_controller global_msc01;
-	struct msc01_pci_controller *msc01;
-	struct pci_controller *hose;
-
-	msc01 = &global_msc01;
-	msc01->base = base;
-
-	hose = &msc01->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,
-		    msc01_read_config_dword,
-		    pci_hose_write_config_byte_via_dword,
-		    pci_hose_write_config_word_via_dword,
-		    msc01_write_config_dword);
-
-	pci_register_hose(hose);
-	hose->last_busno = pci_hose_scan(hose);
-}
-#else
 static int msc01_pci_read_config(const struct udevice *dev, pci_dev_t bdf,
 				 uint where, ulong *val, enum pci_size_t size)
 {
@@ -192,4 +129,3 @@ U_BOOT_DRIVER(msc01_pci) = {
 	.probe		= msc01_pci_probe,
 	.priv_auto	= sizeof(struct msc01_pci_controller),
 };
-#endif
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#37 lore raw

Re: [PATCH v2 17/32] pci: msc01: Drop use of DM_PCI

Quoted 4 lines · Simon Glass

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

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#38 lore raw

PATCH v2 18/32 pci: imx: Drop use of DM_PCI

In reply to Simon Glass

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

---

(no changes since v1)

 drivers/pci/pcie_imx.c | 81 ------------------------------------------
 1 file changed, 81 deletions(-)
drivers/pci/pcie_imx.c +0 -81
index 7b46fdb89a3..756166fd3ea 100644
@@ -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
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#39 lore raw

Re: [PATCH v2 18/32] pci: imx: Drop use of DM_PCI

Quoted 4 lines · Simon Glass

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

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#40 lore raw

PATCH v2 19/32 pci: scsi: pci: Drop DM_PCI check from scsi

In reply to Simon Glass

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

Drop it.

---

(no changes since v1)

 drivers/scsi/scsi.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/scsi/scsi.c +0 -6
index ce69750c7ff..d93d2419285 100644
@@ -284,7 +284,6 @@ void scsi_init(void)
 	 */
 	for (i = 0; i < ARRAY_SIZE(scsi_device_list); i++) {
 		/* get PCI Device ID */
-#ifdef CONFIG_DM_PCI
 		struct udevice *dev;
 		int ret;
 
@@ -294,11 +293,6 @@ void scsi_init(void)
 			busdevfunc = dm_pci_get_bdf(dev);
 			break;
 		}
-#else
-		busdevfunc = pci_find_device(scsi_device_list[i].vendor,
-					     scsi_device_list[i].device,
-					     0);
-#endif
 		if (busdevfunc != -1)
 			break;
 	}
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#41 lore raw

Re: [PATCH v2 19/32] pci: scsi: pci: Drop DM_PCI check from scsi

Quoted 6 lines · Simon Glass

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

Drop it.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#42 lore raw

PATCH v2 20/32 pci: Drop DM_PCI check from bios_emul

In reply to Simon Glass

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

Drop them.

---

(no changes since v1)

 drivers/bios_emulator/atibios.c | 98 ---------------------------------
 drivers/bios_emulator/bios.c    | 39 -------------
 include/bios_emul.h             | 16 ------
 3 files changed, 153 deletions(-)
drivers/bios_emulator/atibios.c +0 -98
index 6c7cc24cbd9..9547470a2f7 100644
@@ -230,19 +230,12 @@ This function executes the BIOS POST code on the controller. We assume that
 at this stage the controller has its I/O and memory space enabled and
 that all other controllers are in a disabled state.
 ****************************************************************************/
-#ifdef CONFIG_DM_PCI
 static void PCI_doBIOSPOST(struct udevice *pcidev, BE_VGAInfo *vga_info,
 			   int vesa_mode, struct vbe_mode_info *mode_info)
-#else
-static void PCI_doBIOSPOST(pci_dev_t pcidev, BE_VGAInfo *vga_info,
-			   int vesa_mode, struct vbe_mode_info *mode_info)
-#endif
 {
 	RMREGS regs;
 	RMSREGS sregs;
-#ifdef CONFIG_DM_PCI
 	pci_dev_t bdf;
-#endif
 
 	/* Determine the value to store in AX for BIOS POST. Per the PCI specs,
 	 AH must contain the bus and AL must contain the devfn, encoded as
@@ -250,14 +243,9 @@ static void PCI_doBIOSPOST(pci_dev_t pcidev, BE_VGAInfo *vga_info,
 	 */
 	memset(&regs, 0, sizeof(regs));
 	memset(&sregs, 0, sizeof(sregs));
-#ifdef CONFIG_DM_PCI
 	bdf = dm_pci_get_bdf(pcidev);
 	regs.x.ax = (int)PCI_BUS(bdf) << 8 |
 			(int)PCI_DEV(bdf) << 3 | (int)PCI_FUNC(bdf);
-#else
-	regs.x.ax = ((int)PCI_BUS(pcidev) << 8) |
-	    ((int)PCI_DEV(pcidev) << 3) | (int)PCI_FUNC(pcidev);
-#endif
 	/*Setup the X86 emulator for the VGA BIOS*/
 	BE_setVGA(vga_info);
 
@@ -300,28 +288,15 @@ NOTE: This function leaves the original memory aperture disabled by leaving
       it programmed to all 1's. It must be restored to the correct value
       later.
 ****************************************************************************/
-#ifdef CONFIG_DM_PCI
 static u32 PCI_findBIOSAddr(struct udevice *pcidev, int *bar)
-#else
-static u32 PCI_findBIOSAddr(pci_dev_t pcidev, int *bar)
-#endif
 {
 	u32 base, size;
 
 	for (*bar = 0x10; *bar <= 0x14; (*bar) += 4) {
-#ifdef CONFIG_DM_PCI
 		dm_pci_read_config32(pcidev, *bar, &base);
-#else
-		pci_read_config_dword(pcidev, *bar, &base);
-#endif
 		if (!(base & 0x1)) {
-#ifdef CONFIG_DM_PCI
 			dm_pci_write_config32(pcidev, *bar, 0xFFFFFFFF);
 			dm_pci_read_config32(pcidev, *bar, &size);
-#else
-			pci_write_config_dword(pcidev, *bar, 0xFFFFFFFF);
-			pci_read_config_dword(pcidev, *bar, &size);
-#endif
 			size = ~(size & ~0xFF) + 1;
 			if (size >= MAX_BIOSLEN)
 				return base & ~0xFF;
@@ -344,19 +319,11 @@ necessary).
 Anyway to fix this we change all I/O mapped base registers and
 chop off the top bits.
 ****************************************************************************/
-#ifdef CONFIG_DM_PCI
 static void PCI_fixupIObase(struct udevice *pcidev, int reg, u32 *base)
-#else
-static void PCI_fixupIObase(pci_dev_t pcidev, int reg, u32 * base)
-#endif
 {
 	if ((*base & 0x1) && (*base > 0xFFFE)) {
 		*base &= 0xFFFF;
-#ifdef CONFIG_DM_PCI
 		dm_pci_write_config32(pcidev, reg, *base);
-#else
-		pci_write_config_dword(pcidev, reg, *base);
-#endif
 
 	}
 }
@@ -371,30 +338,18 @@ Pointers to the mapped BIOS image
 REMARKS:
 Maps a pointer to the BIOS image on the graphics card on the PCI bus.
 ****************************************************************************/
-#ifdef CONFIG_DM_PCI
 void *PCI_mapBIOSImage(struct udevice *pcidev)
-#else
-void *PCI_mapBIOSImage(pci_dev_t pcidev)
-#endif
 {
 	u32 BIOSImageBus;
 	int BIOSImageBAR;
 	u8 *BIOSImage;
 
 	/*Save PCI BAR registers that might get changed*/
-#ifdef CONFIG_DM_PCI
 	dm_pci_read_config32(pcidev, PCI_ROM_ADDRESS, &saveROMBaseAddress);
 	dm_pci_read_config32(pcidev, PCI_BASE_ADDRESS_0, &saveBaseAddress10);
 	dm_pci_read_config32(pcidev, PCI_BASE_ADDRESS_1, &saveBaseAddress14);
 	dm_pci_read_config32(pcidev, PCI_BASE_ADDRESS_2, &saveBaseAddress18);
 	dm_pci_read_config32(pcidev, PCI_BASE_ADDRESS_4, &saveBaseAddress20);
-#else
-	pci_read_config_dword(pcidev, PCI_ROM_ADDRESS, &saveROMBaseAddress);
-	pci_read_config_dword(pcidev, PCI_BASE_ADDRESS_0, &saveBaseAddress10);
-	pci_read_config_dword(pcidev, PCI_BASE_ADDRESS_1, &saveBaseAddress14);
-	pci_read_config_dword(pcidev, PCI_BASE_ADDRESS_2, &saveBaseAddress18);
-	pci_read_config_dword(pcidev, PCI_BASE_ADDRESS_4, &saveBaseAddress20);
-#endif
 
 	/*Fix up I/O base registers to less than 64K */
 	if(saveBaseAddress14 != 0)
@@ -413,21 +368,12 @@ void *PCI_mapBIOSImage(pci_dev_t pcidev)
 		return NULL;
 	}
 
-#ifdef CONFIG_DM_PCI
 	BIOSImage = dm_pci_bus_to_virt(pcidev, BIOSImageBus,
 				       PCI_REGION_MEM, 0, MAP_NOCACHE);
 
 	/*Change the PCI BAR registers to map it onto the bus.*/
 	dm_pci_write_config32(pcidev, BIOSImageBAR, 0);
 	dm_pci_write_config32(pcidev, PCI_ROM_ADDRESS, BIOSImageBus | 0x1);
-#else
-	BIOSImage = pci_bus_to_virt(pcidev, BIOSImageBus,
-				    PCI_REGION_MEM, 0, MAP_NOCACHE);
-
-	/*Change the PCI BAR registers to map it onto the bus.*/
-	pci_write_config_dword(pcidev, BIOSImageBAR, 0);
-	pci_write_config_dword(pcidev, PCI_ROM_ADDRESS, BIOSImageBus | 0x1);
-#endif
 	udelay(1);
 
 	/*Check that the BIOS image is valid. If not fail, or return the
@@ -447,7 +393,6 @@ pcidev	- PCI device info for the video card on the bus
 REMARKS:
 Unmaps the BIOS image for the device and restores framebuffer mappings
 ****************************************************************************/
-#ifdef CONFIG_DM_PCI
 void PCI_unmapBIOSImage(struct udevice *pcidev, void *BIOSImage)
 {
 	dm_pci_write_config32(pcidev, PCI_ROM_ADDRESS, saveROMBaseAddress);
@@ -456,16 +401,6 @@ void PCI_unmapBIOSImage(struct udevice *pcidev, void *BIOSImage)
 	dm_pci_write_config32(pcidev, PCI_BASE_ADDRESS_2, saveBaseAddress18);
 	dm_pci_write_config32(pcidev, PCI_BASE_ADDRESS_4, saveBaseAddress20);
 }
-#else
-void PCI_unmapBIOSImage(pci_dev_t pcidev, void *BIOSImage)
-{
-	pci_write_config_dword(pcidev, PCI_ROM_ADDRESS, saveROMBaseAddress);
-	pci_write_config_dword(pcidev, PCI_BASE_ADDRESS_0, saveBaseAddress10);
-	pci_write_config_dword(pcidev, PCI_BASE_ADDRESS_1, saveBaseAddress14);
-	pci_write_config_dword(pcidev, PCI_BASE_ADDRESS_2, saveBaseAddress18);
-	pci_write_config_dword(pcidev, PCI_BASE_ADDRESS_4, saveBaseAddress20);
-}
-#endif
 
 /****************************************************************************
 PARAMETERS:
@@ -479,22 +414,14 @@ REMARKS:
 Loads and POST's the display controllers BIOS, directly from the BIOS
 image we can extract over the PCI bus.
 ****************************************************************************/
-#ifdef CONFIG_DM_PCI
 static int PCI_postController(struct udevice *pcidev, uchar *bios_rom,
 			      int bios_len, BE_VGAInfo *vga_info,
 			      int vesa_mode, struct vbe_mode_info *mode_info)
-#else
-static int PCI_postController(pci_dev_t pcidev, uchar *bios_rom, int bios_len,
-			      BE_VGAInfo *vga_info, int vesa_mode,
-			      struct vbe_mode_info *mode_info)
-#endif
 {
 	u32 bios_image_len;
 	uchar *mapped_bios;
 	uchar *copy_of_bios;
-#ifdef CONFIG_DM_PCI
 	pci_dev_t bdf;
-#endif
 
 	if (bios_rom) {
 		copy_of_bios = bios_rom;
@@ -522,16 +449,10 @@ static int PCI_postController(pci_dev_t pcidev, uchar *bios_rom, int bios_len,
 	}
 
 	/*Save information in vga_info structure*/
-#ifdef CONFIG_DM_PCI
 	bdf = dm_pci_get_bdf(pcidev);
 	vga_info->function = PCI_FUNC(bdf);
 	vga_info->device = PCI_DEV(bdf);
 	vga_info->bus = PCI_BUS(bdf);
-#else
-	vga_info->function = PCI_FUNC(pcidev);
-	vga_info->device = PCI_DEV(pcidev);
-	vga_info->bus = PCI_BUS(pcidev);
-#endif
 	vga_info->pcidev = pcidev;
 	vga_info->BIOSImage = copy_of_bios;
 	vga_info->BIOSImageLen = bios_image_len;
@@ -549,22 +470,13 @@ static int PCI_postController(pci_dev_t pcidev, uchar *bios_rom, int bios_len,
 	return true;
 }
 
-#ifdef CONFIG_DM_PCI
 int biosemu_setup(struct udevice *pcidev, BE_VGAInfo **vga_infop)
-#else
-int biosemu_setup(pci_dev_t pcidev, BE_VGAInfo **vga_infop)
-#endif
 {
 	BE_VGAInfo *VGAInfo;
-#ifdef CONFIG_DM_PCI
 	pci_dev_t bdf = dm_pci_get_bdf(pcidev);
 
 	printf("videoboot: Booting PCI video card bus %d, function %d, device %d\n",
 	       PCI_BUS(bdf), PCI_FUNC(bdf), PCI_DEV(bdf));
-#else
-	printf("videoboot: Booting PCI video card bus %d, function %d, device %d\n",
-	       PCI_BUS(pcidev), PCI_FUNC(pcidev), PCI_DEV(pcidev));
-#endif
 	/*Initialise the x86 BIOS emulator*/
 	if ((VGAInfo = malloc(sizeof(*VGAInfo))) == NULL) {
 		printf("videoboot: Out of memory!\n");
@@ -582,15 +494,9 @@ void biosemu_set_interrupt_handler(int intnum, int (*int_func)(void))
 	X86EMU_setupIntrFunc(intnum, (X86EMU_intrFuncs)int_func);
 }
 
-#ifdef CONFIG_DM_PCI
 int biosemu_run(struct udevice *pcidev, uchar *bios_rom, int bios_len,
 		BE_VGAInfo *vga_info, int clean_up, int vesa_mode,
 		struct vbe_mode_info *mode_info)
-#else
-int biosemu_run(pci_dev_t pcidev, uchar *bios_rom, int bios_len,
-		BE_VGAInfo *vga_info, int clean_up, int vesa_mode,
-		struct vbe_mode_info *mode_info)
-#endif
 {
 	/*Post all the display controller BIOS'es*/
 	if (!PCI_postController(pcidev, bios_rom, bios_len, vga_info,
@@ -623,12 +529,8 @@ REMARKS:
 Boots the PCI/AGP video card on the bus using the Video ROM BIOS image
 and the X86 BIOS emulator module.
 ****************************************************************************/
-#ifdef CONFIG_DM_PCI
 int BootVideoCardBIOS(struct udevice *pcidev, BE_VGAInfo **pVGAInfo,
 		      int clean_up)
-#else
-int BootVideoCardBIOS(pci_dev_t pcidev, BE_VGAInfo **pVGAInfo, int clean_up)
-#endif
 {
 	BE_VGAInfo *VGAInfo;
 	int ret;
drivers/bios_emulator/bios.c +0 -39
index 77c7f94bc63..9596a1fdd3e 100644
@@ -185,21 +185,12 @@ static void X86API int1A(int unused)
 	case 0xB103:		/* Find PCI class code */
 		M.x86.R_AH = DEVICE_NOT_FOUND;
 #ifdef __KERNEL__
-#ifdef CONFIG_DM_PCI
 		dm_pci_read_config8(_BE_env.vgaInfo.pcidev, PCI_CLASS_PROG,
 				    &interface);
 		dm_pci_read_config8(_BE_env.vgaInfo.pcidev, PCI_CLASS_DEVICE,
 				    &subclass);
 		dm_pci_read_config8(_BE_env.vgaInfo.pcidev,
 				    PCI_CLASS_DEVICE + 1, &baseclass);
-#else
-		pci_read_config_byte(_BE_env.vgaInfo.pcidev, PCI_CLASS_PROG,
-				     &interface);
-		pci_read_config_byte(_BE_env.vgaInfo.pcidev, PCI_CLASS_DEVICE,
-				     &subclass);
-		pci_read_config_byte(_BE_env.vgaInfo.pcidev,
-				     PCI_CLASS_DEVICE + 1, &baseclass);
-#endif
 		if (M.x86.R_CL == interface && M.x86.R_CH == subclass
 		    && (u8) (M.x86.R_ECX >> 16) == baseclass) {
 #else
@@ -218,13 +209,8 @@ static void X86API int1A(int unused)
 		if (M.x86.R_BX == pciSlot) {
 			M.x86.R_AH = SUCCESSFUL;
 #ifdef __KERNEL__
-# ifdef CONFIG_DM_PCI
 			dm_pci_read_config8(_BE_env.vgaInfo.pcidev, M.x86.R_DI,
 					    &M.x86.R_CL);
-# else
-			pci_read_config_byte(_BE_env.vgaInfo.pcidev, M.x86.R_DI,
-					     &M.x86.R_CL);
-# endif
 #else
 			M.x86.R_CL =
 			    (u8) PCI_accessReg(M.x86.R_DI, 0, PCI_READ_BYTE,
@@ -238,13 +224,8 @@ static void X86API int1A(int unused)
 		if (M.x86.R_BX == pciSlot) {
 			M.x86.R_AH = SUCCESSFUL;
 #ifdef __KERNEL__
-# ifdef CONFIG_DM_PCI
 			dm_pci_read_config16(_BE_env.vgaInfo.pcidev, M.x86.R_DI,
 					     &M.x86.R_CX);
-# else
-			pci_read_config_word(_BE_env.vgaInfo.pcidev, M.x86.R_DI,
-					     &M.x86.R_CX);
-# endif
 #else
 			M.x86.R_CX =
 			    (u16) PCI_accessReg(M.x86.R_DI, 0, PCI_READ_WORD,
@@ -258,13 +239,8 @@ static void X86API int1A(int unused)
 		if (M.x86.R_BX == pciSlot) {
 			M.x86.R_AH = SUCCESSFUL;
 #ifdef __KERNEL__
-# ifdef CONFIG_DM_PCI
 			dm_pci_read_config32(_BE_env.vgaInfo.pcidev,
 					     M.x86.R_DI, &M.x86.R_ECX);
-# else
-			pci_read_config_dword(_BE_env.vgaInfo.pcidev,
-					      M.x86.R_DI, &M.x86.R_ECX);
-# endif
 #else
 			M.x86.R_ECX =
 			    (u32) PCI_accessReg(M.x86.R_DI, 0, PCI_READ_DWORD,
@@ -278,13 +254,8 @@ static void X86API int1A(int unused)
 		if (M.x86.R_BX == pciSlot) {
 			M.x86.R_AH = SUCCESSFUL;
 #ifdef __KERNEL__
-# ifdef CONFIG_DM_PCI
 			dm_pci_write_config8(_BE_env.vgaInfo.pcidev,
 					     M.x86.R_DI, M.x86.R_CL);
-# else
-			pci_write_config_byte(_BE_env.vgaInfo.pcidev,
-					      M.x86.R_DI, M.x86.R_CL);
-# endif
 #else
 			PCI_accessReg(M.x86.R_DI, M.x86.R_CL, PCI_WRITE_BYTE,
 				      _BE_env.vgaInfo.pciInfo);
@@ -297,13 +268,8 @@ static void X86API int1A(int unused)
 		if (M.x86.R_BX == pciSlot) {
 			M.x86.R_AH = SUCCESSFUL;
 #ifdef __KERNEL__
-# ifdef CONFIG_DM_PCI
 			dm_pci_write_config32(_BE_env.vgaInfo.pcidev,
 					      M.x86.R_DI, M.x86.R_CX);
-# else
-			pci_write_config_word(_BE_env.vgaInfo.pcidev,
-					      M.x86.R_DI, M.x86.R_CX);
-# endif
 #else
 			PCI_accessReg(M.x86.R_DI, M.x86.R_CX, PCI_WRITE_WORD,
 				      _BE_env.vgaInfo.pciInfo);
@@ -316,13 +282,8 @@ static void X86API int1A(int unused)
 		if (M.x86.R_BX == pciSlot) {
 			M.x86.R_AH = SUCCESSFUL;
 #ifdef __KERNEL__
-# ifdef CONFIG_DM_PCI
 			dm_pci_write_config32(_BE_env.vgaInfo.pcidev,
 					      M.x86.R_DI, M.x86.R_ECX);
-# else
-			pci_write_config_dword(_BE_env.vgaInfo.pcidev,
-					       M.x86.R_DI, M.x86.R_ECX);
-# endif
 #else
 			PCI_accessReg(M.x86.R_DI, M.x86.R_ECX, PCI_WRITE_DWORD,
 				      _BE_env.vgaInfo.pciInfo);
include/bios_emul.h +0 -16
index 158e0f223d8..72410dc7948 100644
@@ -30,11 +30,7 @@ typedef struct {
 	int bus;
 	u32 VendorID;
 	u32 DeviceID;
-#ifdef CONFIG_DM_PCI
 	struct udevice *pcidev;
-#else
-	pci_dev_t pcidev;
-#endif
 	void *BIOSImage;
 	u32 BIOSImageLen;
 	u8 LowMem[1536];
@@ -42,12 +38,8 @@ typedef struct {
 
 struct vbe_mode_info;
 
-#ifdef CONFIG_DM_PCI
 int BootVideoCardBIOS(struct udevice *pcidev, BE_VGAInfo **pVGAInfo,
 		      int clean_up);
-#else
-int BootVideoCardBIOS(pci_dev_t pcidev, BE_VGAInfo **pVGAInfo, int clean_up);
-#endif
 
 /* Run a BIOS ROM natively (only supported on x86 machines) */
 void bios_run_on_x86(struct udevice *dev, unsigned long addr, int vesa_mode,
@@ -65,18 +57,10 @@ void bios_set_interrupt_handler(int intnum, int (*int_handler_func)(void));
 
 void biosemu_set_interrupt_handler(int intnum, int (*int_func)(void));
 
-#ifdef CONFIG_DM_PCI
 int biosemu_setup(struct udevice *pcidev, BE_VGAInfo **pVGAInfo);
 
 int biosemu_run(struct udevice *dev, uchar *bios_rom, int bios_len,
 		BE_VGAInfo *vga_info, int clean_up, int vesa_mode,
 		struct vbe_mode_info *mode_info);
-#else
-int biosemu_setup(pci_dev_t pcidev, BE_VGAInfo **pVGAInfo);
-
-int biosemu_run(pci_dev_t pcidev, uchar *bios_rom, int bios_len,
-		BE_VGAInfo *vga_info, int clean_up, int vesa_mode,
-		struct vbe_mode_info *mode_info);
-#endif
 
 #endif
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#43 lore raw

Re: [PATCH v2 20/32] pci: Drop DM_PCI check from bios_emul

Quoted 6 lines · Simon Glass

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

Drop them.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#44 lore raw

PATCH v2 21/32 net: Drop DM_PCI check from designware driver

In reply to Simon Glass

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

Drop it.

---

(no changes since v1)

 drivers/net/designware.c | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)
drivers/net/designware.c +10 -12
index 5d92257e74d..5aaac603a0e 100644
@@ -756,16 +756,16 @@ int designware_eth_write_hwaddr(struct udevice *dev)
 
 static int designware_eth_bind(struct udevice *dev)
 {
-#ifdef CONFIG_DM_PCI
-	static int num_cards;
-	char name[20];
-
-	/* Create a unique device name for PCI type devices */
-	if (device_is_on_pci_bus(dev)) {
-		sprintf(name, "eth_designware#%u", num_cards++);
-		device_set_name(dev, name);
+	if (IS_ENABLED(CONFIG_PCI)) {
+		static int num_cards;
+		char name[20];
+
+		/* Create a unique device name for PCI type devices */
+		if (device_is_on_pci_bus(dev)) {
+			sprintf(name, "eth_designware#%u", num_cards++);
+			device_set_name(dev, name);
+		}
 	}
-#endif
 
 	return 0;
 }
@@ -831,12 +831,11 @@ int designware_eth_probe(struct udevice *dev)
 	else
 		reset_deassert_bulk(&reset_bulk);
 
-#ifdef CONFIG_DM_PCI
 	/*
 	 * If we are on PCI bus, either directly attached to a PCI root port,
 	 * or via a PCI bridge, fill in plat before we probe the hardware.
 	 */
-	if (device_is_on_pci_bus(dev)) {
+	if (IS_ENABLED(CONFIG_PCI) && device_is_on_pci_bus(dev)) {
 		dm_pci_read_config32(dev, PCI_BASE_ADDRESS_0, &iobase);
 		iobase &= PCI_BASE_ADDRESS_MEM_MASK;
 		iobase = dm_pci_mem_to_phys(dev, iobase);
@@ -844,7 +843,6 @@ int designware_eth_probe(struct udevice *dev)
 		pdata->iobase = iobase;
 		pdata->phy_interface = PHY_INTERFACE_MODE_RMII;
 	}
-#endif
 
 	debug("%s, iobase=%x, priv=%p\n", __func__, iobase, priv);
 	ioaddr = iobase;
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#45 lore raw

Re: [PATCH v2 21/32] net: Drop DM_PCI check from designware driver

Quoted 6 lines · Simon Glass

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

Drop it.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#46 lore raw

PATCH v2 22/32 pci: imx: Drop DM_PCI check from cpu driver

In reply to Simon Glass

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

Drop it.

---

(no changes since v1)

 arch/arm/mach-imx/cpu.c | 4 ----
 include/pci.h           | 4 ----
 2 files changed, 8 deletions(-)
arch/arm/mach-imx/cpu.c +0 -4
index 423b7153522..8eb05c8dd67 100644
@@ -283,10 +283,6 @@ u32 get_ahb_clk(void)
 
 void arch_preboot_os(void)
 {
-#if defined(CONFIG_PCIE_IMX) && !CONFIG_IS_ENABLED(DM_PCI)
-	imx_pcie_remove();
-#endif
-
 #if defined(CONFIG_IMX_AHCI)
 	struct udevice *dev;
 	int rc;
include/pci.h +0 -4
index ca086420ff2..2c2930e7a74 100644
@@ -785,10 +785,6 @@ int pci_last_busno(void);
 extern void pci_mpc85xx_init (struct pci_controller *hose);
 #endif
 
-#ifdef CONFIG_PCIE_IMX
-extern void imx_pcie_remove(void);
-#endif
-
 /**
  * pci_write_bar32() - Write the address of a BAR including control bits
  *
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#47 lore raw

Re: [PATCH v2 22/32] pci: imx: Drop DM_PCI check from cpu driver

Quoted 6 lines · Simon Glass

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

Drop it.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#48 lore raw

PATCH v2 23/32 pci: arm: mvebu: Drop DM_PCI check from

In reply to Simon Glass

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

Use CONFIG_PCI instead.

---

(no changes since v1)

 arch/arm/mach-mvebu/arm64-common.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
arch/arm/mach-mvebu/arm64-common.c +2 -3
index fa687d8abbb..06c4994e065 100644
@@ -104,10 +104,9 @@ int arch_early_init_r(void)
 	/* Cause the SATA device to do its early init */
 	uclass_first_device(UCLASS_AHCI, &dev);
 
-#ifdef CONFIG_DM_PCI
 	/* Trigger PCIe devices detection */
-	pci_init();
-#endif
+	if (IS_ENABLED(PCI))
+		pci_init();
 
 	return 0;
 }
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#49 lore raw

Re: [PATCH v2 23/32] pci: arm: mvebu: Drop DM_PCI check from

Quoted 20 lines · Simon Glass

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

Use CONFIG_PCI instead.

---

(no changes since v1)

 arch/arm/mach-mvebu/arm64-common.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
arch/arm/mach-mvebu/arm64-common.c +0 -0
index fa687d8abbb..06c4994e065 100644
@@ -104,10 +104,9 @@ int arch_early_init_r(void)
 	/* Cause the SATA device to do its early init */
 	uclass_first_device(UCLASS_AHCI, &dev);

arch/arm/mach-mvebu/arm64-common.c int arch_early_init_r(void) · line 112

Quoted 10 lines
arch/arm/mach-mvebu/arm64-common.c +2 -3
 
-#ifdef CONFIG_DM_PCI
 	/* Trigger PCIe devices detection */
-	pci_init();
-#endif
+	if (IS_ENABLED(PCI))
+		pci_init();
 
 	return 0;
 }

This needs to be IS_ENABLED(CONFIG_PCI), I've fixed it locally.

Signature · 1 line
Tom
#50 lore raw

Re: [PATCH v2 23/32] pci: arm: mvebu: Drop DM_PCI check from

In reply to Simon Glass
Quoted 6 lines · Simon Glass

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

Use CONFIG_PCI instead.

Reworded and fixed as I noted and applied to u-boot/master, thanks!

Signature · 1 line
Tom
#51 lore raw

PATCH v2 24/32 pci: sata_sil: Drop DM_PCI checks

In reply to Simon Glass

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

Drop them.

---

(no changes since v1)

 drivers/ata/sata_sil.c | 8 --------
 drivers/ata/sata_sil.h | 4 ----
 2 files changed, 12 deletions(-)
drivers/ata/sata_sil.c +0 -8
index 7e4e97d803e..dda712f42cb 100644
@@ -27,11 +27,7 @@
 
 #include "sata_sil.h"
 
-#ifdef CONFIG_DM_PCI
 #define virt_to_bus(devno, v)	dm_pci_virt_to_mem(devno, (void *) (v))
-#else
-#define virt_to_bus(devno, v)	pci_virt_to_mem(devno, (void *) (v))
-#endif
 
 /* just compatible ahci_ops */
 struct sil_ops {
@@ -616,11 +612,7 @@ static int sil_init_sata(struct udevice *uc_dev, int dev)
 #else
 	priv->sil_sata_desc[dev] = sata;
 	priv->port_num = dev;
-#ifdef CONFIG_DM_PCI
 	sata->devno = uc_dev->parent;
-#else
-	sata->devno = sata_info.devno;
-#endif	/* CONFIG_DM_PCI */
 #endif
 	sata->id = dev;
 	sata->port = port;
drivers/ata/sata_sil.h +0 -4
index a300c0c3887..bea4322c919 100644
@@ -21,11 +21,7 @@ struct sil_sata {
 	u16		pio;
 	u16		mwdma;
 	u16		udma;
-#ifdef CONFIG_DM_PCI
 	struct udevice	*devno;
-#else
-	pci_dev_t	devno;
-#endif
 	int		wcache;
 	int		flush;
 	int		flush_ext;
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#52 lore raw

Re: [PATCH v2 24/32] pci: sata_sil: Drop DM_PCI checks

Quoted 6 lines · Simon Glass

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

Drop them.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#53 lore raw

PATCH v2 25/32 distro_bootcmd: Drop DM_PCI check

In reply to Simon Glass

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

---

(no changes since v1)

 include/config_distro_bootcmd.h | 5 -----
 1 file changed, 5 deletions(-)
include/config_distro_bootcmd.h +0 -5
index e70423f25dd..9b9dd308e68 100644
@@ -265,14 +265,9 @@
 	BOOT_TARGET_DEVICES_references_IDE_without_CONFIG_IDE
 #endif
 
-#if defined(CONFIG_DM_PCI)
 #define BOOTENV_RUN_PCI_ENUM "run boot_pci_enum; "
 #define BOOTENV_SHARED_PCI \
 	"boot_pci_enum=pci enum\0"
-#else
-#define BOOTENV_RUN_PCI_ENUM
-#define BOOTENV_SHARED_PCI
-#endif
 
 #ifdef CONFIG_CMD_USB
 #define BOOTENV_RUN_NET_USB_START "run boot_net_usb_start; "
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#54 lore raw

Re: [PATCH v2 25/32] distro_bootcmd: Drop DM_PCI check

Quoted 20 lines · Simon Glass

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

---

(no changes since v1)

 include/config_distro_bootcmd.h | 5 -----
 1 file changed, 5 deletions(-)
include/config_distro_bootcmd.h +0 -1
index e70423f25dd..9b9dd308e68 100644
@@ -265,14 +265,9 @@
 	BOOT_TARGET_DEVICES_references_IDE_without_CONFIG_IDE
 #endif
 
-#if defined(CONFIG_DM_PCI)

include/config_distro_bootcmd.h line 273

Quoted 10 lines
include/config_distro_bootcmd.h +0 -4
 #define BOOTENV_RUN_PCI_ENUM "run boot_pci_enum; "
 #define BOOTENV_SHARED_PCI \
 	"boot_pci_enum=pci enum\0"
-#else
-#define BOOTENV_RUN_PCI_ENUM
-#define BOOTENV_SHARED_PCI
-#endif
 
 #ifdef CONFIG_CMD_USB
 #define BOOTENV_RUN_NET_USB_START "run boot_net_usb_start; "

This check needs to stay and be for CONFIG_PCI now, I've fixed this locally.

Signature · 1 line
Tom
#56 lore raw

PATCH v2 26/32 pci: Drop pci_init_board()

In reply to Simon Glass

With the conversion to driver model, this is not needed now. Drop it.

---

(no changes since v1)

 board/cavium/thunderx/thunderx.c     |   7 --
 board/freescale/mpc8349emds/pci.c    |  73 ------------------
 board/freescale/mpc837xerdb/Makefile |   1 -
 board/freescale/mpc837xerdb/pci.c    | 109 ---------------------------
 board/xes/common/fsl_8xxx_pci.c      |  50 ------------
 include/init.h                       |   3 -
 6 files changed, 243 deletions(-)
 delete mode 100644 board/freescale/mpc837xerdb/pci.c
board/cavium/thunderx/thunderx.c +0 -7
index a7dc5c6aeb6..a8f8c785584 100644
@@ -123,10 +123,3 @@ int board_eth_init(struct bd_info *bis)
 
 	return rc;
 }
-
-#ifdef CONFIG_PCI
-void pci_init_board(void)
-{
-	printf("DEBUG: PCI Init TODO *****\n");
-}
-#endif
board/freescale/mpc8349emds/pci.c +0 -73

77 lines not on this page · raw message

board/freescale/mpc837xerdb/Makefile +0 -1
index c683b017b55..4661e4cf232 100644
@@ -4,4 +4,3 @@
 # Wolfgang Denk, DENX Software Engineering, [email protected].
 
 obj-y += mpc837xerdb.o
-obj-$(CONFIG_PCI) += pci.o
board/freescale/mpc837xerdb/pci.c deleted +0 -109

109 lines not on this page · raw message

board/xes/common/fsl_8xxx_pci.c +0 -50

56 lines not on this page · raw message

include/init.h +0 -3
index fd51d7f9667..c781789e367 100644
@@ -297,9 +297,6 @@ int board_late_init(void);
 int board_postclk_init(void); /* after clocks/timebase, before env/serial */
 int board_early_init_r(void);
 
-/* TODO([email protected]): Drop this when DM_PCI migration is completed */
-void pci_init_board(void);
-
 /**
  * arch_initr_trap() - Init traps
  *
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#57 lore raw

Re: [PATCH v2 26/32] pci: Drop pci_init_board()

Quoted 3 lines · Simon Glass

With the conversion to driver model, this is not needed now. Drop it.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#58 lore raw

PATCH v2 27/32 pci: ppc: Drop ftpci100 driver

In reply to Simon Glass

This is not used in U-Boot at present. Drop it and related config options.

---

(no changes since v1)

 arch/nds32/include/asm/arch-ag102/ag102.h |   2 -
 drivers/pci/Makefile                      |   1 -
 drivers/pci/pci_ftpci100.c                | 319 ----------------------
 scripts/config_whitelist.txt              |   4 -
 4 files changed, 326 deletions(-)
 delete mode 100644 drivers/pci/pci_ftpci100.c
arch/nds32/include/asm/arch-ag102/ag102.h +0 -2
index d1f4b02e10e..3255db6592e 100644
@@ -11,8 +11,6 @@
  * Hardware register bases
  */
 
-/* PCI Controller */
-#define CONFIG_FTPCI100_BASE		0x90000000
 /* LPC Controller */
 #define CONFIG_LPC_IO_BASE		0x90100000
 /* LPC Controller */
drivers/pci/Makefile +0 -1
index 83d7a4e403c..bdfdec98a08 100644
@@ -19,7 +19,6 @@ obj-$(CONFIG_PCI_GT64120) += pci_gt64120.o
 obj-$(CONFIG_PCI_MPC85XX) += pci_mpc85xx.o
 obj-$(CONFIG_PCI_MSC01) += pci_msc01.o
 obj-$(CONFIG_PCIE_IMX) += pcie_imx.o
-obj-$(CONFIG_FTPCI100) += pci_ftpci100.o
 obj-$(CONFIG_PCI_MVEBU) += pci_mvebu.o
 obj-$(CONFIG_PCI_RCAR_GEN2) += pci-rcar-gen2.o
 obj-$(CONFIG_PCI_RCAR_GEN3) += pci-rcar-gen3.o
drivers/pci/pci_ftpci100.c deleted +0 -319

319 lines not on this page · raw message

scripts/config_whitelist.txt +0 -4
index 17615226d5b..e6bddf15b88 100644
@@ -505,10 +505,6 @@ CONFIG_FTINTC010_BASE
 CONFIG_FTLCDC100_BASE
 CONFIG_FTMAC100_BASE
 CONFIG_FTMAC110_BASE
-CONFIG_FTPCI100_BASE
-CONFIG_FTPCI100_IO_SIZE
-CONFIG_FTPCI100_MEM_BASE
-CONFIG_FTPCI100_MEM_SIZE
 CONFIG_FTPMU010
 CONFIG_FTPMU010_BASE
 CONFIG_FTPMU010_POWER
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#59 lore raw

Re: [PATCH v2 27/32] pci: ppc: Drop ftpci100 driver

Quoted 3 lines · Simon Glass

This is not used in U-Boot at present. Drop it and related config options.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#60 lore raw

PATCH v2 28/32 ppc: Drop idt8t49n222a_serdes_clk driver

In reply to Simon Glass

This is not used. Drop it.

---

(no changes since v1)

 board/freescale/common/Makefile               |   1 -
 .../common/idt8t49n222a_serdes_clk.c          | 208 ------------------
 .../common/idt8t49n222a_serdes_clk.h          | 106 ---------
 3 files changed, 315 deletions(-)
 delete mode 100644 board/freescale/common/idt8t49n222a_serdes_clk.c
 delete mode 100644 board/freescale/common/idt8t49n222a_serdes_clk.h
board/freescale/common/Makefile +0 -1
index 116c1e71cc1..3a171688c3f 100644
@@ -63,7 +63,6 @@ obj-$(CONFIG_TARGET_P3041DS)		+= ics307_clk.o
 obj-$(CONFIG_TARGET_P4080DS)		+= ics307_clk.o
 obj-$(CONFIG_TARGET_P5040DS)		+= ics307_clk.o
 obj-$(CONFIG_VSC_CROSSBAR)    += vsc3316_3308.o
-obj-$(CONFIG_IDT8T49N222A)	+= idt8t49n222a_serdes_clk.o
 obj-$(CONFIG_ZM7300)		+= zm7300.o
 obj-$(CONFIG_POWER_PFUZE100)	+= pfuze.o
 obj-$(CONFIG_DM_PMIC_PFUZE100)	+= pfuze.o
board/freescale/common/idt8t49n222a_serdes_clk.c deleted +0 -208

208 lines not on this page · raw message

board/freescale/common/idt8t49n222a_serdes_clk.h deleted +0 -106

106 lines not on this page · raw message

Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#61 lore raw

Re: [PATCH v2 28/32] ppc: Drop idt8t49n222a_serdes_clk driver

Quoted 3 lines · Simon Glass

This is not used. Drop it.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#62 lore raw

PATCH v2 29/32 ppc: Drop t4qds and b4860qds references

In reply to Simon Glass

These boards have been removed. Drop the config file and other references.

---

(no changes since v1)

 .azure-pipelines.yml             |   4 +-
 doc/board/freescale/b4860qds.rst | 453 -------------------------------
 doc/board/freescale/index.rst    |   1 -
 include/configs/t4qds.h          | 240 ----------------
 4 files changed, 2 insertions(+), 696 deletions(-)
 delete mode 100644 doc/board/freescale/b4860qds.rst
 delete mode 100644 include/configs/t4qds.h
.azure-pipelines.yml +2 -2
index c088e1ac99b..6c7f1a0db03 100644
@@ -413,11 +413,11 @@ jobs:
         non_fsl_ppc:
           BUILDMAN: "powerpc -x freescale"
         mpc85xx_freescale:
-          BUILDMAN: "mpc85xx&freescale -x t208xrdb -x t4qds -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x b4860qds -x bsc91*"
+          BUILDMAN: "mpc85xx&freescale -x t208xrdb -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x bsc91*"
         t208xrdb_corenet_ds:
           BUILDMAN: "t208xrdb corenet_ds"
         fsl_ppc:
-          BUILDMAN: "t4qds b4860qds mpc83xx&freescale"
+          BUILDMAN: "mpc83xx&freescale"
         t102x:
           BUILDMAN: "t102*"
         p1_p2_rdb_pc:
doc/board/freescale/b4860qds.rst deleted +0 -453

453 lines not on this page · raw message

doc/board/freescale/index.rst +0 -1
index 313cf409a69..bddc6c6c2c7 100644
@@ -6,7 +6,6 @@ Freescale
 .. toctree::
    :maxdepth: 2
 
-   b4860qds
    imx8mm_evk
    imx8mn_evk
    imx8mp_evk
include/configs/t4qds.h deleted +0 -240

240 lines not on this page · raw message

Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#63 lore raw

Re: [PATCH v2 29/32] ppc: Drop t4qds and b4860qds references

Quoted 3 lines · Simon Glass

These boards have been removed. Drop the config file and other references.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#64 lore raw

PATCH v2 30/32 pci: Drop PCI_INDIRECT_BRIDGE

In reply to Simon Glass

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

---

(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
README +0 -3
index 4fdc49fbb9c..daa274d0fc7 100644
@@ -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
 
drivers/pci/Makefile +0 -1
index bdfdec98a08..4a131bf5ca4 100644
@@ -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
drivers/pci/pci_indirect.c deleted +0 -71

71 lines not on this page · raw message

include/configs/MPC8349EMDS.h +0 -4
index d6ae419456a..b4e1cae8938 100644
@@ -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
include/configs/MPC8349EMDS_SDRAM.h +0 -4
index 8ebca99d98b..7924cbc8a3e 100644
@@ -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
include/configs/MPC837XERDB.h +0 -2
index 0a136b4f92f..a13b178d6af 100644
@@ -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 */
 
include/configs/MPC8540ADS.h +0 -1
index ac9afa179a5..549fbfa65c7 100644
@@ -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 */
 
 /*
include/configs/MPC8560ADS.h +0 -1
index 02aeb6f3d53..5254936a4b2 100644
@@ -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() */
include/pci.h +0 -4
index 2c2930e7a74..0fc22adffd0 100644
@@ -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);
scripts/config_whitelist.txt +0 -1
index e6bddf15b88..33345358085 100644
@@ -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
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#65 lore raw

Re: [PATCH v2 30/32] pci: Drop PCI_INDIRECT_BRIDGE

Quoted 3 lines · Simon Glass

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

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#66 lore raw

PATCH v2 31/32 pci: Drop DM_PCI

In reply to Simon Glass

This option has not effect now. Drop it, using PCI instead where needed.

---

(no changes since v1)

 arch/Kconfig                         |  1 -
 arch/arm/Kconfig                     |  2 +-
 arch/arm/mach-imx/mx6/Kconfig        |  2 +-
 arch/mips/Kconfig                    |  2 +-
 board/emulation/qemu-riscv/Kconfig   |  1 -
 board/socionext/developerbox/Kconfig |  1 -
 common/Kconfig                       |  1 -
 drivers/gpio/Kconfig                 |  2 +-
 drivers/i2c/Makefile                 |  2 +-
 drivers/net/Kconfig                  |  6 ++---
 drivers/net/mscc_eswitch/Kconfig     |  2 +-
 drivers/pci/Kconfig                  | 40 +++-------------------------
 drivers/spi/Kconfig                  |  2 +-
 drivers/virtio/Kconfig               |  2 +-
 test/dm/Makefile                     |  2 +-
 15 files changed, 14 insertions(+), 54 deletions(-)
arch/Kconfig +0 -1
index b6f9e177b64..8f8daadcf92 100644
@@ -182,7 +182,6 @@ config X86
 	select SUPPORT_TPL
 	select CREATE_ARCH_SYMLINK
 	select DM
-	select DM_PCI
 	select HAVE_ARCH_IOMAP
 	select HAVE_PRIVATE_LIBGCC
 	select OF_CONTROL
arch/arm/Kconfig +1 -1
index 2b7b6257057..817f5fe4781 100644
@@ -1669,7 +1669,7 @@ config TARGET_SL28
 	select DM_SPI_FLASH
 	select DM_ETH
 	select DM_MDIO
-	select DM_PCI
+	select PCI
 	select DM_RNG
 	select DM_RTC
 	select DM_SCSI
arch/arm/mach-imx/mx6/Kconfig +1 -1
index 789a50d4e92..515c3020faa 100644
@@ -237,7 +237,7 @@ config TARGET_KOSAGI_NOVENA
 	select DM_ETH
 	select DM_GPIO
 	select DM_MMC
-	select DM_PCI
+	select PCI
 	select DM_SCSI
 	select DM_VIDEO
 	select OF_CONTROL
arch/mips/Kconfig +1 -1
index 6b1f10d9a0e..a5cec387a04 100644
@@ -17,7 +17,7 @@ config TARGET_MALTA
 	select BOARD_EARLY_INIT_R
 	select DM
 	select DM_SERIAL
-	select DM_PCI
+	select PCI
 	select DM_ETH
 	select DYNAMIC_IO_PORT_BASE
 	select MIPS_CM
board/emulation/qemu-riscv/Kconfig +0 -1
index 0818048ba64..46b01c2049a 100644
@@ -51,7 +51,6 @@ config BOARD_SPECIFIC_OPTIONS # dummy
 	imply E1000
 	imply NVME
 	imply PCI
-	imply DM_PCI
 	imply PCIE_ECAM_GENERIC
 	imply SCSI
 	imply DM_SCSI
board/socionext/developerbox/Kconfig +0 -1
index 706b8dc0f1c..c181d26a44a 100644
@@ -7,7 +7,6 @@ choice
 config TARGET_DEVELOPERBOX
 	bool "Socionext DeveloperBox"
 	select PCI
-	select DM_PCI
 	select PCIE_ECAM_SYNQUACER
 	select SYS_DISABLE_DCACHE_OPS
 	select OF_BOARD_SETUP
common/Kconfig +0 -1
index 2ab20a6c85b..ee14d3ad5bf 100644
@@ -551,7 +551,6 @@ config MISC_INIT_R
 config PCI_INIT_R
 	bool "Enumerate PCI buses during init"
 	depends on PCI
-	default y if !DM_PCI
 	help
 	  With this option U-Boot will call pci_init() soon after relocation,
 	  which will enumerate PCI buses. This is needed, for instance, in the
drivers/gpio/Kconfig +1 -1
index 09695f6c2b0..b2784915f19 100644
@@ -348,7 +348,7 @@ config PIC32_GPIO
 
 config OCTEON_GPIO
 	bool "Octeon II/III/TX/TX2 GPIO driver"
-	depends on DM_GPIO && DM_PCI &&	(ARCH_OCTEON || ARCH_OCTEONTX || ARCH_OCTEONTX2)
+	depends on DM_GPIO && PCI && (ARCH_OCTEON || ARCH_OCTEONTX || ARCH_OCTEONTX2)
 	default y
 	help
 	  Add support for the Marvell Octeon GPIO driver. This is used with
drivers/i2c/Makefile +1 -1
index c2eb24e0f7b..c16ebb24913 100644
@@ -18,7 +18,7 @@ obj-$(CONFIG_SYS_I2C_CADENCE) += i2c-cdns.o
 obj-$(CONFIG_SYS_I2C_CA) += i2c-cortina.o
 obj-$(CONFIG_SYS_I2C_DAVINCI) += davinci_i2c.o
 obj-$(CONFIG_SYS_I2C_DW) += designware_i2c.o
-ifdef CONFIG_DM_PCI
+ifdef CONFIG_PCI
 obj-$(CONFIG_SYS_I2C_DW) += designware_i2c_pci.o
 endif
 obj-$(CONFIG_SYS_I2C_FSL) += fsl_i2c.o
drivers/net/Kconfig +2 -4
index 8b10148579e..0a5e0ac8744 100644
@@ -222,7 +222,6 @@ config DWC_ETH_QOS_TEGRA186
 
 config E1000
 	bool "Intel PRO/1000 Gigabit Ethernet support"
-	depends on (DM_ETH && DM_PCI) || !DM_ETH
 	help
 	  This driver supports Intel(R) PRO/1000 gigabit ethernet family of
 	  adapters.  For more information on how to identify your adapter, go
@@ -506,7 +505,7 @@ config OCTEONTX2_CGX_INTF
 
 config PCH_GBE
 	bool "Intel Platform Controller Hub EG20T GMAC driver"
-	depends on DM_ETH && DM_PCI
+	depends on DM_ETH
 	select PHYLIB
 	help
 	  This MAC is present in Intel Platform Controller Hub EG20T. It
@@ -606,7 +605,6 @@ source "drivers/net/ti/Kconfig"
 
 config TULIP
 	bool "DEC Tulip DC2114x Ethernet support"
-	depends on (DM_ETH && DM_PCI) || !DM_ETH
 	help
 	  This driver supports DEC DC2114x Fast ethernet chips.
 
@@ -791,7 +789,7 @@ config HIGMACV300_ETH
 
 config FSL_ENETC
 	bool "NXP ENETC Ethernet controller"
-	depends on DM_PCI && DM_ETH && DM_MDIO
+	depends on DM_ETH && DM_MDIO
 	help
 	  This driver supports the NXP ENETC Ethernet controller found on some
 	  of the NXP SoCs.
drivers/net/mscc_eswitch/Kconfig +1 -1
index ccf7822dbe7..930d2ef1130 100644
@@ -39,7 +39,7 @@ config MSCC_SERVAL_SWITCH
 
 config MSCC_FELIX_SWITCH
 	bool "Felix switch driver"
-	depends on DM_DSA && DM_PCI
+	depends on DM_DSA
 	select FSL_ENETC
 	help
 	  This driver supports the Ethernet switch integrated in the
drivers/pci/Kconfig +3 -37
index 2ef4d46797e..e4123ba820f 100644
@@ -2,35 +2,26 @@ menuconfig PCI
 	bool "PCI support"
 	depends on DM
 	default y if PPC
-	select DM_PCI
 	help
 	  Enable support for PCI (Peripheral Interconnect Bus), a type of bus
 	  used on some devices to allow the CPU to communicate with its
 	  peripherals.
 
-config DM_PCI
-	bool
-	help
-	  Use driver model for PCI. Driver model is the new method for
-	  orgnising devices in U-Boot. For PCI, driver model keeps track of
-	  available PCI devices, allows scanning of PCI buses and provides
-	  device configuration support.
+	  This subsystem requires driver model.
 
 if PCI
 
 config DM_PCI_COMPAT
 	bool "Enable compatible functions for PCI"
-	depends on DM_PCI
 	help
 	  Enable compatibility functions for PCI so that old code can be used
-	  with CONFIG_DM_PCI enabled. This should be used as an interim
+	  with CONFIG_PCI enabled. This should be used as an interim
 	  measure when porting a board to use driver model for PCI. Once the
 	  board is fully supported, this option should be disabled.
 
 config PCI_AARDVARK
 	bool "Enable Aardvark PCIe driver"
 	default n
-	depends on DM_PCI
 	depends on DM_GPIO
 	depends on ARMADA_3700
 	help
@@ -40,14 +31,12 @@ config PCI_AARDVARK
 
 config PCI_PNP
 	bool "Enable Plug & Play support for PCI"
-	depends on PCI || DM_PCI
 	default y
 	help
 	  Enable PCI memory and I/O space resource allocation and assignment.
 
 config PCI_REGION_MULTI_ENTRY
 	bool "Enable Multiple entries of region type MEMORY in ranges for PCI"
-	depends on PCI || DM_PCI
 	default n
 	help
 	  Enable PCI memory regions to be of multiple entry. Multiple entry
@@ -57,7 +46,6 @@ config PCI_REGION_MULTI_ENTRY
 
 config PCI_MAP_SYSTEM_MEMORY
 	bool "Map local system memory from a virtual base address"
-	depends on PCI || DM_PCI
 	depends on MIPS
 	default n
 	help
@@ -70,7 +58,6 @@ config PCI_MAP_SYSTEM_MEMORY
 
 config PCI_SRIOV
 	bool "Enable Single Root I/O Virtualization support for PCI"
-	depends on PCI || DM_PCI
 	default n
 	help
 	  Say Y here if you want to enable PCI Single Root I/O Virtualization
@@ -80,7 +67,6 @@ config PCI_SRIOV
 
 config PCI_ARID
         bool "Enable Alternate Routing-ID support for PCI"
-        depends on PCI || DM_PCI
         default n
         help
           Say Y here if you want to enable Alternate Routing-ID capability
@@ -90,7 +76,6 @@ config PCI_ARID
 config PCIE_ECAM_GENERIC
 	bool "Generic ECAM-based PCI host controller support"
 	default n
-	depends on DM_PCI
 	help
 	  Say Y here if you want to enable support for generic ECAM-based
 	  PCIe host controllers, such as the one emulated by QEMU.
@@ -98,7 +83,6 @@ config PCIE_ECAM_GENERIC
 config PCIE_ECAM_SYNQUACER
 	bool "SynQuacer ECAM-based PCI host controller support"
 	default n
-	depends on DM_PCI
 	select PCI_INIT_R
 	select PCI_REGION_MULTI_ENTRY
 	help
@@ -109,14 +93,12 @@ config PCIE_ECAM_SYNQUACER
 
 config PCI_PHYTIUM
 	bool "Phytium PCIe support"
-	depends on DM_PCI
 	help
 	  Say Y here if you want to enable PCIe controller support on
 	  Phytium SoCs.
 
 config PCIE_DW_MVEBU
 	bool "Enable Armada-8K PCIe driver (DesignWare core)"
-	depends on DM_PCI
 	depends on ARMADA_8K
 	help
 	  Say Y here if you want to enable PCIe controller support on
@@ -135,7 +117,6 @@ config PCIE_DW_SIFIVE
 
 config PCIE_FSL
 	bool "FSL PowerPC PCIe support"
-	depends on DM_PCI
 	help
 	  Say Y here if you want to enable PCIe controller support on FSL
 	  PowerPC MPC85xx, MPC86xx, B series, P series and T series SoCs.
@@ -143,14 +124,12 @@ config PCIE_FSL
 
 config PCI_MPC85XX
 	bool "MPC85XX PowerPC PCI support"
-	depends on DM_PCI
 	help
 	  Say Y here if you want to enable PCI controller support on FSL
 	  PowerPC MPC85xx SoC.
 
 config PCI_RCAR_GEN2
 	bool "Renesas RCar Gen2 PCIe driver"
-	depends on DM_PCI
 	depends on RCAR_32
 	help
 	  Say Y here if you want to enable PCIe controller support on
@@ -159,7 +138,6 @@ config PCI_RCAR_GEN2
 
 config PCI_RCAR_GEN3
 	bool "Renesas RCar Gen3 PCIe driver"
-	depends on DM_PCI
 	depends on RCAR_GEN3
 	help
 	  Say Y here if you want to enable PCIe controller support on
@@ -167,7 +145,7 @@ config PCI_RCAR_GEN3
 
 config PCI_SANDBOX
 	bool "Sandbox PCI support"
-	depends on SANDBOX && DM_PCI
+	depends on SANDBOX
 	help
 	  Support PCI on sandbox, as an emulated bus. This permits testing of
 	  PCI feature such as bus scanning, device configuration and device
@@ -202,7 +180,6 @@ config PCIE_OCTEON
 
 config PCI_XILINX
 	bool "Xilinx AXI Bridge for PCI Express"
-	depends on DM_PCI
 	help
 	  Enable support for the Xilinx AXI bridge for PCI express, an IP block
 	  which can be used on some generations of Xilinx FPGAs.
@@ -213,7 +190,6 @@ config PCIE_LAYERSCAPE
 
 config PCIE_LAYERSCAPE_RC
 	bool "Layerscape PCIe Root Complex mode support"
-	depends on DM_PCI
 	select PCIE_LAYERSCAPE
 	help
 	  Enable Layerscape PCIe Root Complex mode driver support. The Layerscape
@@ -235,7 +211,6 @@ config PCI_IOMMU_EXTRA_MAPPINGS
 
 config PCIE_LAYERSCAPE_EP
 	bool "Layerscape PCIe Endpoint mode support"
-	depends on DM_PCI
 	select PCIE_LAYERSCAPE
 	select PCI_ENDPOINT
 	help
@@ -246,7 +221,6 @@ config PCIE_LAYERSCAPE_EP
 
 config PCIE_LAYERSCAPE_GEN4
 	bool "Layerscape Gen4 PCIe support"
-	depends on DM_PCI
 	help
 	  Support PCIe Gen4 on NXP Layerscape SoCs, which may have one or
 	  several PCIe controllers. The PCIe controller can work in RC or
@@ -279,14 +253,12 @@ config FSL_PCIE_EP_COMPAT
 
 config PCIE_INTEL_FPGA
 	bool "Intel FPGA PCIe support"
-	depends on DM_PCI
 	help
 	  Say Y here if you want to enable PCIe controller support on Intel
 	  FPGA, example Stratix 10.
 
 config PCIE_IPROC
 	bool "Iproc PCIe support"
-	depends on DM_PCI
 	help
 	  Broadcom iProc PCIe controller driver.
 	  Say Y here if you want to enable Broadcom iProc PCIe controller,
@@ -294,7 +266,6 @@ config PCIE_IPROC
 config PCI_MVEBU
 	bool "Enable Armada XP/38x PCIe driver"
 	depends on ARCH_MVEBU
-	select DM_PCI
 	select MISC
 	help
 	  Say Y here if you want to enable PCIe controller support on
@@ -302,7 +273,6 @@ config PCI_MVEBU
 
 config PCIE_DW_COMMON
 	bool
-	select DM_PCI
 
 config PCI_KEYSTONE
 	bool "TI Keystone PCIe controller"
@@ -312,7 +282,6 @@ config PCI_KEYSTONE
 
 config PCIE_MEDIATEK
 	bool "MediaTek PCIe Gen2 controller"
-	depends on DM_PCI
 	depends on ARCH_MEDIATEK
 	help
 	  Say Y here if you want to enable Gen2 PCIe controller,
@@ -329,7 +298,6 @@ config PCIE_DW_MESON
 config PCIE_ROCKCHIP
 	bool "Enable Rockchip PCIe driver"
 	depends on ARCH_ROCKCHIP
-	select DM_PCI
 	select PHY_ROCKCHIP_PCIE
 	default y if ROCKCHIP_RK3399
 	help
@@ -347,7 +315,6 @@ config PCIE_DW_ROCKCHIP
 
 config PCI_BRCMSTB
 	bool "Broadcom STB PCIe controller"
-	depends on DM_PCI
 	depends on ARCH_BCM283X
 	help
 	  Say Y here if you want to enable support for PCIe controller
@@ -357,7 +324,6 @@ config PCI_BRCMSTB
 
 config PCIE_UNIPHIER
 	bool "Socionext UniPhier PCIe driver"
-	depends on DM_PCI
 	depends on ARCH_UNIPHIER
 	select PHY_UNIPHIER_PCIE
 	help
drivers/spi/Kconfig +1 -1
index 5c2a60a2142..db236591f64 100644
@@ -271,7 +271,7 @@ config NXP_FSPI
 
 config OCTEON_SPI
 	bool "Octeon SPI driver"
-	depends on DM_PCI && (ARCH_OCTEON || ARCH_OCTEONTX || ARCH_OCTEONTX2)
+	depends on ARCH_OCTEON || ARCH_OCTEONTX || ARCH_OCTEONTX2
 	help
 	  Enable the Octeon SPI driver. This driver can be used to
 	  access the SPI NOR flash on Octeon II/III and OcteonTX/TX2
drivers/virtio/Kconfig +1 -1
index 18356070833..863c3fbe029 100644
@@ -31,7 +31,7 @@ config VIRTIO_MMIO
 
 config VIRTIO_PCI
 	bool "PCI driver for virtio devices"
-	depends on DM_PCI
+	depends on PCI
 	select VIRTIO
 	help
 	  This driver provides support for virtio based paravirtual device
test/dm/Makefile +1 -1
index d5c42e7643e..958d7df94a4 100644
@@ -64,7 +64,7 @@ obj-y += of_extra.o
 obj-$(CONFIG_OSD) += osd.o
 obj-$(CONFIG_DM_VIDEO) += panel.o
 obj-$(CONFIG_EFI_PARTITION) += part.o
-obj-$(CONFIG_DM_PCI) += pci.o
+obj-$(CONFIG_PCI) += pci.o
 obj-$(CONFIG_P2SB) += p2sb.o
 obj-$(CONFIG_PCI_ENDPOINT) += pci_ep.o
 obj-$(CONFIG_PCH) += pch.o
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#67 lore raw

Re: [PATCH v2 31/32] pci: Drop DM_PCI

Quoted 3 lines · Simon Glass

This option has not effect now. Drop it, using PCI instead where needed.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#68 lore raw

PATCH v2 32/32 pci: Drop migration method

In reply to Simon Glass

Migration is complete. Drop the message.

---

(no changes since v1)

 doc/develop/driver-model/migration.rst | 9 ---------
 1 file changed, 9 deletions(-)
doc/develop/driver-model/migration.rst +0 -9
index 8d0bb7635b5..8bb8601c582 100644
@@ -75,15 +75,6 @@ Partially converted::
 * Status: In progress
 * Deadline: 2019.07
 
-CONFIG_DM_PCI
--------------
-Deadline: 2019.07
-
-The PCI subsystem has supported driver model since mid 2015. Maintainers should
-submit patches switching over to using CONFIG_DM_PCI and other base driver
-model options in time for inclusion in the 2019.07 release.
-
-
 CONFIG_DM_VIDEO
 ---------------
 Deadline: 2019.07
Signature · 1 line
2.32.0.554.ge1b32706d8-goog
#69 lore raw

Re: [PATCH v2 32/32] pci: Drop migration method

Quoted 3 lines · Simon Glass

Migration is complete. Drop the message.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#70 lore raw
In reply to Simon Glass

Hi Tom,

Quoted 45 lines · Simon Glass

The hard work to actually enable DM_PCI everywhere was done recently. This series attempts to drop most of the code that it no-longer needed now that PCI has been converted to driver model.

It also drops the UCP1020 board since it has various unique build issues. It doesn't even support driver model so it seems reasonable to just remove it.

The DM_PCI option disappears and only PCI is left.

We can drop about 50 ad-hoc CONFIGs also, but this series doesn't do that since it is probably best done when the CONFIGs are resynced. It does include a CONFIG resync patch which can be dropped if that is done separately.

Changes in v2:
- Update to mention DM_PCI instead
- Fix tag to 'mips' from 'ppc'

Simon Glass (32):
pci: Drop old code from pci command
ppc: Remove UCP1020 board
pci: Drop old code from header file
pci: Remove guard around compatibility functions
pci: Drop DM_PCI check from fdtdec
pci: Drop DM_PCI check from pci_common
ppc: Drop CONFIG_SYS_PCI_SUBSYS_VENDORID
pci: powerpc: Drop old code
pci: freescale: Drop old code
pci: dm: core: Drop DM_PCI check from devfdt_get_addr_pci()
ppc: Drop DM_PCI from config files
pci: acpi: Drop DM_PCI check from ahci
pci: usb: Drop DM_PCI from ohci
ppc: malta: Drop use of DM_PCI
ppc: socrates: Drop use of DM_PCI
pci: gt64120: Drop use of DM_PCI
pci: msc01: Drop use of DM_PCI
pci: imx: Drop use of DM_PCI
pci: scsi: pci: Drop DM_PCI check from scsi
pci: Drop DM_PCI check from bios_emul
net: Drop DM_PCI check from designware driver
pci: imx: Drop DM_PCI check from cpu driver
pci: arm: mvebu: Drop DM_PCI check from
pci: sata_sil: Drop DM_PCI checks

Quoted 9 lines

distro_bootcmd: Drop DM_PCI check
pci: Drop pci_init_board()
pci: ppc: Drop ftpci100 driver
ppc: Drop idt8t49n222a_serdes_clk driver
ppc: Drop t4qds and b4860qds references
pci: Drop PCI_INDIRECT_BRIDGE
pci: Drop DM_PCI
pci: Drop migration method

Thanks for fixing up and applying most of this.

Shall I rebase and send the remaining patches as a new series?

Regards,
Simon

#71 lore raw
Quoted 58 lines · Simon Glass

Hi Tom,

Quoted 45 lines · Simon Glass

The hard work to actually enable DM_PCI everywhere was done recently. This series attempts to drop most of the code that it no-longer needed now that PCI has been converted to driver model.

It also drops the UCP1020 board since it has various unique build issues. It doesn't even support driver model so it seems reasonable to just remove it.

The DM_PCI option disappears and only PCI is left.

We can drop about 50 ad-hoc CONFIGs also, but this series doesn't do that since it is probably best done when the CONFIGs are resynced. It does include a CONFIG resync patch which can be dropped if that is done separately.

Changes in v2:
- Update to mention DM_PCI instead
- Fix tag to 'mips' from 'ppc'

Simon Glass (32):
pci: Drop old code from pci command
ppc: Remove UCP1020 board
pci: Drop old code from header file
pci: Remove guard around compatibility functions
pci: Drop DM_PCI check from fdtdec
pci: Drop DM_PCI check from pci_common
ppc: Drop CONFIG_SYS_PCI_SUBSYS_VENDORID
pci: powerpc: Drop old code
pci: freescale: Drop old code
pci: dm: core: Drop DM_PCI check from devfdt_get_addr_pci()
ppc: Drop DM_PCI from config files
pci: acpi: Drop DM_PCI check from ahci
pci: usb: Drop DM_PCI from ohci
ppc: malta: Drop use of DM_PCI
ppc: socrates: Drop use of DM_PCI
pci: gt64120: Drop use of DM_PCI
pci: msc01: Drop use of DM_PCI
pci: imx: Drop use of DM_PCI
pci: scsi: pci: Drop DM_PCI check from scsi
pci: Drop DM_PCI check from bios_emul
net: Drop DM_PCI check from designware driver
pci: imx: Drop DM_PCI check from cpu driver
pci: arm: mvebu: Drop DM_PCI check from
pci: sata_sil: Drop DM_PCI checks

Quoted 9 lines

distro_bootcmd: Drop DM_PCI check
pci: Drop pci_init_board()
pci: ppc: Drop ftpci100 driver
ppc: Drop idt8t49n222a_serdes_clk driver
ppc: Drop t4qds and b4860qds references
pci: Drop PCI_INDIRECT_BRIDGE
pci: Drop DM_PCI
pci: Drop migration method

Quoted 3 lines

Thanks for fixing up and applying most of this.

Shall I rebase and send the remaining patches as a new series?

No need. I'll pick up the rest of the series when I get the UCP1020 update patch as well.

Signature · 1 line
Tom
#72 lore raw
Quoted 60 lines · Tom Rini
Quoted 58 lines · Simon Glass

Hi Tom,

Quoted 54 lines · Simon Glass

The hard work to actually enable DM_PCI everywhere was done recently. This series attempts to drop most of the code that it no-longer needed now that PCI has been converted to driver model.

It also drops the UCP1020 board since it has various unique build issues. It doesn't even support driver model so it seems reasonable to just remove it.

The DM_PCI option disappears and only PCI is left.

We can drop about 50 ad-hoc CONFIGs also, but this series doesn't do that since it is probably best done when the CONFIGs are resynced. It does include a CONFIG resync patch which can be dropped if that is done separately.

Changes in v2:
- Update to mention DM_PCI instead
- Fix tag to 'mips' from 'ppc'

Simon Glass (32):
pci: Drop old code from pci command
ppc: Remove UCP1020 board
pci: Drop old code from header file
pci: Remove guard around compatibility functions
pci: Drop DM_PCI check from fdtdec
pci: Drop DM_PCI check from pci_common
ppc: Drop CONFIG_SYS_PCI_SUBSYS_VENDORID
pci: powerpc: Drop old code
pci: freescale: Drop old code
pci: dm: core: Drop DM_PCI check from devfdt_get_addr_pci()
ppc: Drop DM_PCI from config files
pci: acpi: Drop DM_PCI check from ahci
pci: usb: Drop DM_PCI from ohci
ppc: malta: Drop use of DM_PCI
ppc: socrates: Drop use of DM_PCI
pci: gt64120: Drop use of DM_PCI
pci: msc01: Drop use of DM_PCI
pci: imx: Drop use of DM_PCI
pci: scsi: pci: Drop DM_PCI check from scsi
pci: Drop DM_PCI check from bios_emul
net: Drop DM_PCI check from designware driver
pci: imx: Drop DM_PCI check from cpu driver
pci: arm: mvebu: Drop DM_PCI check from
pci: sata_sil: Drop DM_PCI checks
distro_bootcmd: Drop DM_PCI check
pci: Drop pci_init_board()
pci: ppc: Drop ftpci100 driver
ppc: Drop idt8t49n222a_serdes_clk driver
ppc: Drop t4qds and b4860qds references
pci: Drop PCI_INDIRECT_BRIDGE
pci: Drop DM_PCI
pci: Drop migration method

Quoted 6 lines
Quoted 3 lines

Thanks for fixing up and applying most of this.

Shall I rebase and send the remaining patches as a new series?

No need. I'll pick up the rest of the series when I get the UCP1020 update patch as well.

OK, got it.

- Simon