aboutsummaryrefslogtreecommitdiff
path: root/drivers/platform/msm
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform/msm')
-rw-r--r--drivers/platform/msm/ipa/ipa_client.c3
-rw-r--r--drivers/platform/msm/ipa/ipa_dp.c4
-rw-r--r--drivers/platform/msm/ipa/ipa_qmi_service.h4
-rw-r--r--drivers/platform/msm/ipa/ipa_qmi_service_v01.c5
-rw-r--r--drivers/platform/msm/sps/sps_bam.c24
-rw-r--r--drivers/platform/msm/sps/sps_bam.h4
-rw-r--r--drivers/platform/msm/sps/sps_rm.c9
-rw-r--r--drivers/platform/msm/ssm.c2
8 files changed, 37 insertions, 18 deletions
diff --git a/drivers/platform/msm/ipa/ipa_client.c b/drivers/platform/msm/ipa/ipa_client.c
index fa8ef98fa6e..d20f03d646b 100644
--- a/drivers/platform/msm/ipa/ipa_client.c
+++ b/drivers/platform/msm/ipa/ipa_client.c
@@ -309,9 +309,6 @@ int ipa_connect(const struct ipa_connect_params *in, struct ipa_sps_params *sps,
ep->connect.event_thresh = IPA_EVENT_THRESHOLD;
ep->connect.options = SPS_O_AUTO_ENABLE; /* BAM-to-BAM */
- if (IPA_CLIENT_IS_CONS(in->client))
- ep->connect.options |= SPS_O_NO_DISABLE;
-
result = sps_connect(ep->ep_hdl, &ep->connect);
if (result) {
IPAERR("sps_connect fails.\n");
diff --git a/drivers/platform/msm/ipa/ipa_dp.c b/drivers/platform/msm/ipa/ipa_dp.c
index 7efca891ee9..4150ebc58af 100644
--- a/drivers/platform/msm/ipa/ipa_dp.c
+++ b/drivers/platform/msm/ipa/ipa_dp.c
@@ -2076,7 +2076,7 @@ static int ipa_assign_policy(struct ipa_sys_connect_params *in,
} else if (in->client == IPA_CLIENT_APPS_LAN_CONS) {
sys->policy = IPA_POLICY_INTR_POLL_MODE;
sys->sps_option = (SPS_O_AUTO_ENABLE | SPS_O_EOT |
- SPS_O_ACK_TRANSFERS | SPS_O_NO_DISABLE);
+ SPS_O_ACK_TRANSFERS);
sys->sps_callback = ipa_sps_irq_rx_notify;
INIT_WORK(&sys->work, ipa_wq_handle_rx);
INIT_DELAYED_WORK(&sys->switch_to_intr_work,
@@ -2150,7 +2150,7 @@ static int ipa_assign_policy(struct ipa_sys_connect_params *in,
sys->ep->status.status_en = false;
sys->policy = IPA_POLICY_INTR_POLL_MODE;
sys->sps_option = (SPS_O_AUTO_ENABLE | SPS_O_EOT
- | SPS_O_ACK_TRANSFERS | SPS_O_NO_DISABLE);
+ | SPS_O_ACK_TRANSFERS);
sys->sps_callback = ipa_sps_irq_rx_notify;
INIT_WORK(&sys->work, ipa_wq_handle_rx);
INIT_DELAYED_WORK(&sys->switch_to_intr_work,
diff --git a/drivers/platform/msm/ipa/ipa_qmi_service.h b/drivers/platform/msm/ipa/ipa_qmi_service.h
index e1f0148242e..4681bec42df 100644
--- a/drivers/platform/msm/ipa/ipa_qmi_service.h
+++ b/drivers/platform/msm/ipa/ipa_qmi_service.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-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
@@ -15,8 +15,8 @@
#include <mach/ipa.h>
#include <linux/ipa_qmi_service_v01.h>
-#include <mach/msm_qmi_interface.h>
#include <uapi/linux/msm_rmnet.h>
+#include <soc/qcom/msm_qmi_interface.h>
#include "ipa_i.h"
/**
diff --git a/drivers/platform/msm/ipa/ipa_qmi_service_v01.c b/drivers/platform/msm/ipa/ipa_qmi_service_v01.c
index b6696925313..d7f0953825f 100644
--- a/drivers/platform/msm/ipa/ipa_qmi_service_v01.c
+++ b/drivers/platform/msm/ipa/ipa_qmi_service_v01.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-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
@@ -12,9 +12,10 @@
*/
#include <linux/qmi_encdec.h>
-#include <mach/msm_qmi_interface.h>
#include <linux/ipa_qmi_service_v01.h>
+#include <soc/qcom/msm_qmi_interface.h>
+
/* Type Definitions */
static struct elem_info ipa_hdr_tbl_info_type_data_v01_ei[] = {
{
diff --git a/drivers/platform/msm/sps/sps_bam.c b/drivers/platform/msm/sps/sps_bam.c
index 71aecbf9f1f..7b082e3ffe4 100644
--- a/drivers/platform/msm/sps/sps_bam.c
+++ b/drivers/platform/msm/sps/sps_bam.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2011-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
@@ -169,6 +169,7 @@ static irqreturn_t bam_isr(int irq, void *ctxt)
list_for_each_entry(pipe, &dev->pipes_q, list) {
/* Check this pipe's bit in the source mask */
if (BAM_PIPE_IS_ASSIGNED(pipe)
+ && (!pipe->disconnecting)
&& (source & pipe->pipe_index_mask)) {
/* This pipe has an interrupt pending */
pipe_handler(dev, pipe);
@@ -585,6 +586,8 @@ static void pipe_clear(struct sps_pipe *pipe)
pipe->mode = -1;
pipe->num_descs = 0;
pipe->desc_size = 0;
+ pipe->disconnecting = false;
+ pipe->late_eot = false;
memset(&pipe->sys, 0, sizeof(pipe->sys));
INIT_LIST_HEAD(&pipe->sys.events_q);
}
@@ -1046,6 +1049,7 @@ int sps_bam_pipe_set_params(struct sps_bam *dev, u32 pipe_index, u32 options)
ack_xfers = ((options & SPS_O_ACK_TRANSFERS));
pipe->hybrid = options & SPS_O_HYBRID;
+ pipe->late_eot = options & SPS_O_LATE_EOT;
/* Create interrupt source mask */
mask = 0;
@@ -1567,6 +1571,24 @@ static void pipe_handler_eot(struct sps_bam *dev, struct sps_pipe *pipe)
/* Get offset of last descriptor completed by the pipe */
end_offset = bam_pipe_get_desc_read_offset(dev->base, pipe_index);
+ if (producer && pipe->late_eot) {
+ struct sps_iovec *desc_end;
+ if (end_offset == 0)
+ desc_end = (struct sps_iovec *)(pipe->sys.desc_buf
+ + pipe->desc_size - sizeof(struct sps_iovec));
+ else
+ desc_end = (struct sps_iovec *) (pipe->sys.desc_buf
+ + end_offset - sizeof(struct sps_iovec));
+
+ if (!(desc_end->flags & SPS_IOVEC_FLAG_EOT)) {
+ if (end_offset == 0)
+ end_offset = pipe->desc_size
+ - sizeof(struct sps_iovec);
+ else
+ end_offset -= sizeof(struct sps_iovec);
+ }
+ }
+
/* If no queue, then do not generate any events */
if (pipe->sys.no_queue) {
if (!pipe->sys.ack_xfers) {
diff --git a/drivers/platform/msm/sps/sps_bam.h b/drivers/platform/msm/sps/sps_bam.h
index da5dafd8941..8fae5cb0339 100644
--- a/drivers/platform/msm/sps/sps_bam.h
+++ b/drivers/platform/msm/sps/sps_bam.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2011-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
@@ -176,6 +176,7 @@ struct sps_pipe {
u32 irq_mask;
int polled;
int hybrid;
+ bool late_eot;
u32 irq_gen_addr;
enum sps_mode mode;
u32 num_descs; /* Size (number of elements) of descriptor FIFO */
@@ -185,6 +186,7 @@ struct sps_pipe {
/* System mode control */
struct sps_bam_sys_mode sys;
+ bool disconnecting;
};
/* BAM device descriptor */
diff --git a/drivers/platform/msm/sps/sps_rm.c b/drivers/platform/msm/sps/sps_rm.c
index 7d7e1a6abdd..d8c7a4deb1b 100644
--- a/drivers/platform/msm/sps/sps_rm.c
+++ b/drivers/platform/msm/sps/sps_rm.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2011-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
@@ -556,11 +556,8 @@ static int sps_rm_free(struct sps_pipe *pipe)
{
struct sps_connection *map = (void *)pipe->map;
struct sps_connect *cfg = &pipe->connect;
- struct sps_bam *bam = pipe->bam;
- unsigned long flags;
mutex_lock(&sps_rm->lock);
- spin_lock_irqsave(&bam->isr_lock, flags);
/* Free this connection */
if (cfg->mode == SPS_MODE_SRC)
@@ -574,7 +571,6 @@ static int sps_rm_free(struct sps_pipe *pipe)
sps_rm_remove_ref(map);
- spin_unlock_irqrestore(&bam->isr_lock, flags);
mutex_unlock(&sps_rm->lock);
return 0;
@@ -800,8 +796,9 @@ int sps_rm_state_change(struct sps_pipe *pipe, u32 state)
synchronize_irq(bam->props.irq);
spin_lock_irqsave(&bam->isr_lock, flags);
- result = sps_bam_pipe_disconnect(pipe->bam, pipe_index);
+ pipe->disconnecting = true;
spin_unlock_irqrestore(&bam->isr_lock, flags);
+ result = sps_bam_pipe_disconnect(pipe->bam, pipe_index);
if (result) {
SPS_ERR("sps:Failed to disconnect BAM 0x%x pipe %d",
pipe->bam->props.phys_addr,
diff --git a/drivers/platform/msm/ssm.c b/drivers/platform/msm/ssm.c
index ea59abf00e4..fe612a683a6 100644
--- a/drivers/platform/msm/ssm.c
+++ b/drivers/platform/msm/ssm.c
@@ -27,7 +27,7 @@
#include <linux/platform_device.h>
#include <linux/msm_ion.h>
#include <linux/platform_data/qcom_ssm.h>
-#include <mach/scm.h>
+#include <soc/qcom/scm.h>
#include <mach/msm_smd.h>
#include "qseecom_kernel.h"