Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbarm/beagle Add code to make eMMC 8-bit (disabled...



details:   https://anonhg.NetBSD.org/src/rev/f5fe1706934a
branches:  trunk
changeset: 787667:f5fe1706934a
user:      matt <matt%NetBSD.org@localhost>
date:      Fri Jun 28 00:53:04 2013 +0000

description:
Add code to make eMMC 8-bit (disabled) since it still needs code in omap3_sdhc
to actually enable 8-bit mode.

diffstat:

 sys/arch/evbarm/beagle/beagle_machdep.c |  19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diffs (61 lines):

diff -r 4541f18be456 -r f5fe1706934a sys/arch/evbarm/beagle/beagle_machdep.c
--- a/sys/arch/evbarm/beagle/beagle_machdep.c   Fri Jun 28 00:52:02 2013 +0000
+++ b/sys/arch/evbarm/beagle/beagle_machdep.c   Fri Jun 28 00:53:04 2013 +0000
@@ -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 @@
 #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 @@
 #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 @@
            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 @@
                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;
        }
 



Home | Main Index | Thread Index | Old Index