kernel: bump 5.4 to 5.4.24
[oweals/openwrt.git] / target / linux / bcm53xx / patches-5.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 @@ -54,6 +54,7 @@
15                              <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
16                              <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
17                              <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
18 +               clocks = <&ilp>;
19         };
20  
21         clocks {
22 --- a/drivers/bcma/main.c
23 +++ b/drivers/bcma/main.c
24 @@ -330,14 +330,6 @@ static int bcma_register_devices(struct
25         }
26  #endif
27  
28 -#ifdef CONFIG_BCMA_SFLASH
29 -       if (bus->drv_cc.sflash.present) {
30 -               err = platform_device_register(&bcma_sflash_dev);
31 -               if (err)
32 -                       bcma_err(bus, "Error registering serial flash\n");
33 -       }
34 -#endif
35 -
36  #ifdef CONFIG_BCMA_NFLASH
37         if (bus->drv_cc.nflash.present) {
38                 err = platform_device_register(&bcma_nflash_dev);
39 @@ -415,6 +407,14 @@ int bcma_bus_register(struct bcma_bus *b
40                         bcma_register_core(bus, core);
41         }
42  
43 +#ifdef CONFIG_BCMA_SFLASH
44 +       if (bus->drv_cc.sflash.present) {
45 +               err = platform_device_register(&bcma_sflash_dev);
46 +               if (err)
47 +                       bcma_err(bus, "Error registering serial flash\n");
48 +       }
49 +#endif
50 +
51         /* Try to get SPROM */
52         err = bcma_sprom_get(bus);
53         if (err == -ENOENT) {
54 --- a/drivers/clocksource/arm_arch_timer.c
55 +++ b/drivers/clocksource/arm_arch_timer.c
56 @@ -14,6 +14,7 @@
57  #include <linux/smp.h>
58  #include <linux/cpu.h>
59  #include <linux/cpu_pm.h>
60 +#include <linux/clk.h>
61  #include <linux/clockchips.h>
62  #include <linux/clocksource.h>
63  #include <linux/interrupt.h>
64 @@ -899,6 +900,16 @@ static void arch_timer_of_configure_rate
65         if (of_property_read_u32(np, "clock-frequency", &arch_timer_rate))
66                 arch_timer_rate = rate;
67  
68 +       /* Get clk rate through clk driver if present */
69 +       if (!arch_timer_rate) {
70 +               struct clk *clk = of_clk_get(np, 0);
71 +
72 +               if (!IS_ERR(clk)) {
73 +                       if (!clk_prepare_enable(clk))
74 +                               arch_timer_rate = clk_get_rate(clk);
75 +               }
76 +       }
77 +
78         /* Check the timer frequency. */
79         if (arch_timer_rate == 0)
80                 pr_warn("frequency not available\n");