soc: am64x: Add sec proxy info
authorLokesh Vutla <lokeshvutla@ti.com>
Wed, 11 Nov 2020 15:34:16 +0000 (21:04 +0530)
committerLokesh Vutla <lokeshvutla@ti.com>
Fri, 11 Dec 2020 12:44:44 +0000 (18:14 +0530)
Add TISCI Secure proxy info for AM64x devices. Data based on sysfw
v2020.08b. Also assign this data to sci_info based on SoC detection.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Makefile
common/socinfo.c
soc/am64x/am64x_sec_proxy_info.c [new file with mode: 0644]
soc/am64x/am64x_sec_proxy_info.h [new file with mode: 0644]

index 88cf90418fe89fdb540a7dcbe3f8d935e9d60aa1..a77e4d4598587d4063733b6c000b6ca58132019f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -104,6 +104,7 @@ J721ESOURCES =\
 
 AM64XSOURCES =\
              soc/am64x/am64x_host_info.c \
 
 AM64XSOURCES =\
              soc/am64x/am64x_host_info.c \
+             soc/am64x/am64x_sec_proxy_info.c \
 
 COMMONOBJECTS= $(COMMONSOURCES:.c=.o)
 AM65XOBJECTS=  $(AM65XSOURCES:.c=.o)
 
 COMMONOBJECTS= $(COMMONSOURCES:.c=.o)
 AM65XOBJECTS=  $(AM65XSOURCES:.c=.o)
index 4c72ec15387f1341511f7085a987b2aa7fa898ce..e2069e892eea7ad91136dd27febc529e0779fb26 100644 (file)
@@ -62,6 +62,7 @@
 #include <soc/j7200/j7200_clocks_info.h>
 #include <soc/j7200/j7200_rm_info.h>
 #include <soc/am64x/am64x_host_info.h>
 #include <soc/j7200/j7200_clocks_info.h>
 #include <soc/j7200/j7200_rm_info.h>
 #include <soc/am64x/am64x_host_info.h>
+#include <soc/am64x/am64x_sec_proxy_info.h>
 
 /* Assuming these addresses and definitions stay common across K3 devices */
 #define CTRLMMR_WKUP_JTAG_DEVICE_ID    0x43000018
 
 /* Assuming these addresses and definitions stay common across K3 devices */
 #define CTRLMMR_WKUP_JTAG_DEVICE_ID    0x43000018
@@ -189,6 +190,10 @@ static void am64x_init(void)
 
        sci_info->host_info = am64x_host_info;
        sci_info->num_hosts = AM64X_MAX_HOST_IDS;
 
        sci_info->host_info = am64x_host_info;
        sci_info->num_hosts = AM64X_MAX_HOST_IDS;
+       sci_info->sp_info[MAIN_SEC_PROXY] = am64x_main_sp_info;
+       sci_info->num_sp_threads[MAIN_SEC_PROXY] = AM64X_MAIN_SEC_PROXY_THREADS;
+       sci_info->sp_info[MCU_SEC_PROXY] = NULL;
+       sci_info->num_sp_threads[MCU_SEC_PROXY] = 0;
        soc_info.host_id = 13;
        soc_info.sec_proxy = &k3_lite_sec_proxy_base;
 }
        soc_info.host_id = 13;
        soc_info.sec_proxy = &k3_lite_sec_proxy_base;
 }
diff --git a/soc/am64x/am64x_sec_proxy_info.c b/soc/am64x/am64x_sec_proxy_info.c
new file mode 100644 (file)
index 0000000..d6a39cb
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * AM64X Sec Proxy Info
+ *
+ * Copyright (C) 2020 Texas Instruments Incorporated - https://www.ti.com/
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *    Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ *    Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the
+ *    distribution.
+ *
+ *    Neither the name of Texas Instruments Incorporated nor the names of
+ *    its contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <tisci.h>
+#include <socinfo.h>
+
+struct ti_sci_sec_proxy_info am64x_main_sp_info[] = {
+       [0] = {0, "read", 11, "MAIN_0_R5_0", "response"},
+       [1] = {1, "write", 10, "MAIN_0_R5_0", "low_priority"},
+       [2] = {2, "read", 11, "MAIN_0_R5_1", "response"},
+       [3] = {3, "write", 10, "MAIN_0_R5_1", "low_priority"},
+       [4] = {4, "read", 2, "MAIN_0_R5_2", "response"},
+       [5] = {5, "write", 1, "MAIN_0_R5_2", "low_priority"},
+       [6] = {6, "read", 2, "MAIN_0_R5_3", "response"},
+       [7] = {7, "write", 1, "MAIN_0_R5_3", "low_priority"},
+       [8] = {8, "read", 11, "A53_0", "response"},
+       [9] = {9, "write", 10, "A53_0", "low_priority"},
+       [10] = {10, "read", 6, "A53_1", "response"},
+       [11] = {11, "write", 5, "A53_1", "low_priority"},
+       [12] = {12, "read", 6, "A53_2", "response"},
+       [13] = {13, "write", 5, "A53_2", "low_priority"},
+       [14] = {14, "read", 6, "A53_3", "response"},
+       [15] = {15, "write", 5, "A53_3", "low_priority"},
+       [16] = {16, "read", 6, "M4_0", "response"},
+       [17] = {17, "write", 5, "M4_0", "low_priority"},
+       [18] = {18, "read", 6, "MAIN_1_R5_0", "response"},
+       [19] = {19, "write", 5, "MAIN_1_R5_0", "low_priority"},
+       [20] = {20, "read", 6, "MAIN_1_R5_1", "response"},
+       [21] = {21, "write", 5, "MAIN_1_R5_1", "low_priority"},
+       [22] = {22, "read", 2, "MAIN_1_R5_2", "response"},
+       [23] = {23, "write", 1, "MAIN_1_R5_2", "low_priority"},
+       [24] = {24, "read", 2, "MAIN_1_R5_3", "response"},
+       [25] = {25, "write", 1, "MAIN_1_R5_3", "low_priority"},
+       [26] = {26, "read", 2, "ICSSG_0", "response"},
+       [27] = {27, "write", 1, "ICSSG_0", "low_priority"},
+};
diff --git a/soc/am64x/am64x_sec_proxy_info.h b/soc/am64x/am64x_sec_proxy_info.h
new file mode 100644 (file)
index 0000000..e4d47c3
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * AM64X Sec Proxy Info
+ *
+ * Copyright (C) 2020 Texas Instruments Incorporated - https://www.ti.com/
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *    Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ *    Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the
+ *    distribution.
+ *
+ *    Neither the name of Texas Instruments Incorporated nor the names of
+ *    its contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __AM64X_SEC_PROXY_INFO_H
+#define __AM64X_SEC_PROXY_INFO_H
+
+#define AM64X_MAIN_SEC_PROXY_THREADS   28
+
+extern struct ti_sci_sec_proxy_info am64x_main_sp_info[];
+
+#endif /* __AM64X_SEC_PROXY_INFO_H */
\ No newline at end of file