Source-Changes-HG archive

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

[src/trunk]: src/sys/arch beagleboard supports 8-bit SD mode



details:   https://anonhg.NetBSD.org/src/rev/4c2218502d43
branches:  trunk
changeset: 783603:4c2218502d43
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Mon Dec 31 13:20:16 2012 +0000

description:
beagleboard supports 8-bit SD mode

diffstat:

 sys/arch/arm/omap/omap3_sdhc.c          |  9 +++++++--
 sys/arch/evbarm/beagle/beagle_machdep.c |  5 +++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diffs (67 lines):

diff -r 1ef02aea0d9b -r 4c2218502d43 sys/arch/arm/omap/omap3_sdhc.c
--- a/sys/arch/arm/omap/omap3_sdhc.c    Mon Dec 31 12:47:25 2012 +0000
+++ b/sys/arch/arm/omap/omap3_sdhc.c    Mon Dec 31 13:20:16 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: omap3_sdhc.c,v 1.9 2012/12/29 00:08:26 jmcneill Exp $  */
+/*     $NetBSD: omap3_sdhc.c,v 1.10 2012/12/31 13:20:16 jmcneill Exp $ */
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: omap3_sdhc.c,v 1.9 2012/12/29 00:08:26 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap3_sdhc.c,v 1.10 2012/12/31 13:20:16 jmcneill Exp $");
 
 #include "opt_omap.h"
 
@@ -139,10 +139,13 @@
        prop_dictionary_t prop = device_properties(self);
        uint32_t clkd, stat;
        int error, timo, clksft, n;
+       bool support8bit = false;
 #ifdef TI_AM335X
        size_t i;
 #endif
 
+       prop_dictionary_get_bool(prop, "8bit", &support8bit);
+
        sc->sc.sc_dmat = oa->obio_dmat;
        sc->sc.sc_dev = self;
        //sc->sc.sc_flags |= SDHC_FLAG_USE_DMA;
@@ -150,6 +153,8 @@
        sc->sc.sc_flags |= SDHC_FLAG_NO_LED_ON;
        sc->sc.sc_flags |= SDHC_FLAG_RSP136_CRC;
        sc->sc.sc_flags |= SDHC_FLAG_SINGLE_ONLY;
+       if (support8bit)
+               sc->sc.sc_flags |= SDHC_FLAG_8BIT_MODE;
 #ifdef TI_AM335X
        sc->sc.sc_flags |= SDHC_FLAG_WAIT_RESET;
        sc->sc.sc_flags &= ~SDHC_FLAG_SINGLE_ONLY;
diff -r 1ef02aea0d9b -r 4c2218502d43 sys/arch/evbarm/beagle/beagle_machdep.c
--- a/sys/arch/evbarm/beagle/beagle_machdep.c   Mon Dec 31 12:47:25 2012 +0000
+++ b/sys/arch/evbarm/beagle/beagle_machdep.c   Mon Dec 31 13:20:16 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: beagle_machdep.c,v 1.31 2012/12/13 05:58:14 matt Exp $ */
+/*     $NetBSD: beagle_machdep.c,v 1.32 2012/12/31 13:20:16 jmcneill Exp $ */
 
 /*
  * Machine dependent functions for kernel setup for TI OSK5912 board.
@@ -125,7 +125,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: beagle_machdep.c,v 1.31 2012/12/13 05:58:14 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: beagle_machdep.c,v 1.32 2012/12/31 13:20:16 jmcneill Exp $");
 
 #include "opt_machdep.h"
 #include "opt_ddb.h"
@@ -733,6 +733,7 @@
        if (device_is_a(self, "sdhc")) {
 #if defined(OMAP_3530)
                prop_dictionary_set_uint32(dict, "clkmask", 0);
+               prop_dictionary_set_bool(dict, "8bit", true);
 #endif
                return;
        }



Home | Main Index | Thread Index | Old Index