On 11/22/18 5:39 AM, Roger Quadros wrote:
From: "Andrew F. Davis" <afd@xxxxxx>
Add two new API - pruss_request_mem_region() & pruss_release_mem_region(),
to the PRUSS platform driver to allow client drivers to acquire and release
the common memory resources present within a PRU-ICSS subsystem. This
allows the client drivers to directly manipulate the respective memories,
as per their design contract with the associated firmware.
Signed-off-by: Andrew F. Davis <afd@xxxxxx>
[s-anna@xxxxxx: rename functions, add error checking, comments]
Signed-off-by: Suman Anna <s-anna@xxxxxx>
Signed-off-by: Roger Quadros <rogerq@xxxxxx>
---
diff --git a/drivers/soc/ti/pruss.h b/drivers/soc/ti/pruss.h
index a5a0667..f8878c2 100644
--- a/drivers/soc/ti/pruss.h
+++ b/drivers/soc/ti/pruss.h
@@ -22,28 +22,6 @@
#define MAX_PRU_HOST_INT 10
/**
- * enum pruss_mem - PRUSS memory range identifiers
- */
-enum pruss_mem {
- PRUSS_MEM_DRAM0 = 0,
- PRUSS_MEM_DRAM1,
- PRUSS_MEM_SHRD_RAM2,
- PRUSS_MEM_MAX,
-};
-
-/**
- * struct pruss_mem_region - PRUSS memory region structure
- * @va: kernel virtual address of the PRUSS memory region
- * @pa: physical (bus) address of the PRUSS memory region
- * @size: size of the PRUSS memory region
- */
-struct pruss_mem_region {
- void __iomem *va;
- phys_addr_t pa;
- size_t size;
-};
Why don't we just put these definitions in the correct header file
to start with when they are introduced earlier in this series?
diff --git a/include/linux/pruss.h b/include/linux/pruss.h
new file mode 100644
index 0000000..198ae25
--- /dev/null
+++ b/include/linux/pruss.h
@@ -0,0 +1,61 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/**
+ * PRU-ICSS Subsystem user interfaces
+ *
+ * Copyright (C) 2015-2018 Texas Instruments Incorporated - http://www.ti.com
+ * Suman Anna <s-anna@xxxxxx>
+ * Tero Kristo <t-kristo@xxxxxx>
+ */
+
+#ifndef __LINUX_PRUSS_H
+#define __LINUX_PRUSS_H
+
+/**
+ * enum pruss_mem - PRUSS memory range identifiers
+ */
+enum pruss_mem {
+ PRUSS_MEM_DRAM0 = 0,
+ PRUSS_MEM_DRAM1,
+ PRUSS_MEM_SHRD_RAM2,
+ PRUSS_MEM_MAX,
+};
+
+/**
+ * struct pruss_mem_region - PRUSS memory region structure
+ * @va: kernel virtual address of the PRUSS memory region
+ * @pa: physical (bus) address of the PRUSS memory region
+ * @size: size of the PRUSS memory region
+ */
+struct pruss_mem_region {
+ void __iomem *va;
+ phys_addr_t pa;
+ size_t size;
+};
+