beagleboard supports 8-bit SD mode

This commit is contained in:
jmcneill 2012-12-31 13:20:16 +00:00
parent b5247ae694
commit cd6325cba1
2 changed files with 10 additions and 4 deletions

View File

@ -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_t self, void *aux)
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_t self, void *aux)
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;

View File

@ -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, void *aux)
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;
}