Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/sdmmc Use SMBIOS system product instead of the strin...



details:   https://anonhg.NetBSD.org/src/rev/53c44eade48b
branches:  trunk
changeset: 1022811:53c44eade48b
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Aug 08 11:11:29 2021 +0000

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

diffstat:

 sys/dev/sdmmc/if_bwfm_sdio.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 7372a2f6796a -r 53c44eade48b sys/dev/sdmmc/if_bwfm_sdio.c
--- a/sys/dev/sdmmc/if_bwfm_sdio.c      Sun Aug 08 11:07:19 2021 +0000
+++ b/sys/dev/sdmmc/if_bwfm_sdio.c      Sun Aug 08 11:11:29 2021 +0000
@@ -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 @@
 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



Home | Main Index | Thread Index | Old Index