Commit e070fb74 authored by Hirokazu Takata's avatar Hirokazu Takata

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: default avatarHitoshi Yamamoto <hitoshiy@linux-m32r.org>
Signed-off-by: default avatarHirokazu Takata <takata@linux-m32r.org>
parent ef64cf60
...@@ -57,9 +57,13 @@ config PLAT_MAPPI ...@@ -57,9 +57,13 @@ config PLAT_MAPPI
config PLAT_USRV config PLAT_USRV
bool "uServer" bool "uServer"
select PLAT_HAS_INT1ICU
config PLAT_M32700UT config PLAT_M32700UT
bool "M32700UT" bool "M32700UT"
select PLAT_HAS_INT0ICU
select PLAT_HAS_INT1ICU
select PLAT_HAS_INT2ICU
help help
The M3T-M32700UT is an evaluation board based on uT-Engine The M3T-M32700UT is an evaluation board based on uT-Engine
specification. This board has an M32700 (Chaos) evaluation chip. specification. This board has an M32700 (Chaos) evaluation chip.
...@@ -68,6 +72,9 @@ config PLAT_M32700UT ...@@ -68,6 +72,9 @@ config PLAT_M32700UT
config PLAT_OPSPUT config PLAT_OPSPUT
bool "OPSPUT" bool "OPSPUT"
select PLAT_HAS_INT0ICU
select PLAT_HAS_INT1ICU
select PLAT_HAS_INT2ICU
help help
The OPSPUT is an evaluation board based on uT-Engine The OPSPUT is an evaluation board based on uT-Engine
specification. This board has a OPSP-REP chip. specification. This board has a OPSP-REP chip.
...@@ -89,6 +96,7 @@ config PLAT_MAPPI3 ...@@ -89,6 +96,7 @@ config PLAT_MAPPI3
config PLAT_M32104UT config PLAT_M32104UT
bool "M32104UT" bool "M32104UT"
select PLAT_HAS_INT1ICU
help help
The M3T-M32104UT is an reference board based on uT-Engine The M3T-M32104UT is an reference board based on uT-Engine
specification. This board has a M32104 chip. specification. This board has a M32104 chip.
...@@ -149,6 +157,18 @@ config ISA_DUAL_ISSUE ...@@ -149,6 +157,18 @@ config ISA_DUAL_ISSUE
depends on CHIP_M32700 || CHIP_OPSP depends on CHIP_M32700 || CHIP_OPSP
default y default y
config PLAT_HAS_INT0ICU
bool
default n
config PLAT_HAS_INT1ICU
bool
default n
config PLAT_HAS_INT2ICU
bool
default n
config BUS_CLOCK config BUS_CLOCK
int "Bus Clock [Hz] (integer)" int "Bus Clock [Hz] (integer)"
default "70000000" if PLAT_MAPPI default "70000000" if PLAT_MAPPI
......
...@@ -22,12 +22,26 @@ ...@@ -22,12 +22,26 @@
#include <asm/m32700ut/m32700ut_pld.h> #include <asm/m32700ut/m32700ut_pld.h>
#include <asm/m32700ut/m32700ut_lan.h> #include <asm/m32700ut/m32700ut_lan.h>
#include <asm/m32700ut/m32700ut_lcd.h> #include <asm/m32700ut/m32700ut_lcd.h>
/* for ei_handler:linux/arch/m32r/kernel/entry.S */
#define M32R_INT1ICU_ISTS PLD_ICUISTS
#define M32R_INT1ICU_IRQ_BASE M32700UT_PLD_IRQ_BASE
#define M32R_INT0ICU_ISTS M32700UT_LAN_ICUISTS
#define M32R_INT0ICU_IRQ_BASE M32700UT_LAN_PLD_IRQ_BASE
#define M32R_INT2ICU_ISTS M32700UT_LCD_ICUISTS
#define M32R_INT2ICU_IRQ_BASE M32700UT_LCD_PLD_IRQ_BASE
#endif /* CONFIG_PLAT_M32700UT */ #endif /* CONFIG_PLAT_M32700UT */
#if defined(CONFIG_PLAT_OPSPUT) #if defined(CONFIG_PLAT_OPSPUT)
#include <asm/opsput/opsput_pld.h> #include <asm/opsput/opsput_pld.h>
#include <asm/opsput/opsput_lan.h> #include <asm/opsput/opsput_lan.h>
#include <asm/opsput/opsput_lcd.h> #include <asm/opsput/opsput_lcd.h>
/* for ei_handler:linux/arch/m32r/kernel/entry.S */
#define M32R_INT1ICU_ISTS PLD_ICUISTS
#define M32R_INT1ICU_IRQ_BASE OPSPUT_PLD_IRQ_BASE
#define M32R_INT0ICU_ISTS OPSPUT_LAN_ICUISTS
#define M32R_INT0ICU_IRQ_BASE OPSPUT_LAN_PLD_IRQ_BASE
#define M32R_INT2ICU_ISTS OPSPUT_LCD_ICUISTS
#define M32R_INT2ICU_IRQ_BASE OPSPUT_LCD_PLD_IRQ_BASE
#endif /* CONFIG_PLAT_OPSPUT */ #endif /* CONFIG_PLAT_OPSPUT */
#if defined(CONFIG_PLAT_MAPPI2) #if defined(CONFIG_PLAT_MAPPI2)
...@@ -40,10 +54,16 @@ ...@@ -40,10 +54,16 @@
#if defined(CONFIG_PLAT_USRV) #if defined(CONFIG_PLAT_USRV)
#include <asm/m32700ut/m32700ut_pld.h> #include <asm/m32700ut/m32700ut_pld.h>
/* for ei_handler:linux/arch/m32r/kernel/entry.S */
#define M32R_INT1ICU_ISTS PLD_ICUISTS
#define M32R_INT1ICU_IRQ_BASE M32700UT_PLD_IRQ_BASE
#endif #endif
#if defined(CONFIG_PLAT_M32104UT) #if defined(CONFIG_PLAT_M32104UT)
#include <asm/m32104ut/m32104ut_pld.h> #include <asm/m32104ut/m32104ut_pld.h>
/* for ei_handler:linux/arch/m32r/kernel/entry.S */
#define M32R_INT1ICU_ISTS PLD_ICUISTS
#define M32R_INT1ICU_IRQ_BASE M32104UT_PLD_IRQ_BASE
#endif /* CONFIG_PLAT_M32104 */ #endif /* CONFIG_PLAT_M32104 */
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment