Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/omap Support ADMA2 on OMAP4430.



details:   https://anonhg.NetBSD.org/src/rev/e723b1d0992f
branches:  trunk
changeset: 348111:e723b1d0992f
user:      kiyohara <kiyohara%NetBSD.org@localhost>
date:      Tue Oct 04 15:51:34 2016 +0000

description:
Support ADMA2 on OMAP4430.
 Tested on Gumstix DuoVero.

diffstat:

 sys/arch/arm/omap/omap3_sdhc.c |  13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diffs (41 lines):

diff -r 5cc505b24750 -r e723b1d0992f sys/arch/arm/omap/omap3_sdhc.c
--- a/sys/arch/arm/omap/omap3_sdhc.c    Tue Oct 04 15:47:53 2016 +0000
+++ b/sys/arch/arm/omap/omap3_sdhc.c    Tue Oct 04 15:51:34 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: omap3_sdhc.c,v 1.24 2016/08/15 13:02:07 mlelstv Exp $  */
+/*     $NetBSD: omap3_sdhc.c,v 1.25 2016/10/04 15:51:34 kiyohara 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.24 2016/08/15 13:02:07 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap3_sdhc.c,v 1.25 2016/10/04 15:51:34 kiyohara Exp $");
 
 #include "opt_omap.h"
 #include "edma.h"
@@ -259,8 +259,8 @@
         */
        sc->sc.sc_flags |= SDHC_FLAG_NO_HS_BIT;
 
-//     sc->sc.sc_flags |= SDHC_FLAG_USE_DMA;
-//     sc->sc.sc_flags |= SDHC_FLAG_USE_ADMA2;
+       sc->sc.sc_flags |= SDHC_FLAG_USE_DMA;
+       sc->sc.sc_flags |= SDHC_FLAG_USE_ADMA2;
 #endif
        sc->sc.sc_host = sc->sc_hosts;
        sc->sc.sc_clkbase = 96000;      /* 96MHZ */
@@ -480,6 +480,11 @@
        SDHC_WRITE(sc, SDHC_CLOCK_CTL,
            SDHC_READ(sc, SDHC_CLOCK_CTL) | SDHC_SDCLK_ENABLE);
 
+       if (sc->sc.sc_flags & SDHC_FLAG_USE_ADMA2)
+               bus_space_write_4(sc->sc_bst, sc->sc_bsh, MMCHS_CON,
+                   bus_space_read_4(sc->sc_bst, sc->sc_bsh, MMCHS_CON) |
+                   CON_MNS);
+
        return;
 
 fail:



Home | Main Index | Thread Index | Old Index