0005-MIPS-lantiq-make-irq.c-support-the-FALC-ON.patch 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. From d9355bb07878f9aa40856cc437c43cedc87662fc Mon Sep 17 00:00:00 2001
  2. From: John Crispin <[email protected]>
  3. Date: Thu, 11 Aug 2011 12:25:55 +0200
  4. Subject: [PATCH 05/24] MIPS: lantiq: make irq.c support the FALC-ON
  5. There are minor differences in how irqs work on xway and falcon socs.
  6. Xway needs 2 quirks that we need to disable for falcon to also work with
  7. this code.
  8. * EBU irq does not need to send a special ack to the EBU
  9. * The EIU does not exist
  10. Signed-off-by: John Crispin <[email protected]>
  11. Signed-off-by: Thomas Langer <[email protected]>
  12. Cc: [email protected]
  13. ---
  14. arch/mips/lantiq/irq.c | 24 +++++++++++++-----------
  15. 1 files changed, 13 insertions(+), 11 deletions(-)
  16. diff --git a/arch/mips/lantiq/irq.c b/arch/mips/lantiq/irq.c
  17. index f9737bb..17c057f 100644
  18. --- a/arch/mips/lantiq/irq.c
  19. +++ b/arch/mips/lantiq/irq.c
  20. @@ -195,7 +195,7 @@ static void ltq_hw_irqdispatch(int module)
  21. do_IRQ((int)irq + INT_NUM_IM0_IRL0 + (INT_NUM_IM_OFFSET * module));
  22. /* if this is a EBU irq, we need to ack it or get a deadlock */
  23. - if ((irq == LTQ_ICU_EBU_IRQ) && (module == 0))
  24. + if ((irq == LTQ_ICU_EBU_IRQ) && (module == 0) && LTQ_EBU_PCC_ISTAT)
  25. ltq_ebu_w32(ltq_ebu_r32(LTQ_EBU_PCC_ISTAT) | 0x10,
  26. LTQ_EBU_PCC_ISTAT);
  27. }
  28. @@ -260,17 +260,19 @@ void __init arch_init_irq(void)
  29. if (!ltq_icu_membase)
  30. panic("Failed to remap icu memory\n");
  31. - if (insert_resource(&iomem_resource, &ltq_eiu_resource) < 0)
  32. - panic("Failed to insert eiu memory\n");
  33. + if (LTQ_EIU_BASE_ADDR) {
  34. + if (insert_resource(&iomem_resource, &ltq_eiu_resource) < 0)
  35. + panic("Failed to insert eiu memory\n");
  36. - if (request_mem_region(ltq_eiu_resource.start,
  37. - resource_size(&ltq_eiu_resource), "eiu") < 0)
  38. - panic("Failed to request eiu memory\n");
  39. + if (request_mem_region(ltq_eiu_resource.start,
  40. + resource_size(&ltq_eiu_resource), "eiu") < 0)
  41. + panic("Failed to request eiu memory\n");
  42. - ltq_eiu_membase = ioremap_nocache(ltq_eiu_resource.start,
  43. + ltq_eiu_membase = ioremap_nocache(ltq_eiu_resource.start,
  44. resource_size(&ltq_eiu_resource));
  45. - if (!ltq_eiu_membase)
  46. - panic("Failed to remap eiu memory\n");
  47. + if (!ltq_eiu_membase)
  48. + panic("Failed to remap eiu memory\n");
  49. + }
  50. /* make sure all irqs are turned off by default */
  51. for (i = 0; i < 5; i++)
  52. @@ -296,8 +298,8 @@ void __init arch_init_irq(void)
  53. for (i = INT_NUM_IRQ0;
  54. i <= (INT_NUM_IRQ0 + (5 * INT_NUM_IM_OFFSET)); i++)
  55. - if ((i == LTQ_EIU_IR0) || (i == LTQ_EIU_IR1) ||
  56. - (i == LTQ_EIU_IR2))
  57. + if (((i == LTQ_EIU_IR0) || (i == LTQ_EIU_IR1) ||
  58. + (i == LTQ_EIU_IR2)) && LTQ_EIU_BASE_ADDR)
  59. irq_set_chip_and_handler(i, &ltq_eiu_type,
  60. handle_level_irq);
  61. /* EIU3-5 only exist on ar9 and vr9 */
  62. --
  63. 1.7.5.4