From aa71585668fcbf2c98ed29c5360ed8196b14518e Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Tue, 4 Feb 2014 23:00:55 +0000 Subject: bcm53xx: update the bcm53xx patches This does not add any new features, just some changes to the patches and a first try to use dt to set the irqs. Signed-off-by: Hauke Mehrtens git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39466 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- ...tial-support-for-the-BCM5301-BCM470X-SoC-.patch | 208 +++++++++++++-------- 1 file changed, 132 insertions(+), 76 deletions(-) (limited to 'target/linux/bcm53xx/patches-3.10/051-bcm53xx-initial-support-for-the-BCM5301-BCM470X-SoC-.patch') diff --git a/target/linux/bcm53xx/patches-3.10/051-bcm53xx-initial-support-for-the-BCM5301-BCM470X-SoC-.patch b/target/linux/bcm53xx/patches-3.10/051-bcm53xx-initial-support-for-the-BCM5301-BCM470X-SoC-.patch index 154b61931e..812183120d 100644 --- a/target/linux/bcm53xx/patches-3.10/051-bcm53xx-initial-support-for-the-BCM5301-BCM470X-SoC-.patch +++ b/target/linux/bcm53xx/patches-3.10/051-bcm53xx-initial-support-for-the-BCM5301-BCM470X-SoC-.patch @@ -79,9 +79,10 @@ Signed-off-by: Hauke Mehrtens targets += $(dtb-y) --- /dev/null +++ b/arch/arm/boot/dts/bcm4708-netgear-r6250.dts -@@ -0,0 +1,20 @@ +@@ -0,0 +1,35 @@ +/* + * Broadcom BCM470X / BCM5301X arm platform code. ++ * DTS for Netgear R6250 V1 + * + * Copyright 2013 Hauke Mehrtens + * @@ -93,37 +94,43 @@ Signed-off-by: Hauke Mehrtens +#include "bcm4708.dtsi" + +/ { -+ compatible = "netgear,r6250v1", "broadcom,bcm4708"; ++ compatible = "netgear,r6250v1", "brcm,bcm4708"; + model = "Netgear R6250 V1 (BCM4708)"; + ++ chosen { ++ bootargs = "console=ttyS0,115200"; ++ }; ++ + memory { + reg = <0x00000000 0x08000000>; + }; ++ ++ chipcommonA { ++ uart0: serial@0300 { ++ status = "okay"; ++ }; ++ ++ uart1: serial@0400 { ++ status = "okay"; ++ }; ++ }; +}; --- /dev/null +++ b/arch/arm/boot/dts/bcm4708.dtsi -@@ -0,0 +1,100 @@ +@@ -0,0 +1,34 @@ +/* + * Broadcom BCM470X / BCM5301X ARM platform code. ++ * DTS for BCM4708 SoC. + * -+ * Copyright 2013 Hauke Mehrtens ++ * Copyright 2013-2014 Hauke Mehrtens + * + * Licensed under the GNU/GPL. See COPYING for details. + */ + -+#include -+#include -+ -+#include "skeleton.dtsi" ++#include "bcm5301x.dtsi" + +/ { -+ compatible = "broadcom,bcm4708"; -+ model = "Broadcom BCM4708"; -+ interrupt-parent = <&gic>; -+ -+ chosen { -+ bootargs = "console=ttyS0,115200 debug earlyprintk"; -+ }; ++ compatible = "brcm,bcm4708"; + + cpus { + #address-cells = <1>; @@ -133,74 +140,114 @@ Signed-off-by: Hauke Mehrtens + device_type = "cpu"; + compatible = "arm,cortex-a9"; + next-level-cache = <&L2>; -+ reg = <0>; ++ reg = <0x0>; + }; ++ + cpu@1 { + device_type = "cpu"; + compatible = "arm,cortex-a9"; + next-level-cache = <&L2>; -+ reg = <1>; ++ reg = <0x1>; + }; + }; + -+ clocks { ++}; +--- /dev/null ++++ b/arch/arm/boot/dts/bcm5301x.dtsi +@@ -0,0 +1,95 @@ ++/* ++ * Broadcom BCM470X / BCM5301X ARM platform code. ++ * Generic DTS part for all BCM53010, BCM53011, BCM53012, BCM53014, BCM53015, ++ * BCM53016, BCM53017, BCM53018, BCM4707, BCM4708 and BCM4709 SoCs ++ * ++ * Copyright 2013-2014 Hauke Mehrtens ++ * ++ * Licensed under the GNU/GPL. See COPYING for details. ++ */ ++ ++#include ++#include ++#include "skeleton.dtsi" ++ ++/ { ++ interrupt-parent = <&gic>; ++ ++ chipcommonA { ++ compatible = "simple-bus"; ++ ranges = <0x00000000 0x18000000 0x00001000>; + #address-cells = <1>; -+ #size-cells = <0>; ++ #size-cells = <1>; ++ ++ uart0: serial@0300 { ++ compatible = "ns16550"; ++ reg = <0x0300 0x100>; ++ interrupts = ; ++ clock-frequency = <100000000>; ++ status = "disabled"; ++ }; + -+ clk_periph: periph { -+ compatible = "fixed-clock"; -+ #clock-cells = <0>; -+ clock-frequency = <400000000>; ++ uart1: serial@0400 { ++ compatible = "ns16550"; ++ reg = <0x0400 0x100>; ++ interrupts = ; ++ clock-frequency = <100000000>; ++ status = "disabled"; + }; + }; + -+ uart@18000300 { -+ compatible = "ns16550"; -+ reg = <0x18000300 0x100>; -+ interrupts = ; -+ clock-frequency = <100000000>; -+ }; ++ mpcore { ++ compatible = "simple-bus"; ++ ranges = <0x00000000 0x19020000 0x00003000>; ++ #address-cells = <1>; ++ #size-cells = <1>; + -+ uart@18000400 { -+ compatible = "ns16550"; -+ reg = <0x18000400 0x100>; -+ interrupts = ; -+ clock-frequency = <100000000>; -+ }; ++ scu@0000 { ++ compatible = "arm,cortex-a9-scu"; ++ reg = <0x0000 0x100>; ++ }; + -+ gic: interrupt-controller@19021000 { -+ compatible = "arm,cortex-a9-gic"; -+ #interrupt-cells = <3>; -+ #address-cells = <0>; -+ interrupt-controller; -+ reg = <0x19021000 0x1000>, -+ <0x19020100 0x100>; -+ }; ++ timer@0200 { ++ compatible = "arm,cortex-a9-global-timer"; ++ reg = <0x0200 0x100>; ++ interrupts = ; ++ clocks = <&clk_periph>; ++ }; + -+ timer@19020200 { -+ compatible = "arm,cortex-a9-global-timer"; -+ reg = <0x19020200 0x100>; -+ interrupts = ; -+ clocks = <&clk_periph>; -+ }; ++ local-timer@0600 { ++ compatible = "arm,cortex-a9-twd-timer"; ++ reg = <0x0600 0x100>; ++ interrupts = ; ++ clocks = <&clk_periph>; ++ }; + -+ local-timer@19020600 { -+ compatible = "arm,cortex-a9-twd-timer"; -+ reg = <0x19020600 0x100>; -+ interrupts = ; -+ clocks = <&clk_periph>; -+ }; ++ gic: interrupt-controller@1000 { ++ compatible = "arm,cortex-a9-gic"; ++ #interrupt-cells = <3>; ++ #address-cells = <0>; ++ interrupt-controller; ++ reg = <0x1000 0x1000>, ++ <0x0100 0x100>; ++ }; + -+ L2: cache-controller@19022000 { -+ compatible = "arm,pl310-cache"; -+ reg = <0x19022000 0x1000>; -+ cache-unified; -+ cache-level = <2>; ++ L2: cache-controller@2000 { ++ compatible = "arm,pl310-cache"; ++ reg = <0x2000 0x1000>; ++ cache-unified; ++ cache-level = <2>; ++ }; + }; + -+ scu@19020000 { -+ compatible = "arm,cortex-a9-scu"; -+ reg = <0x19020000 0x100>; ++ clocks { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ /* As long as we do not have a real clock driver us this ++ * fixed clock */ ++ clk_periph: periph { ++ compatible = "fixed-clock"; ++ #clock-cells = <0>; ++ clock-frequency = <400000000>; ++ }; + }; +}; --- /dev/null @@ -227,7 +274,7 @@ Signed-off-by: Hauke Mehrtens +#include --- /dev/null +++ b/arch/arm/mach-bcm53xx/Kconfig -@@ -0,0 +1,26 @@ +@@ -0,0 +1,25 @@ +config ARCH_BCM_5301X + bool "Broadcom BCM470X / BCM5301X ARM SoC" if ARCH_MULTI_V7 + depends on MMU @@ -238,7 +285,6 @@ Signed-off-by: Hauke Mehrtens + select HAVE_SMP + select COMMON_CLK + select GENERIC_CLOCKEVENTS -+ select GENERIC_TIME + select ARM_GLOBAL_TIMER + select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK + select MIGHT_HAVE_PCI @@ -260,7 +306,7 @@ Signed-off-by: Hauke Mehrtens +obj-y += bcm53xx.o --- /dev/null +++ b/arch/arm/mach-bcm53xx/bcm53xx.c -@@ -0,0 +1,60 @@ +@@ -0,0 +1,70 @@ +/* + * Broadcom BCM470X / BCM5301X ARM platform code. + * @@ -268,33 +314,43 @@ Signed-off-by: Hauke Mehrtens + * + * Licensed under the GNU/GPL. See COPYING for details. + */ -+#include +#include +#include +#include +#include + +#include -+#include ++#include +#include + ++ ++static bool first_fault = true; ++ +static int bcm5301x_abort_handler(unsigned long addr, unsigned int fsr, + struct pt_regs *regs) +{ -+ /* -+ * These happen for no good reason, possibly left over from CFE -+ */ -+ pr_warn("External imprecise Data abort at addr=%#lx, fsr=%#x ignored.\n", ++ if (fsr == 0x1c06 && first_fault) { ++ first_fault = false; ++ ++ /* ++ * These faults with code 0x1c06 happens for no good reason, ++ * possibly left over from the CFE boot loader. ++ */ ++ pr_warn("External imprecise Data abort at addr=%#lx, fsr=%#x ignored.\n", + addr, fsr); + -+ /* Returning non-zero causes fault display and panic */ -+ return 0; ++ /* Returning non-zero causes fault display and panic */ ++ return 0; ++ } ++ ++ /* Others should cause a fault */ ++ return 1; +} + +static void __init bcm5301x_init_early(void) +{ + /* Install our hook */ -+ hook_fault_code(16 + 6, bcm5301x_abort_handler, SIGBUS, 0, ++ hook_fault_code(16 + 6, bcm5301x_abort_handler, SIGBUS, BUS_OBJERR, + "imprecise external abort"); +} + @@ -311,7 +367,7 @@ Signed-off-by: Hauke Mehrtens +} + +static const char __initconst *bcm5301x_dt_compat[] = { -+ "broadcom,bcm4708", ++ "brcm,bcm4708", + NULL, +}; + -- cgit v1.2.3