diff mbox series

libpdbg: Auto-detect using bmc_target() for SBEFIFO backend

Message ID 20200625060753.276825-1-amitay@ozlabs.org
State New
Headers show
Series libpdbg: Auto-detect using bmc_target() for SBEFIFO backend | expand

Commit Message

Amitay Isaacs June 25, 2020, 6:07 a.m. UTC
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
---
 libpdbg/dtb.c | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)
diff mbox series

Patch

diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c
index 6d9b182..3d62fb6 100644
--- a/libpdbg/dtb.c
+++ b/libpdbg/dtb.c
@@ -417,21 +417,7 @@  struct pdbg_dtb *pdbg_default_dtb(void *system_fdt)
 		break;
 
 	case PDBG_BACKEND_SBEFIFO:
-		if (!pdbg_backend_option) {
-			pdbg_log(PDBG_ERROR, "No system type specified\n");
-			pdbg_log(PDBG_ERROR, "Use p9\n");
-			return NULL;
-		}
-
-		if (!strcmp(pdbg_backend_option, "p9")) {
-			if (!dtb->backend.fdt)
-				dtb->backend.fdt = &_binary_bmc_sbefifo_dtb_o_start;
-			if (!dtb->system.fdt)
-				dtb->system.fdt = &_binary_p9_dtb_o_start;
-		} else {
-			pdbg_log(PDBG_ERROR, "Invalid system type %s\n", pdbg_backend_option);
-			pdbg_log(PDBG_ERROR, "Use p9\n");
-		}
+		bmc_target(dtb);
 		break;
 
 	default: