/* Calculate the divisor for a specified FACC1 field  */
static unsigned int clock_mss_divisor(unsigned int r, unsigned int s)
/* Calculate the divisor for a specified FACC1 field  */
static unsigned int clock_mss_divisor(unsigned int r, unsigned int s)
{
	unsigned int v, ret;
	v = (r & (0x7<<s)) >> s;
	switch (v) {
	case 0: ret = 1; break;
	case 1: ret = 2; break;
	case 2: ret = 4; break;
	case 4: ret = 8; break;
	case 5: ret = 16; break;
	case 6: ret = 32; break;
	default: ret = 1; break;
	}
	return ret;
}