qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] hw/char/serial: Support serial_mm_init() with wakeup event.


From: Dylan Jhong
Subject: Re: [PATCH] hw/char/serial: Support serial_mm_init() with wakeup event.
Date: Thu, 24 Mar 2022 18:00:34 +0800
User-agent: Mutt/2.2.1 (2022-02-19)

On Wed, Mar 23, 2022 at 05:37:10PM +0800, Peter Maydell wrote:
> On Wed, 23 Mar 2022 at 09:20, Dylan Jhong <dylan@andestech.com> wrote:
> >
> > Although the "wakeup" parameter is declared in SerialState,
> > but there is no function actually setting it up.
> > Support "wakeup" as parameter in serial_mm_init().
> 
> This patch seems to provide a new argument which every
> caller passes the same value for, unless I missed one
> somewhere. What's the reason for this change?
> 
> thanks
> -- PMM

Hi PMM,

First of all, thank you for your review.
The purpose of this variable is to allow users to specify their own wakeup 
reason id.

At present, there are only 4 wakeup reasons provided by QEMU[*1].
Take uart as an example, which are classified as QEMU_WAKEUP_REASON_OTHER,
so there is no way to distinguish the source of the wakeup reason when 
designing a custom power manager device.

Indeed, as you can see, currently there is no device that supports the use of 
"wakeup_reason".
But it will be used on the board we are going to upstream later.

The goal of this patch is to make the "wakeup" feature support more complete.

[*1] include/sysemu/runstate.h:42
typedef enum WakeupReason {
    /* Always keep QEMU_WAKEUP_REASON_NONE = 0 */
    QEMU_WAKEUP_REASON_NONE = 0,
    QEMU_WAKEUP_REASON_RTC,
    QEMU_WAKEUP_REASON_PMTIMER,
    QEMU_WAKEUP_REASON_OTHER,
} WakeupReason;

Thanks,
Dylan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]