panda: centralize spec of interrupt names

ref #874
This commit is contained in:
Martin Stein 2013-10-29 15:31:28 +01:00 committed by Norman Feske
parent 7e294a39f4
commit cc17d82d92
4 changed files with 17 additions and 13 deletions

View File

@ -37,19 +37,20 @@ namespace Genode
MPU_DPLL_CLOCK = 200*1000*1000,
SYS_CLK = 38400000,
/* UARTs */
/* UART controllers */
TL16C750_1_MMIO_BASE = MMIO_0_BASE + 0x6a000,
TL16C750_2_MMIO_BASE = MMIO_0_BASE + 0x6c000,
TL16C750_3_MMIO_BASE = MMIO_0_BASE + 0x20000,
TL16C750_4_MMIO_BASE = MMIO_0_BASE + 0x6e000,
TL16C750_MMIO_SIZE = 0x2000,
TL16C750_CLOCK = 48*1000*1000,
TL16C750_1_IRQ = 104,
TL16C750_2_IRQ = 105,
TL16C750_3_IRQ = 106,
TL16C750_4_IRQ = 102,
TL16C750_1_IRQ = 72,
TL16C750_2_IRQ = 73,
TL16C750_3_IRQ = 74,
TL16C750_4_IRQ = 70,
/* timer modules */
GP_TIMER_3_IRQ = 71,
/* CPU */
CORTEX_A9_PRIVATE_MEM_BASE = 0x48240000,
@ -84,6 +85,9 @@ namespace Genode
GPIO6_MMIO_SIZE = 0x1000,
GPIO6_IRQ = 34 + 32,
/* SD card */
HSMMC_IRQ = 115,
/* CPU cache */
CACHE_LINE_SIZE_LOG2 = 2, /* FIXME get correct value from board spec */

View File

@ -30,10 +30,10 @@ static struct Omap_uart_cfg {
Genode::size_t mmio_size;
int irq_number;
} omap_uart_cfg[UARTS_NUM] = {
{ Genode::Board_base::TL16C750_1_MMIO_BASE, Genode::Board_base::TL16C750_MMIO_SIZE, Genode::Board_base::TL16C750_1_IRQ + 32 },
{ Genode::Board_base::TL16C750_2_MMIO_BASE, Genode::Board_base::TL16C750_MMIO_SIZE, Genode::Board_base::TL16C750_2_IRQ + 32 },
{ Genode::Board_base::TL16C750_3_MMIO_BASE, Genode::Board_base::TL16C750_MMIO_SIZE, Genode::Board_base::TL16C750_3_IRQ + 32 },
{ Genode::Board_base::TL16C750_4_MMIO_BASE, Genode::Board_base::TL16C750_MMIO_SIZE, Genode::Board_base::TL16C750_4_IRQ + 32 },
{ Genode::Board_base::TL16C750_1_MMIO_BASE, Genode::Board_base::TL16C750_MMIO_SIZE, Genode::Board_base::TL16C750_1_IRQ },
{ Genode::Board_base::TL16C750_2_MMIO_BASE, Genode::Board_base::TL16C750_MMIO_SIZE, Genode::Board_base::TL16C750_2_IRQ },
{ Genode::Board_base::TL16C750_3_MMIO_BASE, Genode::Board_base::TL16C750_MMIO_SIZE, Genode::Board_base::TL16C750_3_IRQ },
{ Genode::Board_base::TL16C750_4_MMIO_BASE, Genode::Board_base::TL16C750_MMIO_SIZE, Genode::Board_base::TL16C750_4_IRQ },
};
#endif /* _INCLUDE__PLATFORM__PANDABOARD__UART_DEFS_H_ */

View File

@ -18,6 +18,7 @@
#include <util/mmio.h>
#include <os/attached_ram_dataspace.h>
#include <irq_session/connection.h>
#include <drivers/board_base.h>
/* local includes */
#include <sd_card.h>
@ -749,7 +750,7 @@ struct Omap4_hsmmc_controller : private Mmchs, public Sd_card::Host_controller
public:
enum { IRQ_NUMBER = 83 + 32 };
enum { IRQ_NUMBER = Genode::Board_base::HSMMC_IRQ };
/**
* Constructor

View File

@ -248,14 +248,13 @@ class Platform_timer_base : public Genode::Io_mem_connection,
{
/* FIXME these should be located in a omap4-defs file */
enum {
GP_TIMER_3_IRQ = 71,
GP_TIMER_3_MMIO_BASE = 0x48034000,
GP_TIMER_3_MMIO_SIZE = 0x00001000,
};
public:
enum { IRQ = GP_TIMER_3_IRQ };
enum { IRQ = Genode::Board_base::GP_TIMER_3_IRQ };
/**
* Constructor