IPW_DEBUG_ERROR("%s: Error initializing Symbol\n", 
printk(KERN_ERR DRV_NAME ": %s: Error initializing Symbol\n", 
int ipw2100_ucode_download(struct ipw2100_priv *priv, struct ipw2100_fw *fw){	struct net_device *dev = priv->net_dev;	const unsigned char *microcode_data = fw->uc.data;	unsigned int microcode_data_left = fw->uc.size;	struct symbol_alive_response response;	int i, j;	u8 data;	/* Symbol control */	write_nic_word(dev, IPW2100_CONTROL_REG, 0x703);	readl((void *)(dev->base_addr));	write_nic_word(dev, IPW2100_CONTROL_REG, 0x707);	readl((void *)(dev->base_addr));	/* HW config */	write_nic_byte(dev, 0x210014, 0x72);	/* fifo width =16 */	readl((void *)(dev->base_addr));	write_nic_byte(dev, 0x210014, 0x72);	/* fifo width =16 */	readl((void *)(dev->base_addr));	/* EN_CS_ACCESS bit to reset control store pointer */	write_nic_byte(dev, 0x210000, 0x40);	readl((void *)(dev->base_addr));	write_nic_byte(dev, 0x210000, 0x0);	readl((void *)(dev->base_addr));	write_nic_byte(dev, 0x210000, 0x40);	readl((void *)(dev->base_addr));	/* copy microcode from buffer into Symbol */	while (microcode_data_left > 0) {		write_nic_byte(dev, 0x210010, *microcode_data++);		write_nic_byte(dev, 0x210010, *microcode_data++);		microcode_data_left -= 2;	}	/* EN_CS_ACCESS bit to reset the control store pointer */	write_nic_byte(dev, 0x210000, 0x0);	readl((void *)(dev->base_addr));	/* Enable System (Reg 0)	 * first enable causes garbage in RX FIFO */	write_nic_byte(dev, 0x210000, 0x0);	readl((void *)(dev->base_addr));	write_nic_byte(dev, 0x210000, 0x80);	readl((void *)(dev->base_addr));	/* Reset External Baseband Reg */	write_nic_word(dev, IPW2100_CONTROL_REG, 0x703);	readl((void *)(dev->base_addr));	write_nic_word(dev, IPW2100_CONTROL_REG, 0x707);	readl((void *)(dev->base_addr));	/* HW Config (Reg 5) */	write_nic_byte(dev, 0x210014, 0x72);	// fifo width =16	readl((void *)(dev->base_addr));	write_nic_byte(dev, 0x210014, 0x72);	// fifo width =16	readl((void *)(dev->base_addr));	/* Enable System (Reg 0)	 * second enable should be OK */	write_nic_byte(dev, 0x210000, 0x00);	// clear enable system	readl((void *)(dev->base_addr));	write_nic_byte(dev, 0x210000, 0x80);	// set enable system	/* check Symbol is enabled - upped this from 5 as it wasn't always	 * catching the update */	for (i = 0; i < 10; i++) {		udelay(10);		/* check Dino is enabled bit */		read_nic_byte(dev, 0x210000, &data);		if (data & 0x1)			break;	}	if (i == 10) {		IPW_DEBUG_ERROR("%s: Error initializing Symbol\n",		       dev->name);		return -EIO;	}	/* Get Symbol alive response */	for (i = 0; i < 30; i++) {		/* Read alive response structure */		for (j = 0;		     j < (sizeof(struct symbol_alive_response) >> 1);		     j++)			read_nic_word(dev, 0x210004,				      ((u16 *)&response) + j);		if ((response.cmd_id == 1) &&		    (response.ucode_valid == 0x1))			break;		udelay(10);	}	if (i == 30) {		IPW_DEBUG_ERROR("%s: No response from Symbol - hw not alive\n",		       dev->name);		printk_buf(IPW_DL_ERROR, (u8*)&response, sizeof(response));		return -EIO;	}	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/797b4f7652a4dcf06bdf6a8c870991acdf56c03d/ipw2100.c/clean/drivers/net/wireless/ipw2100.c