lantiq: Use the BAR0 base address in the ath PCI fixup code
[openwrt/staging/mkresin.git] / target / linux / brcm2708 / patches-3.18 / 0051-BCM2708-use-pinctrl-bcm2835.patch
1 From fff70fcc73e09e86d46f87dd44459870f15423b2 Mon Sep 17 00:00:00 2001
2 From: notro <notro@tronnes.org>
3 Date: Thu, 10 Jul 2014 13:59:47 +0200
4 Subject: [PATCH 051/114] BCM2708: use pinctrl-bcm2835
5
6 Use pinctrl-bcm2835 instead of the pinctrl-bcm2708 and bcm2708_gpio
7 combination.
8
9 Signed-off-by: Noralf Tronnes <notro@tronnes.org>
10 ---
11 arch/arm/boot/dts/bcm2708.dtsi | 12 ++++++++++++
12 arch/arm/mach-bcm2708/Kconfig | 3 +++
13 arch/arm/mach-bcm2708/bcm2708.c | 2 +-
14 drivers/pinctrl/pinctrl-bcm2835.c | 2 +-
15 4 files changed, 17 insertions(+), 2 deletions(-)
16
17 --- a/arch/arm/boot/dts/bcm2708.dtsi
18 +++ b/arch/arm/boot/dts/bcm2708.dtsi
19 @@ -26,6 +26,18 @@
20 interrupt-controller;
21 #interrupt-cells = <2>;
22 };
23 +
24 + gpio: gpio {
25 + compatible = "brcm,bcm2835-gpio";
26 + reg = <0x7e200000 0xb4>;
27 + interrupts = <2 17>, <2 18>;
28 +
29 + gpio-controller;
30 + #gpio-cells = <2>;
31 +
32 + interrupt-controller;
33 + #interrupt-cells = <2>;
34 + };
35 };
36
37 clocks {
38 --- a/arch/arm/mach-bcm2708/Kconfig
39 +++ b/arch/arm/mach-bcm2708/Kconfig
40 @@ -14,6 +14,9 @@ config BCM2708_DT
41 depends on MACH_BCM2708
42 default n
43 select USE_OF
44 + select ARCH_REQUIRE_GPIOLIB
45 + select PINCTRL
46 + select PINCTRL_BCM2835
47 help
48 Enable Device Tree support for BCM2708
49
50 --- a/arch/arm/mach-bcm2708/bcm2708.c
51 +++ b/arch/arm/mach-bcm2708/bcm2708.c
52 @@ -767,7 +767,7 @@ void __init bcm2708_init(void)
53 bcm_register_device(&bcm2708_dmaman_device);
54 bcm_register_device(&bcm2708_vcio_device);
55 #ifdef CONFIG_BCM2708_GPIO
56 - bcm_register_device(&bcm2708_gpio_device);
57 + bcm_register_device_dt(&bcm2708_gpio_device);
58 #endif
59 #if defined(CONFIG_W1_MASTER_GPIO) || defined(CONFIG_W1_MASTER_GPIO_MODULE)
60 w1_gpio_pdata.pin = w1_gpio_pin;
61 --- a/drivers/pinctrl/pinctrl-bcm2835.c
62 +++ b/drivers/pinctrl/pinctrl-bcm2835.c
63 @@ -382,7 +382,7 @@ static struct gpio_chip bcm2835_gpio_chi
64 .get = bcm2835_gpio_get,
65 .set = bcm2835_gpio_set,
66 .to_irq = bcm2835_gpio_to_irq,
67 - .base = -1,
68 + .base = 0,
69 .ngpio = BCM2835_NUM_GPIOS,
70 .can_sleep = false,
71 };