bcm2836_control.c (c532b954d96f96d361ca31308f75f1b95bd4df76) | bcm2836_control.c (e7534f29b1587527613fdce3e460ac4720e5d18b) |
---|---|
1/* 2 * Rasperry Pi 2 emulation ARM control logic module. 3 * Copyright (c) 2015, Microsoft 4 * Written by Andrew Baumann 5 * 6 * Based on bcm2835_ic.c (Raspberry Pi emulation) (c) 2012 Gregory Estrade 7 * 8 * At present, only implements interrupt routing, and mailboxes (i.e., --- 143 unchanged lines hidden (view full) --- 152 153/* XXX: the following wrapper functions are a kludgy workaround, 154 * needed because I can't seem to pass useful information in the "irq" 155 * parameter when using named interrupts. Feel free to clean this up! 156 */ 157 158static void bcm2836_control_set_local_irq0(void *opaque, int core, int level) 159{ | 1/* 2 * Rasperry Pi 2 emulation ARM control logic module. 3 * Copyright (c) 2015, Microsoft 4 * Written by Andrew Baumann 5 * 6 * Based on bcm2835_ic.c (Raspberry Pi emulation) (c) 2012 Gregory Estrade 7 * 8 * At present, only implements interrupt routing, and mailboxes (i.e., --- 143 unchanged lines hidden (view full) --- 152 153/* XXX: the following wrapper functions are a kludgy workaround, 154 * needed because I can't seem to pass useful information in the "irq" 155 * parameter when using named interrupts. Feel free to clean this up! 156 */ 157 158static void bcm2836_control_set_local_irq0(void *opaque, int core, int level) 159{ |
160 bcm2836_control_set_local_irq(opaque, core, 0, level); | 160 bcm2836_control_set_local_irq(opaque, core, IRQ_CNTPSIRQ, level); |
161} 162 163static void bcm2836_control_set_local_irq1(void *opaque, int core, int level) 164{ | 161} 162 163static void bcm2836_control_set_local_irq1(void *opaque, int core, int level) 164{ |
165 bcm2836_control_set_local_irq(opaque, core, 1, level); | 165 bcm2836_control_set_local_irq(opaque, core, IRQ_CNTPNSIRQ, level); |
166} 167 168static void bcm2836_control_set_local_irq2(void *opaque, int core, int level) 169{ | 166} 167 168static void bcm2836_control_set_local_irq2(void *opaque, int core, int level) 169{ |
170 bcm2836_control_set_local_irq(opaque, core, 2, level); | 170 bcm2836_control_set_local_irq(opaque, core, IRQ_CNTHPIRQ, level); |
171} 172 173static void bcm2836_control_set_local_irq3(void *opaque, int core, int level) 174{ | 171} 172 173static void bcm2836_control_set_local_irq3(void *opaque, int core, int level) 174{ |
175 bcm2836_control_set_local_irq(opaque, core, 3, level); | 175 bcm2836_control_set_local_irq(opaque, core, IRQ_CNTVIRQ, level); |
176} 177 178static void bcm2836_control_set_gpu_irq(void *opaque, int irq, int level) 179{ 180 BCM2836ControlState *s = opaque; 181 182 s->gpu_irq = level; 183 --- 225 unchanged lines hidden --- | 176} 177 178static void bcm2836_control_set_gpu_irq(void *opaque, int irq, int level) 179{ 180 BCM2836ControlState *s = opaque; 181 182 s->gpu_irq = level; 183 --- 225 unchanged lines hidden --- |