Date: Fri, 10 Nov 2006 18:50:47 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 109695 for review Message-ID: <200611101850.kAAIol3a090170@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=109695 Change 109695 by sam@sam_ebb on 2006/11/10 18:50:41 o setup all direct-mapped registers (was only doing up to command but everything up to status is there) o don't call ata_default_registers; it clobbers register mappings; not sure if we'll need to manually fixup IREASON and ALTSTAT Affected files ... .. //depot/projects/arm/src/sys/arm/xscale/ixp425/avila_ata.c#4 edit Differences ... ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/avila_ata.c#4 (text+ko) ==== @@ -281,8 +281,13 @@ { struct ata_avila_softc *sc = t; -printf("%s(%lx, %ld)\n", __func__, h, o); +#if 0 return bus_space_read_1(sc->sc_iot, h, o); +#else +uint8_t v = bus_space_read_1(sc->sc_iot, h, o); +printf("%s(%lx, %ld) => 0x%x\n", __func__, h, o, v); +return v; +#endif } void @@ -413,16 +418,17 @@ struct ata_channel *ch = device_get_softc(dev); int i; - for (i = ATA_DATA; i <= ATA_COMMAND; i++) { + /* registers up to ATA_STATUS map directly */ + for (i = ATA_DATA; i <= ATA_STATUS; i++) { ch->r_io[i].res = &sc->sc_ata; ch->r_io[i].offset = i; } + /* the control register is special */ ch->r_io[ATA_CONTROL].res = &sc->sc_ata; ch->r_io[ATA_CONTROL].offset = AVILA_IDE_CTRL; /* NB: by convention this points at the base of registers */ ch->r_io[ATA_IDX_ADDR].res = &sc->sc_ata; ch->r_io[ATA_IDX_ADDR].offset = 0; - ata_default_registers(dev); ata_generic_hw(dev); return ata_attach(dev);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611101850.kAAIol3a090170>