* [Qemu-devel] [PATCH v3] hw/arm_sysctl: Fix RESETCTL for realview-pb-a8 and -pbx-a9
@ 2011-11-06 19:14 Jean-Christophe DUBOIS
2011-11-06 21:37 ` Peter Maydell
2011-11-14 3:01 ` andrzej zaborowski
0 siblings, 2 replies; 4+ messages in thread
From: Jean-Christophe DUBOIS @ 2011-11-06 19:14 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell, paul, Jean-Christophe DUBOIS
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_PB926
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 µATX: BOARD_ID = 0x190 = BOARD_ID_VEXPRESS
No reset register
Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
---
v3:
- change patch name to something more meaningful
- move version information after the commit message.
- remove added BOARD_ID and code for unsuported board
- remove code style fixing for unrelated code
v2:
- Add multiple boards support
- fix coding style
- Added a BOARD_ID descriptor for unsupported baseboards.
hw/arm_sysctl.c | 27 +++++++++++++++++++++------
1 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/hw/arm_sysctl.c b/hw/arm_sysctl.c
index 17cf6f7..477fc6f 100644
--- a/hw/arm_sysctl.c
+++ b/hw/arm_sysctl.c
@@ -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. */
--
1.7.5.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v3] hw/arm_sysctl: Fix RESETCTL for realview-pb-a8 and -pbx-a9
2011-11-06 19:14 [Qemu-devel] [PATCH v3] hw/arm_sysctl: Fix RESETCTL for realview-pb-a8 and -pbx-a9 Jean-Christophe DUBOIS
@ 2011-11-06 21:37 ` Peter Maydell
2011-11-14 3:01 ` andrzej zaborowski
1 sibling, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2011-11-06 21:37 UTC (permalink / raw)
To: Jean-Christophe DUBOIS; +Cc: qemu-devel, paul
On 6 November 2011 19:14, Jean-Christophe DUBOIS <jcd@tribudubois.net> wrote:
> Depending on the considered baseboard the bit used to
> reset the platform is different.
> Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v3] hw/arm_sysctl: Fix RESETCTL for realview-pb-a8 and -pbx-a9
2011-11-06 19:14 [Qemu-devel] [PATCH v3] hw/arm_sysctl: Fix RESETCTL for realview-pb-a8 and -pbx-a9 Jean-Christophe DUBOIS
2011-11-06 21:37 ` Peter Maydell
@ 2011-11-14 3:01 ` andrzej zaborowski
2011-11-14 8:09 ` Peter Maydell
1 sibling, 1 reply; 4+ messages in thread
From: andrzej zaborowski @ 2011-11-14 3:01 UTC (permalink / raw)
To: Jean-Christophe DUBOIS; +Cc: peter.maydell, qemu-devel, paul
On 6 November 2011 20:14, Jean-Christophe DUBOIS <jcd@tribudubois.net> wrote:
> 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_PB926
> 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 µATX: BOARD_ID = 0x190 = BOARD_ID_VEXPRESS
> No reset register
>
> Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
Thanks, I applied this fix.
Cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v3] hw/arm_sysctl: Fix RESETCTL for realview-pb-a8 and -pbx-a9
2011-11-14 3:01 ` andrzej zaborowski
@ 2011-11-14 8:09 ` Peter Maydell
0 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2011-11-14 8:09 UTC (permalink / raw)
To: andrzej zaborowski; +Cc: paul, qemu-devel, Jean-Christophe DUBOIS
On 14 November 2011 03:01, andrzej zaborowski <balrogg@gmail.com> wrote:
> On 6 November 2011 20:14, Jean-Christophe DUBOIS <jcd@tribudubois.net> wrote:
>> Depending on the considered baseboard the bit used to
>> reset the platform is different.
> Thanks, I applied this fix.
I had this queued in my "OK but not for 1.0" list...
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-11-14 8:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-06 19:14 [Qemu-devel] [PATCH v3] hw/arm_sysctl: Fix RESETCTL for realview-pb-a8 and -pbx-a9 Jean-Christophe DUBOIS
2011-11-06 21:37 ` Peter Maydell
2011-11-14 3:01 ` andrzej zaborowski
2011-11-14 8:09 ` Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).