soc: am65x_sr2: Add processors info
authorLokesh Vutla <lokeshvutla@ti.com>
Fri, 10 Apr 2020 10:46:52 +0000 (16:16 +0530)
committerLokesh Vutla <lokeshvutla@ti.com>
Wed, 15 Apr 2020 03:29:31 +0000 (08:59 +0530)
Add TISCI Processors information for AM65x SR2 devices. Data derived from
sysfw 2020.02 Documentation.

Tested-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Makefile
common/socinfo.c
soc/am65x_sr2/am65x_sr2_processors_info.c [new file with mode: 0644]
soc/am65x_sr2/am65x_sr2_processors_info.h [new file with mode: 0644]

index 6a6c52deb71a67d0ec78221721029fab08906bba..7d89a90a3c5c414faeac730221f16adbb2a4e369 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -80,7 +80,8 @@ AM65XSOURCES =\
              soc/am65x/am65x_devices_info.c \
              soc/am65x/am65x_clocks_info.c \
              soc/am65x_sr2/am65x_sr2_host_info.c \
-             soc/am65x_sr2/am65x_sr2_sec_proxy_info.c
+             soc/am65x_sr2/am65x_sr2_sec_proxy_info.c \
+             soc/am65x_sr2/am65x_sr2_processors_info.c
 
 J721ESOURCES =\
              soc/j721e/j721e_host_info.c \
index dc26cf8dd2e071df393cba54a81ed38883f3f436..0850ea0231e01b1ba34423958f189185f02b8975 100644 (file)
@@ -44,6 +44,7 @@
 #include <soc/am65x/am65x_clocks_info.h>
 #include <soc/am65x_sr2/am65x_sr2_host_info.h>
 #include <soc/am65x_sr2/am65x_sr2_sec_proxy_info.h>
+#include <soc/am65x_sr2/am65x_sr2_processors_info.h>
 #include <soc/j721e/j721e_host_info.h>
 #include <soc/j721e/j721e_sec_proxy_info.h>
 #include <soc/j721e/j721e_processors_info.h>
@@ -116,6 +117,8 @@ static void am654_sr2_init(void)
        sci_info->num_sp_threads[MAIN_SEC_PROXY] = AM65X_SR2_MAIN_SEC_PROXY_THREADS;
        sci_info->sp_info[MCU_SEC_PROXY] = am65x_sr2_mcu_sp_info;
        sci_info->num_sp_threads[MCU_SEC_PROXY] = AM65X_SR2_MCU_SEC_PROXY_THREADS;
+       sci_info->processors_info = am65x_sr2_processors_info;
+       sci_info->num_processors = AM65X_SR2_MAX_PROCESSORS_IDS;
 }
 
 static void j721e_init(void)
diff --git a/soc/am65x_sr2/am65x_sr2_processors_info.c b/soc/am65x_sr2/am65x_sr2_processors_info.c
new file mode 100644 (file)
index 0000000..c12132c
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * AM65X_SR2 Processor Info
+ *
+ * Copyright (C) 2020 Texas Instruments Incorporated - http://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_processors_info am65x_sr2_processors_info[] = {
+       [0] = {202, 0, 0x20, "A53_CL0_C0"},
+       [1] = {203, 0, 0x21, "A53_CL0_C1"},
+       [2] = {204, 0, 0x22, "A53_CL1_C0"},
+       [3] = {205, 0, 0x23, "A53_CL1_C1"},
+       [4] = {159, 0, 0x01, "R5_CL0_C0"},
+       [5] = {245, 0, 0x02, "R5_CL0_C1"},
+};
diff --git a/soc/am65x_sr2/am65x_sr2_processors_info.h b/soc/am65x_sr2/am65x_sr2_processors_info.h
new file mode 100644 (file)
index 0000000..197b207
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * AM65X_SR2 Processor Info
+ *
+ * Copyright (C) 2020 Texas Instruments Incorporated - http://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 __AM65X_SR2_PROCESSOR_INFO_H
+#define __AM65X_SR2_PROCESSOR_INFO_H
+
+#define AM65X_SR2_MAX_PROCESSORS_IDS   6
+extern struct ti_sci_processors_info am65x_sr2_processors_info[];
+
+#endif /* __AM65X_SR2_PROCESSOR_INFO_H */
\ No newline at end of file