@@ -345,6 +345,7 @@ static void sr_stop_vddautocomp(int srid)
static int sr_late_init(struct omap_sr *sr_info)
{
char name[SMARTREFLEX_NAME_LEN];
+ struct omap_smartreflex_data *pdata = sr_info->pdev->dev.platform_data;
int ret = 0;
if (sr_class->class_type == SR_CLASS2 &&
@@ -358,6 +359,10 @@ static int sr_late_init(struct omap_sr *sr_info)
handler for SR%d. Smartreflex will \
not function as desired\n", sr_info->srid);
}
+
+ if (pdata->enable_on_init)
+ sr_start_vddautocomp(sr_info->srid);
+
return ret;
}
@@ -162,7 +162,21 @@ static int __init omap_devinit_smartreflex(void)
if (WARN_ON(!sr_data))
return -ENOMEM;
- sr_data->enable_on_init = false;
+ /*
+ * OMAP3430 ES3.1 chips by default come with Efuse burnt
+ * with parameters required for full functionality of
+ * smartreflex AVS feature like ntarget values , sennenable
+ * and senpenable. So enable the SR AVS feature during boot up
+ * itself if it is a OMAP3430 ES3.1 chip.
+ */
+ if (cpu_is_omap343x()) {
+ if (omap_rev() == OMAP3430_REV_ES3_1)
+ sr_data->enable_on_init = true;
+ else
+ sr_data->enable_on_init = false;
+ } else {
+ sr_data->enable_on_init = false;
+ }
sr_data->device_enable = omap_device_enable;
sr_data->device_shutdown = omap_device_shutdown;
sr_data->device_idle = omap_device_idle;