 /* * Test for card presence */ if (inb(host->base + WBSD_CSR) & WBSD_CARDPRESENT) host->flags |= WBSD_FCARD_PRESENT; else host->flags &= ~WBSD_FCARD_PRESENT; 
static void wbsd_init_device(struct wbsd_host* host){	u8 setup, ier;		/*	 * Reset chip (SD/MMC part) and fifo.	 */	setup = wbsd_read_index(host, WBSD_IDX_SETUP);	setup |= WBSD_FIFO_RESET | WBSD_SOFT_RESET;	wbsd_write_index(host, WBSD_IDX_SETUP, setup);		/*	 * Read back default clock.	 */	host->clk = wbsd_read_index(host, WBSD_IDX_CLK);	/*	 * Power down port.	 */	outb(WBSD_POWER_N, host->base + WBSD_CSR);		/*	 * Set maximum timeout.	 */	wbsd_write_index(host, WBSD_IDX_TAAC, 0x7F);		/*	 * Enable interesting interrupts.	 */	ier = 0;	ier |= WBSD_EINT_CARD;	ier |= WBSD_EINT_FIFO_THRE;	ier |= WBSD_EINT_CCRC;	ier |= WBSD_EINT_TIMEOUT;	ier |= WBSD_EINT_CRC;	ier |= WBSD_EINT_TC;	outb(ier, host->base + WBSD_EIR);	/*	 * Clear interrupts.	 */	inb(host->base + WBSD_ISR);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/85bcc13072c54592596c5b41d40d1c6a18b04e19/wbsd.c/clean/drivers/mmc/wbsd.c