Module Name: src
Committed By: jmcneill
Date: Mon Dec 31 13:20:16 UTC 2012
Modified Files:
src/sys/arch/arm/omap: omap3_sdhc.c
src/sys/arch/evbarm/beagle: beagle_machdep.c
Log Message:
beagleboard supports 8-bit SD mode
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/omap/omap3_sdhc.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/evbarm/beagle/beagle_machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/omap/omap3_sdhc.c
diff -u src/sys/arch/arm/omap/omap3_sdhc.c:1.9 src/sys/arch/arm/omap/omap3_sdhc.c:1.10
--- src/sys/arch/arm/omap/omap3_sdhc.c:1.9 Sat Dec 29 00:08:26 2012
+++ src/sys/arch/arm/omap/omap3_sdhc.c Mon Dec 31 13:20:16 2012
@@ -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 @@ obiosdhc_attach(device_t parent, device_
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 @@ obiosdhc_attach(device_t parent, device_
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;
Index: src/sys/arch/evbarm/beagle/beagle_machdep.c
diff -u src/sys/arch/evbarm/beagle/beagle_machdep.c:1.31 src/sys/arch/evbarm/beagle/beagle_machdep.c:1.32
--- src/sys/arch/evbarm/beagle/beagle_machdep.c:1.31 Thu Dec 13 05:58:14 2012
+++ src/sys/arch/evbarm/beagle/beagle_machdep.c Mon Dec 31 13:20:16 2012
@@ -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 @@ beagle_device_register(device_t self, vo
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;
}