Module Name: src
Committed By: matt
Date: Fri Jun 28 00:53:04 UTC 2013
Modified Files:
src/sys/arch/evbarm/beagle: beagle_machdep.c
Log Message:
Add code to make eMMC 8-bit (disabled) since it still needs code in omap3_sdhc
to actually enable 8-bit mode.
To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 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/evbarm/beagle/beagle_machdep.c
diff -u src/sys/arch/evbarm/beagle/beagle_machdep.c:1.50 src/sys/arch/evbarm/beagle/beagle_machdep.c:1.51
--- src/sys/arch/evbarm/beagle/beagle_machdep.c:1.50 Thu Jun 27 14:58:55 2013
+++ src/sys/arch/evbarm/beagle/beagle_machdep.c Fri Jun 28 00:53:04 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: beagle_machdep.c,v 1.50 2013/06/27 14:58:55 matt Exp $ */
+/* $NetBSD: beagle_machdep.c,v 1.51 2013/06/28 00:53:04 matt 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.50 2013/06/27 14:58:55 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: beagle_machdep.c,v 1.51 2013/06/28 00:53:04 matt Exp $");
#include "opt_machdep.h"
#include "opt_ddb.h"
@@ -136,6 +136,7 @@ __KERNEL_RCSID(0, "$NetBSD: beagle_machd
#include "opt_omap.h"
#include "prcm.h"
#include "com.h"
+#include "sdhc.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -180,7 +181,11 @@ __KERNEL_RCSID(0, "$NetBSD: beagle_machd
#include <arm/omap/omap2_prcm.h>
#include <arm/omap/omap2_gpio.h>
#ifdef TI_AM335X
-# include <arm/omap/am335x_prcm.h>
+# include <arm/omap/am335x_prcm.h>
+# if NSDHC > 0
+# include <arm/omap/omap2_obiovar.h>
+# include <arm/omap/omap3_sdmmcreg.h>
+# endif
#endif
#ifdef CPU_CORTEXA9
@@ -480,6 +485,9 @@ initarm(void *arg)
OMAP_L4_PERIPHERAL_VBASE - OMAP_L4_PERIPHERAL_BASE;
arml2cc_init(&omap_bs_tag, pl310_bh, 0);
#endif
+#if defined(TI_AM335X)
+ am335x_cpu_clk(); // find our CPU speed.
+#endif
#if 1
beagle_putchar('h');
#endif
@@ -1019,6 +1027,11 @@ beagle_device_register(device_t self, vo
prop_dictionary_set_uint32(dict, "clkmask", 0);
prop_dictionary_set_bool(dict, "8bit", true);
#endif
+#if defined(TI_AM335X) && 0 // doesn't work
+ struct obio_attach_args * const obio = aux;
+ if (obio->obio_addr == SDMMC2_BASE_TIAM335X)
+ prop_dictionary_set_bool(dict, "8bit", true);
+#endif
return;
}