Untitled
public text v1 · immutableI came up with this for the 74 cycle delay:
samcop_write_register(samcop, SAMCOP_SDIPRE, sdi_psc);
/* wait for the prescribed time that the card requires to init */
if ((clock_rate / sdi_psc) > 1000000UL)
ndelay(sdi_psc * 1000000000UL / clock_rate * SAMCOP_CARD_INIT_CYCLES);
else
udelay(sdi_psc * 1000000UL / clock_rate * SAMCOP_CARD_INIT_CYCLES);