|
@@ -110,6 +110,7 @@ struct MPS2TZMachineClass {
|
|
const uint32_t *oscclk;
|
|
const uint32_t *oscclk;
|
|
uint32_t fpgaio_num_leds; /* Number of LEDs in FPGAIO LED0 register */
|
|
uint32_t fpgaio_num_leds; /* Number of LEDs in FPGAIO LED0 register */
|
|
bool fpgaio_has_switches; /* Does FPGAIO have SWITCH register? */
|
|
bool fpgaio_has_switches; /* Does FPGAIO have SWITCH register? */
|
|
|
|
+ bool fpgaio_has_dbgctrl; /* Does FPGAIO have DBGCTRL register? */
|
|
int numirq; /* Number of external interrupts */
|
|
int numirq; /* Number of external interrupts */
|
|
int uart_overflow_irq; /* number of the combined UART overflow IRQ */
|
|
int uart_overflow_irq; /* number of the combined UART overflow IRQ */
|
|
const RAMInfo *raminfo;
|
|
const RAMInfo *raminfo;
|
|
@@ -422,6 +423,7 @@ static MemoryRegion *make_fpgaio(MPS2TZMachineState *mms, void *opaque,
|
|
object_initialize_child(OBJECT(mms), "fpgaio", fpgaio, TYPE_MPS2_FPGAIO);
|
|
object_initialize_child(OBJECT(mms), "fpgaio", fpgaio, TYPE_MPS2_FPGAIO);
|
|
qdev_prop_set_uint32(DEVICE(fpgaio), "num-leds", mmc->fpgaio_num_leds);
|
|
qdev_prop_set_uint32(DEVICE(fpgaio), "num-leds", mmc->fpgaio_num_leds);
|
|
qdev_prop_set_bit(DEVICE(fpgaio), "has-switches", mmc->fpgaio_has_switches);
|
|
qdev_prop_set_bit(DEVICE(fpgaio), "has-switches", mmc->fpgaio_has_switches);
|
|
|
|
+ qdev_prop_set_bit(DEVICE(fpgaio), "has-dbgctrl", mmc->fpgaio_has_dbgctrl);
|
|
sysbus_realize(SYS_BUS_DEVICE(fpgaio), &error_fatal);
|
|
sysbus_realize(SYS_BUS_DEVICE(fpgaio), &error_fatal);
|
|
return sysbus_mmio_get_region(SYS_BUS_DEVICE(fpgaio), 0);
|
|
return sysbus_mmio_get_region(SYS_BUS_DEVICE(fpgaio), 0);
|
|
}
|
|
}
|
|
@@ -1046,6 +1048,7 @@ static void mps2tz_an505_class_init(ObjectClass *oc, void *data)
|
|
mmc->len_oscclk = ARRAY_SIZE(an505_oscclk);
|
|
mmc->len_oscclk = ARRAY_SIZE(an505_oscclk);
|
|
mmc->fpgaio_num_leds = 2;
|
|
mmc->fpgaio_num_leds = 2;
|
|
mmc->fpgaio_has_switches = false;
|
|
mmc->fpgaio_has_switches = false;
|
|
|
|
+ mmc->fpgaio_has_dbgctrl = false;
|
|
mmc->numirq = 92;
|
|
mmc->numirq = 92;
|
|
mmc->uart_overflow_irq = 47;
|
|
mmc->uart_overflow_irq = 47;
|
|
mmc->raminfo = an505_raminfo;
|
|
mmc->raminfo = an505_raminfo;
|
|
@@ -1070,6 +1073,7 @@ static void mps2tz_an521_class_init(ObjectClass *oc, void *data)
|
|
mmc->len_oscclk = ARRAY_SIZE(an505_oscclk);
|
|
mmc->len_oscclk = ARRAY_SIZE(an505_oscclk);
|
|
mmc->fpgaio_num_leds = 2;
|
|
mmc->fpgaio_num_leds = 2;
|
|
mmc->fpgaio_has_switches = false;
|
|
mmc->fpgaio_has_switches = false;
|
|
|
|
+ mmc->fpgaio_has_dbgctrl = false;
|
|
mmc->numirq = 92;
|
|
mmc->numirq = 92;
|
|
mmc->uart_overflow_irq = 47;
|
|
mmc->uart_overflow_irq = 47;
|
|
mmc->raminfo = an505_raminfo; /* AN521 is the same as AN505 here */
|
|
mmc->raminfo = an505_raminfo; /* AN521 is the same as AN505 here */
|
|
@@ -1094,6 +1098,7 @@ static void mps3tz_an524_class_init(ObjectClass *oc, void *data)
|
|
mmc->len_oscclk = ARRAY_SIZE(an524_oscclk);
|
|
mmc->len_oscclk = ARRAY_SIZE(an524_oscclk);
|
|
mmc->fpgaio_num_leds = 10;
|
|
mmc->fpgaio_num_leds = 10;
|
|
mmc->fpgaio_has_switches = true;
|
|
mmc->fpgaio_has_switches = true;
|
|
|
|
+ mmc->fpgaio_has_dbgctrl = false;
|
|
mmc->numirq = 95;
|
|
mmc->numirq = 95;
|
|
mmc->uart_overflow_irq = 47;
|
|
mmc->uart_overflow_irq = 47;
|
|
mmc->raminfo = an524_raminfo;
|
|
mmc->raminfo = an524_raminfo;
|