msm: qdss: add support for qdss_get/put and qdss_enable/disable
Implement qdss_get/put and qdss_enable/disable external apis. Add
qdss platform virtual device and platform data to support the
implementation. Also split the QDSS driver initcall to allow early
init of data structures required to support qdss_get calls made by
other trace source drivers that want to use the services of the
qdss driver.
QDSS source drivers will use these apis to setup QDSS to collect
the trace data that they will generate. QDSS logical driver will
internally call the apis for the etb, funnel and tpiu device
drivers.
Change-Id: I06ece3fba110398b346c86f8b479153c60777540
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
diff --git a/arch/arm/mach-msm/devices-8960.c b/arch/arm/mach-msm/devices-8960.c
index b03f137..0ab81a4 100644
--- a/arch/arm/mach-msm/devices-8960.c
+++ b/arch/arm/mach-msm/devices-8960.c
@@ -34,6 +34,7 @@
#include <sound/msm-dai-q6.h>
#include <sound/apr_audio.h>
#include <mach/msm_tsif.h>
+#include <mach/qdss.h>
#include "clock.h"
#include "devices.h"
#include "devices-msm8x60.h"
@@ -3167,6 +3168,26 @@
#define MSM_FUNNEL_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x4000)
#define MSM_ETM_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1C000)
+#define QDSS_SOURCE(src_name, fpm) { .name = src_name, .fport_mask = fpm, }
+
+static struct qdss_source msm_qdss_sources[] = {
+ QDSS_SOURCE("msm_etm", 0x3),
+};
+
+static struct msm_qdss_platform_data qdss_pdata = {
+ .src_table = msm_qdss_sources,
+ .size = ARRAY_SIZE(msm_qdss_sources),
+ .afamily = 1,
+};
+
+struct platform_device msm_qdss_device = {
+ .name = "msm_qdss",
+ .id = -1,
+ .dev = {
+ .platform_data = &qdss_pdata,
+ },
+};
+
static struct resource msm_etb_resources[] = {
{
.start = MSM_ETB_PHYS_BASE,