qemu-arm
[Top][All Lists]
Advanced

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

Re: [PATCH v2 2/7] hw/arm/musicpal: Open-code pflash_cfi02_register() ca


From: Richard Henderson
Subject: Re: [PATCH v2 2/7] hw/arm/musicpal: Open-code pflash_cfi02_register() call
Date: Wed, 21 Apr 2021 18:37:47 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

On 4/19/21 2:43 AM, Philippe Mathieu-Daudé wrote:
To be able to manually map the flash region on the main memory
(in the next commit), first expand the pflash_cfi02_register
in place.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
  hw/arm/musicpal.c | 27 +++++++++++++++++++++------
  1 file changed, 21 insertions(+), 6 deletions(-)

diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c
index 9cebece2de0..8b58b66f263 100644
--- a/hw/arm/musicpal.c
+++ b/hw/arm/musicpal.c
@@ -10,6 +10,7 @@
   */
#include "qemu/osdep.h"
+#include "qemu/units.h"
  #include "qapi/error.h"
  #include "cpu.h"
  #include "hw/sysbus.h"
@@ -1640,6 +1641,7 @@ static void musicpal_init(MachineState *machine)
      /* Register flash */
      dinfo = drive_get(IF_PFLASH, 0, 0);
      if (dinfo) {
+        static const size_t sector_size = 64 * KiB;

Drop the static.  We do not need permanent storage for this.
Otherwise,

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

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