projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
80e5f83
)
sunxi: Fix clock_twi_onoff for sun6i
author
Hans de Goede
<
[email protected]
>
Wed, 16 Mar 2016 19:44:51 +0000
(20:44 +0100)
committer
Hans de Goede
<
[email protected]
>
Wed, 23 Mar 2016 21:04:13 +0000
(22:04 +0100)
The clock_sun6i.c implementation was not deasserting the reset for
the regular i2c controllers, this commit fixes this.
Signed-off-by: Hans de Goede <
[email protected]
>
Acked-by: Ian Campbell <
[email protected]
>
arch/arm/cpu/armv7/sunxi/clock_sun6i.c
patch
|
blob
|
history
diff --git
a/arch/arm/cpu/armv7/sunxi/clock_sun6i.c
b/arch/arm/cpu/armv7/sunxi/clock_sun6i.c
index 700b605ab3a93936a8c638bab273aa22c9095fe2..4e1e1a4090cb0cc30b54a717a67171bad96746f5 100644
(file)
--- a/
arch/arm/cpu/armv7/sunxi/clock_sun6i.c
+++ b/
arch/arm/cpu/armv7/sunxi/clock_sun6i.c
@@
-100,13
+100,18
@@
int clock_twi_onoff(int port, int state)
return 0;
}
- /* set the apb clock gate for twi */
- if (state)
+ /* set the apb clock gate
and reset
for twi */
+ if (state)
{
setbits_le32(&ccm->apb2_gate,
CLK_GATE_OPEN << (APB2_GATE_TWI_SHIFT+port));
- else
+ setbits_le32(&ccm->apb2_reset_cfg,
+ 1 << (APB2_RESET_TWI_SHIFT + port));
+ } else {
+ clrbits_le32(&ccm->apb2_reset_cfg,
+ 1 << (APB2_RESET_TWI_SHIFT + port));
clrbits_le32(&ccm->apb2_gate,
CLK_GATE_OPEN << (APB2_GATE_TWI_SHIFT+port));
+ }
return 0;
}