PERFORCE change 112151 for review

Bernd Walter ticso at FreeBSD.org
Tue Dec 26 17:20:17 PST 2006


http://perforce.freebsd.org/chv.cgi?CH=112151

Change 112151 by ticso at ticso on 2006/12/27 01:19:56

	read access require PDC to be setup first otherwise one might
	get overrun errors.
	write access however need cmd first, so keep the existing order
	for them.

Affected files ...

.. //depot/projects/arm/src/sys/arm/at91/at91_mci.c#28 edit

Differences ...

==== //depot/projects/arm/src/sys/arm/at91/at91_mci.c#28 (text+ko) ====

@@ -403,12 +403,14 @@
 	}
 //	printf("CMDR %x ARGR %x with data\n", cmdr, cmd->arg);
 	WR4(sc, MCI_ARGR, cmd->arg);
-	WR4(sc, MCI_CMDR, cmdr);
 	if (cmdr & MCI_CMDR_TRCMD_START) {
-		if (cmdr & MCI_CMDR_TRDIR)
+		if (cmdr & MCI_CMDR_TRDIR) {
 			WR4(sc, PDC_PTCR, PDC_PTCR_RXTEN);
-		else
+			WR4(sc, MCI_CMDR, cmdr);
+		} else {
+			WR4(sc, MCI_CMDR, cmdr);
 			WR4(sc, PDC_PTCR, PDC_PTCR_TXTEN);
+		}
 	}
 	WR4(sc, MCI_IER, MCI_SR_ERROR | ier);
 }
@@ -538,6 +540,7 @@
 //	printf("i 0x%x\n", sr);
 	cmd = sc->curcmd;
 	if (sr & MCI_SR_ERROR) {
+//		printf("MCI_SR_ERROR 0x%x\n", sr & MCI_SR_ERROR);
 		// Ignore CRC errors on CMD2 and ACMD47, per relevant standards
 		if ((sr & MCI_SR_RCRCE) && (cmd->opcode == MMC_SEND_OP_COND ||
 		    cmd->opcode == ACMD_SD_SEND_OP_COND))


More information about the p4-projects mailing list