sunxi: Fix clock_twi_onoff for sun9i
authorHans de Goede <hdegoede@redhat.com>
Wed, 16 Mar 2016 19:58:41 +0000 (20:58 +0100)
committerHans de Goede <hdegoede@redhat.com>
Wed, 23 Mar 2016 21:04:13 +0000 (22:04 +0100)
Fix a copy and paste error which caused us to use the uart rather then
the twi reset bits in clock_twi_onoff for sun9i.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
arch/arm/cpu/armv7/sunxi/clock_sun9i.c

index 27179ba..180634c 100644 (file)
@@ -43,10 +43,10 @@ int clock_twi_onoff(int port, int state)
                setbits_le32(&ccm->apb1_gate,
                             CLK_GATE_OPEN << (APB1_GATE_TWI_SHIFT + port));
                setbits_le32(&ccm->apb1_reset_cfg,
-                            1 << (APB1_RESET_UART_SHIFT + port));
+                            1 << (APB1_RESET_TWI_SHIFT + port));
        } else {
                clrbits_le32(&ccm->apb1_reset_cfg,
-                            1 << (APB1_RESET_UART_SHIFT + port));
+                            1 << (APB1_RESET_TWI_SHIFT + port));
                clrbits_le32(&ccm->apb1_gate,
                             CLK_GATE_OPEN << (APB1_GATE_TWI_SHIFT + port));
        }