summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2016-01-29 13:47:38 -0500
committerTom Rini <trini@konsulko.com>2016-01-29 13:47:38 -0500
commit8a36287a019f5d7532a8a1a7da6aa96e490dbb8a (patch)
treecae7e68596b7405120720f7a81c7ffb04d6ffa6e /cmd
parent82d72a1b9967cff4908f22c57536c3660f794401 (diff)
parent26db3a617b38cc1bed1ce100381d2c4ccbb55e42 (diff)
downloadtalos-obmc-uboot-8a36287a019f5d7532a8a1a7da6aa96e490dbb8a.tar.gz
talos-obmc-uboot-8a36287a019f5d7532a8a1a7da6aa96e490dbb8a.zip
Merge git://git.denx.de/u-boot-dm
Diffstat (limited to 'cmd')
-rw-r--r--cmd/pci.c18
-rw-r--r--cmd/tpm.c2
2 files changed, 6 insertions, 14 deletions
diff --git a/cmd/pci.c b/cmd/pci.c
index 8094d3380f..2f4978af9f 100644
--- a/cmd/pci.c
+++ b/cmd/pci.c
@@ -578,9 +578,10 @@ static 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
+#if defined(CONFIG_CMD_PCI_ENUM) || defined(CONFIG_DM_PCI)
case 'e':
- break;
+ pci_init();
+ return 0;
#endif
default: /* scan bus */
value = 1; /* short listing */
@@ -621,15 +622,6 @@ static int do_pci(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
break;
case 'd': /* display */
return pci_cfg_display(dev, addr, size, value);
-#ifdef CONFIG_CMD_PCI_ENUM
- case 'e':
-# ifdef CONFIG_DM_PCI
- printf("This command is not yet supported with driver model\n");
-# else
- pci_init();
-# endif
- break;
-#endif
case 'n': /* next */
if (argc < 4)
goto usage;
@@ -665,9 +657,9 @@ static int do_pci(cmd_tbl_t *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"
-#ifdef CONFIG_CMD_PCI_ENUM
+#if defined(CONFIG_CMD_PCI_ENUM) || defined(CONFIG_DM_PCI)
"pci enum\n"
- " - re-enumerate PCI buses\n"
+ " - Enumerate PCI buses\n"
#endif
"pci header b.d.f\n"
" - show header of PCI device 'bus.device.function'\n"
diff --git a/cmd/tpm.c b/cmd/tpm.c
index add6bfb416..6edf3e9dc3 100644
--- a/cmd/tpm.c
+++ b/cmd/tpm.c
@@ -448,7 +448,7 @@ static int get_tpm(struct udevice **devp)
int rc;
rc = uclass_first_device(UCLASS_TPM, devp);
- if (rc) {
+ if (rc || !*devp) {
printf("Could not find TPM (ret=%d)\n", rc);
return CMD_RET_FAILURE;
}
OpenPOWER on IntegriCloud