>>-----Original Message----- >>From: Felipe Balbi [mailto:me@xxxxxxxxxxxxxxx] >>Sent: Monday, March 08, 2010 11:49 PM >>To: Gopinath, Thara >>Cc: linux-omap@xxxxxxxxxxxxxxx; khilman@xxxxxxxxxxxxxxxxxxx; paul@xxxxxxxxx; Menon, Nishanth; >>Sripathy, Vishwanath; Sawant, Anand; Cousson, Benoit >>Subject: Re: [PATCH 3/3] OMAP3: PM: Adding OMAP3630 support in smartreflex driver >> >>hi, >> >>On Mon, Mar 08, 2010 at 10:50:51PM +0530, Thara Gopinath wrote: >>> @@ -289,32 +311,66 @@ static void __init vp_reg_configure(int vp_id) >>> >>> vp_reg[vp_id].vp_offs = omap3_vp_offs[vp_id]; >>> if (vp_id == VP1) { >>> - /* >>> - * OMAP3430 has error gain varying btw higher and >>> - * lower opp's >>> - */ >>> - vp_reg[vp_id].vp_errorgain = (((get_vdd1_opp() > 2) ? >>> - (OMAP3_VP_CONFIG_ERRORGAIN_HIGHOPP) : >>> - (OMAP3_VP_CONFIG_ERRORGAIN_LOWOPP)) << >>> + u8 vlimitto_vddmin, vlimitto_vddmax; >>> + >>> + if (cpu_is_omap3630()) { >>> + vlimitto_vddmin = OMAP3630_VP1_VLIMITTO_VDDMIN; >>> + vlimitto_vddmax = OMAP3630_VP1_VLIMITTO_VDDMAX; >>> + /* >>> + * OMAP3630 has error gain varying btw >>> + * all opp's >>> + */ >>> + vp_reg[vp_id].vp_errorgain = >>> + (omap_errorgain[get_vdd1_opp() - 1] << >>> + OMAP3430_ERRORGAIN_SHIFT); >> >>this error gain hunk repeats itself over and over again. How about >>adding an inline function for handling that ? Also, why not using >>SR version you added instead of cpu_is_xxx() check ? Hello Felipe I could try adding a separate inline function. But I cannot use SR version to check this. This is because the error gain values vary between OMAP3430 OMAP3630 and OMAP4 and is independent of the smartreflex ip in use. Regards Thara -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html