Note this is something I noticed while working on the clock stuff for the mmc support. Likely more work is needed to get twi to work on sun6i, this is just a first step.
Signed-off-by: Hans de Goede <[email protected]> --- arch/arm/cpu/armv7/sunxi/clock.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm/cpu/armv7/sunxi/clock.c b/arch/arm/cpu/armv7/sunxi/clock.c index 273aa3f..a178eea 100644 --- a/arch/arm/cpu/armv7/sunxi/clock.c +++ b/arch/arm/cpu/armv7/sunxi/clock.c @@ -116,8 +116,12 @@ int clock_twi_onoff(int port, int state) if (port > 2) return -1; - /* set the apb1 clock gate for twi */ + /* set the apb clock gate for twi */ +#if defined(CONFIG_SUN6I) + sr32(&ccm->apb2_gate, 0 + port, 1, state); +#else sr32(&ccm->apb1_gate, 0 + port, 1, state); +#endif return 0; } -- 1.9.0 -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
