Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
82262970
Commit
82262970
authored
5 years ago
by
joanna.farley
Committed by
TrustedFirmware Code Review
5 years ago
Browse files
Options
Download
Plain Diff
Merge "mediatek: mt8183: switch PLL/CLKSQ/ck_off/axi_26m control to SPM" into integration
parents
0ff3fb32
658cb072
master
v2.5
v2.5-rc1
v2.5-rc0
v2.4
v2.4-rc2
v2.4-rc1
v2.4-rc0
v2.3
v2.3-rc2
v2.3-rc1
v2.3-rc0
arm_cca_v0.2
arm_cca_v0.1
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
plat/mediatek/mt8183/drivers/spm/spm.c
+24
-0
plat/mediatek/mt8183/drivers/spm/spm.c
plat/mediatek/mt8183/include/platform_def.h
+7
-0
plat/mediatek/mt8183/include/platform_def.h
with
31 additions
and
0 deletions
+31
-0
plat/mediatek/mt8183/drivers/spm/spm.c
View file @
82262970
...
...
@@ -12,6 +12,21 @@
DEFINE_BAKERY_LOCK
(
spm_lock
);
/* CLK_SCP_CFG_0 */
#define SPM_CK_OFF_CONTROL (0x3FF)
/* CLK_SCP_CFG_1 */
#define SPM_AXI_26M_SEL (0x1)
/* AP_PLL_CON3 */
#define SPM_PLL_CONTROL (0x7FAAAAF)
/* AP_PLL_CON4 */
#define SPM_PLL_OUT_OFF_CONTROL (0xFA0A)
/* AP_PLL_CON6 */
#define PLL_DLY (0x20000)
const
char
*
wakeup_src_str
[
32
]
=
{
[
0
]
=
"R12_PCM_TIMER"
,
[
1
]
=
"R12_SSPM_WDT_EVENT_B"
,
...
...
@@ -324,5 +339,14 @@ void spm_boot_init(void)
spm_lock_init
();
mt_spm_pmic_wrap_set_phase
(
PMIC_WRAP_PHASE_ALLINONE
);
/* switch ck_off/axi_26m control to SPM */
mmio_setbits_32
(
CLK_SCP_CFG_0
,
SPM_CK_OFF_CONTROL
);
mmio_setbits_32
(
CLK_SCP_CFG_1
,
SPM_AXI_26M_SEL
);
/* switch PLL/CLKSQ control to SPM */
mmio_clrbits_32
(
AP_PLL_CON3
,
SPM_PLL_CONTROL
);
mmio_clrbits_32
(
AP_PLL_CON4
,
SPM_PLL_OUT_OFF_CONTROL
);
mmio_clrbits_32
(
AP_PLL_CON6
,
PLL_DLY
);
NOTICE
(
"%s() end
\n
"
,
__func__
);
}
This diff is collapsed.
Click to expand it.
plat/mediatek/mt8183/include/platform_def.h
View file @
82262970
...
...
@@ -39,7 +39,14 @@
#define INFRACFG_AO_BASE (IO_PHYS + 0x1000)
#define TOPCKGEN_BASE (IO_PHYS + 0x0)
#define CLK_SCP_CFG_0 (TOPCKGEN_BASE + 0x200)
#define CLK_SCP_CFG_1 (TOPCKGEN_BASE + 0x204)
#define APMIXEDSYS (IO_PHYS + 0xC000)
#define AP_PLL_CON3 (APMIXEDSYS + 0xC)
#define AP_PLL_CON4 (APMIXEDSYS + 0x10)
#define AP_PLL_CON6 (APMIXEDSYS + 0x18)
#define ARMPLL_LL_CON0 (APMIXEDSYS + 0x200)
#define ARMPLL_L_CON0 (APMIXEDSYS + 0x210)
#define ARMPLL_L_PWR_CON0 (APMIXEDSYS + 0x21c)
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help