db845c: qcom: Add userspace tools to talk to dsp and modem

Add Qcom userspace tools and their respective sepolicy rules.

Userspace tools are downloaded from following github:

To trigger loading of wlan firmware on SDM845
git clone https://github.com/andersson/pd-mapper

Userspace reference for net/qrtr in the Linux kernel
git clone https://github.com/andersson/qrtr

Qualcomm Remote Filesystem Service Implementation
git clone https://github.com/andersson/rmtfs

Trivial File Transfer Protocol server over AF_QIPCRTR
git clone https://github.com/andersson/tqftpserv

Change-Id: Ic466af6fef010a9b71c90e38205f49a876b001e2
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
diff --git a/qcom/rmtfs/rmtfs.h b/qcom/rmtfs/rmtfs.h
new file mode 100644
index 0000000..242baa5
--- /dev/null
+++ b/qcom/rmtfs/rmtfs.h
@@ -0,0 +1,42 @@
+#ifndef __RMTFS_H__
+#define __RMTFS_H__
+
+#include <stdint.h>
+#include "qmi_rmtfs.h"
+
+#define SECTOR_SIZE		512
+
+struct qmi_packet {
+	uint8_t flags;
+	uint16_t txn_id;
+	uint16_t msg_id;
+	uint16_t msg_len;
+	uint8_t data[];
+} __attribute__((__packed__));
+
+struct rmtfs_mem;
+
+struct rmtfs_mem *rmtfs_mem_open(void);
+void rmtfs_mem_close(struct rmtfs_mem *rmem);
+int64_t rmtfs_mem_alloc(struct rmtfs_mem *rmem, size_t size);
+void rmtfs_mem_free(struct rmtfs_mem *rmem);
+ssize_t rmtfs_mem_read(struct rmtfs_mem *rmem, unsigned long phys_address, void *buf, ssize_t len);
+ssize_t rmtfs_mem_write(struct rmtfs_mem *rmem, unsigned long phys_address, const void *buf, ssize_t len);
+
+struct rmtfd;
+
+int storage_init(const char *storage_root, bool read_only, bool use_partitions);
+struct rmtfd *storage_open(unsigned node, const char *path);
+struct rmtfd *storage_get(unsigned node, int caller_id);
+void storage_close(struct rmtfd *rmtfd);
+int storage_get_caller_id(const struct rmtfd *rmtfd);
+int storage_get_error(const struct rmtfd *rmtfd);
+void storage_exit(void);
+ssize_t storage_pread(const struct rmtfd *rmtfd, void *buf, size_t nbyte, off_t offset);
+ssize_t storage_pwrite(struct rmtfd *rmtfd, const void *buf, size_t nbyte, off_t offset);
+
+int rproc_init(void);
+int rproc_start(void);
+int rproc_stop(void);
+
+#endif