 /* * This behaviour is stolen from the * Windows driver. Don't know why, but * it is needed. */ setup = wbsd_read_index(host, WBSD_IDX_SETUP); if (ios->bus_mode == MMC_BUSMODE_OPENDRAIN) setup |= WBSD_DAT3_H; else setup &= ~WBSD_DAT3_H; wbsd_write_index(host, WBSD_IDX_SETUP, setup);  mdelay(1); 
static void wbsd_set_ios(struct mmc_host* mmc, struct mmc_ios* ios){	struct wbsd_host* host = mmc_priv(mmc);	u8 clk, setup, pwr;		DBGF("clock %uHz busmode %u powermode %u Vdd %u\n",		ios->clock, ios->bus_mode, ios->power_mode, ios->vdd);	spin_lock_bh(&host->lock);	/*	 * Reset the chip on each power off.	 * Should clear out any weird states.	 */	if (ios->power_mode == MMC_POWER_OFF)		wbsd_init_device(host);		if (ios->clock >= 24000000)		clk = WBSD_CLK_24M;	else if (ios->clock >= 16000000)		clk = WBSD_CLK_16M;	else if (ios->clock >= 12000000)		clk = WBSD_CLK_12M;	else		clk = WBSD_CLK_375K;	/*	 * Only write to the clock register when	 * there is an actual change.	 */	if (clk != host->clk)	{		wbsd_write_index(host, WBSD_IDX_CLK, clk);		host->clk = clk;	}	if (ios->power_mode != MMC_POWER_OFF)	{		/*		 * Power up card.		 */		pwr = inb(host->base + WBSD_CSR);		pwr &= ~WBSD_POWER_N;		outb(pwr, host->base + WBSD_CSR);		/*		 * This behaviour is stolen from the		 * Windows driver. Don't know why, but		 * it is needed.		 */		setup = wbsd_read_index(host, WBSD_IDX_SETUP);		if (ios->bus_mode == MMC_BUSMODE_OPENDRAIN)			setup |= WBSD_DAT3_H;		else			setup &= ~WBSD_DAT3_H;		wbsd_write_index(host, WBSD_IDX_SETUP, setup);		mdelay(1);	}	spin_unlock_bh(&host->lock);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/85bcc13072c54592596c5b41d40d1c6a18b04e19/wbsd.c/clean/drivers/mmc/wbsd.c