From e849cce39e7671ca57e1a16347fe3ca54e043a2b Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Tue, 29 Oct 2013 13:40:43 +0100 Subject: [PATCH] pbxa9: centralize spec of interrupt names ref #874 --- base/include/platform/pbxa9/drivers/board_base.h | 14 ++++++++++++++ os/include/platform/pbxa9/lan9118_defs.h | 4 +++- os/include/platform/pbxa9/pl011_defs.h | 10 ++++++---- os/include/platform/pbxa9/pl050_defs.h | 6 ++++-- os/include/platform/pbxa9/pl180_defs.h | 6 ++++-- 5 files changed, 31 insertions(+), 9 deletions(-) diff --git a/base/include/platform/pbxa9/drivers/board_base.h b/base/include/platform/pbxa9/drivers/board_base.h index 1af98c166..d94cd7201 100644 --- a/base/include/platform/pbxa9/drivers/board_base.h +++ b/base/include/platform/pbxa9/drivers/board_base.h @@ -56,6 +56,9 @@ namespace Genode PL011_0_MMIO_SIZE = 0x00001000, PL011_0_CLOCK = OSC_6_CLOCK, PL011_0_IRQ = 44, + PL011_1_IRQ = 45, + PL011_2_IRQ = 46, + PL011_3_IRQ = 47, /* timer */ SP804_0_1_MMIO_BASE = 0x10011000, @@ -63,6 +66,17 @@ namespace Genode SP804_0_1_IRQ = 36, SP804_0_1_CLOCK = 1000*1000, + /* keyboard & mouse */ + KMI_0_IRQ = 52, + KMI_1_IRQ = 53, + + /* LAN */ + ETHERNET_IRQ = 60, + + /* SD card */ + PL180_IRQ_0 = 49, + PL180_IRQ_1 = 50, + /* CPU cache */ CACHE_LINE_SIZE_LOG2 = 2, /* FIXME get correct value from board spec */ diff --git a/os/include/platform/pbxa9/lan9118_defs.h b/os/include/platform/pbxa9/lan9118_defs.h index 4b5d7baff..7b00c8056 100644 --- a/os/include/platform/pbxa9/lan9118_defs.h +++ b/os/include/platform/pbxa9/lan9118_defs.h @@ -14,6 +14,8 @@ #ifndef _INCLUDE__PLATFORM__PBXA9__LAN9118_DEFS_H_ #define _INCLUDE__PLATFORM__PBXA9__LAN9118_DEFS_H_ +#include + enum { /** @@ -32,7 +34,7 @@ enum { /** * Interrupt line */ - LAN9118_IRQ = 28 + 32, + LAN9118_IRQ = Genode::Board_base::ETHERNET_IRQ, }; #endif /* _INCLUDE__PLATFORM__PBXA9__LAN9118_DEFS_H_ */ diff --git a/os/include/platform/pbxa9/pl011_defs.h b/os/include/platform/pbxa9/pl011_defs.h index 37b864020..226839808 100644 --- a/os/include/platform/pbxa9/pl011_defs.h +++ b/os/include/platform/pbxa9/pl011_defs.h @@ -14,6 +14,8 @@ #ifndef _INCLUDE__PLATFORM__PBXA9__PL011_DEFS_H_ #define _INCLUDE__PLATFORM__PBXA9__PL011_DEFS_H_ +#include + enum { /** Number of UARTs */ @@ -31,10 +33,10 @@ enum { /** * Interrupt lines */ - PL011_IRQ0 = 12 + 32, /* UART 0 */ - PL011_IRQ1 = 13 + 32, /* UART 1 */ - PL011_IRQ2 = 14 + 32, /* UART 2 */ - PL011_IRQ3 = 15 + 32, /* UART 3 */ + PL011_IRQ0 = Genode::Board_base::PL011_0_IRQ, /* UART 0 */ + PL011_IRQ1 = Genode::Board_base::PL011_1_IRQ, /* UART 1 */ + PL011_IRQ2 = Genode::Board_base::PL011_2_IRQ, /* UART 2 */ + PL011_IRQ3 = Genode::Board_base::PL011_3_IRQ, /* UART 3 */ /** * UART baud rate configuration (precalculated) diff --git a/os/include/platform/pbxa9/pl050_defs.h b/os/include/platform/pbxa9/pl050_defs.h index a859469ea..c712f355d 100644 --- a/os/include/platform/pbxa9/pl050_defs.h +++ b/os/include/platform/pbxa9/pl050_defs.h @@ -14,6 +14,8 @@ #ifndef _INCLUDE__PLATFORM__PBXA9__PL050_DEFS_H_ #define _INCLUDE__PLATFORM__PBXA9__PL050_DEFS_H_ +#include + enum { PL050_KEYBD_PHYS = 0x10006000, PL050_KEYBD_SIZE = 0x1000, PL050_MOUSE_PHYS = 0x10007000, PL050_MOUSE_SIZE = 0x1000, @@ -21,8 +23,8 @@ enum { /** * Interrupt lines */ - PL050_KEYBD_IRQ = 20 + 32, - PL050_MOUSE_IRQ = 21 + 32, + PL050_KEYBD_IRQ = Genode::Board_base::KMI_0_IRQ, + PL050_MOUSE_IRQ = Genode::Board_base::KMI_1_IRQ, }; #endif /* _INCLUDE__PLATFORM__PBXA9__PL050_DEFS_H_ */ diff --git a/os/include/platform/pbxa9/pl180_defs.h b/os/include/platform/pbxa9/pl180_defs.h index 469e65ae9..db433192b 100644 --- a/os/include/platform/pbxa9/pl180_defs.h +++ b/os/include/platform/pbxa9/pl180_defs.h @@ -14,14 +14,16 @@ #ifndef _INCLUDE__PLATFORM__PBXA9__PL180_DEFS_H_ #define _INCLUDE__PLATFORM__PBXA9__PL180_DEFS_H_ +#include + enum { PL180_PHYS = 0x10005000, PL180_SIZE = 0x1000, /** * Interrupt lines */ - PL180_IRQ0 = 17 + 32, - PL180_IRQ1 = 18 + 32, + PL180_IRQ0 = Genode::Board_base::PL180_IRQ_0, + PL180_IRQ1 = Genode::Board_base::PL180_IRQ_1, }; #endif /* _INCLUDE__PLATFORM__PBXA9__PL180_DEFS_H_ */