[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-9.0.1 14/44] hw/arm/npcm7xx: Store derivative OTP fuse key in li
From: |
Michael Tokarev |
Subject: |
[Stable-9.0.1 14/44] hw/arm/npcm7xx: Store derivative OTP fuse key in little endian |
Date: |
Mon, 27 May 2024 11:21:05 +0300 |
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Use little endian for derivative OTP fuse key.
Cc: qemu-stable@nongnu.org
Fixes: c752bb079b ("hw/nvram: NPCM7xx OTP device model")
Suggested-by: Avi Fishman <Avi.Fishman@nuvoton.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20240422125813.1403-1-philmd@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit eb656a60fd93262b1e519b3162888bf261df7f68)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/arm/npcm7xx.c b/hw/arm/npcm7xx.c
index cc68b5d8f1..9f2d96c733 100644
--- a/hw/arm/npcm7xx.c
+++ b/hw/arm/npcm7xx.c
@@ -24,6 +24,7 @@
#include "hw/qdev-clock.h"
#include "hw/qdev-properties.h"
#include "qapi/error.h"
+#include "qemu/bswap.h"
#include "qemu/units.h"
#include "sysemu/sysemu.h"
#include "target/arm/cpu-qom.h"
@@ -386,7 +387,7 @@ static void npcm7xx_init_fuses(NPCM7xxState *s)
* The initial mask of disabled modules indicates the chip derivative (e.g.
* NPCM750 or NPCM730).
*/
- value = tswap32(nc->disabled_modules);
+ value = cpu_to_le32(nc->disabled_modules);
npcm7xx_otp_array_write(&s->fuse_array, &value, NPCM7XX_FUSE_DERIVATIVE,
sizeof(value));
}
--
2.39.2
- [Stable-9.0.1 00/44] Patch Round-up for stable 9.0.1, freeze on 2024-06-07, Michael Tokarev, 2024/05/27
- [Stable-9.0.1 05/44] nbd/server: Mark negotiation functions as coroutine_fn, Michael Tokarev, 2024/05/27
- [Stable-9.0.1 01/44] migration/colo: Fix bdrv_graph_rdlock_main_loop: Assertion `!qemu_in_coroutine()' failed., Michael Tokarev, 2024/05/27
- [Stable-9.0.1 08/44] target/riscv/kvm: remove sneaky strerrorname_np() instance, Michael Tokarev, 2024/05/27
- [Stable-9.0.1 09/44] target/arm: Restrict translation disabled alignment check to VMSA, Michael Tokarev, 2024/05/27
- [Stable-9.0.1 10/44] tests/avocado: update sunxi kernel from armbian to 6.6.16, Michael Tokarev, 2024/05/27
- [Stable-9.0.1 14/44] hw/arm/npcm7xx: Store derivative OTP fuse key in little endian,
Michael Tokarev <=
- [Stable-9.0.1 11/44] .gitlab-ci.d/cirrus.yml: Shorten the runtime of the macOS and FreeBSD jobs, Michael Tokarev, 2024/05/27
- [Stable-9.0.1 12/44] hw/ufs: Fix buffer overflow bug, Michael Tokarev, 2024/05/27
- [Stable-9.0.1 15/44] target/sh4: Fix ADDV opcode, Michael Tokarev, 2024/05/27
- [Stable-9.0.1 02/44] linux-user: do_setsockopt: fix SOL_ALG.ALG_SET_KEY, Michael Tokarev, 2024/05/27
- [Stable-9.0.1 04/44] nbd/server: do not poll within a coroutine context, Michael Tokarev, 2024/05/27
- [Stable-9.0.1 16/44] target/sh4: Fix SUBV opcode, Michael Tokarev, 2024/05/27
- [Stable-9.0.1 21/44] target/sparc: Fix FMUL8x16A{U,L}, Michael Tokarev, 2024/05/27
- [Stable-9.0.1 17/44] plugins: Update stale comment, Michael Tokarev, 2024/05/27
- [Stable-9.0.1 18/44] target/i386: Give IRQs a chance when resetting HF_INHIBIT_IRQ_MASK, Michael Tokarev, 2024/05/27
- [Stable-9.0.1 03/44] docs: i386: pc: Update maximum CPU numbers for PC Q35, Michael Tokarev, 2024/05/27