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
b1593e53
Commit
b1593e53
authored
Sep 16, 2020
by
Viresh Kumar
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
ded10c47
' into HEAD
parents
dc279ac6
ded10c47
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
15 deletions
+19
-15
drivers/cpufreq/imx6q-cpufreq.c
drivers/cpufreq/imx6q-cpufreq.c
+2
-8
drivers/opp/core.c
drivers/opp/core.c
+16
-6
drivers/opp/opp.h
drivers/opp/opp.h
+1
-1
No files found.
drivers/cpufreq/imx6q-cpufreq.c
View file @
b1593e53
...
...
@@ -48,7 +48,6 @@ static struct clk_bulk_data clks[] = {
};
static
struct
device
*
cpu_dev
;
static
bool
free_opp
;
static
struct
cpufreq_frequency_table
*
freq_table
;
static
unsigned
int
max_freq
;
static
unsigned
int
transition_latency
;
...
...
@@ -390,9 +389,6 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev)
goto
put_reg
;
}
/* Because we have added the OPPs here, we must free them */
free_opp
=
true
;
if
(
of_machine_is_compatible
(
"fsl,imx6ul"
)
||
of_machine_is_compatible
(
"fsl,imx6ull"
))
{
ret
=
imx6ul_opp_check_speed_grading
(
cpu_dev
);
...
...
@@ -507,8 +503,7 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev)
free_freq_table:
dev_pm_opp_free_cpufreq_table
(
cpu_dev
,
&
freq_table
);
out_free_opp:
if
(
free_opp
)
dev_pm_opp_of_remove_table
(
cpu_dev
);
dev_pm_opp_of_remove_table
(
cpu_dev
);
put_reg:
if
(
!
IS_ERR
(
arm_reg
))
regulator_put
(
arm_reg
);
...
...
@@ -528,8 +523,7 @@ static int imx6q_cpufreq_remove(struct platform_device *pdev)
{
cpufreq_unregister_driver
(
&
imx6q_cpufreq_driver
);
dev_pm_opp_free_cpufreq_table
(
cpu_dev
,
&
freq_table
);
if
(
free_opp
)
dev_pm_opp_of_remove_table
(
cpu_dev
);
dev_pm_opp_of_remove_table
(
cpu_dev
);
regulator_put
(
arm_reg
);
if
(
!
IS_ERR
(
pu_reg
))
regulator_put
(
pu_reg
);
...
...
drivers/opp/core.c
View file @
b1593e53
...
...
@@ -1300,13 +1300,19 @@ void dev_pm_opp_remove(struct device *dev, unsigned long freq)
}
EXPORT_SYMBOL_GPL
(
dev_pm_opp_remove
);
void
_opp_remove_all_static
(
struct
opp_table
*
opp_table
)
bool
_opp_remove_all_static
(
struct
opp_table
*
opp_table
)
{
struct
dev_pm_opp
*
opp
,
*
tmp
;
bool
ret
=
true
;
mutex_lock
(
&
opp_table
->
lock
);
if
(
!
opp_table
->
parsed_static_opps
||
--
opp_table
->
parsed_static_opps
)
if
(
!
opp_table
->
parsed_static_opps
)
{
ret
=
false
;
goto
unlock
;
}
if
(
--
opp_table
->
parsed_static_opps
)
goto
unlock
;
list_for_each_entry_safe
(
opp
,
tmp
,
&
opp_table
->
opp_list
,
node
)
{
...
...
@@ -1316,6 +1322,8 @@ void _opp_remove_all_static(struct opp_table *opp_table)
unlock:
mutex_unlock
(
&
opp_table
->
lock
);
return
ret
;
}
/**
...
...
@@ -2418,13 +2426,15 @@ void _dev_pm_opp_find_and_remove_table(struct device *dev)
return
;
}
_opp_remove_all_static
(
opp_table
);
/*
* Drop the extra reference only if the OPP table was successfully added
* with dev_pm_opp_of_add_table() earlier.
**/
if
(
_opp_remove_all_static
(
opp_table
))
dev_pm_opp_put_opp_table
(
opp_table
);
/* Drop reference taken by _find_opp_table() */
dev_pm_opp_put_opp_table
(
opp_table
);
/* Drop reference taken while the OPP table was added */
dev_pm_opp_put_opp_table
(
opp_table
);
}
/**
...
...
drivers/opp/opp.h
View file @
b1593e53
...
...
@@ -212,7 +212,7 @@ struct opp_table {
/* Routines internal to opp core */
void
dev_pm_opp_get
(
struct
dev_pm_opp
*
opp
);
void
_opp_remove_all_static
(
struct
opp_table
*
opp_table
);
bool
_opp_remove_all_static
(
struct
opp_table
*
opp_table
);
void
_get_opp_table_kref
(
struct
opp_table
*
opp_table
);
int
_get_opp_count
(
struct
opp_table
*
opp_table
);
struct
opp_table
*
_find_opp_table
(
struct
device
*
dev
);
...
...
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