m32r: Define symbols to unify platform-dependent ICU checks

On some m32r platforms, cascaded ICUs are used.
This patch is required to simplify ei_handler and consolidate platform-
dependent ICU check routines.

platform ICU/INT1 ICU/INT0 ICU/INT2
-------------- -------- -------- --------
m32104ut o - -
m32700ut o o o
opsput o o o
usrv o - -
(others) - - -

Signed-off-by: Hitoshi Yamamoto <hitoshiy@linux-m32r.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>

+40
+20
arch/m32r/Kconfig
··· 57 57 58 58 config PLAT_USRV 59 59 bool "uServer" 60 + select PLAT_HAS_INT1ICU 60 61 61 62 config PLAT_M32700UT 62 63 bool "M32700UT" 64 + select PLAT_HAS_INT0ICU 65 + select PLAT_HAS_INT1ICU 66 + select PLAT_HAS_INT2ICU 63 67 help 64 68 The M3T-M32700UT is an evaluation board based on uT-Engine 65 69 specification. This board has an M32700 (Chaos) evaluation chip. ··· 72 68 73 69 config PLAT_OPSPUT 74 70 bool "OPSPUT" 71 + select PLAT_HAS_INT0ICU 72 + select PLAT_HAS_INT1ICU 73 + select PLAT_HAS_INT2ICU 75 74 help 76 75 The OPSPUT is an evaluation board based on uT-Engine 77 76 specification. This board has a OPSP-REP chip. ··· 96 89 97 90 config PLAT_M32104UT 98 91 bool "M32104UT" 92 + select PLAT_HAS_INT1ICU 99 93 help 100 94 The M3T-M32104UT is an reference board based on uT-Engine 101 95 specification. This board has a M32104 chip. ··· 156 148 bool 157 149 depends on CHIP_M32700 || CHIP_OPSP 158 150 default y 151 + 152 + config PLAT_HAS_INT0ICU 153 + bool 154 + default n 155 + 156 + config PLAT_HAS_INT1ICU 157 + bool 158 + default n 159 + 160 + config PLAT_HAS_INT2ICU 161 + bool 162 + default n 159 163 160 164 config BUS_CLOCK 161 165 int "Bus Clock [Hz] (integer)"
+20
include/asm-m32r/m32r.h
··· 22 22 #include <asm/m32700ut/m32700ut_pld.h> 23 23 #include <asm/m32700ut/m32700ut_lan.h> 24 24 #include <asm/m32700ut/m32700ut_lcd.h> 25 + /* for ei_handler:linux/arch/m32r/kernel/entry.S */ 26 + #define M32R_INT1ICU_ISTS PLD_ICUISTS 27 + #define M32R_INT1ICU_IRQ_BASE M32700UT_PLD_IRQ_BASE 28 + #define M32R_INT0ICU_ISTS M32700UT_LAN_ICUISTS 29 + #define M32R_INT0ICU_IRQ_BASE M32700UT_LAN_PLD_IRQ_BASE 30 + #define M32R_INT2ICU_ISTS M32700UT_LCD_ICUISTS 31 + #define M32R_INT2ICU_IRQ_BASE M32700UT_LCD_PLD_IRQ_BASE 25 32 #endif /* CONFIG_PLAT_M32700UT */ 26 33 27 34 #if defined(CONFIG_PLAT_OPSPUT) 28 35 #include <asm/opsput/opsput_pld.h> 29 36 #include <asm/opsput/opsput_lan.h> 30 37 #include <asm/opsput/opsput_lcd.h> 38 + /* for ei_handler:linux/arch/m32r/kernel/entry.S */ 39 + #define M32R_INT1ICU_ISTS PLD_ICUISTS 40 + #define M32R_INT1ICU_IRQ_BASE OPSPUT_PLD_IRQ_BASE 41 + #define M32R_INT0ICU_ISTS OPSPUT_LAN_ICUISTS 42 + #define M32R_INT0ICU_IRQ_BASE OPSPUT_LAN_PLD_IRQ_BASE 43 + #define M32R_INT2ICU_ISTS OPSPUT_LCD_ICUISTS 44 + #define M32R_INT2ICU_IRQ_BASE OPSPUT_LCD_PLD_IRQ_BASE 31 45 #endif /* CONFIG_PLAT_OPSPUT */ 32 46 33 47 #if defined(CONFIG_PLAT_MAPPI2) ··· 54 40 55 41 #if defined(CONFIG_PLAT_USRV) 56 42 #include <asm/m32700ut/m32700ut_pld.h> 43 + /* for ei_handler:linux/arch/m32r/kernel/entry.S */ 44 + #define M32R_INT1ICU_ISTS PLD_ICUISTS 45 + #define M32R_INT1ICU_IRQ_BASE M32700UT_PLD_IRQ_BASE 57 46 #endif 58 47 59 48 #if defined(CONFIG_PLAT_M32104UT) 60 49 #include <asm/m32104ut/m32104ut_pld.h> 50 + /* for ei_handler:linux/arch/m32r/kernel/entry.S */ 51 + #define M32R_INT1ICU_ISTS PLD_ICUISTS 52 + #define M32R_INT1ICU_IRQ_BASE M32104UT_PLD_IRQ_BASE 61 53 #endif /* CONFIG_PLAT_M32104 */ 62 54 63 55 /*