bcm_5301x.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Broadcom BCM470X / BCM5301X ARM platform code.
  3. *
  4. * Copyright 2013 Hauke Mehrtens <hauke@hauke-m.de>
  5. *
  6. * Licensed under the GNU/GPL. See COPYING for details.
  7. */
  8. #include <linux/of_platform.h>
  9. #include <asm/hardware/cache-l2x0.h>
  10. #include <asm/mach/arch.h>
  11. #include <asm/siginfo.h>
  12. #include <asm/signal.h>
  13. static bool first_fault = true;
  14. static int bcm5301x_abort_handler(unsigned long addr, unsigned int fsr,
  15. struct pt_regs *regs)
  16. {
  17. if (fsr == 0x1c06 && first_fault) {
  18. first_fault = false;
  19. /*
  20. * These faults with code 0x1c06 happens for no good reason,
  21. * possibly left over from the CFE boot loader.
  22. */
  23. pr_warn("External imprecise Data abort at addr=%#lx, fsr=%#x ignored.\n",
  24. addr, fsr);
  25. /* Returning non-zero causes fault display and panic */
  26. return 0;
  27. }
  28. /* Others should cause a fault */
  29. return 1;
  30. }
  31. static void __init bcm5301x_init_early(void)
  32. {
  33. /* Install our hook */
  34. hook_fault_code(16 + 6, bcm5301x_abort_handler, SIGBUS, BUS_OBJERR,
  35. "imprecise external abort");
  36. }
  37. static const char __initconst *bcm5301x_dt_compat[] = {
  38. "brcm,bcm4708",
  39. NULL,
  40. };
  41. DT_MACHINE_START(BCM5301X, "BCM5301X")
  42. .l2c_aux_val = 0,
  43. .l2c_aux_mask = ~0,
  44. .init_early = bcm5301x_init_early,
  45. .dt_compat = bcm5301x_dt_compat,
  46. MACHINE_END