diff options
author | John Schmoller <jschmoller@xes-inc.com> | 2010-10-22 00:20:23 -0500 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2010-10-22 02:17:12 -0500 |
commit | 96d6160324c49c81df10b6b4c75d2470cb30dce4 (patch) | |
tree | 8f39289d4721ce30ad091c21cadee229ed3a5954 /common | |
parent | 9660c5de74aae900077c3769d7d18b39a124d9d5 (diff) | |
download | u-boot-imx-96d6160324c49c81df10b6b4c75d2470cb30dce4.zip u-boot-imx-96d6160324c49c81df10b6b4c75d2470cb30dce4.tar.gz u-boot-imx-96d6160324c49c81df10b6b4c75d2470cb30dce4.tar.bz2 |
pci: Add ability to re-enumerate PCI buses
Add a new 'pci enum' command which re-enumerates the PCI buses. This
command is enabled via the CONFIG_CMD_PCI_ENUM define and can be useful
in boards with FPGAs connected via PCI/PCIe, boards that support PCI
hot-plugging, or during PCI debug.
Also enable the 'pci enum' command for X-ES's Freescale-based boards.
Signed-off-by: John Schmoller <jschmoller@xes-inc.com>
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_pci.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/common/cmd_pci.c b/common/cmd_pci.c index 4bde059..ccf5ada 100644 --- a/common/cmd_pci.c +++ b/common/cmd_pci.c @@ -497,6 +497,10 @@ int do_pci (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) if ((bdf = get_pci_dev(argv[2])) == -1) return 1; break; +#ifdef CONFIG_CMD_PCI_ENUM + case 'e': + break; +#endif default: /* scan bus */ value = 1; /* short listing */ bdf = 0; /* bus number */ @@ -518,6 +522,11 @@ int do_pci (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 0; case 'd': /* display */ return pci_cfg_display(bdf, addr, size, value); +#ifdef CONFIG_CMD_PCI_ENUM + case 'e': + pci_init(); + return 0; +#endif case 'n': /* next */ if (argc < 4) goto usage; @@ -545,6 +554,10 @@ U_BOOT_CMD( "list and access PCI Configuration Space", "[bus] [long]\n" " - short or long list of PCI devices on bus 'bus'\n" +#ifdef CONFIG_CMD_PCI_ENUM + "pci enum\n" + " - re-enumerate PCI buses\n" +#endif "pci header b.d.f\n" " - show header of PCI device 'bus.device.function'\n" "pci display[.b, .w, .l] b.d.f [address] [# of objects]\n" |