svn commit: r188041 - projects/cambria/sys/dev/cfi
Sam Leffler
sam at FreeBSD.org
Mon Feb 2 18:51:57 PST 2009
Author: sam
Date: Tue Feb 3 02:51:57 2009
New Revision: 188041
URL: http://svn.freebsd.org/changeset/base/188041
Log:
o don't set the CS0 timing register, the boot code should do this for us
as it maps the flash for it's own purpose
o leave a debug printf under bootverbose for debugging
Modified:
projects/cambria/sys/dev/cfi/cfi_bus_ixp4xx.c
Modified: projects/cambria/sys/dev/cfi/cfi_bus_ixp4xx.c
==============================================================================
--- projects/cambria/sys/dev/cfi/cfi_bus_ixp4xx.c Tue Feb 3 01:17:34 2009 (r188040)
+++ projects/cambria/sys/dev/cfi/cfi_bus_ixp4xx.c Tue Feb 3 02:51:57 2009 (r188041)
@@ -46,27 +46,20 @@ __FBSDID("$FreeBSD$");
static int
cfi_ixp4xx_probe(device_t dev)
{
-#define EXP_TIMING_PRESERVE \
- (EXP_TIMING_RSVD | EXP_TIMING_MASK)
- struct ixp425_softc *sa = device_get_softc(device_get_parent(dev));
struct cfi_softc *sc = device_get_softc(dev);
-
- /* setup CS0 per Intel AP-785 */
- EXP_BUS_WRITE_4(sa, EXP_TIMING_CS0_OFFSET,
- (EXP_BUS_READ_4(sa, EXP_TIMING_CS0_OFFSET) & EXP_TIMING_PRESERVE)
- | EXP_CS_EN
- | EXP_SZ_16M
- | EXP_WR_EN
- | EXP_BYTE_RD16
- | IXP425_EXP_ADDR_T(1)
- | IXP425_EXP_SETUP_T(1)
- | IXP425_EXP_STROBE_T(4)
- | IXP425_EXP_HOLD_T(1)
- | IXP425_EXP_RECOVERY_T(1));
-
+ /*
+ * NB: we assume the boot loader sets up EXP_TIMING_CS0_OFFSET
+ * according to the flash on the board. If it does not then it
+ * can be done here.
+ */
+ if (bootverbose) {
+ struct ixp425_softc *sa =
+ device_get_softc(device_get_parent(dev));
+ device_printf(dev, "EXP_TIMING_CS0_OFFSET 0x%x\n",
+ EXP_BUS_READ_4(sa, EXP_TIMING_CS0_OFFSET));
+ }
sc->sc_width = 2; /* NB: don't probe interface width */
return cfi_probe(dev);
-#undef EXP_TIMING_PRESERVE
}
static device_method_t cfi_ixp4xx_methods[] = {
More information about the svn-src-projects
mailing list