hw/arm_sysctl: Fix RESETCTL for realview-pb-a8 and -pbx-a9
Depending on the considered baseboard the bit used to reset the platform is different. Here is the list of considered Realview/Versatile platforms: Realview/Versatile AB for ARM926EJ-S: BOARD_ID = 0x100 = BOARD_ID_PB9 http://infocenter.arm.com/help/topic/com.arm.doc.dui0225d/CACCIFGI.html RealView Emulation Baseboard: BOARD_ID = 0x140 = BOARD_ID_EB No reset register RealView PB for Cortex-A8: BOARD_ID = 0x178 = BOARD_ID_PBA8 http://infocenter.arm.com/help/topic/com.arm.doc.dui0417d/BBACIGAD.html RealView PB for Cortex-A9: BOARD_ID = 0x182 = BOARD_ID_PBX http://infocenter.arm.com/help/topic/com.arm.doc.dui0440b/CACCHBFB.html Motherboard Express =C2=B5ATX: BOARD_ID = 0x190 = BOARD_ID_VEXPRESS No reset register Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
This commit is contained in:
parent
7c64d297f9
commit
b2887c43ee
@ -231,15 +231,30 @@ static void arm_sysctl_write(void *opaque, target_phys_addr_t offset,
|
||||
s->nvflags &= ~val;
|
||||
break;
|
||||
case 0x40: /* RESETCTL */
|
||||
if (board_id(s) == BOARD_ID_VEXPRESS) {
|
||||
switch (board_id(s)) {
|
||||
case BOARD_ID_PB926:
|
||||
if (s->lockval == LOCK_VALUE) {
|
||||
s->resetlevel = val;
|
||||
if (val & 0x100) {
|
||||
qemu_system_reset_request();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case BOARD_ID_PBX:
|
||||
case BOARD_ID_PBA8:
|
||||
if (s->lockval == LOCK_VALUE) {
|
||||
s->resetlevel = val;
|
||||
if (val & 0x04) {
|
||||
qemu_system_reset_request();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case BOARD_ID_VEXPRESS:
|
||||
case BOARD_ID_EB:
|
||||
default:
|
||||
/* reserved: RAZ/WI */
|
||||
break;
|
||||
}
|
||||
if (s->lockval == LOCK_VALUE) {
|
||||
s->resetlevel = val;
|
||||
if (val & 0x100)
|
||||
qemu_system_reset_request ();
|
||||
}
|
||||
break;
|
||||
case 0x44: /* PCICTL */
|
||||
/* nothing to do. */
|
||||
|
Loading…
Reference in New Issue
Block a user