Changed battery driver to just charge FAST/SLOW to 100% rather than 99%
I am assuming overcharge/overheat/etc protection will kick in and stop charging worst case. Updated overclocking code based on huanyu and michyprima's versions. Still overclocked by default to 1113MHz but can be pushed to 1152MHz with SetCPU. Custom compiling with EXOVERCLOCK can now go to 1305MHz though I wouldn't recommend it. I find it unlikely any gain would be worth the risk of shortening the life of your CPU.
This commit is contained in:
parent
0f9f0c7dce
commit
56aad1fd46
@ -170,23 +170,29 @@ struct clkctl_acpu_speed acpu_freq_tbl[] = {
|
||||
{ 1036800, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1B, 0, 1225, 128000 },
|
||||
{ 1075200, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1C, 0, 1250, 128000 },
|
||||
{ 1113600, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1D, 0, 1275, 128000 },
|
||||
{ 1152000, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1E, 0, 1300, 128000 },
|
||||
#elif CONFIG_HTCLEO_UNDERVOLT_925
|
||||
{ 1036800, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1B, 0, 1225, 128000 },
|
||||
{ 1075200, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1C, 0, 1250, 128000 },
|
||||
{ 1113600, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1D, 0, 1275, 128000 },
|
||||
{ 1152000, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1E, 0, 1300, 128000 },
|
||||
#elif CONFIG_HTCLEO_UNDERVOLT_800
|
||||
{ 1036800, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1B, 0, 1225, 128000 },
|
||||
{ 1075200, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1C, 0, 1250, 128000 },
|
||||
{ 1113600, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1D, 0, 1275, 128000 },
|
||||
{ 1152000, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1E, 0, 1300, 128000 },
|
||||
#else
|
||||
{ 1036800, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1B, 0, 1300, 128000 },
|
||||
{ 1075200, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1C, 0, 1300, 128000 },
|
||||
{ 1113600, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1D, 0, 1300, 128000 },
|
||||
{ 1152000, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1E, 0, 1325, 128000 },
|
||||
#endif
|
||||
#endif
|
||||
#ifdef CONFIG_HTCLEO_EXOVERCLOCK
|
||||
{ 1152000, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1E, 0, 1300, 128000 },
|
||||
{ 1190400, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1F, 0, 1300, 128000 },
|
||||
{ 1190400, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1F, 0, 1325, 128000 },
|
||||
{ 1228800, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x20, 0, 1325, 128000 },
|
||||
{ 1267200, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x21, 0, 1350, 128000 },
|
||||
{ 1305600, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x22, 0, 1350, 128000 },
|
||||
#endif
|
||||
{ 0 },
|
||||
};
|
||||
@ -530,9 +536,9 @@ void __init acpu_freq_tbl_fixup(void)
|
||||
case 0x30:
|
||||
case 0x00:
|
||||
#ifdef CONFIG_HTCLEO_EXOVERCLOCK
|
||||
max_acpu_khz = 1190400;
|
||||
max_acpu_khz = 1305600;
|
||||
#elif CONFIG_HTCLEO_OVERCLOCK
|
||||
max_acpu_khz = 1113600;
|
||||
max_acpu_khz = 1152000;
|
||||
#else
|
||||
max_acpu_khz = 998400;
|
||||
#endif
|
||||
|
@ -561,10 +561,6 @@ static int battery_adjust_charge_state(struct htcleo_device_info *di)
|
||||
{
|
||||
di->status.battery_full = 0;
|
||||
}
|
||||
if((di->status.percentage > 98) && (charge_mode == CHARGE_FAST))
|
||||
{
|
||||
charge_mode = CHARGE_SLOW;
|
||||
}
|
||||
#else
|
||||
// CotullaTODO: add DS274X check code here
|
||||
di->status.battery_full = 0;
|
||||
|
@ -90,6 +90,12 @@ static int __init msm_cpufreq_init(struct cpufreq_policy *policy)
|
||||
|
||||
BUG_ON(cpufreq_frequency_table_cpuinfo(policy, table));
|
||||
policy->cur = acpuclk_get_rate();
|
||||
#ifdef CONFIG_HTCLEO_OVERCLOCK
|
||||
policy->max = 1113600;
|
||||
#endif
|
||||
#ifdef CONFIG_HTCLEO_EXOVERCLOCK
|
||||
policy->max = 1113600;
|
||||
#endif
|
||||
policy->cpuinfo.transition_latency =
|
||||
acpuclk_get_switch_time() * NSEC_PER_USEC;
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user