diff options
author | Florian Fainelli <florian@openwrt.org> | 2014-02-28 20:30:08 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2014-02-28 20:30:08 +0000 |
commit | 800930b924c19a56b3a6e94ad351cd0715fb410d (patch) | |
tree | 70158d97f68604d69da8da779507469cf930bf07 /target/linux/brcm2708/patches-3.10/0066-Only-init-gpio-pins-of-selected-i2c-bus.patch | |
parent | 68c939ba0b0a0dda84e7a2ae370155be9a5593bc (diff) | |
download | master-187ad058-800930b924c19a56b3a6e94ad351cd0715fb410d.tar.gz master-187ad058-800930b924c19a56b3a6e94ad351cd0715fb410d.tar.bz2 master-187ad058-800930b924c19a56b3a6e94ad351cd0715fb410d.zip |
brcm2708: update against latest rpi-3.10.y branch
Update our copies of the brcm2708 patches to the latest rpi-3.10-y
rebased against linux-3.10.y stable (3.10.32). This should hopefully
make it easier for us in the future to leverage the raspberry/rpi-*
branches.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39770 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm2708/patches-3.10/0066-Only-init-gpio-pins-of-selected-i2c-bus.patch')
-rw-r--r-- | target/linux/brcm2708/patches-3.10/0066-Only-init-gpio-pins-of-selected-i2c-bus.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-3.10/0066-Only-init-gpio-pins-of-selected-i2c-bus.patch b/target/linux/brcm2708/patches-3.10/0066-Only-init-gpio-pins-of-selected-i2c-bus.patch new file mode 100644 index 0000000000..10eaf2e27e --- /dev/null +++ b/target/linux/brcm2708/patches-3.10/0066-Only-init-gpio-pins-of-selected-i2c-bus.patch @@ -0,0 +1,41 @@ +From 7776b6ebf1063d2f9fac33313c8d049b424fce46 Mon Sep 17 00:00:00 2001 +From: popcornmix <popcornmix@gmail.com> +Date: Sat, 8 Jun 2013 22:14:13 +0100 +Subject: [PATCH 066/174] Only init gpio pins of selected i2c bus + +--- + drivers/i2c/busses/i2c-bcm2708.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +--- a/drivers/i2c/busses/i2c-bcm2708.c ++++ b/drivers/i2c/busses/i2c-bcm2708.c +@@ -97,7 +97,7 @@ struct bcm2708_i2c { + * + * FIXME: This is a hack. Use pinmux / pinctrl. + */ +-static void bcm2708_i2c_init_pinmode(void) ++static void bcm2708_i2c_init_pinmode(int id) + { + #define INP_GPIO(g) *(gpio+((g)/10)) &= ~(7<<(((g)%10)*3)) + #define SET_GPIO_ALT(g,a) *(gpio+(((g)/10))) |= (((a)<=3?(a)+4:(a)==4?3:2)<<(((g)%10)*3)) +@@ -105,8 +105,10 @@ static void bcm2708_i2c_init_pinmode(voi + int pin; + u32 *gpio = ioremap(0x20200000, SZ_16K); + ++ BUG_ON(id != 0 && id != 1); + /* BSC0 is on GPIO 0 & 1, BSC1 is on GPIO 2 & 3 */ +- for (pin = 0; pin <= 3; pin++) { ++ for (pin = id*2+0; pin <= id*2+1; pin++) { ++printk("bcm2708_i2c_init_pinmode(%d,%d)\n", id, pin); + INP_GPIO(pin); /* set mode to GPIO input first */ + SET_GPIO_ALT(pin, 0); /* set mode to ALT 0 */ + } +@@ -279,7 +281,7 @@ static int bcm2708_i2c_probe(struct plat + return PTR_ERR(clk); + } + +- bcm2708_i2c_init_pinmode(); ++ bcm2708_i2c_init_pinmode(pdev->id); + + bi = kzalloc(sizeof(*bi), GFP_KERNEL); + if (!bi) |