]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
arm: tegra: tn8: remove old system edp
authorTimo Alho <talho@nvidia.com>
Fri, 25 Oct 2013 21:07:37 +0000 (00:07 +0300)
committerJuha Tukkinen <jtukkinen@nvidia.com>
Mon, 28 Oct 2013 14:52:19 +0000 (07:52 -0700)
This patch removes tn8 system edp initialization calls as tn8 is
migrated to revised framework.

Change-Id: Iac65ecab3f2e14b0ddf333bd531e89afc760a780
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: http://git-master/r/304008
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
arch/arm/mach-tegra/board-ardbeg.c
arch/arm/mach-tegra/board-ardbeg.h
arch/arm/mach-tegra/board-tn8-power.c

index 0c1280a1ab43618311db3a8d768a6f1e2b3b9e58..92fe38b39d3236a1deeb6d41d8dac1d2c5e64f7a 100644 (file)
@@ -1033,9 +1033,7 @@ static void __init ardbeg_sysedp_init(void)
        switch (bi.board_id) {
        case BOARD_E1780:
                if (bi.sku == 1100) {
-                       tn8_sysedp_init();
-                       if (!IS_ENABLED(CONFIG_SYSEDP_FRAMEWORK))
-                               tn8_new_sysedp_init();
+                       tn8_new_sysedp_init();
                }
                break;
        case BOARD_PM358:
@@ -1045,24 +1043,6 @@ static void __init ardbeg_sysedp_init(void)
        }
 }
 
-static void __init sysedp_core_init(void)
-{
-       struct board_info bi;
-
-       tegra_get_board_info(&bi);
-
-       switch (bi.board_id) {
-       case BOARD_E1780:
-               if (bi.sku == 1100)
-                       tn8_sysedp_core_init();
-               break;
-       case BOARD_PM358:
-       case BOARD_PM359:
-       default:
-               break;
-       }
-}
-
 static void __init ardbeg_sysedp_dynamic_capping_init(void)
 {
        struct board_info bi;
@@ -1081,25 +1061,6 @@ static void __init ardbeg_sysedp_dynamic_capping_init(void)
        }
 }
 
-
-static void __init sysedp_psydepl_init(void)
-{
-       struct board_info bi;
-
-       tegra_get_board_info(&bi);
-
-       switch (bi.board_id) {
-       case BOARD_E1780:
-               if (bi.sku == 1100)
-                       tn8_sysedp_psydepl_init();
-               break;
-       case BOARD_PM358:
-       case BOARD_PM359:
-       default:
-               break;
-       }
-}
-
 static void __init ardbeg_sysedp_batmon_init(void)
 {
        struct board_info bi;
@@ -1257,9 +1218,6 @@ static void __init tegra_ardbeg_late_init(void)
        ardbeg_setup_bluedroid_pm();
        tegra_register_fuse();
 
-       sysedp_core_init();
-       sysedp_psydepl_init();
-
        ardbeg_sysedp_dynamic_capping_init();
        ardbeg_sysedp_batmon_init();
 }
index 200c1f076d2985a5d4ba607f9a1238c95570a4f1..2cb8d06b6821a617a1848f9f3bafd1ca50d87867 100644 (file)
@@ -163,10 +163,6 @@ int laguna_edp_init(void);
 int tn8_regulator_init(void);
 int tn8_fixed_regulator_init(void);
 int tn8_edp_init(void);
-void tn8_sysedp_init(void);
-void tn8_sysedp_psydepl_init(void);
-void tn8_sysedp_core_init(void);
-
 void tn8_new_sysedp_init(void);
 void tn8_sysedp_dynamic_capping_init(void);
 void tn8_sysedp_batmon_init(void);
index 1a11cce11e32adb3c50c3ff025d302a49ea17126..6627e36def764866e94da0461a6cfbf1360eec20 100644 (file)
@@ -146,177 +146,3 @@ int __init tn8_edp_init(void)
 
        return 0;
 }
-static struct edp_manager tn8_sysedp_manager = {
-       .name = "battery",
-       .max = 19000  /*TODO*/
-};
-
-void __init tn8_sysedp_init(void)
-{
-       struct edp_governor *g;
-       int r;
-
-       if (!IS_ENABLED(CONFIG_EDP_FRAMEWORK))
-               return;
-
-       if (get_power_supply_type() != POWER_SUPPLY_TYPE_BATTERY)
-               tn8_sysedp_manager.max = INT_MAX;
-
-       r = edp_register_manager(&tn8_sysedp_manager);
-       WARN_ON(r);
-       if (r)
-               return;
-
-       /* start with priority governor */
-       g = edp_get_governor("priority");
-       WARN_ON(!g);
-       if (!g)
-               return;
-
-       r = edp_set_governor(&tn8_sysedp_manager, g);
-       WARN_ON(r);
-}
-
-static unsigned int tn8_psydepl_states[] = {
-       18000, 17000, 16000, 15000, 14000, 13000, 12000, 11000,
-        9900,  9600,  9300,  9000,  8700,  8400,  8100,  7800,
-        7500,  7200,  6900,  6600,  6300,  6000,  5800,  5600,
-        5400,  5200,  5000,  4800,  4600,  4400,  4200,  4000,
-        3800,  3600,  3400,  3200,  3000,  2800,  2600,  2400,
-        2200,  2000,  1900,  1800,  1700,  1600,  1500,  1400,
-        1300,  1200,  1100,  1000,   900,   800,   700,   600,
-         500,   400,   300,   200,   100,     0
-
-};
-
-/* Temperature in celcius */
-static struct psy_depletion_ibat_lut tn8_ibat_lut[] = {
-       {  60, 6150 }, /* TODO */
-       {  40, 6150 },
-       {   0, 6150 },
-       { -30,    0 }
-
-};
-
-static struct psy_depletion_rbat_lut tn8_rbat_lut[] = {
-       { 100,  76000  },
-       {  88,  85000  },
-       {  75,  102000 },
-       {  63,  93000  },
-       {  50,  85000  },
-       {  38,  93000  },
-       {  25,  102000 },
-       {  13,  119000 },
-       {   0,  119000 }
-};
-
-static struct psy_depletion_ocv_lut tn8_ocv_lut[] = {
-       { 100, 4200000 },
-       {  90, 4151388 },
-       {  80, 4064953 },
-       {  70, 3990914 },
-       {  60, 3916230 },
-       {  50, 3863778 },
-       {  40, 3807535 },
-       {  30, 3781554 },
-       {  20, 3761117 },
-       {  10, 3663381 },
-       {   0, 3514236 }
-};
-
-static struct psy_depletion_platform_data tn8_psydepl_pdata = {
-       .power_supply = "battery",
-       .states = tn8_psydepl_states,
-       .num_states = ARRAY_SIZE(tn8_psydepl_states),
-       .e0_index = 16, /* depletion client at around 30% charge remaining */
-       .r_const = 38000,
-       .vsys_min = 3250000, /*TODO*/
-       .vcharge = 4200000, /* voltage at 100% */
-       .ibat_nom = 6150,
-       .ibat_lut = tn8_ibat_lut,
-       .rbat_lut = tn8_rbat_lut,
-       /*.ocv_lut = tn8_ocv_lut*/
-
-};
-
-static struct platform_device tn8_psydepl_device = {
-       .name = "psy_depletion",
-       .id = -1,
-       .dev = { .platform_data = &tn8_psydepl_pdata }
-};
-
-void __init tn8_sysedp_psydepl_init(void)
-{
-       int r;
-
-       r = platform_device_register(&tn8_psydepl_device);
-       WARN_ON(r);
-}
-
-static struct tegra_sysedp_corecap tn8_sysedp_corecap[] = {
-       {  1000, {  1000, 240000, 204000 }, {  1000, 240000, 204000 } },
-       {  2000, {  1000, 240000, 204000 }, {  1000, 240000, 204000 } },
-       {  3000, {  1000, 240000, 204000 }, {  1000, 240000, 204000 } },
-       {  4000, {  1000, 240000, 204000 }, {  1000, 240000, 204000 } },
-       {  5000, {  1000, 240000, 204000 }, {  1000, 240000, 204000 } },
-       {  5500, {  1000, 240000, 312000 }, {  1000, 240000, 312000 } },
-       {  6000, {  1283, 240000, 312000 }, {  1283, 240000, 312000 } },
-       {  6500, {  1783, 240000, 312000 }, {  1275, 324000, 312000 } },
-       {  7000, {  1843, 240000, 624000 }, {  1975, 324000, 408000 } },
-       {  7500, {  2343, 240000, 624000 }, {  1806, 420000, 408000 } },
-       {  8000, {  2843, 240000, 624000 }, {  2306, 420000, 624000 } },
-       {  8500, {  3343, 240000, 624000 }, {  2806, 420000, 624000 } },
-       {  9000, {  3843, 240000, 624000 }, {  2606, 420000, 792000 } },
-       {  9500, {  4343, 240000, 624000 }, {  2898, 528000, 792000 } },
-       { 10000, {  4565, 240000, 792000 }, {  3398, 528000, 792000 } },
-       { 10500, {  5065, 240000, 792000 }, {  3898, 528000, 792000 } },
-       { 11000, {  5565, 240000, 792000 }, {  4398, 528000, 792000 } },
-       { 11500, {  6065, 240000, 792000 }, {  3777, 600000, 792000 } },
-       { 12000, {  6565, 240000, 792000 }, {  4277, 600000, 792000 } },
-       { 12500, {  7065, 240000, 792000 }, {  4777, 600000, 792000 } },
-       { 13000, {  7565, 240000, 792000 }, {  5277, 600000, 792000 } },
-       { 13500, {  8065, 240000, 792000 }, {  5777, 600000, 792000 } },
-       { 14000, {  8565, 240000, 792000 }, {  6277, 600000, 792000 } },
-       { 14500, {  9065, 240000, 792000 }, {  6777, 600000, 792000 } },
-       { 15000, {  9565, 384000, 792000 }, {  7277, 600000, 792000 } },
-       { 15500, {  9565, 468000, 792000 }, {  7777, 600000, 792000 } },
-       { 16000, { 10565, 468000, 792000 }, {  8277, 600000, 792000 } },
-       { 16500, { 11065, 468000, 792000 }, {  8777, 600000, 792000 } },
-       { 17000, { 11565, 468000, 792000 }, {  9277, 600000, 792000 } },
-       { 17500, { 12065, 468000, 792000 }, {  9577, 600000, 792000 } },
-       { 18000, { 12565, 468000, 792000 }, { 10277, 600000, 792000 } },
-       { 18500, { 13065, 468000, 792000 }, { 10777, 600000, 792000 } },
-       { 19000, { 13565, 468000, 792000 }, { 11277, 600000, 792000 } },
-       { 19500, { 14065, 468000, 792000 }, { 11777, 600000, 792000 } },
-       { 20000, { 14565, 468000, 792000 }, { 12277, 600000, 792000 } },
-       { 23000, { 14565, 600000, 792000 }, { 14565, 600000, 792000 } },
-};
-
-static struct tegra_sysedp_platform_data tn8_sysedp_platdata = {
-       .corecap = tn8_sysedp_corecap,
-       .corecap_size = ARRAY_SIZE(tn8_sysedp_corecap),
-       .core_gain = 130,
-       .init_req_watts = 20000,
-       /*.bbc = "bbc"*/
-};
-
-static struct platform_device tn8_sysedp_device = {
-       .name = "tegra_sysedp",
-       .id = -1,
-       .dev = { .platform_data = &tn8_sysedp_platdata }
-};
-
-void __init tn8_sysedp_core_init(void)
-{
-       int r;
-
-       tn8_sysedp_platdata.cpufreq_lim = tegra_get_system_edp_entries(
-                       &tn8_sysedp_platdata.cpufreq_lim_size);
-       if (!tn8_sysedp_platdata.cpufreq_lim) {
-               WARN_ON(1);
-               return;
-       }
-
-       r = platform_device_register(&tn8_sysedp_device);
-       WARN_ON(r);
-}