Source-Changes-HG archive

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

[src/netbsd-7]: src/sys/dev/sdmmc Pull up following revision(s) (requested by...



details:   https://anonhg.NetBSD.org/src/rev/848306c83088
branches:  netbsd-7
changeset: 798395:848306c83088
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Oct 04 08:20:11 2014 +0000

description:
Pull up following revision(s) (requested by skrll in ticket #127):
        sys/dev/sdmmc/sdhc.c: revision 1.50
Fix divisor calculation for SDHC 3.0.

diffstat:

 sys/dev/sdmmc/sdhc.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r d233ea756620 -r 848306c83088 sys/dev/sdmmc/sdhc.c
--- a/sys/dev/sdmmc/sdhc.c      Fri Oct 03 18:55:37 2014 +0000
+++ b/sys/dev/sdmmc/sdhc.c      Sat Oct 04 08:20:11 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sdhc.c,v 1.44.2.3 2014/10/03 18:53:56 martin Exp $     */
+/*     $NetBSD: sdhc.c,v 1.44.2.4 2014/10/04 08:20:11 martin Exp $     */
 /*     $OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $        */
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.44.2.3 2014/10/03 18:53:56 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.44.2.4 2014/10/04 08:20:11 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -814,8 +814,7 @@
        }
        if (hp->specver == SDHC_SPEC_VERS_300) {
                div = howmany(hp->clkbase, freq);
-               if (div > 0)
-                       --div;
+               div = div > 1 ? howmany(div, 2) : 0;
                if (div > 0x3ff)
                        return false;
                *divp = (((div >> 8) & SDHC_SDCLK_XDIV_MASK)



Home | Main Index | Thread Index | Old Index