soc: qcom: dcc_v2: Add snapshot of the DCC v2 driver

This is a snapshot of the DCC_v2 driver as of msm-4.14
commit 'f7e2b74'("coresight: stm: Fix master control issue").
The second offset present as part of offset descriptor needs
to take into account the length of the first offset. This patch
fixes the current offset calculation to account for it. This
patch removes the clock support since it's not needed.

Fix sscanf issue to prevent buffer overflow.

Change-Id: Iac7463b759efd56b98aa92c594a46a76c3c8d208
Signed-off-by: Rama Aparna Mallavarapu <aparnam@codeaurora.org>
Signed-off-by: Mulu He <muluhe@codeaurora.org>
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
diff --git a/drivers/soc/qcom/Makefile b/drivers/soc/qcom/Makefile
index a5aa6e2..c2a94ec 100644
--- a/drivers/soc/qcom/Makefile
+++ b/drivers/soc/qcom/Makefile
@@ -34,6 +34,7 @@
 obj-$(CONFIG_MSM_CORE_HANG_DETECT) += core_hang_detect.o
 obj-$(CONFIG_QCOM_MINIDUMP) += msm_minidump.o minidump_log.o
 obj-$(CONFIG_QCOM_MEMORY_DUMP_V2) += memory_dump_v2.o
+obj-$(CONFIG_QCOM_DCC_V2) += dcc_v2.o
 obj-$(CONFIG_MSM_SERVICE_NOTIFIER) += service-notifier.o
 obj-$(CONFIG_MSM_SERVICE_LOCATOR) += service-locator.o
 obj-$(CONFIG_MSM_SYSMON_GLINK_COMM) += sysmon-glink.o sysmon-qmi.o