Re: [PATCH 3/3] OMAP3: PM: Adding OMAP3630 support in smartreflex driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 ?

-- 
balbi
--
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

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux