Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Disable sdhost instead of sdhc for non-wifibt boards.
details: https://anonhg.NetBSD.org/src/rev/a6267ab875af
branches: trunk
changeset: 826130:a6267ab875af
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Wed Aug 16 20:54:19 2017 +0000
description:
Disable sdhost instead of sdhc for non-wifibt boards.
diffstat:
sys/arch/arm/broadcom/bcm2835_sdhost.c | 12 ++++++++++--
sys/arch/evbarm/rpi/rpi_machdep.c | 14 ++++++--------
2 files changed, 16 insertions(+), 10 deletions(-)
diffs (81 lines):
diff -r 4de75a93c962 -r a6267ab875af sys/arch/arm/broadcom/bcm2835_sdhost.c
--- a/sys/arch/arm/broadcom/bcm2835_sdhost.c Wed Aug 16 18:23:03 2017 +0000
+++ b/sys/arch/arm/broadcom/bcm2835_sdhost.c Wed Aug 16 20:54:19 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcm2835_sdhost.c,v 1.2 2017/07/30 23:47:58 jmcneill Exp $ */
+/* $NetBSD: bcm2835_sdhost.c,v 1.3 2017/08/16 20:54:19 jmcneill Exp $ */
/*-
* Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_sdhost.c,v 1.2 2017/07/30 23:47:58 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_sdhost.c,v 1.3 2017/08/16 20:54:19 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -183,6 +183,7 @@
struct sdhost_softc * const sc = device_private(self);
struct amba_attach_args * const aaa = aux;
prop_dictionary_t dict = device_properties(self);
+ bool disable = false;
sc->sc_dev = self;
sc->sc_bst = aaa->aaa_iot;
@@ -201,6 +202,13 @@
aprint_naive("\n");
aprint_normal(": SD HOST controller\n");
+ prop_dictionary_get_bool(dict, "disable", &disable);
+ if (disable) {
+ aprint_naive(": disabled\n");
+ aprint_normal(": disabled\n");
+ return;
+ }
+
prop_dictionary_get_uint32(dict, "frequency", &sc->sc_rate);
if (sc->sc_rate == 0) {
aprint_error_dev(self, "couldn't get clock frequency\n");
diff -r 4de75a93c962 -r a6267ab875af sys/arch/evbarm/rpi/rpi_machdep.c
--- a/sys/arch/evbarm/rpi/rpi_machdep.c Wed Aug 16 18:23:03 2017 +0000
+++ b/sys/arch/evbarm/rpi/rpi_machdep.c Wed Aug 16 20:54:19 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rpi_machdep.c,v 1.79 2017/08/12 11:44:26 jmcneill Exp $ */
+/* $NetBSD: rpi_machdep.c,v 1.80 2017/08/16 20:54:19 jmcneill Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.79 2017/08/12 11:44:26 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.80 2017/08/16 20:54:19 jmcneill Exp $");
#include "opt_arm_debug.h"
#include "opt_bcm283x.h"
@@ -1293,18 +1293,16 @@
vb.vbt_emmcclockrate.rate > 0) {
prop_dictionary_set_uint32(dict,
"frequency", vb.vbt_emmcclockrate.rate);
-#if NBCMSDHOST > 0
- if (!rpi_rev_has_btwifi(vb.vbt_boardrev.rev)) {
- /* No btwifi and sdhost driver is present */
- prop_dictionary_set_bool(dict, "disable", true);
- }
-#endif
}
if (device_is_a(dev, "sdhost") &&
vcprop_tag_success_p(&vb.vbt_coreclockrate.tag) &&
vb.vbt_coreclockrate.rate > 0) {
prop_dictionary_set_uint32(dict,
"frequency", vb.vbt_coreclockrate.rate);
+ if (!rpi_rev_has_btwifi(vb.vbt_boardrev.rev)) {
+ /* No btwifi and sdhost driver is present */
+ prop_dictionary_set_bool(dict, "disable", true);
+ }
}
if (booted_device == NULL &&
device_is_a(dev, "ld") &&
Home |
Main Index |
Thread Index |
Old Index