summaryrefslogtreecommitdiff
path: root/target/linux/bcm53xx
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2016-03-08 08:29:29 +0000
committerRafał Miłecki <zajec5@gmail.com>2016-03-08 08:29:29 +0000
commit9f116fae920d271b564d66b77c26ccbd7298c905 (patch)
treea8af66722bdfc98ec37873465315248a56e1b32d /target/linux/bcm53xx
parent0e2f0196a2d684f2bb6f652e09e98b79c2bcf60e (diff)
downloadmtk-20170518-9f116fae920d271b564d66b77c26ccbd7298c905.zip
mtk-20170518-9f116fae920d271b564d66b77c26ccbd7298c905.tar.gz
mtk-20170518-9f116fae920d271b564d66b77c26ccbd7298c905.tar.bz2
bcm53xx: revert patch removing imprecise abort workaround
It seems it still happens on some devices. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 48961
Diffstat (limited to 'target/linux/bcm53xx')
-rw-r--r--target/linux/bcm53xx/patches-4.4/301-Revert-ARM-BCM5301X-remove-workaround-imprecise-abor.patch66
1 files changed, 66 insertions, 0 deletions
diff --git a/target/linux/bcm53xx/patches-4.4/301-Revert-ARM-BCM5301X-remove-workaround-imprecise-abor.patch b/target/linux/bcm53xx/patches-4.4/301-Revert-ARM-BCM5301X-remove-workaround-imprecise-abor.patch
new file mode 100644
index 0000000..907c581
--- /dev/null
+++ b/target/linux/bcm53xx/patches-4.4/301-Revert-ARM-BCM5301X-remove-workaround-imprecise-abor.patch
@@ -0,0 +1,66 @@
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
+Date: Tue, 8 Mar 2016 09:03:21 +0100
+Subject: [PATCH] Revert "ARM: BCM5301X: remove workaround imprecise abort
+ fault handler"
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This reverts commit 937b12306ea79044c86f2e69b3061c7279245825.
+
+It seems imprecise external abort (0x1406) can be still happen on
+BCM4709 during PCI initialization.
+
+Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
+---
+
+--- a/arch/arm/mach-bcm/bcm_5301x.c
++++ b/arch/arm/mach-bcm/bcm_5301x.c
+@@ -9,6 +9,40 @@
+ #include <asm/hardware/cache-l2x0.h>
+
+ #include <asm/mach/arch.h>
++#include <asm/siginfo.h>
++#include <asm/signal.h>
++
++
++static bool first_fault = true;
++
++static int bcm5301x_abort_handler(unsigned long addr, unsigned int fsr,
++ struct pt_regs *regs)
++{
++ if ((fsr == 0x1406 || fsr == 0x1c06) && first_fault) {
++ first_fault = false;
++
++ /*
++ * These faults with codes 0x1406 (BCM4709) or 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;
++ }
++
++ /* 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, BUS_OBJERR,
++ "imprecise external abort");
++}
+
+ static const char *const bcm5301x_dt_compat[] __initconst = {
+ "brcm,bcm4708",
+@@ -18,5 +52,6 @@ static const char *const bcm5301x_dt_com
+ DT_MACHINE_START(BCM5301X, "BCM5301X")
+ .l2c_aux_val = 0,
+ .l2c_aux_mask = ~0,
++ .init_early = bcm5301x_init_early,
+ .dt_compat = bcm5301x_dt_compat,
+ MACHINE_END