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
a52ae5a7
Commit
a52ae5a7
authored
Sep 17, 2014
by
Mike Turquette
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'clk-fixes' into clk-next
parents
0469a43b
8ce8ebeb
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
10 deletions
+24
-10
drivers/clk/at91/clk-slow.c
drivers/clk/at91/clk-slow.c
+1
-1
drivers/clk/clk-efm32gg.c
drivers/clk/clk-efm32gg.c
+3
-3
drivers/clk/clk.c
drivers/clk/clk.c
+6
-1
drivers/clk/qcom/gcc-ipq806x.c
drivers/clk/qcom/gcc-ipq806x.c
+1
-1
drivers/clk/rockchip/clk-rk3288.c
drivers/clk/rockchip/clk-rk3288.c
+2
-2
drivers/clk/ti/clk-dra7-atl.c
drivers/clk/ti/clk-dra7-atl.c
+5
-1
drivers/clk/ti/divider.c
drivers/clk/ti/divider.c
+6
-1
No files found.
drivers/clk/at91/clk-slow.c
View file @
a52ae5a7
...
...
@@ -447,7 +447,7 @@ void __init of_at91sam9260_clk_slow_setup(struct device_node *np,
int
i
;
num_parents
=
of_count_phandle_with_args
(
np
,
"clocks"
,
"#clock-cells"
);
if
(
num_parents
<=
0
||
num_parents
>
1
)
if
(
num_parents
!=
2
)
return
;
for
(
i
=
0
;
i
<
num_parents
;
++
i
)
{
...
...
drivers/clk/clk-efm32gg.c
View file @
a52ae5a7
...
...
@@ -22,7 +22,7 @@ static struct clk_onecell_data clk_data = {
.
clk_num
=
ARRAY_SIZE
(
clk
),
};
static
int
__init
efm32gg_cmu_init
(
struct
device_node
*
np
)
static
void
__init
efm32gg_cmu_init
(
struct
device_node
*
np
)
{
int
i
;
void
__iomem
*
base
;
...
...
@@ -33,7 +33,7 @@ static int __init efm32gg_cmu_init(struct device_node *np)
base
=
of_iomap
(
np
,
0
);
if
(
!
base
)
{
pr_warn
(
"Failed to map address range for efm32gg,cmu node
\n
"
);
return
-
EADDRNOTAVAIL
;
return
;
}
clk
[
clk_HFXO
]
=
clk_register_fixed_rate
(
NULL
,
"HFXO"
,
NULL
,
...
...
@@ -76,6 +76,6 @@ static int __init efm32gg_cmu_init(struct device_node *np)
clk
[
clk_HFPERCLKDAC0
]
=
clk_register_gate
(
NULL
,
"HFPERCLK.DAC0"
,
"HFXO"
,
0
,
base
+
CMU_HFPERCLKEN0
,
17
,
0
,
NULL
);
return
of_clk_add_provider
(
np
,
of_clk_src_onecell_get
,
&
clk_data
);
of_clk_add_provider
(
np
,
of_clk_src_onecell_get
,
&
clk_data
);
}
CLK_OF_DECLARE
(
efm32ggcmu
,
"efm32gg,cmu"
,
efm32gg_cmu_init
);
drivers/clk/clk.c
View file @
a52ae5a7
...
...
@@ -1449,6 +1449,7 @@ static struct clk *clk_propagate_rate_change(struct clk *clk, unsigned long even
static
void
clk_change_rate
(
struct
clk
*
clk
)
{
struct
clk
*
child
;
struct
hlist_node
*
tmp
;
unsigned
long
old_rate
;
unsigned
long
best_parent_rate
=
0
;
bool
skip_set_rate
=
false
;
...
...
@@ -1484,7 +1485,11 @@ static void clk_change_rate(struct clk *clk)
if
(
clk
->
notifier_count
&&
old_rate
!=
clk
->
rate
)
__clk_notify
(
clk
,
POST_RATE_CHANGE
,
old_rate
,
clk
->
rate
);
hlist_for_each_entry
(
child
,
&
clk
->
children
,
child_node
)
{
/*
* Use safe iteration, as change_rate can actually swap parents
* for certain clock types.
*/
hlist_for_each_entry_safe
(
child
,
tmp
,
&
clk
->
children
,
child_node
)
{
/* Skip children who will be reparented to another clock */
if
(
child
->
new_parent
&&
child
->
new_parent
!=
clk
)
continue
;
...
...
drivers/clk/qcom/gcc-ipq806x.c
View file @
a52ae5a7
...
...
@@ -1095,7 +1095,7 @@ static struct clk_branch prng_clk = {
};
static
const
struct
freq_tbl
clk_tbl_sdc
[]
=
{
{
144000
,
P_PXO
,
5
,
18
,
6
25
},
{
200000
,
P_PXO
,
2
,
2
,
1
25
},
{
400000
,
P_PLL8
,
4
,
1
,
240
},
{
16000000
,
P_PLL8
,
4
,
1
,
6
},
{
17070000
,
P_PLL8
,
1
,
2
,
45
},
...
...
drivers/clk/rockchip/clk-rk3288.c
View file @
a52ae5a7
...
...
@@ -545,7 +545,7 @@ static struct rockchip_clk_branch rk3288_clk_branches[] __initdata = {
GATE
(
PCLK_PWM
,
"pclk_pwm"
,
"pclk_cpu"
,
0
,
RK3288_CLKGATE_CON
(
10
),
0
,
GFLAGS
),
GATE
(
PCLK_TIMER
,
"pclk_timer"
,
"pclk_cpu"
,
0
,
RK3288_CLKGATE_CON
(
10
),
1
,
GFLAGS
),
GATE
(
PCLK_I2C0
,
"pclk_i2c0"
,
"pclk_cpu"
,
0
,
RK3288_CLKGATE_CON
(
10
),
2
,
GFLAGS
),
GATE
(
PCLK_I2C
1
,
"pclk_i2c1
"
,
"pclk_cpu"
,
0
,
RK3288_CLKGATE_CON
(
10
),
3
,
GFLAGS
),
GATE
(
PCLK_I2C
2
,
"pclk_i2c2
"
,
"pclk_cpu"
,
0
,
RK3288_CLKGATE_CON
(
10
),
3
,
GFLAGS
),
GATE
(
0
,
"pclk_ddrupctl0"
,
"pclk_cpu"
,
0
,
RK3288_CLKGATE_CON
(
10
),
14
,
GFLAGS
),
GATE
(
0
,
"pclk_publ0"
,
"pclk_cpu"
,
0
,
RK3288_CLKGATE_CON
(
10
),
15
,
GFLAGS
),
GATE
(
0
,
"pclk_ddrupctl1"
,
"pclk_cpu"
,
0
,
RK3288_CLKGATE_CON
(
11
),
0
,
GFLAGS
),
...
...
@@ -603,7 +603,7 @@ static struct rockchip_clk_branch rk3288_clk_branches[] __initdata = {
GATE
(
PCLK_I2C4
,
"pclk_i2c4"
,
"pclk_peri"
,
0
,
RK3288_CLKGATE_CON
(
6
),
15
,
GFLAGS
),
GATE
(
PCLK_UART3
,
"pclk_uart3"
,
"pclk_peri"
,
0
,
RK3288_CLKGATE_CON
(
6
),
11
,
GFLAGS
),
GATE
(
PCLK_UART4
,
"pclk_uart4"
,
"pclk_peri"
,
0
,
RK3288_CLKGATE_CON
(
6
),
12
,
GFLAGS
),
GATE
(
PCLK_I2C
2
,
"pclk_i2c2
"
,
"pclk_peri"
,
0
,
RK3288_CLKGATE_CON
(
6
),
13
,
GFLAGS
),
GATE
(
PCLK_I2C
1
,
"pclk_i2c1
"
,
"pclk_peri"
,
0
,
RK3288_CLKGATE_CON
(
6
),
13
,
GFLAGS
),
GATE
(
PCLK_I2C3
,
"pclk_i2c3"
,
"pclk_peri"
,
0
,
RK3288_CLKGATE_CON
(
6
),
14
,
GFLAGS
),
GATE
(
PCLK_SARADC
,
"pclk_saradc"
,
"pclk_peri"
,
0
,
RK3288_CLKGATE_CON
(
7
),
1
,
GFLAGS
),
GATE
(
PCLK_TSADC
,
"pclk_tsadc"
,
"pclk_peri"
,
0
,
RK3288_CLKGATE_CON
(
7
),
2
,
GFLAGS
),
...
...
drivers/clk/ti/clk-dra7-atl.c
View file @
a52ae5a7
...
...
@@ -139,9 +139,13 @@ static long atl_clk_round_rate(struct clk_hw *hw, unsigned long rate,
static
int
atl_clk_set_rate
(
struct
clk_hw
*
hw
,
unsigned
long
rate
,
unsigned
long
parent_rate
)
{
struct
dra7_atl_desc
*
cdesc
=
to_atl_desc
(
hw
)
;
struct
dra7_atl_desc
*
cdesc
;
u32
divider
;
if
(
!
hw
||
!
rate
)
return
-
EINVAL
;
cdesc
=
to_atl_desc
(
hw
);
divider
=
((
parent_rate
+
rate
/
2
)
/
rate
)
-
1
;
if
(
divider
>
DRA7_ATL_DIVIDER_MASK
)
divider
=
DRA7_ATL_DIVIDER_MASK
;
...
...
drivers/clk/ti/divider.c
View file @
a52ae5a7
...
...
@@ -211,11 +211,16 @@ static long ti_clk_divider_round_rate(struct clk_hw *hw, unsigned long rate,
static
int
ti_clk_divider_set_rate
(
struct
clk_hw
*
hw
,
unsigned
long
rate
,
unsigned
long
parent_rate
)
{
struct
clk_divider
*
divider
=
to_clk_divider
(
hw
)
;
struct
clk_divider
*
divider
;
unsigned
int
div
,
value
;
unsigned
long
flags
=
0
;
u32
val
;
if
(
!
hw
||
!
rate
)
return
-
EINVAL
;
divider
=
to_clk_divider
(
hw
);
div
=
DIV_ROUND_UP
(
parent_rate
,
rate
);
value
=
_get_val
(
divider
,
div
);
...
...
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