FreeBSD/sys/dev/ed/if_ed_pccard.c
/*
 * Special setup for AX88[17]90
 */
Special setup for AX88[17]90
Special setup for AX88 [ 17 ] 90
static int
ed_pccard_ax88x90(device_t dev, const struct ed_product *pp)
{
	int	error;
	int iobase;
	struct	ed_softc *sc = device_get_softc(dev);
	if (!(pp->flags & NE2000DVF_AX88X90))
		return (ENXIO);
	if (bootverbose)
		device_printf(dev, "Checking AX88x90\n");
	iobase = rman_get_start(sc->port_res);
	pccard_ccr_write_1(dev, PCCARD_CCR_IOBASE0, iobase & 0xff);
	pccard_ccr_write_1(dev, PCCARD_CCR_IOBASE1, (iobase >> 8) & 0xff);
	error = ed_probe_ax88x90_generic(dev, device_get_flags(dev));
	if (error) {
		if (bootverbose)
			device_printf(dev, "probe ax88x90 failed %d\n",
			    error);
		return (error);
	}
	sc->mii_bitbang_ops = &ed_pccard_ax88x90_mii_bitbang_ops;
	error = ed_pccard_ax88x90_check_mii(dev, sc);
	if (error)
		return (error);
	sc->vendor = ED_VENDOR_NOVELL;
	sc->type = ED_TYPE_NE2000;
	if (sc->chip_type == ED_CHIP_TYPE_AX88190)
		sc->type_str = "AX88190";
	else
		sc->type_str = "AX88790";
	return (0);
}
static int ed_pccard_ax88x90 ( device_t dev , const struct ed_product * pp ) { int error ; int iobase ; struct ed_softc * sc = device_get_softc ( dev ) ; if ( ! ( pp -> flags & NE2000DVF_AX88X90 ) ) return ( ENXIO ) ; if ( bootverbose ) device_printf ( dev , " \n " ) ; iobase = rman_get_start ( sc -> port_res ) ; pccard_ccr_write_1 ( dev , PCCARD_CCR_IOBASE0 , iobase & 0xff ) ; pccard_ccr_write_1 ( dev , PCCARD_CCR_IOBASE1 , ( iobase >> 8 ) & 0xff ) ; error = ed_probe_ax88x90_generic ( dev , device_get_flags ( dev ) ) ; if ( error ) { if ( bootverbose ) device_printf ( dev , " \n " , error ) ; return ( error ) ; } sc -> mii_bitbang_ops = & ed_pccard_ax88x90_mii_bitbang_ops ; error = ed_pccard_ax88x90_check_mii ( dev , sc ) ; if ( error ) return ( error ) ; sc -> vendor = ED_VENDOR_NOVELL ; sc -> type = ED_TYPE_NE2000 ; if ( sc -> chip_type == ED_CHIP_TYPE_AX88190 ) sc -> type_str = " " ; else sc -> type_str = " " ; return ( 0 ) ; }
Special setup for AX88[17]90
Special setup for AX88 [ 17 ] 90
/*
	 * Set the IOBASE Register.  The AX88x90 cards are potentially
	 * multifunction cards, and thus requires a slight workaround.
	 * We write the address the card is at, on the off chance that this
	 * card is not MFC.
	 * XXX I'm not sure that this is still needed...
	 */