diff options
author | John Crispin <john@phrozen.org> | 2020-02-10 07:46:56 +0100 |
---|---|---|
committer | Koen Vandeputte <koen.vandeputte@ncentric.com> | 2020-02-28 17:50:46 +0100 |
commit | 50c6938b95a0c915c5c8ffe1fe67a94b9402e98e (patch) | |
tree | 3e2ee026d1a8b32f9fa89e7b96aae9bf03a5bf20 /target/linux/bcm53xx/patches-5.4/905-BCM53573-minor-hacks.patch | |
parent | 6d5291ff7244a8d5c914542ff2b3809609fdb1c0 (diff) | |
download | upstream-50c6938b95a0c915c5c8ffe1fe67a94b9402e98e.tar.gz upstream-50c6938b95a0c915c5c8ffe1fe67a94b9402e98e.tar.bz2 upstream-50c6938b95a0c915c5c8ffe1fe67a94b9402e98e.zip |
bcm53xx: add v5.4 support
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/bcm53xx/patches-5.4/905-BCM53573-minor-hacks.patch')
-rw-r--r-- | target/linux/bcm53xx/patches-5.4/905-BCM53573-minor-hacks.patch | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/target/linux/bcm53xx/patches-5.4/905-BCM53573-minor-hacks.patch b/target/linux/bcm53xx/patches-5.4/905-BCM53573-minor-hacks.patch new file mode 100644 index 0000000000..470b17a5ff --- /dev/null +++ b/target/linux/bcm53xx/patches-5.4/905-BCM53573-minor-hacks.patch @@ -0,0 +1,80 @@ +From 6f1c62440eb6846cb8045d7a5480ec7bbe47c96f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl> +Date: Mon, 15 Aug 2016 10:30:41 +0200 +Subject: [PATCH] BCM53573 minor hacks +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Rafał Miłecki <rafal@milecki.pl> +--- + +--- a/arch/arm/boot/dts/bcm53573.dtsi ++++ b/arch/arm/boot/dts/bcm53573.dtsi +@@ -53,6 +53,7 @@ + <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>, + <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>, + <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; ++ clocks = <&ilp>; + }; + + clocks { +--- a/drivers/bcma/main.c ++++ b/drivers/bcma/main.c +@@ -330,14 +330,6 @@ static int bcma_register_devices(struct + } + #endif + +-#ifdef CONFIG_BCMA_SFLASH +- if (bus->drv_cc.sflash.present) { +- err = platform_device_register(&bcma_sflash_dev); +- if (err) +- bcma_err(bus, "Error registering serial flash\n"); +- } +-#endif +- + #ifdef CONFIG_BCMA_NFLASH + if (bus->drv_cc.nflash.present) { + err = platform_device_register(&bcma_nflash_dev); +@@ -415,6 +407,14 @@ int bcma_bus_register(struct bcma_bus *b + bcma_register_core(bus, core); + } + ++#ifdef CONFIG_BCMA_SFLASH ++ if (bus->drv_cc.sflash.present) { ++ err = platform_device_register(&bcma_sflash_dev); ++ if (err) ++ bcma_err(bus, "Error registering serial flash\n"); ++ } ++#endif ++ + /* Try to get SPROM */ + err = bcma_sprom_get(bus); + if (err == -ENOENT) { +--- a/drivers/clocksource/arm_arch_timer.c ++++ b/drivers/clocksource/arm_arch_timer.c +@@ -17,6 +17,7 @@ + #include <linux/smp.h> + #include <linux/cpu.h> + #include <linux/cpu_pm.h> ++#include <linux/clk.h> + #include <linux/clockchips.h> + #include <linux/clocksource.h> + #include <linux/interrupt.h> +@@ -919,6 +920,16 @@ static void arch_timer_of_configure_rate + if (of_property_read_u32(np, "clock-frequency", &arch_timer_rate)) + arch_timer_rate = rate; + ++ /* Get clk rate through clk driver if present */ ++ if (!arch_timer_rate) { ++ struct clk *clk = of_clk_get(np, 0); ++ ++ if (!IS_ERR(clk)) { ++ if (!clk_prepare_enable(clk)) ++ arch_timer_rate = clk_get_rate(clk); ++ } ++ } ++ + /* Check the timer frequency. */ + if (arch_timer_rate == 0) + pr_warn("frequency not available\n"); |