[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 04/21] aspeed/scu: Fix valid access size on AST2400
From: |
Cédric Le Goater |
Subject: |
[PATCH v2 04/21] aspeed/scu: Fix valid access size on AST2400 |
Date: |
Wed, 19 Aug 2020 12:09:39 +0200 |
The read access size of the SCU registers can be 1/2/4 bytes and write
is 4 bytes and all Aspeed models would need a .valid.accepts() handler.
For the moment, set the min access size to 1 byte to cover both read
and write operations on the AST2400 but keep the min access size of
the other SoCs to 4 bytes as this is an unusual access size.
This fixes support for some old firmware doing 2 bytes reads on the
AST2400 SoC.
Reported-by: erik-smit <erik.lucas.smit@gmail.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
hw/misc/aspeed_scu.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/misc/aspeed_scu.c b/hw/misc/aspeed_scu.c
index ec4fef900e27..764222404bef 100644
--- a/hw/misc/aspeed_scu.c
+++ b/hw/misc/aspeed_scu.c
@@ -328,9 +328,10 @@ static const MemoryRegionOps aspeed_ast2400_scu_ops = {
.read = aspeed_scu_read,
.write = aspeed_ast2400_scu_write,
.endianness = DEVICE_LITTLE_ENDIAN,
- .valid.min_access_size = 4,
- .valid.max_access_size = 4,
- .valid.unaligned = false,
+ .valid = {
+ .min_access_size = 1,
+ .max_access_size = 4,
+ },
};
static const MemoryRegionOps aspeed_ast2500_scu_ops = {
--
2.25.4
- [PATCH v2 00/21] aspeed: cleanups and some extensions, Cédric Le Goater, 2020/08/19
- [PATCH v2 13/21] ftgmac100: Check for invalid len and address before doing a DMA transfer, Cédric Le Goater, 2020/08/19
- [PATCH v2 01/21] m25p80: Return the JEDEC ID twice for mx25l25635e, Cédric Le Goater, 2020/08/19
- [PATCH v2 02/21] m25p80: Add support for mx25l25635f, Cédric Le Goater, 2020/08/19
- [PATCH v2 07/21] aspeed/smc: Fix max_slaves of the legacy SMC device, Cédric Le Goater, 2020/08/19
- [PATCH v2 04/21] aspeed/scu: Fix valid access size on AST2400,
Cédric Le Goater <=
- [PATCH v2 16/21] aspeed/sdmc: Perform memory training, Cédric Le Goater, 2020/08/19
- [PATCH v2 18/21] aspeed/sdmc: Simplify calculation of RAM bits, Cédric Le Goater, 2020/08/19
- [PATCH v2 10/21] ftgmac100: Fix interrupt status "Packet transmitted on ethernet", Cédric Le Goater, 2020/08/19
- [PATCH v2 11/21] ftgmac100: Fix interrupt status "Packet moved to RX FIFO", Cédric Le Goater, 2020/08/19
- [PATCH v2 03/21] m25p80: Add support for n25q512ax3, Cédric Le Goater, 2020/08/19
- [PATCH v2 17/21] aspeed/sdmc: Allow writes to unprotected registers, Cédric Le Goater, 2020/08/19
- [PATCH v2 05/21] hw/arm/aspeed: Add board model for Supermicro X11 BMC, Cédric Le Goater, 2020/08/19