[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
- Re: [PATCH v2 10/21] hw/sh4: Open-code pflash_cfi02_register(), (continued)
- [PATCH v2 11/21] hw/arm/digic: Open-code pflash_cfi02_register(), Philippe Mathieu-Daudé, 2023/01/09
- [PATCH v2 12/21] hw/arm/musicpal: Open-code pflash_cfi02_register(), Philippe Mathieu-Daudé, 2023/01/09
- [PATCH v2 13/21] hw/arm/xilinx_zynq: Open-code pflash_cfi02_register(), Philippe Mathieu-Daudé, 2023/01/09
- [PATCH v2 14/21] hw/block: Remove unused pflash_cfi02_register(), Philippe Mathieu-Daudé, 2023/01/09
- [PATCH v2 15/21] hw/block: Make PFlashCFI02 QOM declaration internal, Philippe Mathieu-Daudé, 2023/01/09
- [PATCH v2 16/21] hw/arm: Open-code pflash_cfi01_register(), Philippe Mathieu-Daudé, 2023/01/09
- Re: [PATCH v2 16/21] hw/arm: Open-code pflash_cfi01_register(),
Peter Maydell <=
- [PATCH v2 17/21] hw/microblaze: Open-code pflash_cfi01_register(), Philippe Mathieu-Daudé, 2023/01/09
- [PATCH v2 20/21] hw/block: Remove unused pflash_cfi01_register(), Philippe Mathieu-Daudé, 2023/01/09
- [PATCH v2 19/21] hw/ppc: Open-code pflash_cfi01_register(), Philippe Mathieu-Daudé, 2023/01/09
- [PATCH v2 18/21] hw/mips: Open-code pflash_cfi01_register(), Philippe Mathieu-Daudé, 2023/01/09
- [PATCH v2 21/21] hw/block: Make PFlashCFI01 QOM declaration internal, Philippe Mathieu-Daudé, 2023/01/09
- Re: [PATCH v2 00/21] hw: Remove implicit sysbus_mmio_map() from pflash APIs, Philippe Mathieu-Daudé, 2023/01/09