Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys/arch/arm/allwinner Pull up following revision(s) (req...
details: https://anonhg.NetBSD.org/src/rev/0b8bb011d01a
branches: netbsd-7
changeset: 799670:0b8bb011d01a
user: riz <riz%NetBSD.org@localhost>
date: Sat Nov 07 16:15:03 2015 +0000
description:
Pull up following revision(s) (requested by bouyer in ticket #1006):
sys/arch/arm/allwinner/awin_mmc.c: revision 1.22
Avoid a divide by 0 when unplugging a sd card.
diffstat:
sys/arch/arm/allwinner/awin_mmc.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r b493e48650a9 -r 0b8bb011d01a sys/arch/arm/allwinner/awin_mmc.c
--- a/sys/arch/arm/allwinner/awin_mmc.c Sat Nov 07 01:56:08 2015 +0000
+++ b/sys/arch/arm/allwinner/awin_mmc.c Sat Nov 07 16:15:03 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_mmc.c,v 1.3.10.3 2014/12/04 11:08:38 martin Exp $ */
+/* $NetBSD: awin_mmc.c,v 1.3.10.4 2015/11/07 16:15:03 riz Exp $ */
/*-
* Copyright (c) 2014 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
#include "locators.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: awin_mmc.c,v 1.3.10.3 2014/12/04 11:08:38 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awin_mmc.c,v 1.3.10.4 2015/11/07 16:15:03 riz Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -510,7 +510,10 @@
sdly = awin_chip_id() == AWIN_CHIP_ID_A31 ? 0 : 7;
clksrc = AWIN_SD_CLK_SRC_SEL_OSC24M;
n = 2;
- m = ((osc24m_freq / (1 << n)) / freq) - 1;
+ if (freq > 0)
+ m = ((osc24m_freq / (1 << n)) / freq) - 1;
+ else
+ m = 15;
} else if (freq <= 25000) {
odly = 0;
sdly = 5;
Home |
Main Index |
Thread Index |
Old Index