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
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
12 --- a/arch/arm/boot/dts/bcm53573.dtsi
13 +++ b/arch/arm/boot/dts/bcm53573.dtsi
19 + compatible = "brcm,ns-ilp";
20 + reg = <0x18012000 0x1000>;
24 + clock-output-names = "ilp";
28 + compatible = "arm,armv7-timer";
29 + interrupts = <GIC_PPI 13 0>,
39 --- a/drivers/bcma/main.c
40 +++ b/drivers/bcma/main.c
41 @@ -349,14 +349,6 @@ static int bcma_register_devices(struct
45 -#ifdef CONFIG_BCMA_SFLASH
46 - if (bus->drv_cc.sflash.present) {
47 - err = platform_device_register(&bcma_sflash_dev);
49 - bcma_err(bus, "Error registering serial flash\n");
53 #ifdef CONFIG_BCMA_NFLASH
54 if (bus->drv_cc.nflash.present) {
55 err = platform_device_register(&bcma_nflash_dev);
56 @@ -437,6 +429,14 @@ int bcma_bus_register(struct bcma_bus *b
57 bcma_register_core(bus, core);
60 +#ifdef CONFIG_BCMA_SFLASH
61 + if (bus->drv_cc.sflash.present) {
62 + err = platform_device_register(&bcma_sflash_dev);
64 + bcma_err(bus, "Error registering serial flash\n");
68 /* Try to get SPROM */
69 err = bcma_sprom_get(bus);
71 --- a/drivers/clocksource/arm_arch_timer.c
72 +++ b/drivers/clocksource/arm_arch_timer.c
74 #include <linux/smp.h>
75 #include <linux/cpu.h>
76 #include <linux/cpu_pm.h>
77 +#include <linux/clk.h>
78 #include <linux/clockchips.h>
79 #include <linux/clocksource.h>
80 #include <linux/interrupt.h>
81 @@ -376,6 +377,16 @@ arch_timer_detect_rate(void __iomem *cnt
82 arch_timer_rate = arch_timer_get_cntfrq();
85 + /* Get clk rate through clk driver if present */
86 + if (!arch_timer_rate) {
87 + struct clk *clk = of_clk_get(np, 0);
90 + if (!clk_prepare_enable(clk))
91 + arch_timer_rate = clk_get_rate(clk);
95 /* Check the timer frequency. */
96 if (arch_timer_rate == 0)
97 pr_warn("Architected timer frequency not available\n");