diff options
author | Zoltan Herpai <wigyori@uid0.hu> | 2016-03-29 11:42:14 +0000 |
---|---|---|
committer | Zoltan Herpai <wigyori@uid0.hu> | 2016-03-29 11:42:14 +0000 |
commit | 2d4ebff3ad9b298837782b790ac5aea941c2a255 (patch) | |
tree | 8febe14ffb923147afec2dfe978760bfbc9882a2 /package/boot/uboot-sunxi/patches/012-sun6i-fix-clock_twi_onoff.patch | |
parent | d1aa4bfe1ddd52c52eb6314155245121078399a1 (diff) | |
download | upstream-2d4ebff3ad9b298837782b790ac5aea941c2a255.tar.gz upstream-2d4ebff3ad9b298837782b790ac5aea941c2a255.tar.bz2 upstream-2d4ebff3ad9b298837782b790ac5aea941c2a255.zip |
package: uboot-sunxi: various changes - bump to 2016.03 - add bugfixes related to 2016.03 update - sync DTS files with mainline - add support for non-standard uEnv.txt - add initial support for Theobroma A31-yQ7 devboard
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
SVN-Revision: 49089
Diffstat (limited to 'package/boot/uboot-sunxi/patches/012-sun6i-fix-clock_twi_onoff.patch')
-rw-r--r-- | package/boot/uboot-sunxi/patches/012-sun6i-fix-clock_twi_onoff.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/package/boot/uboot-sunxi/patches/012-sun6i-fix-clock_twi_onoff.patch b/package/boot/uboot-sunxi/patches/012-sun6i-fix-clock_twi_onoff.patch new file mode 100644 index 0000000000..9471b39b3b --- /dev/null +++ b/package/boot/uboot-sunxi/patches/012-sun6i-fix-clock_twi_onoff.patch @@ -0,0 +1,40 @@ +From 730d2f3a41c5ccae71b5008fffdf697d143be68c Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Wed, 16 Mar 2016 20:44:51 +0100 +Subject: [PATCH] sunxi: Fix clock_twi_onoff for sun6i + +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 <hdegoede@redhat.com> +Acked-by: Ian Campbell <ijc@hellion.org.uk> +--- + arch/arm/cpu/armv7/sunxi/clock_sun6i.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/cpu/armv7/sunxi/clock_sun6i.c b/arch/arm/cpu/armv7/sunxi/clock_sun6i.c +index 700b605..4e1e1a4 100644 +--- 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; + } |