/* Local Divide function. 
This function does the divide */
static int chipcHw_divide(int num, int denom)
/* Local Divide function. 
This function does the divide */
static int chipcHw_divide(int num, int denom)
{
	int r;
	int t = 1;
	while ((denom & 0x40000000) == 0) {
		denom = denom << 1;
		t = t << 1;
	}
	r = 0;
	do {
		if ((num - denom) >= 0) {
			num = num - denom;
			r = r + t;
		}
		denom = denom >> 1;
		t = t >> 1;
	} while (t != 0);
	return r;
}