brcm2708: update linux 4.4 patches to latest version
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-4.4 / 0028-squash-include-ARCH_BCM2708-ARCH_BCM2709.patch
1 From fcc9c391c9244922fc3b955d7bf08c6db8b54a9c Mon Sep 17 00:00:00 2001
2 From: popcornmix <popcornmix@gmail.com>
3 Date: Wed, 11 Nov 2015 21:01:15 +0000
4 Subject: [PATCH] squash: include ARCH_BCM2708 / ARCH_BCM2709
5
6 ---
7 drivers/char/hw_random/Kconfig | 2 +-
8 drivers/mailbox/Kconfig | 2 +-
9 drivers/mailbox/bcm2835-mailbox.c | 18 ++++++++++++++++--
10 drivers/pinctrl/Makefile | 1 +
11 drivers/pwm/Kconfig | 2 +-
12 drivers/spi/Kconfig | 2 +-
13 drivers/watchdog/Kconfig | 2 +-
14 sound/soc/bcm/Kconfig | 2 +-
15 8 files changed, 23 insertions(+), 8 deletions(-)
16
17 --- a/drivers/char/hw_random/Kconfig
18 +++ b/drivers/char/hw_random/Kconfig
19 @@ -90,7 +90,7 @@ config HW_RANDOM_BCM63XX
20
21 config HW_RANDOM_BCM2835
22 tristate "Broadcom BCM2835 Random Number Generator support"
23 - depends on ARCH_BCM2835
24 + depends on ARCH_BCM2835 || ARCH_BCM2708 || ARCH_BCM2709
25 default HW_RANDOM
26 ---help---
27 This driver provides kernel-side support for the Random Number
28 --- a/drivers/mailbox/Kconfig
29 +++ b/drivers/mailbox/Kconfig
30 @@ -65,7 +65,7 @@ config ALTERA_MBOX
31
32 config BCM2835_MBOX
33 tristate "BCM2835 Mailbox"
34 - depends on ARCH_BCM2835
35 + depends on ARCH_BCM2835 || ARCH_BCM2708 || ARCH_BCM2709
36 help
37 An implementation of the BCM2385 Mailbox. It is used to invoke
38 the services of the Videocore. Say Y here if you want to use the
39 --- a/drivers/mailbox/bcm2835-mailbox.c
40 +++ b/drivers/mailbox/bcm2835-mailbox.c
41 @@ -51,12 +51,15 @@
42 #define MAIL1_WRT (ARM_0_MAIL1 + 0x00)
43 #define MAIL1_STA (ARM_0_MAIL1 + 0x18)
44
45 +/* On ARCH_BCM270x these come through <linux/interrupt.h> (arm_control.h ) */
46 +#ifndef ARM_MS_FULL
47 /* Status register: FIFO state. */
48 #define ARM_MS_FULL BIT(31)
49 #define ARM_MS_EMPTY BIT(30)
50
51 /* Configuration register: Enable interrupts. */
52 #define ARM_MC_IHAVEDATAIRQEN BIT(0)
53 +#endif
54
55 struct bcm2835_mbox {
56 void __iomem *regs;
57 @@ -151,7 +154,7 @@ static int bcm2835_mbox_probe(struct pla
58 return -ENOMEM;
59 spin_lock_init(&mbox->lock);
60
61 - ret = devm_request_irq(dev, irq_of_parse_and_map(dev->of_node, 0),
62 + ret = devm_request_irq(dev, platform_get_irq(pdev, 0),
63 bcm2835_mbox_irq, 0, dev_name(dev), mbox);
64 if (ret) {
65 dev_err(dev, "Failed to register a mailbox IRQ handler: %d\n",
66 @@ -209,7 +212,18 @@ static struct platform_driver bcm2835_mb
67 .probe = bcm2835_mbox_probe,
68 .remove = bcm2835_mbox_remove,
69 };
70 -module_platform_driver(bcm2835_mbox_driver);
71 +
72 +static int __init bcm2835_mbox_init(void)
73 +{
74 + return platform_driver_register(&bcm2835_mbox_driver);
75 +}
76 +arch_initcall(bcm2835_mbox_init);
77 +
78 +static void __init bcm2835_mbox_exit(void)
79 +{
80 + platform_driver_unregister(&bcm2835_mbox_driver);
81 +}
82 +module_exit(bcm2835_mbox_exit);
83
84 MODULE_AUTHOR("Lubomir Rintel <lkundrak@v3.sk>");
85 MODULE_DESCRIPTION("BCM2835 mailbox IPC driver");
86 --- a/drivers/pinctrl/Makefile
87 +++ b/drivers/pinctrl/Makefile
88 @@ -40,6 +40,7 @@ obj-$(CONFIG_PINCTRL_TB10X) += pinctrl-t
89 obj-$(CONFIG_PINCTRL_ST) += pinctrl-st.o
90 obj-$(CONFIG_PINCTRL_ZYNQ) += pinctrl-zynq.o
91
92 +obj-$(CONFIG_ARCH_BCM2708)$(CONFIG_ARCH_BCM2709) += bcm/
93 obj-$(CONFIG_ARCH_BCM) += bcm/
94 obj-$(CONFIG_ARCH_BERLIN) += berlin/
95 obj-y += freescale/
96 --- a/drivers/pwm/Kconfig
97 +++ b/drivers/pwm/Kconfig
98 @@ -85,7 +85,7 @@ config PWM_BCM_KONA
99
100 config PWM_BCM2835
101 tristate "BCM2835 PWM support"
102 - depends on ARCH_BCM2835
103 + depends on ARCH_BCM2835 || ARCH_BCM2708 || ARCH_BCM2709
104 help
105 PWM framework driver for BCM2835 controller (Raspberry Pi)
106
107 --- a/drivers/spi/Kconfig
108 +++ b/drivers/spi/Kconfig
109 @@ -78,7 +78,7 @@ config SPI_ATMEL
110 config SPI_BCM2835
111 tristate "BCM2835 SPI controller"
112 depends on GPIOLIB
113 - depends on ARCH_BCM2835 || COMPILE_TEST
114 + depends on ARCH_BCM2835 || ARCH_BCM2708 || ARCH_BCM2709 || COMPILE_TEST
115 depends on GPIOLIB
116 help
117 This selects a driver for the Broadcom BCM2835 SPI master.
118 --- a/drivers/watchdog/Kconfig
119 +++ b/drivers/watchdog/Kconfig
120 @@ -1282,7 +1282,7 @@ config BCM63XX_WDT
121
122 config BCM2835_WDT
123 tristate "Broadcom BCM2835 hardware watchdog"
124 - depends on ARCH_BCM2835
125 + depends on ARCH_BCM2835 || ARCH_BCM2708 || ARCH_BCM2709
126 select WATCHDOG_CORE
127 help
128 Watchdog driver for the built in watchdog hardware in Broadcom
129 --- a/sound/soc/bcm/Kconfig
130 +++ b/sound/soc/bcm/Kconfig
131 @@ -1,6 +1,6 @@
132 config SND_BCM2835_SOC_I2S
133 tristate "SoC Audio support for the Broadcom BCM2835 I2S module"
134 - depends on ARCH_BCM2835 || COMPILE_TEST
135 + depends on ARCH_BCM2835 || MACH_BCM2708 || MACH_BCM2709 || COMPILE_TEST
136 select SND_SOC_GENERIC_DMAENGINE_PCM
137 select REGMAP_MMIO
138 help