Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / arch / arm / mach-bcm / bcm_5301x.c
blobcd29496da1ea4fa435f7977d88718b8c121afb21
1 /*
2 * Broadcom BCM470X / BCM5301X ARM platform code.
4 * Copyright 2013 Hauke Mehrtens <hauke@hauke-m.de>
6 * Licensed under the GNU/GPL. See COPYING for details.
7 */
9 #include <asm/mach/arch.h>
10 #include <asm/siginfo.h>
11 #include <asm/signal.h>
13 #define FSR_EXTERNAL (1 << 12)
14 #define FSR_READ (0 << 10)
15 #define FSR_IMPRECISE 0x0406
17 static const char *const bcm5301x_dt_compat[] __initconst = {
18 "brcm,bcm4708",
19 NULL,
22 static int bcm5301x_abort_handler(unsigned long addr, unsigned int fsr,
23 struct pt_regs *regs)
26 * We want to ignore aborts forwarded from the PCIe bus that are
27 * expected and shouldn't really be passed by the PCIe controller.
28 * The biggest disadvantage is the same FSR code may be reported when
29 * reading non-existing APB register and we shouldn't ignore that.
31 if (fsr == (FSR_EXTERNAL | FSR_READ | FSR_IMPRECISE))
32 return 0;
34 return 1;
37 static void __init bcm5301x_init_early(void)
39 hook_fault_code(16 + 6, bcm5301x_abort_handler, SIGBUS, BUS_OBJERR,
40 "imprecise external abort");
43 DT_MACHINE_START(BCM5301X, "BCM5301X")
44 .l2c_aux_val = 0,
45 .l2c_aux_mask = ~0,
46 .dt_compat = bcm5301x_dt_compat,
47 .init_early = bcm5301x_init_early,
48 MACHINE_END