PERFORCE change 212338 for review
Brooks Davis
brooks at FreeBSD.org
Tue Jun 5 19:59:10 UTC 2012
http://p4web.freebsd.org/@@212338?ac=10
Change 212338 by brooks at brooks_ecr_current on 2012/06/05 19:58:39
Enable buffered writes after fixing an off by one error when
programming the buffer word count.
Affected files ...
.. //depot/projects/ctsrd/beribsd/src/sys/dev/isf/isf.c#7 edit
Differences ...
==== //depot/projects/ctsrd/beribsd/src/sys/dev/isf/isf.c#7 (text+ko) ====
@@ -120,6 +120,8 @@
#define ISF_SR_DWS (1 << 7) /* Device Write Status */
#define ISF_SR_FSC_MASK (ISF_SR_VPPS | ISF_SR_PS | ISF_SR_BLS)
+#define ISF_BUFFER_PROGRAM
+
MALLOC_DEFINE(M_ISF, "isf_data", "Intel StrateFlash driver");
static void isf_task(void *arg);
@@ -272,10 +274,9 @@
/* XXX: should have a timeout */
isf_write_cmd(sc, coff, ISF_CMD_BPS);
- isf_write_cmd(sc, coff, 32);
- //bus_write_region_2(sc->isf_res, coff, dp, 32);
- for (int i = 0; i < 32; i++)
- isf_write_cmd(sc, coff + i * 2, *(dp + 1));
+ /* When writing N blocks, send N-1 as the count */
+ isf_write_cmd(sc, coff, 31);
+ bus_write_region_2(sc->isf_res, coff, dp, 32);
isf_write_cmd(sc, coff, ISF_CMD_BPC);
More information about the p4-projects
mailing list