summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jacinto6/sgx.tgzbin2786364 -> 2784441 bytes
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap/sgxfreq.c18
2 files changed, 13 insertions, 5 deletions
diff --git a/jacinto6/sgx.tgz b/jacinto6/sgx.tgz
index 8574397..e7b60f1 100644
--- a/jacinto6/sgx.tgz
+++ b/jacinto6/sgx.tgz
Binary files differ
diff --git a/jacinto6/sgx_src/eurasia_km/services4/system/omap/sgxfreq.c b/jacinto6/sgx_src/eurasia_km/services4/system/omap/sgxfreq.c
index 8df1505..5159fd4 100644
--- a/jacinto6/sgx_src/eurasia_km/services4/system/omap/sgxfreq.c
+++ b/jacinto6/sgx_src/eurasia_km/services4/system/omap/sgxfreq.c
@@ -441,16 +441,16 @@ int sgxfreq_init(struct device *dev)
return -EINVAL;
#endif
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0))
rcu_read_lock();
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0))
sfd.freq_cnt = sfd.pdata->opp_get_opp_count(dev);
#else
- ret = of_init_opp_table(dev);
- if (ret) {
- pr_err("sgxfreq: failed to init OPP table: %d\n", ret);
+ ret = of_init_opp_table(dev);
+ if (ret) {
+ pr_err("sgxfreq: failed to init OPP table: %d\n", ret);
return -EINVAL;
- }
+ }
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0))
sfd.freq_cnt = opp_get_opp_count(dev);
#else
@@ -459,7 +459,9 @@ int sgxfreq_init(struct device *dev)
#endif
if (sfd.freq_cnt < 1) {
pr_err("sgxfreq: failed to get operating frequencies\n");
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0))
rcu_read_unlock();
+#endif
return -ENODEV;
}
@@ -485,7 +487,9 @@ int sgxfreq_init(struct device *dev)
#endif
sfd.freq_list = kmalloc(sfd.freq_cnt * sizeof(unsigned long), GFP_ATOMIC);
if (!sfd.freq_list) {
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0))
rcu_read_unlock();
+#endif
return -ENOMEM;
}
@@ -500,14 +504,18 @@ int sgxfreq_init(struct device *dev)
opp = dev_pm_opp_find_freq_ceil(dev, &freq);
#endif
if (IS_ERR_OR_NULL(opp)) {
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0))
rcu_read_unlock();
+#endif
kfree(sfd.freq_list);
return -ENODEV;
}
sfd.freq_list[i] = freq;
freq++;
}
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0))
rcu_read_unlock();
+#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
sfd.core_clk = devm_clk_get(dev, "dpll_core_h14x2_ck");