[qca-nss-drv]: Add support for retrieving NSS FW logs from HLOS

This commit adds support in qca-nss-drv to retrieve NSS FW logs
from HLOS by running cat/tail command on file
/sys/kernel/debug/qca-nss-drv/logs/core0 (core-id 0) or file
/sys/kernel/debug/qca-nss-drv/logs/core1 (core-id 1). We can
also run 'tail -f <file>'

Change-Id: Id137e0c41e336d683a46354fd50544a8d9364ffa
Signed-off-by: Saurabh Misra <smisra@codeaurora.org>
diff --git a/nss_init.c b/nss_init.c
index 3173769..7d5a59b 100755
--- a/nss_init.c
+++ b/nss_init.c
@@ -53,6 +53,7 @@
 int nss_ctl_redirect __read_mostly = 0;
 int nss_ctl_debug __read_mostly = 0;
 int nss_rps_cfg __read_mostly = 0;
+int nss_ctl_logbuf __read_mostly = 0;
 
 /*
  * PM client handle
@@ -168,7 +169,7 @@
 		goto err_init_0;
 	}
 
-	printk("nss_driver - fw of size %u  bytes copied to load addr: %x\n", nss_fw->size, npd->load_addr);
+	printk("nss_driver - fw of size %u  bytes copied to load addr: %x, nss_id : %d\n", nss_fw->size, npd->load_addr, nss_dev->id);
 	memcpy_toio(load_mem, nss_fw->data, nss_fw->size);
 	release_firmware(nss_fw);
 	iounmap(load_mem);
@@ -865,6 +866,13 @@
 		.mode                   = 0644,
 		.proc_handler   	= &nss_rpscfg_handler,
 	},
+	{
+		.procname               = "logbuf",
+		.data                   = &nss_ctl_logbuf,
+		.maxlen                 = sizeof(int),
+		.mode                   = 0644,
+		.proc_handler   	= &nss_logbuffer_handler,
+	},
 	{ }
 };