Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
1555547d
Commit
1555547d
authored
May 06, 2020
by
Thierry Reding
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-5.8/arm/core' into for-5.8/cpuidle
parents
8f3d9f35
38743e41
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
9 deletions
+33
-9
arch/arm/mach-tegra/pm.c
arch/arm/mach-tegra/pm.c
+4
-0
arch/arm/mach-tegra/reset-handler.S
arch/arm/mach-tegra/reset-handler.S
+6
-1
drivers/firmware/tegra/bpmp.c
drivers/firmware/tegra/bpmp.c
+3
-6
drivers/firmware/trusted_foundations.c
drivers/firmware/trusted_foundations.c
+19
-2
include/linux/firmware/trusted_foundations.h
include/linux/firmware/trusted_foundations.h
+1
-0
No files found.
arch/arm/mach-tegra/pm.c
View file @
1555547d
...
...
@@ -216,6 +216,8 @@ int tegra_pm_enter_lp2(void)
restore_cpu_complex
();
cpu_cluster_pm_exit
();
call_firmware_op
(
prepare_idle
,
TF_PM_MODE_NONE
);
return
err
;
}
...
...
@@ -391,6 +393,8 @@ static int tegra_suspend_enter(suspend_state_t state)
local_fiq_enable
();
call_firmware_op
(
prepare_idle
,
TF_PM_MODE_NONE
);
return
0
;
}
...
...
arch/arm/mach-tegra/reset-handler.S
View file @
1555547d
...
...
@@ -98,7 +98,12 @@ ENTRY(tegra_resume_trusted_foundations)
reteq
lr
.
arch_extension
sec
/
*
First
call
after
suspend
wakes
firmware
.
No
arguments
required
.
*/
/
*
*
First
call
after
suspend
wakes
firmware
.
No
arguments
required
*
for
some
firmware
versions
.
Downstream
kernel
of
ASUS
TF300T
uses
*
r0
=
3
for
the
wake
-
up
notification
.
*/
mov
r0
,
#
3
smc
#
0
b
cpu_resume
...
...
drivers/firmware/tegra/bpmp.c
View file @
1555547d
...
...
@@ -6,6 +6,7 @@
#include <linux/clk/tegra.h>
#include <linux/genalloc.h>
#include <linux/mailbox_client.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_device.h>
...
...
@@ -869,12 +870,8 @@ static struct platform_driver tegra_bpmp_driver = {
.
name
=
"tegra-bpmp"
,
.
of_match_table
=
tegra_bpmp_match
,
.
pm
=
&
tegra_bpmp_pm_ops
,
.
suppress_bind_attrs
=
true
,
},
.
probe
=
tegra_bpmp_probe
,
};
static
int
__init
tegra_bpmp_init
(
void
)
{
return
platform_driver_register
(
&
tegra_bpmp_driver
);
}
core_initcall
(
tegra_bpmp_init
);
builtin_platform_driver
(
tegra_bpmp_driver
);
drivers/firmware/trusted_foundations.c
View file @
1555547d
...
...
@@ -19,6 +19,7 @@
#define TF_CACHE_ENABLE 1
#define TF_CACHE_DISABLE 2
#define TF_CACHE_REENABLE 4
#define TF_SET_CPU_BOOT_ADDR_SMC 0xfffff200
...
...
@@ -29,6 +30,7 @@
#define TF_CPU_PM_S1 0xffffffe4
#define TF_CPU_PM_S1_NOFLUSH_L2 0xffffffe7
static
unsigned
long
tf_idle_mode
=
TF_PM_MODE_NONE
;
static
unsigned
long
cpu_boot_addr
;
static
void
tf_generic_smc
(
u32
type
,
u32
arg1
,
u32
arg2
)
...
...
@@ -85,25 +87,40 @@ static int tf_prepare_idle(unsigned long mode)
cpu_boot_addr
);
break
;
case
TF_PM_MODE_NONE
:
break
;
default:
return
-
EINVAL
;
}
tf_idle_mode
=
mode
;
return
0
;
}
#ifdef CONFIG_CACHE_L2X0
static
void
tf_cache_write_sec
(
unsigned
long
val
,
unsigned
int
reg
)
{
u32
l2x0_way_mask
=
0xff
;
u32
enable_op
,
l2x0_way_mask
=
0xff
;
switch
(
reg
)
{
case
L2X0_CTRL
:
if
(
l2x0_saved_regs
.
aux_ctrl
&
L310_AUX_CTRL_ASSOCIATIVITY_16
)
l2x0_way_mask
=
0xffff
;
switch
(
tf_idle_mode
)
{
case
TF_PM_MODE_LP2
:
enable_op
=
TF_CACHE_REENABLE
;
break
;
default:
enable_op
=
TF_CACHE_ENABLE
;
break
;
}
if
(
val
==
L2X0_CTRL_EN
)
tf_generic_smc
(
TF_CACHE_MAINT
,
TF_CACHE_ENABLE
,
tf_generic_smc
(
TF_CACHE_MAINT
,
enable_op
,
l2x0_saved_regs
.
aux_ctrl
);
else
tf_generic_smc
(
TF_CACHE_MAINT
,
TF_CACHE_DISABLE
,
...
...
include/linux/firmware/trusted_foundations.h
View file @
1555547d
...
...
@@ -32,6 +32,7 @@
#define TF_PM_MODE_LP1_NO_MC_CLK 2
#define TF_PM_MODE_LP2 3
#define TF_PM_MODE_LP2_NOFLUSH_L2 4
#define TF_PM_MODE_NONE 5
struct
trusted_foundations_platform_data
{
unsigned
int
version_major
;
...
...
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