Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
7fbb3dba
Commit
7fbb3dba
authored
Sep 09, 2020
by
Madhukar Pappireddy
Committed by
TrustedFirmware Code Review
Sep 09, 2020
Browse files
Merge "mediatek: Add jedec info" into integration
parents
f831ed73
74a34600
Changes
5
Show whitespace changes
Inline
Side-by-side
plat/mediatek/common/mtk_plat_common.c
View file @
7fbb3dba
...
...
@@ -10,8 +10,10 @@
#include <drivers/arm/cci.h>
#include <drivers/console.h>
#include <lib/mmio.h>
#include <lib/smccc.h>
#include <lib/xlat_tables/xlat_tables.h>
#include <plat/common/platform.h>
#include <services/arm_arch_svc.h>
#include <mtk_plat_common.h>
#include <mtk_sip_svc.h>
...
...
@@ -116,3 +118,33 @@ uint32_t plat_get_spsr_for_bl33_entry(void)
spsr
=
SPSR_MODE32
(
mode
,
0
,
ee
,
daif
);
return
spsr
;
}
/*****************************************************************************
* plat_is_smccc_feature_available() - This function checks whether SMCCC
* feature is availabile for platform.
* @fid: SMCCC function id
*
* Return SMC_OK if SMCCC feature is available and SMC_ARCH_CALL_NOT_SUPPORTED
* otherwise.
*****************************************************************************/
int32_t
plat_is_smccc_feature_available
(
u_register_t
fid
)
{
switch
(
fid
)
{
case
SMCCC_ARCH_SOC_ID
:
return
SMC_ARCH_CALL_SUCCESS
;
default:
return
SMC_ARCH_CALL_NOT_SUPPORTED
;
}
}
int32_t
plat_get_soc_version
(
void
)
{
uint32_t
manfid
=
(
JEDEC_MTK_BKID
<<
24U
)
|
(
JEDEC_MTK_MFID
<<
16U
);
return
(
int32_t
)(
manfid
|
(
SOC_CHIP_ID
&
0xFFFFU
));
}
int32_t
plat_get_soc_revision
(
void
)
{
return
0
;
}
plat/mediatek/common/mtk_plat_common.h
View file @
7fbb3dba
...
...
@@ -18,6 +18,9 @@
#define LINUX_KERNEL_32 0
#define SMC32_PARAM_MASK (0xFFFFFFFF)
#define JEDEC_MTK_BKID U(4)
#define JEDEC_MTK_MFID U(0x26)
struct
atf_arg_t
{
unsigned
int
atf_magic
;
unsigned
int
tee_support
;
...
...
plat/mediatek/mt8173/include/platform_def.h
View file @
7fbb3dba
...
...
@@ -51,6 +51,8 @@
PLATFORM_CLUSTER_COUNT + \
PLATFORM_CORE_COUNT)
#define SOC_CHIP_ID U(0x8173)
/*******************************************************************************
* Platform memory map related constants
******************************************************************************/
...
...
plat/mediatek/mt8183/include/platform_def.h
View file @
7fbb3dba
...
...
@@ -279,6 +279,8 @@ INTR_PROP_DESC(MT_IRQ_SEC_SGI_7, GIC_HIGHEST_SEC_PRIORITY, grp, \
PLATFORM_CLUSTER_COUNT + \
PLATFORM_CORE_COUNT)
#define SOC_CHIP_ID U(0x8183)
/*******************************************************************************
* Platform memory map related constants
******************************************************************************/
...
...
plat/mediatek/mt8192/include/platform_def.h
View file @
7fbb3dba
...
...
@@ -59,6 +59,8 @@
#define PLATFORM_CORE_COUNT (PLATFORM_CLUSTER0_CORE_COUNT)
#define PLATFORM_MAX_CPUS_PER_CLUSTER U(8)
#define SOC_CHIP_ID U(0x8192)
/*******************************************************************************
* Platform memory map related constants
******************************************************************************/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment