summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/arm/msm/cpubw.txt7
-rw-r--r--Documentation/devicetree/bindings/platform/msm/avtimer.txt5
-rw-r--r--arch/arm/boot/dts/qcom/msm8916.dtsi6
-rw-r--r--arch/arm/mach-msm/devfreq_cpubw.c45
-rw-r--r--drivers/media/platform/msm/camera_v2/isp/msm_isp.h2
-rw-r--r--drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c74
-rw-r--r--drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.h1
-rw-r--r--drivers/platform/msm/avtimer.c53
-rw-r--r--include/linux/avtimer_kernel.h24
-rw-r--r--include/sound/q6core.h (renamed from sound/soc/msm/qdsp6v2/q6core.h)0
-rw-r--r--include/uapi/linux/avtimer.h2
-rw-r--r--kernel/time/sched_clock.c4
-rw-r--r--sound/soc/codecs/msm8x10-wcd.c2
-rw-r--r--sound/soc/codecs/msm8x16-wcd.c2
-rw-r--r--sound/soc/msm/apq8074.c2
-rw-r--r--sound/soc/msm/apq8084-i2s.c2
-rw-r--r--sound/soc/msm/apq8084.c2
-rw-r--r--sound/soc/msm/msm8226.c2
-rw-r--r--sound/soc/msm/msm8974.c2
-rw-r--r--sound/soc/msm/qdsp6v2/audio_ocmem.c2
-rw-r--r--sound/soc/msm/qdsp6v2/msm-dolby-dap-config.c2
-rw-r--r--sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c2
-rw-r--r--sound/soc/msm/qdsp6v2/q6core.c2
-rw-r--r--sound/soc/msm/qdsp6v2/q6lsm.c2
24 files changed, 212 insertions, 35 deletions
diff --git a/Documentation/devicetree/bindings/arm/msm/cpubw.txt b/Documentation/devicetree/bindings/arm/msm/cpubw.txt
index 1dc38357ec6f..64c7a4854b97 100644
--- a/Documentation/devicetree/bindings/arm/msm/cpubw.txt
+++ b/Documentation/devicetree/bindings/arm/msm/cpubw.txt
@@ -13,6 +13,13 @@ Required properties:
subsystem to DDR. The list of values depend on the
supported DDR frequencies and the bus widths.
+Optional properties:
+- qcom,ab-tbl: A list of pre-calculated absolute bandwidth values
+ (in MB/s) that can be requested from the CPU subsystem
+ to DDR for particular instantaneous bandwidth. The list
+ of values could depend on a certain percentage of
+ instantaneous bandwidth.
+
Example:
qcom,cpubw {
diff --git a/Documentation/devicetree/bindings/platform/msm/avtimer.txt b/Documentation/devicetree/bindings/platform/msm/avtimer.txt
index 86c9b676ad55..2d892623f9c2 100644
--- a/Documentation/devicetree/bindings/platform/msm/avtimer.txt
+++ b/Documentation/devicetree/bindings/platform/msm/avtimer.txt
@@ -12,10 +12,15 @@ Required properties:
"avtimer_msb_addr" : AVtimer msb physical address
- compatible : Must be "qcom,avtimer"
+Optional properties:
+- clk_div : For 8916 the clk is at 27MHz and hence ticks are to be
+ divided by 27 to achive the msec value.
+
Example:
qcom,avtimer {
compatible = "qcom,avtimer";
reg = <0xfe053008 0x4>,
<0xfe05300c 0x4>;
reg-names = "avtimer_lsb_addr", "avtimer_msb_addr";
+ qcom,clk_div = <27>;
};
diff --git a/arch/arm/boot/dts/qcom/msm8916.dtsi b/arch/arm/boot/dts/qcom/msm8916.dtsi
index fd458cdef3fe..ed8ba99b4ec1 100644
--- a/arch/arm/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm/boot/dts/qcom/msm8916.dtsi
@@ -293,6 +293,11 @@
< 1525 /* 200 MHz */>,
< 3051 /* 400 MHz */>,
< 4066 /* 533 MHz */>;
+ qcom,ab-tbl =
+ < 191 >,
+ < 381 >,
+ < 763 >,
+ < 1017 >;
};
qcom,msm-cpufreq@0 {
@@ -1639,6 +1644,7 @@
reg = <0x0770600C 0x4>,
<0x07706010 0x4>;
reg-names = "avtimer_lsb_addr", "avtimer_msb_addr";
+ qcom,clk_div = <27>;
};
};
diff --git a/arch/arm/mach-msm/devfreq_cpubw.c b/arch/arm/mach-msm/devfreq_cpubw.c
index 50d8a45247d9..5498bab63673 100644
--- a/arch/arm/mach-msm/devfreq_cpubw.c
+++ b/arch/arm/mach-msm/devfreq_cpubw.c
@@ -48,6 +48,7 @@ static struct msm_bus_scale_pdata bw_data = {
static int num_paths;
static u32 bus_client;
+static unsigned int *freq_ab_table;
static int set_bw(int new_ib, int new_ab)
{
static int cur_idx, cur_ab, cur_ib;
@@ -77,6 +78,22 @@ static int set_bw(int new_ib, int new_ab)
return ret;
}
+static unsigned int find_ab(struct devfreq_dev_profile *p, unsigned long *freq)
+{
+ int i;
+ unsigned long f;
+
+ if (freq_ab_table == NULL)
+ return 0;
+
+ for (i = 0; i < p->max_state; i++) {
+ f = p->freq_table[i];
+ if (f == *freq)
+ break;
+ }
+ return freq_ab_table[i];
+}
+
static void find_freq(struct devfreq_dev_profile *p, unsigned long *freq,
u32 flags)
{
@@ -105,7 +122,11 @@ static long gov_ab;
int cpubw_target(struct device *dev, unsigned long *freq, u32 flags)
{
find_freq(&cpubw_profile, freq, flags);
- return set_bw(*freq, gov_ab);
+
+ if (!gov_ab)
+ return set_bw(*freq, find_ab(&cpubw_profile, freq));
+ else
+ return set_bw(*freq, gov_ab);
}
static struct devfreq_governor_data gov_data[] = {
@@ -125,6 +146,7 @@ struct devfreq_dev_profile cpubw_profile = {
#define PROP_PORTS "qcom,cpu-mem-ports"
#define PROP_TBL "qcom,bw-tbl"
+#define PROP_AB_TBL "qcom,ab-tbl"
static int __init cpubw_probe(struct platform_device *pdev)
{
@@ -182,6 +204,27 @@ static int __init cpubw_probe(struct platform_device *pdev)
p->max_state = len;
}
+ if (of_find_property(dev->of_node, PROP_AB_TBL, &len)) {
+ len /= sizeof(*data);
+ data = devm_kzalloc(dev, len * sizeof(*data), GFP_KERNEL);
+ if (!data)
+ return -ENOMEM;
+
+ freq_ab_table = devm_kzalloc(dev,
+ len * sizeof(*freq_ab_table),
+ GFP_KERNEL);
+ if (!freq_ab_table)
+ return -ENOMEM;
+
+ ret = of_property_read_u32_array(dev->of_node, PROP_AB_TBL,
+ data, len);
+ if (ret)
+ return ret;
+
+ for (i = 0; i < len; i++)
+ freq_ab_table[i] = data[i];
+ }
+
bus_client = msm_bus_scale_register_client(&bw_data);
if (!bus_client) {
dev_err(dev, "Unable to register bus client\n");
diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp.h b/drivers/media/platform/msm/camera_v2/isp/msm_isp.h
index d6d49d8c148b..50688b61c3d5 100644
--- a/drivers/media/platform/msm/camera_v2/isp/msm_isp.h
+++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp.h
@@ -19,7 +19,7 @@
#include <linux/io.h>
#include <linux/list.h>
#include <linux/delay.h>
-#include <linux/avtimer.h>
+#include <linux/avtimer_kernel.h>
#include <media/v4l2-subdev.h>
#include <media/msmb_isp.h>
#include <linux/msm-bus.h>
diff --git a/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c b/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c
index 841160ef8e63..a9aa9a7f3692 100644
--- a/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c
+++ b/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c
@@ -107,6 +107,8 @@ static int msm_cpp_buffer_ops(struct cpp_device *cpp_dev,
qcmd; \
})
+#define MSM_CPP_MAX_TIMEOUT_TRIAL 3
+
struct msm_cpp_timer_data_t {
struct cpp_device *cpp_dev;
struct msm_cpp_frame_info_t *processed_frame;
@@ -177,6 +179,14 @@ static void msm_cpp_write(u32 data, void __iomem *cpp_base)
writel_relaxed((data), cpp_base + MSM_CPP_MICRO_FIFO_RX_DATA);
}
+static void msm_cpp_clear_timer(struct cpp_device *cpp_dev)
+{
+ atomic_set(&cpp_timer.used, 0);
+ del_timer(&cpp_timer.cpp_timer);
+ cpp_timer.data.processed_frame = NULL;
+ cpp_dev->timeout_trial_cnt = 0;
+}
+
static uint32_t msm_cpp_read(void __iomem *cpp_base)
{
uint32_t tmp, retry = 0;
@@ -620,7 +630,6 @@ void msm_cpp_do_tasklet(unsigned long data)
uint32_t tx_fifo[MSM_CPP_TX_FIFO_LEVEL];
struct cpp_device *cpp_dev = (struct cpp_device *) data;
struct msm_cpp_tasklet_queue_cmd *queue_cmd;
- struct msm_cpp_timer_t *timer = NULL;
while (atomic_read(&cpp_dev->irq_cnt)) {
spin_lock_irqsave(&cpp_dev->tasklet_lock, flags);
@@ -649,19 +658,13 @@ void msm_cpp_do_tasklet(unsigned long data)
CPP_DBG("Frame done!!\n");
/* delete CPP timer */
CPP_DBG("delete timer.\n");
- timer = &cpp_timer;
- atomic_set(&timer->used, 0);
- del_timer(&timer->cpp_timer);
- timer->data.processed_frame = NULL;
+ msm_cpp_clear_timer(cpp_dev);
msm_cpp_notify_frame_done(cpp_dev);
} else if (msg_id ==
MSM_CPP_MSG_ID_FRAME_NACK) {
pr_err("NACK error from hw!!\n");
CPP_DBG("delete timer.\n");
- timer = &cpp_timer;
- atomic_set(&timer->used, 0);
- del_timer(&timer->cpp_timer);
- timer->data.processed_frame = NULL;
+ msm_cpp_clear_timer(cpp_dev);
msm_cpp_notify_frame_done(cpp_dev);
}
i += cmd_len + 2;
@@ -1090,6 +1093,7 @@ static int cpp_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
pr_debug("DEBUG_R1: 0x%x\n",
msm_camera_io_r(cpp_dev->cpp_hw_base + 0x8C));
msm_camera_io_w(0x0, cpp_dev->base + MSM_CPP_MICRO_CLKEN_CTL);
+ msm_cpp_clear_timer(cpp_dev);
cpp_deinit_mem(cpp_dev);
if (cpp_dev->iommu_state == CPP_IOMMU_STATE_ATTACHED) {
iommu_detach_device(cpp_dev->domain,
@@ -1227,8 +1231,9 @@ static void msm_cpp_do_timeout_work(struct work_struct *work)
pr_err("cpp_timer_callback called. (jiffies=%lu)\n",
jiffies);
- if (!work) {
- pr_err("Invalid work:%p\n", work);
+ if (!work || cpp_timer.data.cpp_dev->state != CPP_STATE_ACTIVE) {
+ pr_err("Invalid work:%p or state:%d\n", work,
+ cpp_timer.data.cpp_dev->state);
return;
}
if (!atomic_read(&cpp_timer.used)) {
@@ -1252,6 +1257,14 @@ static void msm_cpp_do_timeout_work(struct work_struct *work)
return;
}
+ if (cpp_timer.data.cpp_dev->timeout_trial_cnt >=
+ MSM_CPP_MAX_TIMEOUT_TRIAL) {
+ pr_info("Max trial reached\n");
+ msm_cpp_notify_frame_done(cpp_timer.data.cpp_dev);
+ cpp_timer.data.cpp_dev->timeout_trial_cnt = 0;
+ return;
+ }
+
this_frame = cpp_timer.data.processed_frame;
pr_err("Starting timer to fire in %d ms. (jiffies=%lu)\n",
CPP_CMD_TIMEOUT_MS, jiffies);
@@ -1267,6 +1280,7 @@ static void msm_cpp_do_timeout_work(struct work_struct *work)
for (i = 0; i < this_frame->msg_len; i++)
msm_cpp_write(this_frame->cpp_cmd_msg[i],
cpp_timer.data.cpp_dev->base);
+ cpp_timer.data.cpp_dev->timeout_trial_cnt++;
return;
}
@@ -1535,6 +1549,26 @@ ERROR1:
return rc;
}
+void msm_cpp_clean_queue(struct cpp_device *cpp_dev)
+{
+ struct msm_queue_cmd *frame_qcmd = NULL;
+ struct msm_cpp_frame_info_t *processed_frame = NULL;
+ struct msm_device_queue *queue = NULL;
+
+ while (cpp_dev->processing_q.len) {
+ pr_info("queue len:%d\n", cpp_dev->processing_q.len);
+ queue = &cpp_dev->processing_q;
+ frame_qcmd = msm_dequeue(queue, list_frame);
+ if (frame_qcmd) {
+ processed_frame = frame_qcmd->command;
+ kfree(frame_qcmd);
+ if (processed_frame)
+ kfree(processed_frame->cpp_cmd_msg);
+ kfree(processed_frame);
+ }
+ }
+}
+
long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd,
unsigned int cmd, void *arg)
{
@@ -1695,6 +1729,11 @@ long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd,
kfree(k_stream_buff_info.buffer_info);
kfree(u_stream_buff_info);
+ if (cpp_dev->stream_cnt == 0) {
+ cpp_dev->state = CPP_STATE_ACTIVE;
+ msm_cpp_clear_timer(cpp_dev);
+ msm_cpp_clean_queue(cpp_dev);
+ }
if (cmd != VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO) {
cpp_dev->stream_cnt++;
@@ -1708,7 +1747,7 @@ long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd,
CPP_DBG("VIDIOC_MSM_CPP_DEQUEUE_STREAM_BUFF_INFO\n");
if ((ioctl_ptr->len == 0) ||
- (ioctl_ptr->len > sizeof(uint32_t)))
+ (ioctl_ptr->len > sizeof(uint32_t)))
return -EINVAL;
rc = (copy_from_user(&identity,
@@ -1735,11 +1774,14 @@ long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd,
buff_queue_info->stream_id);
if (cpp_dev->stream_cnt > 0) {
cpp_dev->stream_cnt--;
- pr_err("stream_cnt:%d\n", cpp_dev->stream_cnt);
+ pr_info("stream_cnt:%d\n", cpp_dev->stream_cnt);
if (cpp_dev->stream_cnt == 0) {
rc = msm_isp_update_bandwidth(ISP_CPP, 0, 0);
if (rc < 0)
pr_err("Bandwidth Reset Failed!\n");
+ cpp_dev->state = CPP_STATE_IDLE;
+ msm_cpp_clear_timer(cpp_dev);
+ msm_cpp_clean_queue(cpp_dev);
}
} else {
pr_err("error: stream count underflow %d\n",
@@ -1827,6 +1869,12 @@ long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd,
case MSM_SD_SHUTDOWN:
CPP_DBG("MSM_SD_SHUTDOWN\n");
mutex_unlock(&cpp_dev->mutex);
+ pr_info("shutdown cpp node. open cnt:%d\n",
+ cpp_dev->cpp_open_cnt);
+
+ if (atomic_read(&cpp_timer.used))
+ pr_info("Timer state not cleared\n");
+
while (cpp_dev->cpp_open_cnt != 0)
cpp_close_node(sd, NULL);
mutex_lock(&cpp_dev->mutex);
diff --git a/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.h b/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.h
index e306335a826d..308552840060 100644
--- a/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.h
+++ b/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.h
@@ -198,6 +198,7 @@ struct cpp_device {
struct msm_cpp_work_t *work;
uint32_t fw_version;
uint8_t stream_cnt;
+ uint8_t timeout_trial_cnt;
int domain_num;
struct iommu_domain *domain;
diff --git a/drivers/platform/msm/avtimer.c b/drivers/platform/msm/avtimer.c
index 354ddff601b5..43966663080f 100644
--- a/drivers/platform/msm/avtimer.c
+++ b/drivers/platform/msm/avtimer.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -25,6 +25,8 @@
#include <linux/wait.h>
#include <linux/sched.h>
#include <linux/qdsp6v2/apr.h>
+#include <soc/qcom/subsystem_notif.h>
+#include <sound/q6core.h>
#define DEVICE_NAME "avtimer"
#define TIMEOUT_MS 1000
@@ -58,6 +60,8 @@ struct avtimer_t {
int timer_handle;
void __iomem *p_avtimer_msw;
void __iomem *p_avtimer_lsw;
+ uint32_t clk_div;
+ atomic_t adsp_ready;
};
static struct avtimer_t avtimer;
@@ -102,6 +106,7 @@ static int32_t aprv2_core_fn_q(struct apr_client_data *data, void *priv)
pr_debug("%s: Reset event received in AV timer\n", __func__);
apr_reset(avtimer.core_handle_q);
avtimer.core_handle_q = NULL;
+ atomic_set(&avtimer.adsp_ready, 0);
break;
}
@@ -239,8 +244,10 @@ int avcs_core_disable_power_collapse(int enable)
goto done;
}
rc = avcs_core_enable_avtimer("timer");
- if (!rc)
+ if (!rc) {
avtimer.avtimer_open_cnt++;
+ atomic_set(&avtimer.adsp_ready, 1);
+ }
} else {
if (avtimer.avtimer_open_cnt > 0) {
avtimer.avtimer_open_cnt--;
@@ -257,6 +264,31 @@ done:
}
EXPORT_SYMBOL(avcs_core_disable_power_collapse);
+int avcs_core_query_timer(uint64_t *avtimer_tick)
+{
+ int ret = 0;
+ uint32_t avtimer_msw = 0, avtimer_lsw = 0;
+
+ if (!atomic_read(&avtimer.adsp_ready)) {
+ if (q6core_is_adsp_ready()) {
+ ret = avcs_core_disable_power_collapse(1);
+ if (ret)
+ return ret;
+ } else {
+ return -ENETRESET;
+ }
+ }
+ avtimer_msw = ioread32(avtimer.p_avtimer_msw);
+ avtimer_lsw = ioread32(avtimer.p_avtimer_lsw);
+
+ avtimer_lsw = avtimer_lsw/avtimer.clk_div;
+ *avtimer_tick =
+ (uint64_t)((uint64_t)avtimer_msw << 32)
+ | avtimer_lsw;
+ return 0;
+}
+EXPORT_SYMBOL(avcs_core_query_timer);
+
static int avtimer_open(struct inode *inode, struct file *file)
{
return avcs_core_disable_power_collapse(1);
@@ -285,6 +317,7 @@ static long avtimer_ioctl(struct file *file, unsigned int ioctl_num,
avtimer_msw_2nd = ioread32(avtimer.p_avtimer_msw);
} while (avtimer_msw_1st != avtimer_msw_2nd);
+ avtimer_lsw = avtimer_lsw/avtimer.clk_div;
avtimer_tick =
((uint64_t) avtimer_msw_1st << 32) | avtimer_lsw;
@@ -317,6 +350,7 @@ static int dev_avtimer_probe(struct platform_device *pdev)
dev_t dev = MKDEV(major, 0);
struct device *device_handle;
struct resource *reg_lsb = NULL, *reg_msb = NULL;
+ uint32_t clk_div_val;
if (!pdev) {
pr_err("%s: Invalid params\n", __func__);
@@ -360,14 +394,15 @@ static int dev_avtimer_probe(struct platform_device *pdev)
}
if (result < 0) {
- pr_err("%s: Registering avtimer device failed\n", __func__);
+ dev_err(&pdev->dev, "%s: Registering avtimer device failed\n",
+ __func__);
goto unmap;
}
avtimer.avtimer_class = class_create(THIS_MODULE, "avtimer");
if (IS_ERR(avtimer.avtimer_class)) {
result = PTR_ERR(avtimer.avtimer_class);
- pr_err("%s: Error creating avtimer class: %d\n",
+ dev_err(&pdev->dev, "%s: Error creating avtimer class: %d\n",
__func__, result);
goto unregister_chrdev_region;
}
@@ -376,7 +411,8 @@ static int dev_avtimer_probe(struct platform_device *pdev)
result = cdev_add(&avtimer.myc, dev, 1);
if (result < 0) {
- pr_err("%s: Registering file operations failed\n", __func__);
+ dev_err(&pdev->dev, "%s: Registering file operations failed\n",
+ __func__);
goto class_destroy;
}
@@ -394,6 +430,13 @@ static int dev_avtimer_probe(struct platform_device *pdev)
pr_debug("%s: Device create done for avtimer major=%d\n",
__func__, major);
+ if (of_property_read_u32(pdev->dev.of_node,
+ "qcom,clk_div", &clk_div_val))
+ avtimer.clk_div = 1;
+ else
+ avtimer.clk_div = clk_div_val;
+
+ pr_debug("avtimer.clk_div = %d\n", avtimer.clk_div);
return 0;
class_destroy:
diff --git a/include/linux/avtimer_kernel.h b/include/linux/avtimer_kernel.h
new file mode 100644
index 000000000000..5eff8ccff4cf
--- /dev/null
+++ b/include/linux/avtimer_kernel.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2014, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef _AVTIMER_H
+#define _AVTIMER_H
+
+#include <uapi/linux/avtimer.h>
+
+int avcs_core_open(void);
+int avcs_core_disable_power_collapse(int disable);/* true or flase */
+int avcs_core_query_timer(uint64_t *avtimer_tick);
+
+#endif
diff --git a/sound/soc/msm/qdsp6v2/q6core.h b/include/sound/q6core.h
index ec5bb00de0fa..ec5bb00de0fa 100644
--- a/sound/soc/msm/qdsp6v2/q6core.h
+++ b/include/sound/q6core.h
diff --git a/include/uapi/linux/avtimer.h b/include/uapi/linux/avtimer.h
index 2ef0d70ddfbf..f688b380e28d 100644
--- a/include/uapi/linux/avtimer.h
+++ b/include/uapi/linux/avtimer.h
@@ -15,7 +15,5 @@ struct dev_avtimer_data {
uint32_t avtimer_msw_phy_addr;
uint32_t avtimer_lsw_phy_addr;
};
-int avcs_core_open(void);
-int avcs_core_disable_power_collapse(int disable);/* true or flase */
#endif
diff --git a/kernel/time/sched_clock.c b/kernel/time/sched_clock.c
index d5a3c23e56cd..8a546bb4b8be 100644
--- a/kernel/time/sched_clock.c
+++ b/kernel/time/sched_clock.c
@@ -200,7 +200,8 @@ void __init sched_clock_postinit(void)
static int sched_clock_suspend(void)
{
- sched_clock_poll(&sched_clock_timer);
+ update_sched_clock();
+ hrtimer_cancel(&sched_clock_timer);
cd.suspended = true;
return 0;
}
@@ -208,6 +209,7 @@ static int sched_clock_suspend(void)
static void sched_clock_resume(void)
{
cd.epoch_cyc = read_sched_clock();
+ hrtimer_start(&sched_clock_timer, cd.wrap_kt, HRTIMER_MODE_REL);
cd.suspended = false;
}
diff --git a/sound/soc/codecs/msm8x10-wcd.c b/sound/soc/codecs/msm8x10-wcd.c
index e8aba8d41070..dd152e0d4f1d 100644
--- a/sound/soc/codecs/msm8x10-wcd.c
+++ b/sound/soc/codecs/msm8x10-wcd.c
@@ -34,11 +34,11 @@
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <sound/tlv.h>
+#include <sound/q6core.h>
#include <linux/qdsp6v2/apr.h>
#include "msm8x10-wcd.h"
#include "wcd9xxx-resmgr.h"
#include "msm8x10_wcd_registers.h"
-#include "../msm/qdsp6v2/q6core.h"
#include "wcd9xxx-common.h"
#define MSM8X10_WCD_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 |\
diff --git a/sound/soc/codecs/msm8x16-wcd.c b/sound/soc/codecs/msm8x16-wcd.c
index 0ac902cf0603..cc783c8bde82 100644
--- a/sound/soc/codecs/msm8x16-wcd.c
+++ b/sound/soc/codecs/msm8x16-wcd.c
@@ -39,12 +39,12 @@
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <sound/tlv.h>
+#include <sound/q6core.h>
#include <soc/qcom/subsystem_notif.h>
#include "msm8x16-wcd.h"
#include "wcd-mbhc-v2.h"
#include "msm8916-wcd-irq.h"
#include "msm8x16_wcd_registers.h"
-#include "../msm/qdsp6v2/q6core.h"
#define MSM8X16_WCD_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 |\
SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_48000)
diff --git a/sound/soc/msm/apq8074.c b/sound/soc/msm/apq8074.c
index 8f189e27055c..16698fd66378 100644
--- a/sound/soc/msm/apq8074.c
+++ b/sound/soc/msm/apq8074.c
@@ -28,10 +28,10 @@
#include <sound/pcm.h>
#include <sound/jack.h>
#include <sound/q6afe-v2.h>
+#include <sound/q6core.h>
#include <sound/pcm_params.h>
#include "qdsp6v2/msm-pcm-routing-v2.h"
-#include "qdsp6v2/q6core.h"
#include "../codecs/wcd9xxx-common.h"
#include "../codecs/wcd9320.h"
diff --git a/sound/soc/msm/apq8084-i2s.c b/sound/soc/msm/apq8084-i2s.c
index 652177ed1909..efbe1ff2eeeb 100644
--- a/sound/soc/msm/apq8084-i2s.c
+++ b/sound/soc/msm/apq8084-i2s.c
@@ -27,10 +27,10 @@
#include <sound/pcm.h>
#include <sound/jack.h>
#include <sound/q6afe-v2.h>
+#include <sound/q6core.h>
#include <sound/pcm_params.h>
#include <soc/qcom/subsystem_notif.h>
#include "qdsp6v2/msm-pcm-routing-v2.h"
-#include "qdsp6v2/q6core.h"
#include "../codecs/wcd9xxx-common.h"
#include "../codecs/wcd9320.h"
diff --git a/sound/soc/msm/apq8084.c b/sound/soc/msm/apq8084.c
index 41a6aec69afb..038893ca4334 100644
--- a/sound/soc/msm/apq8084.c
+++ b/sound/soc/msm/apq8084.c
@@ -29,9 +29,9 @@
#include <sound/pcm.h>
#include <sound/jack.h>
#include <sound/q6afe-v2.h>
+#include <sound/q6core.h>
#include <sound/pcm_params.h>
#include "qdsp6v2/msm-pcm-routing-v2.h"
-#include "qdsp6v2/q6core.h"
#include "../codecs/wcd9xxx-common.h"
#include "../codecs/wcd9320.h"
#include "../codecs/wcd9330.h"
diff --git a/sound/soc/msm/msm8226.c b/sound/soc/msm/msm8226.c
index cfacf373a7d5..f65cd842a12d 100644
--- a/sound/soc/msm/msm8226.c
+++ b/sound/soc/msm/msm8226.c
@@ -26,9 +26,9 @@
#include <sound/pcm.h>
#include <sound/jack.h>
#include <sound/q6afe-v2.h>
+#include <sound/q6core.h>
#include <qdsp6v2/msm-pcm-routing-v2.h>
-#include "qdsp6v2/q6core.h"
#include "../codecs/wcd9xxx-common.h"
#include "../codecs/wcd9306.h"
diff --git a/sound/soc/msm/msm8974.c b/sound/soc/msm/msm8974.c
index acb4d7746dba..323ec5afff47 100644
--- a/sound/soc/msm/msm8974.c
+++ b/sound/soc/msm/msm8974.c
@@ -27,9 +27,9 @@
#include <sound/pcm.h>
#include <sound/jack.h>
#include <sound/q6afe-v2.h>
+#include <sound/q6core.h>
#include <sound/pcm_params.h>
#include "qdsp6v2/msm-pcm-routing-v2.h"
-#include "qdsp6v2/q6core.h"
#include "../codecs/wcd9xxx-common.h"
#include "../codecs/wcd9320.h"
diff --git a/sound/soc/msm/qdsp6v2/audio_ocmem.c b/sound/soc/msm/qdsp6v2/audio_ocmem.c
index b0905e92b939..6c74a0fdc8c1 100644
--- a/sound/soc/msm/qdsp6v2/audio_ocmem.c
+++ b/sound/soc/msm/qdsp6v2/audio_ocmem.c
@@ -30,7 +30,7 @@
#include <linux/msm-bus-board.h>
#include <mach/msm_memtypes.h>
#include <soc/qcom/ocmem.h>
-#include "q6core.h"
+#include <sound/q6core.h>
#include "audio_ocmem.h"
diff --git a/sound/soc/msm/qdsp6v2/msm-dolby-dap-config.c b/sound/soc/msm/qdsp6v2/msm-dolby-dap-config.c
index 6d3a1299e42c..fdc5db10eda4 100644
--- a/sound/soc/msm/qdsp6v2/msm-dolby-dap-config.c
+++ b/sound/soc/msm/qdsp6v2/msm-dolby-dap-config.c
@@ -14,9 +14,9 @@
#include <linux/bitops.h>
#include <sound/control.h>
#include <sound/q6adm-v2.h>
+#include <sound/q6core.h>
#include "msm-dolby-dap-config.h"
-#include "q6core.h"
/* dolby endp based parameters */
struct dolby_dap_endp_params_s {
diff --git a/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c b/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c
index 2f05aa3e7d25..b3f1ecb1a1c4 100644
--- a/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c
+++ b/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c
@@ -30,6 +30,7 @@
#include <sound/tlv.h>
#include <sound/asound.h>
#include <sound/pcm_params.h>
+#include <sound/q6core.h>
#include <linux/slab.h>
#include "msm-pcm-routing-v2.h"
@@ -37,7 +38,6 @@
#include "msm-dts-srs-tm-config.h"
#include "msm-dolby-dap-config.h"
#include "q6voice.h"
-#include "q6core.h"
#include "sound/q6lsm.h"
#define EC_PORT_ID_PRIMARY_MI2S_TX 1
diff --git a/sound/soc/msm/qdsp6v2/q6core.c b/sound/soc/msm/qdsp6v2/q6core.c
index 2bd0bc37ddf3..95cacd10db6d 100644
--- a/sound/soc/msm/qdsp6v2/q6core.c
+++ b/sound/soc/msm/qdsp6v2/q6core.c
@@ -21,7 +21,7 @@
#include <linux/qdsp6v2/apr.h>
#include <soc/qcom/smd.h>
#include <soc/qcom/ocmem.h>
-#include "q6core.h"
+#include <sound/q6core.h>
#include "audio_acdb.h"
#define TIMEOUT_MS 1000
diff --git a/sound/soc/msm/qdsp6v2/q6lsm.c b/sound/soc/msm/qdsp6v2/q6lsm.c
index 3641e3451b51..75f9e550b8fd 100644
--- a/sound/soc/msm/qdsp6v2/q6lsm.c
+++ b/sound/soc/msm/qdsp6v2/q6lsm.c
@@ -25,12 +25,12 @@
#include <linux/atomic.h>
#include <sound/apr_audio-v2.h>
#include <sound/lsm_params.h>
+#include <sound/q6core.h>
#include <sound/q6lsm.h>
#include <asm/ioctls.h>
#include <linux/memory.h>
#include <linux/msm_audio_ion.h>
#include "audio_acdb.h"
-#include "q6core.h"
#define APR_TIMEOUT (5 * HZ)
#define LSM_CAL_SIZE 4096