On 5/27/24 17:58, Philippe Mathieu-Daudé wrote:
Hi,

On 27/5/24 10:02, Jamin Lin wrote:
AST2700 fmc/spi controller's address decoding unit is 64KB
and only bits [31:16] are used for decoding. Introduce seg_to_reg
and reg_to_seg handlers for ast2700 fmc/spi controller.
In addition, adds ast2700 fmc, spi0, spi1, and spi2 class init handler.

Signed-off-by: Troy Lee <troy_...@aspeedtech.com>
Signed-off-by: Jamin Lin <jamin_...@aspeedtech.com>
Reviewed-by: Cédric Le Goater <c...@kaod.org>
---
  hw/ssi/aspeed_smc.c | 222 +++++++++++++++++++++++++++++++++++++++++++-
  1 file changed, 220 insertions(+), 2 deletions(-)

diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c
index df0c63469c..b4006c8339 100644
--- a/hw/ssi/aspeed_smc.c
+++ b/hw/ssi/aspeed_smc.c
@@ -185,7 +185,7 @@
   *   0: 4 bytes
   *   0x1FFFFFC: 32M bytes
   *
- * DMA length is from 1 byte to 32MB (AST2600, AST10x0)
+ * DMA length is from 1 byte to 32MB (AST2600, AST10x0 and AST2700)
   *   0: 1 byte
   *   0x1FFFFFF: 32M bytes
   */
@@ -670,7 +670,7 @@ static const MemoryRegionOps aspeed_smc_flash_ops = {
      .endianness = DEVICE_LITTLE_ENDIAN,
      .valid = {
          .min_access_size = 1,
-        .max_access_size = 4,
+        .max_access_size = 8,

Is this a bugfix? If so, please use a separate patch. Otherwise
please mention why it is OK to widen access for AST2600 & AST10x0.

Ah I missed that. I wonder how we could set different access width
tough on the model ?

Should we allocate a MemoryRegionOps in the realize() handler and set
the width depending on the SoC ?


Thanks,

C.





Reply via email to