diff options
author | Luden <luden@ghostmail.com> | 2016-03-10 01:07:37 +0100 |
---|---|---|
committer | Ziyan <jaraidaniel@gmail.com> | 2016-04-03 14:57:30 +0200 |
commit | f460346c9be8bfe2c5b904ba54c46b53fdee6a43 (patch) | |
tree | 533e1852c6ef75901a61febe97f8e6e71634bb5c /security/smc/tf_comm_mshield.c | |
parent | e1c6fce23182b44f8d9e27e6fba09cb64519d15e (diff) | |
download | kernel_samsung_tuna-f460346c9be8bfe2c5b904ba54c46b53fdee6a43.zip kernel_samsung_tuna-f460346c9be8bfe2c5b904ba54c46b53fdee6a43.tar.gz kernel_samsung_tuna-f460346c9be8bfe2c5b904ba54c46b53fdee6a43.tar.bz2 |
Power usage bug work-around for tuna SMC.
This commit implements the work-around for the power usage bug in tuna SMC
PA and enables SMC-related kernel options. Note that in order to take
advantage of this code there are also some userspace changes that are
required, e.g. enabling SMC PA loading and using tuna keymaster version
that is ported to Keymaster HAL 0.
Change-Id: I0e4705c6959e73fbeaec9bfb62d5e82e1dfa62a4
Diffstat (limited to 'security/smc/tf_comm_mshield.c')
-rw-r--r-- | security/smc/tf_comm_mshield.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/security/smc/tf_comm_mshield.c b/security/smc/tf_comm_mshield.c index 23b6203..4b1a3f5 100644 --- a/security/smc/tf_comm_mshield.c +++ b/security/smc/tf_comm_mshield.c @@ -115,6 +115,20 @@ static struct wake_lock g_tf_wake_lock; static struct clockdomain *smc_l4_sec_clkdm; +void tf_crypto_clockdomain_wakeup(void) +{ + if (smc_l4_sec_clkdm) { + clkdm_wakeup(smc_l4_sec_clkdm); + } +} + +void tf_crypto_clockdomain_idle(void) +{ + if (smc_l4_sec_clkdm) { + clkdm_allow_idle(smc_l4_sec_clkdm); + } +} + static int __init tf_early_init(void) { g_secure_task_id = 0; @@ -203,6 +217,7 @@ static void tf_clock_timer_cb(unsigned long data) clkdm_allow_idle(smc_l4_sec_clkdm); spin_unlock_irqrestore(&clk_timer_lock, flags); + tf_crypto_digest_apply_clock_workaround(); dprintk(KERN_INFO "%s success\n", __func__); return; |