socsvn commit: r287228 - soc2015/pratiksinghal/cubie-head/sys/arm/allwinner

pratiksinghal at FreeBSD.org pratiksinghal at FreeBSD.org
Wed Jun 17 12:51:38 UTC 2015


Author: pratiksinghal
Date: Wed Jun 17 09:55:38 2015
New Revision: 287228
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287228

Log:
  Removed the geom panic message by correcting the buffer address, DMA working completely now

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	Wed Jun 17 07:43:20 2015	(r287227)
+++ soc2015/pratiksinghal/cubie-head/sys/arm/allwinner/a10_mmc.c	Wed Jun 17 09:55:38 2015	(r287228)
@@ -304,11 +304,10 @@
 	int desc, rem ;
 	uint32_t val;
 	desc = 0 ;
-	bus_addr_t paddr = sc->a10_dma_buff_addr ;
 	//bus_size_t len = (sc->a10_dma_cb_arg).segs[0].ds_len ;
 	bus_size_t len = A10_MMC_DMA_MAXLEN ;
 	rem = min(len,cmd->data->len) ;
-
+	device_printf(sc->a10_dev, "%d bytes to be transferred\n", rem) ; 
 	uint32_t error = bus_dmamap_load(sc->a10_dma_buff_tag, sc->a10_dma_buff_map,
 					cmd->data->data,rem,a10_dma_buff_cb,
 					&sc->a10_dma_buff_addr,BUS_DMA_NOWAIT) ;
@@ -317,6 +316,7 @@
 		return EIO  ;
 	}
 
+	bus_addr_t paddr = sc->a10_dma_buff_addr ;
 	/* Program all the descriptors in this segment. */
 	while(rem > 0)
 	{
@@ -399,7 +399,7 @@
 static int
 a10_mmc_can_do_dma(struct mmc_request* req)
 {
-	if(req->cmd->data->len > A10_MMC_DMA_MAXLEN)
+	if(req->cmd->data->len >= A10_MMC_DMA_MAXLEN) 
 		return (0) ;
 	else
 		return (1) ;


More information about the svn-soc-all mailing list