[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v2 05/16] hw/timer/xilinx_timer: Allow down to 8-bit memory a
From: |
Philippe Mathieu-Daudé |
Subject: |
[RFC PATCH v2 05/16] hw/timer/xilinx_timer: Allow down to 8-bit memory access |
Date: |
Thu, 7 Nov 2024 01:22:11 +0000 |
Allow down to 8-bit access, per the datasheet (reference added
in previous commit):
"Timer Counter registers are accessed as one of the following types:
• Byte (8 bits)
• Half word (2 bytes)
• Word (4 bytes)"
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
---
RFC: This breaks the UART qtest, instead of having TX register
receiving 'T' = 0x54, it receives 0x54000000, converted to '\0'
char. It works if we use SWI instead of SBI (storing 32-bit).
---
hw/timer/xilinx_timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/timer/xilinx_timer.c b/hw/timer/xilinx_timer.c
index 383fc8b3c8..c117bff225 100644
--- a/hw/timer/xilinx_timer.c
+++ b/hw/timer/xilinx_timer.c
@@ -198,7 +198,7 @@ static const MemoryRegionOps timer_ops = {
.max_access_size = 4,
},
.valid = {
- .min_access_size = 4,
+ .min_access_size = 1,
.max_access_size = 4
}
};
--
2.45.2
- [PATCH v2 00/16] hw/microblaze: Allow running cross-endian vCPUs, Philippe Mathieu-Daudé, 2024/11/06
- [PATCH v2 01/16] hw/microblaze: Restrict MemoryRegionOps are implemented as 32-bit, Philippe Mathieu-Daudé, 2024/11/06
- [PATCH v2 02/16] hw/microblaze: Propagate CPU endianness to microblaze_load_kernel(), Philippe Mathieu-Daudé, 2024/11/06
- [PATCH v2 03/16] hw/intc/xilinx_intc: Make device endianness configurable, Philippe Mathieu-Daudé, 2024/11/06
- [RFC PATCH v2 04/16] hw/net/xilinx_ethlite: Simplify by having configurable endianness, Philippe Mathieu-Daudé, 2024/11/06
- [RFC PATCH v2 05/16] hw/timer/xilinx_timer: Allow down to 8-bit memory access,
Philippe Mathieu-Daudé <=
- [PATCH v2 06/16] hw/timer/xilinx_timer: Make device endianness configurable, Philippe Mathieu-Daudé, 2024/11/06
- [PATCH v2 07/16] hw/char/xilinx_uartlite: Make device endianness configurable, Philippe Mathieu-Daudé, 2024/11/06
- [PATCH v2 08/16] hw/ssi/xilinx_spi: Make device endianness configurable, Philippe Mathieu-Daudé, 2024/11/06
- [PATCH v2 09/16] hw/ssi/xilinx_spips: Make device endianness configurable, Philippe Mathieu-Daudé, 2024/11/06
- [PATCH v2 10/16] target/microblaze: Explode MO_TExx -> MO_TE | MO_xx, Philippe Mathieu-Daudé, 2024/11/06
- [PATCH v2 11/16] target/microblaze: Set MO_TE once in do_load() / do_store(), Philippe Mathieu-Daudé, 2024/11/06