PERFORCE change 107233 for review

Warner Losh imp at FreeBSD.org
Tue Oct 3 18:28:59 PDT 2006


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

Change 107233 by imp at imp_lighthouse on 2006/10/04 01:28:10

	Be chatty about setting bus width, for the moment
	max freq 30MHz (doubles freq)

Affected files ...

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

Differences ...

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

@@ -195,7 +195,7 @@
 		goto out;
 	}
 	sc->host.f_min = 375000;
-	sc->host.f_max = 25000000;
+	sc->host.f_max = 30000000;
 	sc->host.host_ocr = MMC_OCR_320_330 | MMC_OCR_330_340;
 	sc->host.caps = MMC_CAP_4_BIT_DATA;
 	child = device_add_child(dev, "mmc", 0);
@@ -290,10 +290,13 @@
 		else
 			clkdiv = (at91_master_clock / ios->clock) / 2;
 	}
-	if (ios->bus_width == bus_width_4 && sc->wire4)
+	if (ios->bus_width == bus_width_4 && sc->wire4) {
+		device_printf(sc->dev, "Setting controller bus width to 4\n");
 		WR4(sc, MCI_SDCR, RD4(sc, MCI_SDCR) | MCI_SDCR_SDCBUS);
-	else
+	} else {
+		device_printf(sc->dev, "Setting controller bus width to 1\n");
 		WR4(sc, MCI_SDCR, RD4(sc, MCI_SDCR) & ~MCI_SDCR_SDCBUS);
+	}
 	WR4(sc, MCI_MR, (RD4(sc, MCI_MR) & ~MCI_MR_CLKDIV) | clkdiv);
 #if 0
 	if (sc->vcc_pin) {


More information about the p4-projects mailing list