Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jun 2015 11:39:18 GMT
From:      pratiksinghal@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r287322 - soc2015/pratiksinghal/cubie-head/sys/arm/allwinner
Message-ID:  <201506191139.t5JBdIXk081464@socsvn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pratiksinghal
Date: Fri Jun 19 11:39:18 2015
New Revision: 287322
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287322

Log:
  Added the sync call before start of transfer

Modified:
  soc2015/pratiksinghal/cubie-head/sys/arm/allwinner/a10_mmc.c

Modified: soc2015/pratiksinghal/cubie-head/sys/arm/allwinner/a10_mmc.c
==============================================================================
--- soc2015/pratiksinghal/cubie-head/sys/arm/allwinner/a10_mmc.c	Fri Jun 19 09:37:37 2015	(r287321)
+++ soc2015/pratiksinghal/cubie-head/sys/arm/allwinner/a10_mmc.c	Fri Jun 19 11:39:18 2015	(r287322)
@@ -350,6 +350,11 @@
 		return EIO ;
 	}
 
+	if (sc->a10_dma_ops == 0)
+		bus_dmamap_sync(sc->a10_dma_buff_tag, sc->a10_dma_buff_map, BUS_DMASYNC_PREREAD) ; 
+	else if(sc->a10_dma_ops == 1)
+		bus_dmamap_sync(sc->a10_dma_buff_tag, sc->a10_dma_buff_map, BUS_DMASYNC_PREWRITE) ; 
+		
 	bus_dmamap_sync(sc->a10_dma_tag, sc->a10_dma_map, BUS_DMASYNC_PREWRITE) ;
 
 	val = A10_MMC_READ_4(sc, A10_MMC_GCTRL) ;
@@ -702,6 +707,12 @@
 		}
 
 	}
+	else
+	{
+		uint32_t temp_val = A10_MMC_READ_4(sc, A10_MMC_GCTRL) | A10_MMC_INT_ENABLE | A10_MMC_ACCESS_BY_AHB ; 
+		temp_val = temp_val & (~A10_MMC_DMA_ENABLE) ; 
+		A10_MMC_WRITE_4(sc, A10_MMC_GCTRL, temp_val) ; 
+	}
 
 	A10_MMC_WRITE_4(sc, A10_MMC_CARG, cmd->arg);
 	A10_MMC_WRITE_4(sc, A10_MMC_CMDR, cmdreg | cmd->opcode);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506191139.t5JBdIXk081464>