Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbarm/rpi if the firmware gives us a bad emmc cloc...



details:   https://anonhg.NetBSD.org/src/rev/e6d0608e8bd8
branches:  trunk
changeset: 784147:e6d0608e8bd8
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sat Jan 19 17:45:28 2013 +0000

description:
if the firmware gives us a bad emmc clock rate, ignore it

diffstat:

 sys/arch/evbarm/rpi/rpi_machdep.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 993e39856bbf -r e6d0608e8bd8 sys/arch/evbarm/rpi/rpi_machdep.c
--- a/sys/arch/evbarm/rpi/rpi_machdep.c Sat Jan 19 16:19:55 2013 +0000
+++ b/sys/arch/evbarm/rpi/rpi_machdep.c Sat Jan 19 17:45:28 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rpi_machdep.c,v 1.28 2013/01/11 12:47:38 jmcneill Exp $        */
+/*     $NetBSD: rpi_machdep.c,v 1.29 2013/01/19 17:45:28 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.28 2013/01/11 12:47:38 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.29 2013/01/19 17:45:28 jmcneill Exp $");
 
 #include "opt_evbarm_boardtype.h"
 
@@ -733,7 +733,8 @@
 
 #if NSDHC > 0
        if (device_is_a(dev, "sdhc") &&
-           vcprop_tag_success_p(&vb.vbt_emmcclockrate.tag)) {
+           vcprop_tag_success_p(&vb.vbt_emmcclockrate.tag) &&
+           vb.vbt_emmcclockrate.rate > 0) {
                prop_dictionary_set_uint32(dict,
                    "frequency", vb.vbt_emmcclockrate.rate);
        }



Home | Main Index | Thread Index | Old Index