From: xxx Date: Mon, 2 Apr 2012 10:14:41 +0000 (-0700) Subject: rk30: sdk: add cpufreq setup X-Git-Tag: firefly_0821_release~9494 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=28204445361ea0e352aa2c07b04dcf0e9bf65e85;p=firefly-linux-kernel-4.4.55.git rk30: sdk: add cpufreq setup --- diff --git a/arch/arm/mach-rk30/board-rk30-sdk.c b/arch/arm/mach-rk30/board-rk30-sdk.c index 18d4693b483a..26ef71da0fad 100755 --- a/arch/arm/mach-rk30/board-rk30-sdk.c +++ b/arch/arm/mach-rk30/board-rk30-sdk.c @@ -24,6 +24,9 @@ #include #include #include +#include +#include +#include #include #include @@ -1198,9 +1201,24 @@ static void __init rk30_reserve(void) board_mem_reserved(); } +static struct cpufreq_frequency_table cpu_dvfs_table[] = { + //{.frequency = 126*1000, .index = 980*1000}, + {.frequency = 252*1000, .index = 980*1000}, + {.frequency = 504*1000, .index = 980*1000}, + {.frequency = 816*1000, .index = 1000*1000}, + {.frequency = 1008*1000,.index = 1050*1000}, + {.frequency = 1200*1000,.index = 1150*1000}, + {.frequency = 1416*1000,.index = 1280*1000}, + {.frequency = 1512*1000,.index = 1320*1000}, + //{.frequency = 1560*1000,.index = 1350*1000}, + //{.frequency = 1608*1000,.index = 1350*1000}, + {.frequency = CPUFREQ_TABLE_END}, +}; + void __init board_clock_init(void) { rk30_clock_data_init(periph_pll_297mhz, codec_pll_360mhz, max_i2s_12288khz); + dvfs_set_freq_volt_table(clk_get(NULL, "cpu"), cpu_dvfs_table); } MACHINE_START(RK30, "RK30board")