diff options
author | Xue Dong <xdong@nvidia.com> | 2013-08-20 18:17:41 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-16 17:40:56 -0700 |
commit | 0ba6f15d4fbb3bd6412721550278489d7d9e68ea (patch) | |
tree | 671ddd5cfc151c38f63c68a4486c570871fb0500 /arch/arm/mach-tegra/tegra12_emc.c | |
parent | 502b7d80287a9810ab91625a7377348a71a1bbc6 (diff) |
ARM: tegra12: Add emc use case table
bug 1162232
Change-Id: I2bf4cdec47b98da45852e3fd345dd1833bb020af
Signed-off-by: Xue Dong <xdong@nvidia.com>
Reviewed-on: http://git-master/r/264134
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Chao Xu <cxu@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/tegra12_emc.c')
-rw-r--r-- | arch/arm/mach-tegra/tegra12_emc.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/tegra12_emc.c b/arch/arm/mach-tegra/tegra12_emc.c index 5b062a64373e..b01639ab894d 100644 --- a/arch/arm/mach-tegra/tegra12_emc.c +++ b/arch/arm/mach-tegra/tegra12_emc.c @@ -47,6 +47,14 @@ module_param(emc_enable, bool, 0644); u8 tegra_emc_bw_efficiency = 100; +static struct emc_iso_usage tegra12_emc_iso_usage[] = { + { BIT(EMC_USER_DC1), 80 }, + { BIT(EMC_USER_DC2), 80 }, + { BIT(EMC_USER_DC1) | BIT(EMC_USER_DC2), 50 }, + { BIT(EMC_USER_DC1) | BIT(EMC_USER_VI), 50 }, + { BIT(EMC_USER_DC2) | BIT(EMC_USER_VI), 50 }, +}; + #define PLL_C_DIRECT_FLOOR 333500000 #define EMC_STATUS_UPDATE_TIMEOUT 100 #define TEGRA_EMC_TABLE_MAX_SIZE 16 @@ -1215,7 +1223,19 @@ static struct platform_driver tegra12_emc_driver = { int __init tegra12_emc_init(void) { - return platform_driver_register(&tegra12_emc_driver); + int ret = platform_driver_register(&tegra12_emc_driver); + + if (!ret) { + tegra_emc_iso_usage_table_init(tegra12_emc_iso_usage, + ARRAY_SIZE(tegra12_emc_iso_usage)); + if (emc_enable) { + unsigned long rate = tegra_emc_round_rate_updown( + emc->boot_rate, false); + if (!IS_ERR_VALUE(rate)) + tegra_clk_preset_emc_monitor(rate); + } + } + return ret; } void tegra_emc_timing_invalidate(void) @@ -1401,6 +1421,9 @@ static int __init tegra_emc_debug_init(void) emc_debugfs_root, NULL, &efficiency_fops)) goto err_out; + if (tegra_emc_iso_usage_debugfs_init(emc_debugfs_root)) + goto err_out; + return 0; err_out: |