Module Name:    src
Committed By:   jmcneill
Date:           Sun Aug  8 11:11:29 UTC 2021

Modified Files:
        src/sys/dev/sdmmc: if_bwfm_sdio.c

Log Message:
Use SMBIOS system product instead of the string "netbsd,generic-acpi"
for firmware loading on ACPI systems.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/sdmmc/if_bwfm_sdio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/sdmmc/if_bwfm_sdio.c
diff -u src/sys/dev/sdmmc/if_bwfm_sdio.c:1.26 src/sys/dev/sdmmc/if_bwfm_sdio.c:1.27
--- src/sys/dev/sdmmc/if_bwfm_sdio.c:1.26	Mon Jun 21 03:17:59 2021
+++ src/sys/dev/sdmmc/if_bwfm_sdio.c	Sun Aug  8 11:11:29 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bwfm_sdio.c,v 1.26 2021/06/21 03:17:59 christos Exp $ */
+/* $NetBSD: if_bwfm_sdio.c,v 1.27 2021/08/08 11:11:29 jmcneill Exp $ */
 /* $OpenBSD: if_bwfm_sdio.c,v 1.1 2017/10/11 17:19:50 patrick Exp $ */
 /*
  * Copyright (c) 2010-2016 Broadcom Corporation
@@ -592,10 +592,17 @@ bwfm_fdt_find_phandle(device_t self, dev
 static const char *
 bwfm_fdt_get_model(void)
 {
+	const char *model;
 	int phandle;
 
 	phandle = OF_finddevice("/");
-	return fdtbus_get_string_index(phandle, "compatible", 0);
+	model = fdtbus_get_string_index(phandle, "compatible", 0);
+	if (model == NULL ||
+	    (model != NULL && strcmp(model, "netbsd,generic-acpi") == 0)) {
+		model = pmf_get_platform("system-product");
+	}
+
+	return model;
 }
 
 static int

Reply via email to