aboutsummaryrefslogtreecommitdiffstats
path: root/boards/base/RaspberryPi/example-FreeRTOS/Drivers/bcm2835_intc.h
blob: 9f87b88e443680b57e4ba0c81b9d5bcd40e8ce15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef _BCM2835_INTC_H_
#define _BCM2835_INTC_H_

//#include "bcm2835.h"

#define BCM2835_INTC_TOTAL_IRQ		64 + 8

#define BCM2835_BASE_INTC			(0x2000B200)
#define BCM2835_INTC_IRQ_BASIC		(BCM2835_BASE_INTC + 0x00)
#define BCM2835_IRQ_PENDING1		(BCM2835_BASE_INTC + 0x04)
#define BCM2835_IRQ_PENDING2		(BCM2835_BASE_INTC + 0x08)
#define BCM2835_IRQ_FIQ_CTRL		(BCM2835_BASE_INTC + 0x0C)
#define BCM2835_IRQ_ENABLE1			(BCM2835_BASE_INTC + 0x10)
#define BCM2835_IRQ_ENABLE2			(BCM2835_BASE_INTC + 0x14)
#define BCM2835_IRQ_ENABLE_BASIC	(BCM2835_BASE_INTC + 0x18)
#define BCM2835_IRQ_DISABLE1		(BCM2835_BASE_INTC + 0x1C)
#define BCM2835_IRQ_DISABLE2		(BCM2835_BASE_INTC + 0x20)
#define BCM2835_IRQ_DISABLE_BASIC	(BCM2835_BASE_INTC + 0x24)




#define BCM2835_IRQ_ID_AUX			29
#define BCM2835_IRQ_ID_SPI_SLAVE 	43
#define BCM2835_IRQ_ID_PWA0			45
#define BCM2835_IRQ_ID_PWA1		   	46
#define BCM2835_IRQ_ID_SMI 			48
#define BCM2835_IRQ_ID_GPIO_0 		49
#define BCM2835_IRQ_ID_GPIO_1 		50
#define BCM2835_IRQ_ID_GPIO_2 		51
#define BCM2835_IRQ_ID_GPIO_3 		52
#define BCM2835_IRQ_ID_I2C 			53
#define BCM2835_IRQ_ID_SPI 			54
#define BCM2835_IRQ_ID_PCM 			55
#define BCM2835_IRQ_ID_UART 		57


#define BCM2835_IRQ_ID_TIMER_0 		64
#define BCM2835_IRQ_ID_MAILBOX_0	65
#define BCM2835_IRQ_ID_DOORBELL_0 	66
#define BCM2835_IRQ_ID_DOORBELL_1 	67
#define BCM2835_IRQ_ID_GPU0_HALTED 	68


#endif
an> #include <xen/init.h> #include <xen/sched.h> #include <xen/dmi.h> /* Function pointer used to handle platform specific I/O port emulation. */ extern void (*ioemul_handle_quirk)( u8 opcode, char *io_emul_stub, struct cpu_user_regs *regs); static void ioemul_handle_proliant_quirk( u8 opcode, char *io_emul_stub, struct cpu_user_regs *regs) { uint16_t port = regs->edx; uint8_t value = regs->eax; if ( (opcode != 0xee) || (port != 0xcd4) || !(value & 0x80) ) return; /* pushf */ io_emul_stub[0] = 0x9c; /* cli */ io_emul_stub[1] = 0xfa; /* out %al,%dx */ io_emul_stub[2] = 0xee; /* 1: in %dx,%al */ io_emul_stub[3] = 0xec; /* test $0x80,%al */ io_emul_stub[4] = 0xa8; io_emul_stub[5] = 0x80; /* jnz 1b */ io_emul_stub[6] = 0x75; io_emul_stub[7] = 0xfb; /* popf */ io_emul_stub[8] = 0x9d; /* ret */ io_emul_stub[9] = 0xc3; } static int __init proliant_quirk(struct dmi_system_id *d) { ioemul_handle_quirk = ioemul_handle_proliant_quirk; return 0; } /* This table is the set of system-specific I/O emulation hooks. */ static struct dmi_system_id __initdata ioport_quirks_tbl[] = { /* * I/O emulation hook for certain HP ProLiant servers with * 'special' SMM goodness. */ { .callback = proliant_quirk, .ident = "HP ProLiant DL3xx", .matches = { DMI_MATCH(DMI_BIOS_VENDOR, "HP"), DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL3"), }, }, { .callback = proliant_quirk, .ident = "HP ProLiant DL5xx", .matches = { DMI_MATCH(DMI_BIOS_VENDOR, "HP"), DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL5"), }, }, { .callback = proliant_quirk, .ident = "HP ProLiant DL7xx", .matches = { DMI_MATCH(DMI_BIOS_VENDOR, "HP"), DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL7"), }, }, { .callback = proliant_quirk, .ident = "HP ProLiant ML3xx", .matches = { DMI_MATCH(DMI_BIOS_VENDOR, "HP"), DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant ML3"), }, }, { .callback = proliant_quirk, .ident = "HP ProLiant ML5xx", .matches = { DMI_MATCH(DMI_BIOS_VENDOR, "HP"), DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant ML5"), }, }, { .callback = proliant_quirk, .ident = "HP ProLiant BL2xx", .matches = { DMI_MATCH(DMI_BIOS_VENDOR, "HP"), DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL2"), }, }, { .callback = proliant_quirk, .ident = "HP ProLiant BL4xx", .matches = { DMI_MATCH(DMI_BIOS_VENDOR, "HP"), DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL4"), }, }, { .callback = proliant_quirk, .ident = "HP ProLiant BL6xx", .matches = { DMI_MATCH(DMI_BIOS_VENDOR, "HP"), DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL6"), }, }, { } }; static int __init ioport_quirks_init(void) { dmi_check_system(ioport_quirks_tbl); return 0; } __initcall(ioport_quirks_init); /* * Local variables: * mode: C * c-set-style: "BSD" * c-basic-offset: 4 * tab-width: 4 * indent-tabs-mode: nil * End: */