diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2018-08-14 04:11:38 +0300 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2018-08-20 22:28:04 +0300 |
commit | 994fa1c83d658f857dacf0512e8f7db246143d26 (patch) | |
tree | 31c638260fdbf906f57013e92929cb3f49677388 /arch | |
parent | aea731c81f998af5e45654459bac24a1c808fb22 (diff) | |
download | linux-994fa1c83d658f857dacf0512e8f7db246143d26.tar.xz |
xtensa: move PLATFORM_NR_IRQS to Kconfig
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/xtensa/Kconfig | 4 | ||||
-rw-r--r-- | arch/xtensa/include/asm/irq.h | 5 | ||||
-rw-r--r-- | arch/xtensa/platforms/xt2000/include/platform/hardware.h | 4 | ||||
-rw-r--r-- | arch/xtensa/platforms/xtfpga/include/platform/hardware.h | 4 |
4 files changed, 7 insertions, 10 deletions
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index e82ed7216eca..4e64c9c1748b 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig @@ -435,6 +435,10 @@ config XTENSA_PLATFORM_XTFPGA endchoice +config PLATFORM_NR_IRQS + int + default 3 if XTENSA_PLATFORM_XT2000 + default 0 config XTENSA_CPU_CLOCK int "CPU clock rate [MHz]" diff --git a/arch/xtensa/include/asm/irq.h b/arch/xtensa/include/asm/irq.h index 19707db966f1..2270d93ab7e6 100644 --- a/arch/xtensa/include/asm/irq.h +++ b/arch/xtensa/include/asm/irq.h @@ -12,7 +12,6 @@ #define _XTENSA_IRQ_H #include <linux/init.h> -#include <platform/hardware.h> #include <variant/core.h> #ifdef CONFIG_VARIANT_IRQ_SWITCH @@ -25,7 +24,9 @@ static inline void variant_irq_disable(unsigned int irq) { } #ifndef VARIANT_NR_IRQS # define VARIANT_NR_IRQS 0 #endif -#ifndef PLATFORM_NR_IRQS +#ifdef CONFIG_PLATFORM_NR_IRQS +# define PLATFORM_NR_IRQS CONFIG_PLATFORM_NR_IRQS +#else # define PLATFORM_NR_IRQS 0 #endif #define XTENSA_NR_IRQS XCHAL_NUM_INTERRUPTS diff --git a/arch/xtensa/platforms/xt2000/include/platform/hardware.h b/arch/xtensa/platforms/xt2000/include/platform/hardware.h index a309ec190777..8e5e0d6a81ec 100644 --- a/arch/xtensa/platforms/xt2000/include/platform/hardware.h +++ b/arch/xtensa/platforms/xt2000/include/platform/hardware.h @@ -18,10 +18,6 @@ #include <variant/core.h> /* - * Number of platform IRQs - */ -#define PLATFORM_NR_IRQS 3 -/* * On-board components. */ diff --git a/arch/xtensa/platforms/xtfpga/include/platform/hardware.h b/arch/xtensa/platforms/xtfpga/include/platform/hardware.h index 99d9bcbec57e..30d9cb6cf168 100644 --- a/arch/xtensa/platforms/xtfpga/include/platform/hardware.h +++ b/arch/xtensa/platforms/xtfpga/include/platform/hardware.h @@ -17,10 +17,6 @@ #ifndef __XTENSA_XTAVNET_HARDWARE_H #define __XTENSA_XTAVNET_HARDWARE_H -/* Interrupt configuration. */ - -#define PLATFORM_NR_IRQS 0 - /* Default assignment of LX60 devices to external interrupts. */ #ifdef CONFIG_XTENSA_MX |