/* This procedure will find the highest period which will give a timeout greater than the one required. e.g. for a bus speed of 66666666 and and a parameter of 2 secs, then this procedure will return a value of 38.  */
static unsigned int sec_to_period(unsigned int secs)
/* This procedure will find the highest period which will give a timeout greater than the one required. e.g. for a bus speed of 66666666 and and a parameter of 2 secs, then this procedure will return a value of 38.  */
static unsigned int sec_to_period(unsigned int secs)
{
	unsigned int period;
	for (period = 63; period > 0; period--) {
		if (period_to_sec(period) >= secs)
			return period;
	}
	return 0;
}