/* Calculates IICx_CLCKDIV value for a specific OPB clock frequency  */
static u8 iic_clckdiv(unsigned int opb)
/* Calculates IICx_CLCKDIV value for a specific OPB clock frequency  */
static u8 iic_clckdiv(unsigned int opb)
{
	if (!opb){
		printk(KERN_WARNING "ibm-iic: using compatibility value for OPB freq,"
			" fix your board specific setup\n");
		opb = 50000000;
	}
	opb /= 1000000;
	if (opb < 20 || opb > 150){
		printk(KERN_WARNING "ibm-iic: invalid OPB clock frequency %u MHz\n",
			opb);
		opb = opb < 20 ? 20 : 150;
	}
	return (u8)((opb + 9) / 10 - 1);
}