EDP: tegra: remove loan from tegra_sysedp_corecap
Sivaram Nair [Wed, 24 Apr 2013 08:33:11 +0000 (11:33 +0300)]
loan is exclusively used for the CPU power right now - no need to
include it in the tables. This reduces the table length.

Bug 1264825

Change-Id: I6c563d0b02e11cd72a40bc6f645b29fe816274d9
Signed-off-by: Sivaram Nair <sivaramn@nvidia.com>
Reviewed-on: http://git-master/r/222569
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>

drivers/edp/tegra_edp.c
include/linux/platform_data/tegra_edp.h

index 4849dc7..14f3c20 100644 (file)
@@ -177,11 +177,12 @@ static void update_cur_corecap(void)
                return;
 
        power = core_edp_states[core_state] * gain_factor / 100;
+       power += core_loan;
        i = core_platdata->corecap_size - 1;
        cap = core_platdata->corecap + i;
 
        for (; i >= 0; i--, cap--) {
-               if (cap->power <= power && cap->loan <= core_loan) {
+               if (cap->power <= power) {
                        cur_corecap = cap;
                        return;
                }
index 84fb5ad..9af311c 100644 (file)
@@ -34,7 +34,6 @@ struct tegra_sysedp_devcap {
 
 struct tegra_sysedp_corecap {
        unsigned int power;
-       unsigned int loan;
        struct tegra_sysedp_devcap cpupri;
        struct tegra_sysedp_devcap gpupri;
 };