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
f7bfed69
Commit
f7bfed69
authored
Jul 21, 2020
by
Manish Pandey
Committed by
TrustedFirmware Code Review
Jul 21, 2020
Browse files
Merge "gicv3: Do power management on Arm GIC-Clayton as well" into integration
parents
1f730723
e270e675
Changes
1
Hide whitespace changes
Inline
Side-by-side
drivers/arm/gic/v3/gic-x00.c
View file @
f7bfed69
...
...
@@ -24,6 +24,7 @@
#define GICR_PWRR 0x24
#define IIDR_MODEL_ARM_GIC_600 (0x0200043b)
#define IIDR_MODEL_ARM_GIC_600AE (0x0300043b)
#define IIDR_MODEL_ARM_GIC_CLAYTON (0x0400043b)
/* GICR_PWRR fields */
#define PWRR_RDPD_SHIFT 0
...
...
@@ -45,7 +46,7 @@
#if GICV3_SUPPORT_GIC600
/* GIC-600 specific accessor functions */
/* GIC-600
/Clayton
specific accessor functions */
static
void
gicr_write_pwrr
(
uintptr_t
base
,
unsigned
int
val
)
{
mmio_write_32
(
base
+
GICR_PWRR
,
val
);
...
...
@@ -113,12 +114,17 @@ static uintptr_t get_gicr_base(unsigned int proc_num)
return
gicr_base
;
}
static
bool
gicv3_
is_gic600
(
uintptr_t
gicr_base
)
static
bool
gicv3_
redists_need_power_mgmt
(
uintptr_t
gicr_base
)
{
uint32_t
reg
=
mmio_read_32
(
gicr_base
+
GICR_IIDR
);
/*
* The Arm GIC-600 and GIC-Clayton models have their redistributors
* powered down at reset.
*/
return
(((
reg
&
IIDR_MODEL_MASK
)
==
IIDR_MODEL_ARM_GIC_600
)
||
((
reg
&
IIDR_MODEL_MASK
)
==
IIDR_MODEL_ARM_GIC_600AE
));
((
reg
&
IIDR_MODEL_MASK
)
==
IIDR_MODEL_ARM_GIC_600AE
)
||
((
reg
&
IIDR_MODEL_MASK
)
==
IIDR_MODEL_ARM_GIC_CLAYTON
));
}
#endif
...
...
@@ -143,7 +149,7 @@ void gicv3_rdistif_off(unsigned int proc_num)
uintptr_t
gicr_base
=
get_gicr_base
(
proc_num
);
/* Attempt to power redistributor off */
if
(
gicv3_
is_gic600
(
gicr_base
))
{
if
(
gicv3_
redists_need_power_mgmt
(
gicr_base
))
{
gic600_pwr_off
(
gicr_base
);
}
#endif
...
...
@@ -158,7 +164,7 @@ void gicv3_rdistif_on(unsigned int proc_num)
uintptr_t
gicr_base
=
get_gicr_base
(
proc_num
);
/* Power redistributor on */
if
(
gicv3_
is_gic600
(
gicr_base
))
{
if
(
gicv3_
redists_need_power_mgmt
(
gicr_base
))
{
gic600_pwr_on
(
gicr_base
);
}
#endif
...
...
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