ARM: tegra: dvfs: Add override property
Alex Frid [Sun, 21 Jul 2013 02:07:32 +0000 (19:07 -0700)]
Bug 1307369

Added "can override" property to dvfs structure. Skipped dvfs tables
with this property when evaluating available rail override range.

Change-Id: Iced4b7917c3d3edc1f7a5ce77009a854bc50a335
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/251662
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Tested-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

arch/arm/mach-tegra/dvfs.c
arch/arm/mach-tegra/dvfs.h

index ba1564f..730c0dc 100644 (file)
@@ -721,7 +721,7 @@ int __init tegra_enable_dvfs_on_clk(struct clk *c, struct dvfs *d)
         * safe levels when override limit is set)
         */
        if (i && c->ops && !c->ops->shared_bus_update &&
-           !(c->flags & PERIPH_ON_CBUS)) {
+           !(c->flags & PERIPH_ON_CBUS) && !d->can_override) {
                int mv = tegra_dvfs_predict_millivolts(c, d->freqs[i-1]);
                if (d->dvfs_rail->min_override_millivolts < mv)
                        d->dvfs_rail->min_override_millivolts = mv;
index 1730c5b..298fa9c 100644 (file)
@@ -131,6 +131,7 @@ struct dvfs {
        const int *dfll_millivolts;
        struct dvfs_rail *dvfs_rail;
        bool auto_dvfs;
+       bool can_override;
 
        /* Filled in by tegra_dvfs_init */
        int max_millivolts;