From a2b67025f716e1c8091d318b1b4f709abdb0def3 Mon Sep 17 00:00:00 2001 From: Lokesh Vutla Date: Thu, 22 Aug 2019 11:58:52 +0530 Subject: [PATCH] soc: j721e: Add processors info Add Processors information for J721e devices. Signed-off-by: Lokesh Vutla --- Makefile | 3 +- common/socinfo.c | 3 ++ include/soc/j721e/j721e_processors_info.h | 44 ++++++++++++++++++++ soc/j721e/j721e_processors_info.c | 50 +++++++++++++++++++++++ 4 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 include/soc/j721e/j721e_processors_info.h create mode 100644 soc/j721e/j721e_processors_info.c diff --git a/Makefile b/Makefile index deb28fd..0d711a5 100644 --- a/Makefile +++ b/Makefile @@ -73,7 +73,8 @@ AM65XSOURCES =\ J721ESOURCES =\ soc/j721e/j721e_host_info.c \ - soc/j721e/j721e_sec_proxy_info.c + soc/j721e/j721e_sec_proxy_info.c \ + soc/j721e/j721e_processors_info.c COMMONOBJECTS= $(COMMONSOURCES:.c=.o) AM65XOBJECTS= $(AM65XSOURCES:.c=.o) diff --git a/common/socinfo.c b/common/socinfo.c index 880ebf9..b518252 100644 --- a/common/socinfo.c +++ b/common/socinfo.c @@ -42,6 +42,7 @@ #include #include #include +#include /* Assuming these addresses and definitions stay common across K3 devices */ #define CTRLMMR_WKUP_JTAG_DEVICE_ID 0x43000018 @@ -105,6 +106,8 @@ static void j721e_init(void) sci_info->num_sp_threads[MAIN_SEC_PROXY] = J721E_MAIN_SEC_PROXY_THREADS; sci_info->sp_info[MCU_SEC_PROXY] = j721e_mcu_sp_info; sci_info->num_sp_threads[MCU_SEC_PROXY] = J721E_MCU_SEC_PROXY_THREADS; + sci_info->processors_info = j721e_processors_info; + sci_info->num_processors = J721E_MAX_PROCESSORS_IDS; } int soc_init(void) diff --git a/include/soc/j721e/j721e_processors_info.h b/include/soc/j721e/j721e_processors_info.h new file mode 100644 index 0000000..59c9af1 --- /dev/null +++ b/include/soc/j721e/j721e_processors_info.h @@ -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 __J721E_PROCESSORS_INFO +#define __J721E_PROCESSORS_INFO + +#include +#include + +#define J721E_MAX_PROCESSORS_IDS 11 + +extern struct ti_sci_processors_info j721e_processors_info[]; +#endif diff --git a/soc/j721e/j721e_processors_info.c b/soc/j721e/j721e_processors_info.c new file mode 100644 index 0000000..9e44f79 --- /dev/null +++ b/soc/j721e/j721e_processors_info.c @@ -0,0 +1,50 @@ +/* + * 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. + */ + +#include +#include + +struct ti_sci_processors_info j721e_processors_info[] = { + [0] = {202, 2, 0x20, "A72SS0_CORE0"}, + [1] = {203, 0, 0x21, "A72SS0_CORE1"}, + [2] = {142, 0, 0x03, "C66SS0_CORE0"}, + [3] = {143, 0, 0x04, "C66SS1_CORE0"}, + [4] = {15, 0, 0x30, "C71SS0"}, + [5] = {250, 0, 0x01, "MCU_R5FSS0_CORE0"}, + [6] = {251, 0, 0x02, "MCU_R5FSS0_CORE1"}, + [7] = {245, 0, 0x06, "R5FSS0_CORE0"}, + [8] = {246, 0, 0x07, "R5FSS0_CORE1"}, + [9] = {247, 0, 0x08, "R5FSS1_CORE0"}, + [10] = {248, 0, 0x09, "R5FSS1_CORE1"}, +}; -- 2.26.2