qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 16/21] hw/arm: Open-code pflash_cfi01_register()


From: Peter Maydell
Subject: Re: [PATCH v2 16/21] hw/arm: Open-code pflash_cfi01_register()
Date: Fri, 13 Jan 2023 14:03:30 +0000

On Mon, 9 Jan 2023 at 13:13, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> pflash_cfi01_register() hides an implicit sysbus mapping of
> MMIO region #0. This is not practical in a heterogeneous world
> where multiple cores use different address spaces. In order to
> remove pflash_cfi01_register() from the pflash API, open-code it
> as a qdev creation call followed by an explicit sysbus mapping.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  hw/arm/collie.c      | 16 ++++++++++++----
>  hw/arm/gumstix.c     | 32 ++++++++++++++++++++++++++------
>  hw/arm/mainstone.c   | 19 ++++++++++++++-----
>  hw/arm/omap_sx1.c    | 31 +++++++++++++++++++++++--------
>  hw/arm/versatilepb.c | 18 +++++++++++++-----
>  hw/arm/z2.c          | 17 ++++++++++++++---
>  6 files changed, 102 insertions(+), 31 deletions(-)

When we exand out these uses of pflash_cfi01_register() can
we add a brief todo comment:

/*
 * TODO: we should set device-width to avoid the legacy
 * back-compat behaviour of cfi01. What does the hardware do?
 */

(feel free to edit if you can get it down to 1 line...)

I don't think it's worth trying to track down the right answer
for all these old boards, I just want something so that if
somebody cut-n-pastes this into new board code we can see it
in code review and say "oh, you need to set device-width".

thanks
-- PMM



reply via email to

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