/* As a reference, see the "Firmware Specification v5.1", page 18 and 19. I did not follow their suggested timing to the word, but this works nice & fast anyway.  */
static int if_cs_poll_while_fw_download(struct if_cs_card *card, uint addr, u8 reg)
/* As a reference, see the "Firmware Specification v5.1", page 18 and 19. I did not follow their suggested timing to the word, but this works nice & fast anyway.  */
static int if_cs_poll_while_fw_download(struct if_cs_card *card, uint addr, u8 reg)
{
	int i;
	for (i = 0; i < 100000; i++) {
		u8 val = if_cs_read8(card, addr);
		if (val == reg)
			return 0;
		udelay(5);
	}
	return -ETIME;
}