]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - k3conf/k3conf.git/commitdiff
soc: am65x: Add processors info
authorLokesh Vutla <lokeshvutla@ti.com>
Thu, 22 Aug 2019 06:19:33 +0000 (11:49 +0530)
committerLokesh Vutla <lokeshvutla@ti.com>
Sun, 25 Aug 2019 03:14:04 +0000 (08:44 +0530)
Add Processors information for AM65x devices.

dev_id, clk_id in ti_sci_processors_info is hand edited.

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

index 061480e850f25861f6991cadc209cd0d46258431..deb28fd36e3493573a802ead3fee20c36e895ba3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -68,7 +68,8 @@ COMMONSOURCES=\
 
 AM65XSOURCES =\
              soc/am65x/am65x_host_info.c \
-             soc/am65x/am65x_sec_proxy_info.c
+             soc/am65x/am65x_sec_proxy_info.c \
+             soc/am65x/am65x_processors_info.c
 
 J721ESOURCES =\
              soc/j721e/j721e_host_info.c \
index 165348c6e81ffb2fe37a7704f5c81c8ab6471d36..880ebf97eec02926a7bd52dc169651719fba4422 100644 (file)
@@ -39,6 +39,7 @@
 #include <sec_proxy.h>
 #include <soc/am65x/am65x_host_info.h>
 #include <soc/am65x/am65x_sec_proxy_info.h>
+#include <soc/am65x/am65x_processors_info.h>
 #include <soc/j721e/j721e_host_info.h>
 #include <soc/j721e/j721e_sec_proxy_info.h>
 
@@ -90,6 +91,8 @@ static void am654_init(void)
        sci_info->num_sp_threads[MAIN_SEC_PROXY] = AM65X_MAIN_SEC_PROXY_THREADS;
        sci_info->sp_info[MCU_SEC_PROXY] = am65x_mcu_sp_info;
        sci_info->num_sp_threads[MCU_SEC_PROXY] = AM65X_MCU_SEC_PROXY_THREADS;
+       sci_info->processors_info = am65x_processors_info;
+       sci_info->num_processors = AM65X_MAX_PROCESSORS_IDS;
 }
 
 static void j721e_init(void)
diff --git a/include/soc/am65x/am65x_processors_info.h b/include/soc/am65x/am65x_processors_info.h
new file mode 100644 (file)
index 0000000..938b8fd
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * SoC Processors Info
+ *
+ * Copyright (C) 2019 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_PROCESSORS_INFO
+#define __AM65X_PROCESSORS_INFO
+
+#include <stdio.h>
+#include <stdint.h>
+
+#define AM65X_MAX_PROCESSORS_IDS       6
+
+extern struct ti_sci_processors_info am65x_processors_info[];
+#endif
index 33c1ea50e5c0294f7409c5c394daca61f8b0a5dd..cfab5814df216512aeab7ac7bd1ab39eb92ec595 100644 (file)
@@ -63,6 +63,13 @@ struct ti_sci_sec_proxy_info {
        char host_function[25];
 };
 
+struct ti_sci_processors_info {
+       uint32_t dev_id;
+       uint32_t clk_id;
+       uint32_t processor_id;
+       char name[20];
+};
+
 struct ti_sci_info {
        uint8_t host_id;
        struct ti_sci_version_info version;
@@ -70,6 +77,8 @@ struct ti_sci_info {
        uint32_t num_hosts;
        struct ti_sci_sec_proxy_info *sp_info[2];
        uint32_t num_sp_threads[2];
+       struct ti_sci_processors_info *processors_info;
+       uint32_t num_processors;
 };
 
 #define MAX_DEVICE_STATE_LENGTH                25
diff --git a/soc/am65x/am65x_processors_info.c b/soc/am65x/am65x_processors_info.c
new file mode 100644 (file)
index 0000000..1139b11
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * SoC Host Info
+ *
+ * Copyright (C) 2019 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_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"},
+};