qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH][RFC 0/14] implement power chip
@ 2013-03-13  8:01 liguang
  2013-03-13  8:01 ` [Qemu-devel] [PATCH][RFC 01/14] gitignore: ignore more files liguang
                   ` (16 more replies)
  0 siblings, 17 replies; 37+ messages in thread
From: liguang @ 2013-03-13  8:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: liguang

By now, all devices of QEMU do not have much more
power management consideration, for example, if
system do suspend, it will call all registered notifiers,
this was loosely required, and the code to do power management
state transition seems just do 'ugly emulation', rather than be
conscious with whole system devices, same condition with reset(it
has been embedded in DeviceClass, good!),
shutdown, in real world, commonly all devices' power are controlled
by a power chip, then all power sequence can be done just
issue commands to this chip.
so, I come across an idea to implement qdev'ed power device, and
make all qdev struct of devices aware of self power management(add
on/off/wakeup/suspend ... filed for DeviceClass), this will
bring tidy power management, and the emulation will more like what
happened in real world.

Of course, it's only a patch-set for RFC, I'd like to ask all 
developers to help correct this idea, if it's worth to implement, 
I'll go head to refactor more.

Li Guang (14)
	 gitignore: ignore more files
	 qdev: add power management method
	 qdev: remove redundant abort()
	 qdev: add power on/off/suspend/wakeup handler
	 power: add power chip emulation
	 sysemu: remove PowerReason in sysemu.h
	 acpi: refactor acpi wakeup function
	 ich9: make lpc's reset also do pm_reset
	 ich9: do lpc's power on by reset function
	 piix4: refactor piix4's power callbacks
	 pckbd: refactor pckbd's power callbacks
	 ps2: call ps2_{kbd,mouse}_reset in kbd_reset
	 parallel: refactor parallel_reset function
	 uhci: refactor uhci's power callbacks

.gitignore              |   3 +++
Makefile.objs           |   1 +
hw/acpi.c               |  20 +++++++++-----------
hw/acpi.h               |   3 ++-
hw/acpi_ich9.c          |   4 ++--
hw/ich9.h               |   1 +
hw/lpc_ich9.c           |  12 ++++++++++-
hw/parallel.c           |  10 ++++++----
hw/pckbd.c              |  25 ++++++++++++----------
hw/piix4.c              |  14 ++++++++++++--
hw/ps2.c                |   8 ++++----
hw/ps2.h                |   2 ++
hw/qdev-core.h          |  15 ++++++
hw/qdev.c               |  99 +--
hw/usb/hcd-uhci.c       |  10 ++++++++++
include/sysemu/sysemu.h |   7 +------
power.c                 | 133 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
power.h                 |  41 +++++++++++++++++
18 files changed, 365 insertions(+), 43 deletions(-)
 create mode 100644 power.c
 create mode 100644 power.h

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2013-03-22  0:33 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-13  8:01 [Qemu-devel] [PATCH][RFC 0/14] implement power chip liguang
2013-03-13  8:01 ` [Qemu-devel] [PATCH][RFC 01/14] gitignore: ignore more files liguang
2013-03-21  6:24   ` li guang
2013-03-21 10:43     ` Peter Maydell
2013-03-13  8:01 ` [Qemu-devel] [PATCH][RFC 02/14] qdev: add power management method liguang
2013-03-18  8:25   ` Andreas Färber
2013-03-18  8:29     ` li guang
2013-03-13  8:01 ` [Qemu-devel] [PATCH][RFC 03/14] qdev: remove redundant abort() liguang
2013-03-18  8:26   ` Andreas Färber
2013-03-21  6:24     ` li guang
2013-03-13  8:01 ` [Qemu-devel] [PATCH][RFC 04/14] qdev: add power on/off/suspend/wakeup handler liguang
2013-03-18  8:31   ` Andreas Färber
2013-03-18  8:34     ` li guang
2013-03-13  8:01 ` liguang
2013-03-13  8:01 ` [Qemu-devel] [PATCH][RFC 06/14] sysemu: remove PowerReason in sysemu.h liguang
2013-03-13  8:01 ` [Qemu-devel] [PATCH][RFC 07/14] acpi: refactor acpi wakeup function liguang
2013-03-13  8:01 ` [Qemu-devel] [PATCH][RFC 08/14] ich9: make lpc's reset also do pm_reset liguang
2013-03-13  8:01 ` [Qemu-devel] [PATCH][RFC 09/14] ich9: do lpc's power on by reset function liguang
2013-03-13  8:01 ` [Qemu-devel] [PATCH][RFC 10/14] piix4: refactor piix4's power callbacks liguang
2013-03-13  8:01 ` [Qemu-devel] [PATCH][RFC 11/14] pckbd: refactor pckbd's " liguang
2013-03-13  8:01 ` [Qemu-devel] [PATCH][RFC 12/14] ps2: call ps2_{kbd, mouse}_reset in kbd_reset liguang
2013-03-13  8:01 ` [Qemu-devel] [PATCH][RFC 13/14] parallel: refactor parallel_reset function liguang
2013-03-13  8:01 ` [Qemu-devel] [PATCH][RFC 14/14] uhci: refactor uhci's power callbacks liguang
2013-03-15  0:59 ` [Qemu-devel] [PATCH][RFC 0/14] implement power chip li guang
2013-03-18  6:12   ` li guang
2013-03-18  8:34 ` Andreas Färber
2013-03-18  8:41   ` li guang
2013-03-18 11:07 ` Peter Maydell
2013-03-19  0:55   ` li guang
2013-03-19  9:05     ` Peter Maydell
2013-03-19  9:31       ` li guang
2013-03-19 10:15         ` Peter Maydell
2013-03-20  0:56           ` li guang
2013-03-20 10:50             ` Peter Maydell
2013-03-21  0:36               ` li guang
2013-03-21 10:41                 ` Peter Maydell
2013-03-22  0:31                   ` li guang

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).