On Thu, 6 Feb 2025 at 22:12, Hao Wu <wuhao...@google.com> wrote: > > Signed-off-by: Hao Wu <wuhao...@google.com> > --- > configs/devices/aarch64-softmmu/default.mak | 1 + > hw/arm/Kconfig | 13 + > hw/arm/meson.build | 1 + > hw/arm/npcm8xx.c | 804 ++++++++++++++++++++ > include/hw/arm/npcm8xx.h | 107 +++ > 5 files changed, 926 insertions(+) > create mode 100644 hw/arm/npcm8xx.c > create mode 100644 include/hw/arm/npcm8xx.h
> +static void npcm8xx_init_fuses(NPCM8xxState *s) > +{ > + NPCM8xxClass *nc = NPCM8XX_GET_CLASS(s); > + uint32_t value; > + > + /* > + * The initial mask of disabled modules indicates the chip derivative > (e.g. > + * NPCM750 or NPCM730). > + */ > + value = tswap32(nc->disabled_modules); > + npcm7xx_otp_array_write(&s->fuse_array, &value, NPCM7XX_FUSE_DERIVATIVE, > + sizeof(value)); > +} We're trying to get rid of tswap32() uses. Compare npcm7xx_init_fuses(), which does value = cpu_to_le32(nc->disabled_modules); Otherwise Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> thanks -- PMM