--- zzzz-none-000/linux-3.10.107/arch/arm/mach-msm/include/mach/irqs.h 2017-06-27 09:49:32.000000000 +0000 +++ vr9-7490-729/linux-3.10.107/arch/arm/mach-msm/include/mach/irqs.h 2021-11-10 11:53:52.000000000 +0000 @@ -1,6 +1,7 @@ +/* * Copyright (c) 2012 The Linux Foundation. All rights reserved.* */ /* * Copyright (C) 2007 Google, Inc. - * Copyright (c) 2008-2010, Code Aurora Forum. All rights reserved. + * Copyright (c) 2008-2012, The Linux Foundation. All rights reserved. * Author: Brian Swetland * * This software is licensed under the terms of the GNU General Public @@ -19,6 +20,45 @@ #define MSM_IRQ_BIT(irq) (1 << ((irq) & 31)) +#include "irqs-8625.h" + +#if defined(CONFIG_ARCH_MSM8960) || defined(CONFIG_ARCH_APQ8064) || \ + defined(CONFIG_ARCH_IPQ806X) + +#ifdef CONFIG_ARCH_MSM8960 +#include "irqs-8960.h" +#endif + +#ifdef CONFIG_ARCH_APQ8064 +#include "irqs-8064.h" +#endif + +#ifdef CONFIG_ARCH_IPQ806X +#include "irqs-ipq806x.h" +#endif + +/* For now, use the maximum number of interrupts until a pending GIC issue + * is sorted out */ +#define NR_MSM_IRQS 288 +#define NR_GPIO_IRQS 152 +#define NR_PM8921_IRQS 256 +#define NR_PM8821_IRQS 112 +#define NR_WCD9XXX_IRQS 49 +#define NR_TABLA_IRQS NR_WCD9XXX_IRQS +#define NR_GPIO_EXPANDER_IRQS 64 +#ifdef CONFIG_PCI_MSI +#define NR_PCIE_MSI_IRQS 256 +#define NR_BOARD_IRQS (NR_PM8921_IRQS + NR_PM8821_IRQS + \ + NR_WCD9XXX_IRQS + NR_GPIO_EXPANDER_IRQS + NR_PCIE_MSI_IRQS) +#else +#define NR_BOARD_IRQS (NR_PM8921_IRQS + NR_PM8821_IRQS + \ + NR_WCD9XXX_IRQS + NR_GPIO_EXPANDER_IRQS) +#endif +#define NR_TLMM_MSM_DIR_CONN_IRQ 8 /*Need to Verify this Count*/ +#define NR_MSM_GPIOS NR_GPIO_IRQS + +#else + #if defined(CONFIG_ARCH_MSM7X30) #include "irqs-7x30.h" #elif defined(CONFIG_ARCH_QSD8X50) @@ -26,17 +66,37 @@ #include "sirc.h" #elif defined(CONFIG_ARCH_MSM8X60) #include "irqs-8x60.h" -#elif defined(CONFIG_ARCH_MSM8960) -/* TODO: Make these not generic. */ -#include "irqs-8960.h" -#elif defined(CONFIG_ARCH_MSM_ARM11) -#include "irqs-7x00.h" +#elif defined(CONFIG_ARCH_MSM7X01A) || defined(CONFIG_ARCH_MSM7X25) \ + || defined(CONFIG_ARCH_MSM7X27) +#include "irqs-7xxx.h" + +#define NR_GPIO_IRQS 133 +#define NR_MSM_IRQS 256 +#define NR_BOARD_IRQS 256 +#define NR_MSM_GPIOS NR_GPIO_IRQS +#elif defined(CONFIG_ARCH_FSM9XXX) +#include "irqs-fsm9xxx.h" +#include "sirc.h" #else #error "Unknown architecture specification" #endif +#endif + +#if !defined(CONFIG_SPARSE_IRQ) #define NR_IRQS (NR_MSM_IRQS + NR_GPIO_IRQS + NR_BOARD_IRQS) #define MSM_GPIO_TO_INT(n) (NR_MSM_IRQS + (n)) +#define FIRST_GPIO_IRQ MSM_GPIO_TO_INT(0) #define MSM_INT_TO_REG(base, irq) (base + irq / 32) +#endif + +#if defined(CONFIG_PCI_MSI) && defined(CONFIG_MSM_PCIE) +#define MSM_PCIE_MSI_INT(n) (NR_MSM_IRQS + NR_GPIO_IRQS + NR_PM8921_IRQS + \ + NR_PM8821_IRQS + NR_TABLA_IRQS + NR_GPIO_EXPANDER_IRQS + (n)) +#endif + +#ifndef IS_TLMM_MSM_DIR_CONN_IRQ +#define IS_TLMM_MSM_DIR_CONN_IRQ(irq) (irq < NR_TLMM_MSM_DIR_CONN_IRQ) +#endif #endif