On Thu, Sep 2, 2021 at 2:11 PM Philippe Mathieu-Daudé <[email protected]> wrote: > > On 9/2/21 8:09 AM, Philippe Mathieu-Daudé wrote: > > On 9/1/21 5:27 AM, Bin Meng wrote: > >> Read or write to uart registers when unclocked or in reset should be > >> ignored. Add the check there, and as a result of this, the check in > >> uart_write_tx_fifo() is now unnecessary. > >> > >> Signed-off-by: Bin Meng <[email protected]> > >> > >> --- > >> > >> Changes in v2: > >> - new patch: hw/char: cadence_uart: Ignore access when unclocked or in > >> reset for uart_{read,write}() > >> > >> hw/char/cadence_uart.c | 15 ++++++++++----- > >> 1 file changed, 10 insertions(+), 5 deletions(-) > > > > Reviewed-by: Philippe Mathieu-Daudé <[email protected]> > > Just realized it is simpler to implement MemoryRegionOps::accepts().
Is there any guidance on what condition falls into MemoryRegionOps::accepts() to check? For example, should we move the register offset check to accepts()? It looks like only a few codes implemented the MemoryRegionOps::accepts(). Regards, Bin
