Message ID | 20230104220449.41337-16-philmd@linaro.org |
---|---|
State | New |
Headers | show |
Series | hw: Remove implicit sysbus_mmio_map() from pflash APIs | expand |
On Thu, Jan 5, 2023 at 6:52 AM Philippe Mathieu-Daudé <philmd@linaro.org> wrote: > > Convert the QOM PFlashCFI01 to a forward/opaque pointer declaration. > Only pflash_cfi01.c is able to poke at the internal fields. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > hw/block/pflash_cfi01.c | 2 ++ > include/hw/block/flash.h | 1 - > 2 files changed, 2 insertions(+), 1 deletion(-) > Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 9df79b102b..2af9273fc1 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c @@ -59,6 +59,8 @@ #define PFLASH_BE 0 #define PFLASH_SECURE 1 +OBJECT_DECLARE_SIMPLE_TYPE(PFlashCFI01, PFLASH_CFI01) + struct PFlashCFI01 { /*< private >*/ SysBusDevice parent_obj; diff --git a/include/hw/block/flash.h b/include/hw/block/flash.h index 858c0a1b6e..321aede8ef 100644 --- a/include/hw/block/flash.h +++ b/include/hw/block/flash.h @@ -9,7 +9,6 @@ /* pflash_cfi01.c */ #define TYPE_PFLASH_CFI01 "cfi.pflash01" -OBJECT_DECLARE_SIMPLE_TYPE(PFlashCFI01, PFLASH_CFI01) /** * Create and realize a parallel NOR flash (CFI type 1) on the heap.
Convert the QOM PFlashCFI01 to a forward/opaque pointer declaration. Only pflash_cfi01.c is able to poke at the internal fields. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- hw/block/pflash_cfi01.c | 2 ++ include/hw/block/flash.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-)