linux-mips
[Top] [All Lists]

[PATCH 13/14] MIPS: Netlogic: Add IRQ mappings for more devices

To: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: [PATCH 13/14] MIPS: Netlogic: Add IRQ mappings for more devices
From: "Jayachandran C" <jayachandranc@netlogicmicro.com>
Date: Tue, 8 May 2012 18:12:07 +0530
Cc: "Jayachandran C" <jayachandranc@netlogicmicro.com>
In-reply-to: <1336480928-18887-1-git-send-email-jayachandranc@netlogicmicro.com>
References: <1336480928-18887-1-git-send-email-jayachandranc@netlogicmicro.com>
Sender: linux-mips-bounce@linux-mips.org
Add IRT to IRQ translation for the MMC and I2C IRQs.

Signed-off-by: Jayachandran C <jayachandranc@netlogicmicro.com>
---
 arch/mips/include/asm/netlogic/xlp-hal/xlp.h |    3 +++
 arch/mips/netlogic/xlp/nlm_hal.c             |   12 ++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/arch/mips/include/asm/netlogic/xlp-hal/xlp.h 
b/arch/mips/include/asm/netlogic/xlp-hal/xlp.h
index 3921a31..7e47209 100644
--- a/arch/mips/include/asm/netlogic/xlp-hal/xlp.h
+++ b/arch/mips/include/asm/netlogic/xlp-hal/xlp.h
@@ -47,6 +47,9 @@
 #define PIC_OHCI_1_IRQ                 26
 #define PIC_OHCI_2_IRQ                 27
 #define PIC_OHCI_3_IRQ                 28
+#define PIC_MMC_IRQ                    29
+#define PIC_I2C_0_IRQ                  30
+#define PIC_I2C_1_IRQ                  31
 
 #ifndef __ASSEMBLY__
 
diff --git a/arch/mips/netlogic/xlp/nlm_hal.c b/arch/mips/netlogic/xlp/nlm_hal.c
index fad2cae..6c65ac7 100644
--- a/arch/mips/netlogic/xlp/nlm_hal.c
+++ b/arch/mips/netlogic/xlp/nlm_hal.c
@@ -89,6 +89,12 @@ int nlm_irq_to_irt(int irq)
               return PIC_IRT_OHCI_2_INDEX;
        case PIC_OHCI_3_IRQ:
               return PIC_IRT_OHCI_3_INDEX;
+       case PIC_MMC_IRQ:
+              return PIC_IRT_MMC_INDEX;
+       case PIC_I2C_0_IRQ:
+               return PIC_IRT_I2C_0_INDEX;
+       case PIC_I2C_1_IRQ:
+               return PIC_IRT_I2C_1_INDEX;
        default:
                return -1;
        }
@@ -121,6 +127,12 @@ int nlm_irt_to_irq(int irt)
                return PIC_OHCI_2_IRQ;
        case PIC_IRT_OHCI_3_INDEX:
                return PIC_OHCI_3_IRQ;
+       case PIC_IRT_MMC_INDEX:
+              return PIC_MMC_IRQ;
+       case PIC_IRT_I2C_0_INDEX:
+               return PIC_I2C_0_IRQ;
+       case PIC_IRT_I2C_1_INDEX:
+               return PIC_I2C_1_IRQ;
        default:
                return -1;
        }
-- 
1.7.9.5



<Prev in Thread] Current Thread [Next in Thread>