diff options
author | Sivaram Nair <sivaramn@nvidia.com> | 2013-05-06 11:57:29 +0300 |
---|---|---|
committer | Riham Haidar <rhaidar@nvidia.com> | 2013-05-08 16:30:16 -0700 |
commit | 9aef7fd44b74cacd1948300d881c5d6c27d07b34 (patch) | |
tree | dcf92b01ef2390a224365a1185cc1ef095443c58 /arch/arm/mach-tegra/board-macallan-power.c | |
parent | 9c8e126b141afb1d3dde7b09f09f600734dcb708 (diff) |
ARM: tegra: adding macallan core client
Bug 1274376
Change-Id: I20c03a59b7e5b17b102e27b757c51cc1a13d5924
Signed-off-by: Sivaram Nair <sivaramn@nvidia.com>
Reviewed-on: http://git-master/r/226230
GVS: Gerrit_Virtual_Submit
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-macallan-power.c')
-rw-r--r-- | arch/arm/mach-tegra/board-macallan-power.c | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-macallan-power.c b/arch/arm/mach-tegra/board-macallan-power.c index 7923322a9cf4..5eb1fd01ece3 100644 --- a/arch/arm/mach-tegra/board-macallan-power.c +++ b/arch/arm/mach-tegra/board-macallan-power.c @@ -32,6 +32,7 @@ #include <linux/interrupt.h> #include <linux/regulator/userspace-consumer.h> #include <linux/edp.h> +#include <linux/platform_data/tegra_edp.h> #include <asm/mach-types.h> #include <linux/power/sbs-battery.h> @@ -855,3 +856,54 @@ void __init macallan_sysedp_init(void) r = edp_set_governor(&macallan_sysedp_manager, g); WARN_ON(r); } + +static struct tegra_sysedp_corecap macallan_sysedp_corecap[] = { + { 1000, { 1000, 240, 204 }, { 1000, 240, 204 } }, + { 2000, { 1000, 240, 204 }, { 1000, 240, 204 } }, + { 3000, { 1000, 240, 204 }, { 1000, 240, 204 } }, + { 4000, { 1000, 240, 204 }, { 1000, 240, 204 } }, + { 5000, { 1000, 240, 204 }, { 1000, 240, 312 } }, + { 6000, { 1679, 240, 312 }, { 1679, 240, 312 } }, + { 7000, { 1843, 240, 624 }, { 1975, 324, 408 } }, + { 8000, { 2843, 240, 624 }, { 2306, 420, 624 } }, + { 9000, { 3843, 240, 624 }, { 2606, 420, 792 } }, + { 10000, { 4565, 240, 792 }, { 3398, 528, 792 } }, + { 11000, { 5565, 240, 792 }, { 4398, 528, 792 } }, + { 12000, { 6565, 240, 792 }, { 4277, 600, 792 } }, + { 13000, { 7565, 240, 792 }, { 5277, 600, 792 } }, + { 14000, { 8565, 240, 792 }, { 6277, 600, 792 } }, + { 15000, { 9565, 240, 792 }, { 7277, 600, 792 } }, + { 16000, { 10565, 240, 792 }, { 8277, 600, 792 } }, + { 17000, { 11565, 240, 792 }, { 9277, 600, 792 } }, + { 18000, { 12565, 240, 792 }, { 10277, 600, 792 } }, + { 19000, { 13565, 240, 792 }, { 11277, 600, 792 } }, + { 20000, { 14565, 240, 792 }, { 12277, 600, 792 } }, + { 23000, { 14565, 600, 792 }, { 14565, 600, 792 } }, +}; + +static struct tegra_sysedp_platform_data macallan_sysedp_platdata = { + .corecap = macallan_sysedp_corecap, + .corecap_size = ARRAY_SIZE(macallan_sysedp_corecap), + .init_req_watts = 20000 +}; + +static struct platform_device macallan_sysedp_device = { + .name = "tegra_sysedp", + .id = -1, + .dev = { .platform_data = &macallan_sysedp_platdata } +}; + +void __init macallan_sysedp_core_init(void) +{ + int r; + + macallan_sysedp_platdata.cpufreq_lim = tegra_get_system_edp_entries( + &macallan_sysedp_platdata.cpufreq_lim_size); + if (!macallan_sysedp_platdata.cpufreq_lim) { + WARN_ON(1); + return; + } + + r = platform_device_register(&macallan_sysedp_device); + WARN_ON(r); +} |