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
Kirill Smelkov
linux
Commits
364b40c6
Commit
364b40c6
authored
Oct 13, 2023
by
Thierry Reding
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-6.7/firmware' into for-6.7/memory
parents
0bb80ecc
ea608a01
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
1 deletion
+37
-1
drivers/firmware/tegra/bpmp.c
drivers/firmware/tegra/bpmp.c
+30
-0
include/soc/tegra/bpmp-abi.h
include/soc/tegra/bpmp-abi.h
+1
-1
include/soc/tegra/bpmp.h
include/soc/tegra/bpmp.h
+6
-0
No files found.
drivers/firmware/tegra/bpmp.c
View file @
364b40c6
...
...
@@ -313,6 +313,8 @@ static ssize_t tegra_bpmp_channel_write(struct tegra_bpmp_channel *channel,
return
__tegra_bpmp_channel_write
(
channel
,
mrq
,
flags
,
data
,
size
);
}
static
int
__maybe_unused
tegra_bpmp_resume
(
struct
device
*
dev
);
int
tegra_bpmp_transfer_atomic
(
struct
tegra_bpmp
*
bpmp
,
struct
tegra_bpmp_message
*
msg
)
{
...
...
@@ -325,6 +327,14 @@ int tegra_bpmp_transfer_atomic(struct tegra_bpmp *bpmp,
if
(
!
tegra_bpmp_message_valid
(
msg
))
return
-
EINVAL
;
if
(
bpmp
->
suspended
)
{
/* Reset BPMP IPC channels during resume based on flags passed */
if
(
msg
->
flags
&
TEGRA_BPMP_MESSAGE_RESET
)
tegra_bpmp_resume
(
bpmp
->
dev
);
else
return
-
EAGAIN
;
}
channel
=
bpmp
->
tx_channel
;
spin_lock
(
&
bpmp
->
atomic_tx_lock
);
...
...
@@ -364,6 +374,14 @@ int tegra_bpmp_transfer(struct tegra_bpmp *bpmp,
if
(
!
tegra_bpmp_message_valid
(
msg
))
return
-
EINVAL
;
if
(
bpmp
->
suspended
)
{
/* Reset BPMP IPC channels during resume based on flags passed */
if
(
msg
->
flags
&
TEGRA_BPMP_MESSAGE_RESET
)
tegra_bpmp_resume
(
bpmp
->
dev
);
else
return
-
EAGAIN
;
}
channel
=
tegra_bpmp_write_threaded
(
bpmp
,
msg
->
mrq
,
msg
->
tx
.
data
,
msg
->
tx
.
size
);
if
(
IS_ERR
(
channel
))
...
...
@@ -796,10 +814,21 @@ static int tegra_bpmp_probe(struct platform_device *pdev)
return
err
;
}
static
int
__maybe_unused
tegra_bpmp_suspend
(
struct
device
*
dev
)
{
struct
tegra_bpmp
*
bpmp
=
dev_get_drvdata
(
dev
);
bpmp
->
suspended
=
true
;
return
0
;
}
static
int
__maybe_unused
tegra_bpmp_resume
(
struct
device
*
dev
)
{
struct
tegra_bpmp
*
bpmp
=
dev_get_drvdata
(
dev
);
bpmp
->
suspended
=
false
;
if
(
bpmp
->
soc
->
ops
->
resume
)
return
bpmp
->
soc
->
ops
->
resume
(
bpmp
);
else
...
...
@@ -807,6 +836,7 @@ static int __maybe_unused tegra_bpmp_resume(struct device *dev)
}
static
const
struct
dev_pm_ops
tegra_bpmp_pm_ops
=
{
.
suspend_noirq
=
tegra_bpmp_suspend
,
.
resume_noirq
=
tegra_bpmp_resume
,
};
...
...
include/soc/tegra/bpmp-abi.h
View file @
364b40c6
...
...
@@ -1194,7 +1194,7 @@ struct cmd_clk_is_enabled_request {
*/
struct
cmd_clk_is_enabled_response
{
/**
* @brief The state of the clock that has been succesfully
* @brief The state of the clock that has been succes
s
fully
* requested with CMD_CLK_ENABLE or CMD_CLK_DISABLE by the
* master invoking the command earlier.
*
...
...
include/soc/tegra/bpmp.h
View file @
364b40c6
...
...
@@ -102,8 +102,12 @@ struct tegra_bpmp {
#ifdef CONFIG_DEBUG_FS
struct
dentry
*
debugfs_mirror
;
#endif
bool
suspended
;
};
#define TEGRA_BPMP_MESSAGE_RESET BIT(0)
struct
tegra_bpmp_message
{
unsigned
int
mrq
;
...
...
@@ -117,6 +121,8 @@ struct tegra_bpmp_message {
size_t
size
;
int
ret
;
}
rx
;
unsigned
long
flags
;
};
#if IS_ENABLED(CONFIG_TEGRA_BPMP)
...
...
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