printf(": %s, revision %d.%d\n", acp->acp_product_name, (sc->sc_rev >> 4) & 0xf, sc->sc_rev & 0xf);
atw_cardbus_attach(struct device *parent, struct device *self, void *aux){	struct atw_cardbus_softc *csc = (void *)self;	struct atw_softc *sc = &csc->sc_atw;	struct cardbus_attach_args *ca = aux;	cardbus_devfunc_t ct = ca->ca_ct;	const struct atw_cardbus_product *acp;	bus_addr_t adr;	sc->sc_dmat = ca->ca_dmat;	csc->sc_ct = ct;	csc->sc_tag = ca->ca_tag;	acp = atw_cardbus_lookup(ca);	if (acp == NULL) {		printf("\n");		panic("atw_cardbus_attach: impossible");	}	/*	 * Power management hooks.	 */	sc->sc_enable = atw_cardbus_enable;	sc->sc_disable = atw_cardbus_disable;	sc->sc_power = atw_cardbus_power;	/* Get revision info. */	sc->sc_rev = PCI_REVISION(ca->ca_class);	printf(": %s, revision %d.%d\n", acp->acp_product_name,	    (sc->sc_rev >> 4) & 0xf, sc->sc_rev & 0xf);#if 0	printf(": signature %08x\n%s",	    cardbus_conf_read(ct->ct_cc, ct->ct_cf, csc->sc_tag, 0x80),	    sc->sc_dev.dv_xname);#endif	/*	 * Map the device.	 */	csc->sc_csr = CARDBUS_COMMAND_MASTER_ENABLE;	if (Cardbus_mapreg_map(ct, ATW_PCI_MMBA,	    CARDBUS_MAPREG_TYPE_MEM, 0, &sc->sc_st, &sc->sc_sh, &adr,	    &csc->sc_mapsize) == 0) {#if 0		printf(": atw_cardbus_attach mapped %d bytes mem space\n%s",		    csc->sc_mapsize, sc->sc_dev.dv_xname);#endif#if rbus#else		(*ct->ct_cf->cardbus_mem_open)(cc, 0, adr, adr+csc->sc_mapsize);#endif		csc->sc_cben = CARDBUS_MEM_ENABLE;		csc->sc_csr |= CARDBUS_COMMAND_MEM_ENABLE;		csc->sc_bar_reg = ATW_PCI_MMBA;		csc->sc_bar_val = adr | CARDBUS_MAPREG_TYPE_MEM;	} else if (Cardbus_mapreg_map(ct, ATW_PCI_IOBA,	    CARDBUS_MAPREG_TYPE_IO, 0, &sc->sc_st, &sc->sc_sh, &adr,	    &csc->sc_mapsize) == 0) {#if 0		printf(": atw_cardbus_attach mapped %d bytes I/O space\n%s",		    csc->sc_mapsize, sc->sc_dev.dv_xname);#endif#if rbus#else		(*ct->ct_cf->cardbus_io_open)(cc, 0, adr, adr+csc->sc_mapsize);#endif		csc->sc_cben = CARDBUS_IO_ENABLE;		csc->sc_csr |= CARDBUS_COMMAND_IO_ENABLE;		csc->sc_bar_reg = ATW_PCI_IOBA;		csc->sc_bar_val = adr | CARDBUS_MAPREG_TYPE_IO;	} else {		printf(": unable to map device registers\n");		return;	}	/*	 * Bring the chip out of powersave mode and initialize the	 * configuration registers.	 */	atw_cardbus_setup(csc);	/* Remember which interrupt line. */	csc->sc_intrline = ca->ca_intrline;	printf(": %s: irq %d\n", acp->acp_product_name, csc->sc_intrline);#if 0	/*	 * The CardBus cards will make it to store-and-forward mode as	 * soon as you put them under any kind of load, so just start	 * out there.	 */	sc->sc_txthresh = 3; /* TBD name constant */#endif	/*	 * Finish off the attach.	 */	atw_attach(sc);	ATW_WRITE(sc, ATW_FER, ATW_FER_INTR);	/*	 * Power down the socket.	 */	Cardbus_function_disable(csc->sc_ct);}