From: Igor Mammedov <imammedo@redhat.com>
To: peter.maydell@linaro.org, qemu-devel@nongnu.org
Cc: aliguori@us.ibm.com, mst@redhat.com, jan.kiszka@siemens.com,
lcapitulino@redhat.com, blauwirbel@gmail.com,
alex.williamson@redhat.com, kraxel@redhat.com,
pbonzini@redhat.com
Subject: [Qemu-devel] [PATCH 3/5] target-arm: use notifier for signaling guest system_powerdown command
Date: Wed, 29 Aug 2012 19:02:45 +0200 [thread overview]
Message-ID: <1346259767-991-4-git-send-email-imammedo@redhat.com> (raw)
In-Reply-To: <1346259767-991-1-git-send-email-imammedo@redhat.com>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
hw/nseries.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/hw/nseries.c b/hw/nseries.c
index 4df2670..6df71eb 100644
--- a/hw/nseries.c
+++ b/hw/nseries.c
@@ -189,6 +189,17 @@ static void n8x0_nand_setup(struct n800_s *s)
/* XXX: in theory should also update the OOB for both pages */
}
+static qemu_irq n8x0_system_powerdown;
+
+static void n8x0_powerdown_req(Notifier *n, void *opaque)
+{
+ qemu_irq_raise(n8x0_system_powerdown);
+}
+
+static Notifier n8x0_system_powerdown_notifier = {
+ .notify = n8x0_powerdown_req
+};
+
static void n8x0_i2c_setup(struct n800_s *s)
{
DeviceState *dev;
@@ -201,7 +212,8 @@ static void n8x0_i2c_setup(struct n800_s *s)
qdev_get_gpio_in(s->mpu->ih[0],
OMAP_INT_24XX_SYS_NIRQ));
- qemu_system_powerdown = qdev_get_gpio_in(dev, 3);
+ n8x0_system_powerdown = qdev_get_gpio_in(dev, 3);
+ qemu_register_powerdown_notifier(&n8x0_system_powerdown_notifier);
/* Attach a TMP105 PM chip (A0 wired to ground) */
dev = i2c_create_slave(i2c, "tmp105", N8X0_TMP105_ADDR);
--
1.7.11.4
next prev parent reply other threads:[~2012-08-29 17:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-29 17:02 [Qemu-devel] [PATCH 0/5 v2] convert system_powerdown command to notifiers Igor Mammedov
2012-08-29 17:02 ` [Qemu-devel] [PATCH 1/5] introduce powerdown_notifiers Igor Mammedov
2012-08-29 17:06 ` Andreas Färber
2012-08-29 21:55 ` Igor Mammedov
2012-08-30 6:49 ` Igor Mammedov
2012-08-30 7:41 ` Paolo Bonzini
2012-08-30 8:17 ` Igor Mammedov
2012-08-29 17:02 ` [Qemu-devel] [PATCH 2/5] acpi: use notifier for signaling guest system_powerdown command Igor Mammedov
2012-08-29 17:02 ` Igor Mammedov [this message]
2012-08-29 17:02 ` [Qemu-devel] [PATCH 4/5] target-sparc: " Igor Mammedov
2012-08-29 17:02 ` [Qemu-devel] [PATCH 5/5] cleanup unused qemu_system_powerdown Igor Mammedov
-- strict thread matches above, loose matches on Subject: below --
2012-09-05 21:06 [Qemu-devel] [PATCH 0/5 v3] convert system_powerdown command to notifiers Igor Mammedov
2012-09-05 21:06 ` [Qemu-devel] [PATCH 3/5] target-arm: use notifier for signaling guest system_powerdown command Igor Mammedov
2012-09-18 16:13 ` Peter Maydell
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=1346259767-991-4-git-send-email-imammedo@redhat.com \
--to=imammedo@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=blauwirbel@gmail.com \
--cc=jan.kiszka@siemens.com \
--cc=kraxel@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=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).