at91: Remove u-boot from platform images folder
[lede.git] / target / linux / bcm53xx / patches-4.4 / 905-BCM53573-minor-hacks.patch
1 From 6f1c62440eb6846cb8045d7a5480ec7bbe47c96f Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Mon, 15 Aug 2016 10:30:41 +0200
4 Subject: [PATCH] BCM53573 minor hacks
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
10 ---
11
12 --- a/arch/arm/boot/dts/bcm53573.dtsi
13 +++ b/arch/arm/boot/dts/bcm53573.dtsi
14 @@ -44,6 +44,27 @@
15                 };
16         };
17  
18 +       pmu@18012000 {
19 +               compatible = "simple-mfd", "syscon";
20 +               reg = <0x18012000 0x00001000>;
21 +
22 +               ilp: ilp {
23 +                       compatible = "brcm,bcm53573-ilp";
24 +                       clocks = <&alp>;
25 +                       #clock-cells = <0>;
26 +                       clock-output-names = "ilp";
27 +               };
28 +       };
29 +
30 +       timer {
31 +               compatible = "arm,armv7-timer";
32 +               interrupts = <GIC_PPI 13 0>,
33 +                            <GIC_PPI 14 0>,
34 +                            <GIC_PPI 11 0>,
35 +                            <GIC_PPI 10 0>;
36 +               clocks = <&ilp>;
37 +       };
38 +
39         clocks {
40                 #address-cells = <1>;
41                 #size-cells = <1>;
42 --- a/drivers/bcma/main.c
43 +++ b/drivers/bcma/main.c
44 @@ -349,14 +349,6 @@ static int bcma_register_devices(struct
45         }
46  #endif
47  
48 -#ifdef CONFIG_BCMA_SFLASH
49 -       if (bus->drv_cc.sflash.present) {
50 -               err = platform_device_register(&bcma_sflash_dev);
51 -               if (err)
52 -                       bcma_err(bus, "Error registering serial flash\n");
53 -       }
54 -#endif
55 -
56  #ifdef CONFIG_BCMA_NFLASH
57         if (bus->drv_cc.nflash.present) {
58                 err = platform_device_register(&bcma_nflash_dev);
59 @@ -437,6 +429,14 @@ int bcma_bus_register(struct bcma_bus *b
60                         bcma_register_core(bus, core);
61         }
62  
63 +#ifdef CONFIG_BCMA_SFLASH
64 +       if (bus->drv_cc.sflash.present) {
65 +               err = platform_device_register(&bcma_sflash_dev);
66 +               if (err)
67 +                       bcma_err(bus, "Error registering serial flash\n");
68 +       }
69 +#endif
70 +
71         /* Try to get SPROM */
72         err = bcma_sprom_get(bus);
73         if (err == -ENOENT) {
74 --- a/drivers/clocksource/arm_arch_timer.c
75 +++ b/drivers/clocksource/arm_arch_timer.c
76 @@ -14,6 +14,7 @@
77  #include <linux/smp.h>
78  #include <linux/cpu.h>
79  #include <linux/cpu_pm.h>
80 +#include <linux/clk.h>
81  #include <linux/clockchips.h>
82  #include <linux/clocksource.h>
83  #include <linux/interrupt.h>
84 @@ -376,6 +377,16 @@ arch_timer_detect_rate(void __iomem *cnt
85                         arch_timer_rate = arch_timer_get_cntfrq();
86         }
87  
88 +       /* Get clk rate through clk driver if present */
89 +       if (!arch_timer_rate) {
90 +               struct clk *clk = of_clk_get(np, 0);
91 +
92 +               if (!IS_ERR(clk)) {
93 +                       if (!clk_prepare_enable(clk))
94 +                               arch_timer_rate = clk_get_rate(clk);
95 +               }
96 +       }
97 +
98         /* Check the timer frequency. */
99         if (arch_timer_rate == 0)
100                 pr_warn("Architected timer frequency not available\n");