From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 5/8] pl031: Implement save/restore
Date: Thu, 23 Dec 2010 17:19:55 +0000 [thread overview]
Message-ID: <1293124798-5335-6-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1293124798-5335-1-git-send-email-peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/pl031.c | 25 ++++++++++++++++++++++++-
1 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/hw/pl031.c b/hw/pl031.c
index e3700c1..c488f69 100644
--- a/hw/pl031.c
+++ b/hw/pl031.c
@@ -44,6 +44,21 @@ typedef struct {
uint32_t is;
} pl031_state;
+static const VMStateDescription vmstate_pl031 = {
+ .name = "pl031",
+ .version_id = 1,
+ .minimum_version_id = 1,
+ .fields = (VMStateField[]) {
+ VMSTATE_UINT32(tick_offset, pl031_state),
+ VMSTATE_UINT32(mr, pl031_state),
+ VMSTATE_UINT32(lr, pl031_state),
+ VMSTATE_UINT32(cr, pl031_state),
+ VMSTATE_UINT32(im, pl031_state),
+ VMSTATE_UINT32(is, pl031_state),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
static const unsigned char pl031_id[] = {
0x31, 0x10, 0x14, 0x00, /* Device ID */
0x0d, 0xf0, 0x05, 0xb1 /* Cell ID */
@@ -206,9 +221,17 @@ static int pl031_init(SysBusDevice *dev)
return 0;
}
+static SysBusDeviceInfo pl031_info = {
+ .init = pl031_init,
+ .qdev.name = "pl031",
+ .qdev.size = sizeof(pl031_state),
+ .qdev.vmsd = &vmstate_pl031,
+ .qdev.no_user = 1,
+};
+
static void pl031_register_devices(void)
{
- sysbus_register_dev("pl031", sizeof(pl031_state), pl031_init);
+ sysbus_register_withprop(&pl031_info);
}
device_init(pl031_register_devices)
--
1.6.3.3
next prev parent reply other threads:[~2010-12-23 17:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-23 17:19 [Qemu-devel] [PATCH 0/8] Add save/restore support to ARM versatilepb devices Peter Maydell
2010-12-23 17:19 ` [Qemu-devel] [PATCH 1/8] pl190: Implement save/restore Peter Maydell
2010-12-23 17:19 ` [Qemu-devel] [PATCH 2/8] vpb_sic: " Peter Maydell
2010-12-23 17:19 ` [Qemu-devel] [PATCH 3/8] arm_sysctl: " Peter Maydell
2010-12-23 17:19 ` [Qemu-devel] [PATCH 4/8] pl050: " Peter Maydell
2010-12-23 17:19 ` Peter Maydell [this message]
2010-12-23 17:19 ` [Qemu-devel] [PATCH 6/8] pl110: " Peter Maydell
2010-12-23 17:19 ` [Qemu-devel] [PATCH 7/8] pl080: " Peter Maydell
2010-12-23 17:19 ` [Qemu-devel] [PATCH 8/8] stc91c111: " Peter Maydell
2011-01-12 12:33 ` [Qemu-devel] [PATCH 0/8] Add save/restore support to ARM versatilepb devices Peter Maydell
2011-01-20 11:44 ` Aurelien Jarno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1293124798-5335-6-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).