Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jun 2015 09:55:38 GMT
From:      pratiksinghal@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r287228 - soc2015/pratiksinghal/cubie-head/sys/arm/allwinner
Message-ID:  <201506170955.t5H9tcm8034818@socsvn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) ;



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