[PATCH v2 0/2] Define NPCM7XX PWRON bit fields

Hao Wu posted 2 patches 3 years, 10 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220411165842.3912945-1-wuhaotsh@google.com
Maintainers: Havard Skinnemoen <hskinnemoen@google.com>, Tyrone Ting <kfting@nuvoton.com>, Peter Maydell <peter.maydell@linaro.org>
hw/arm/npcm7xx_boards.c       | 24 +++++++++++++++++++-----
include/hw/misc/npcm7xx_gcr.h | 30 ++++++++++++++++++++++++++++++
2 files changed, 49 insertions(+), 5 deletions(-)
[PATCH v2 0/2] Define NPCM7XX PWRON bit fields
Posted by Hao Wu 3 years, 10 months ago
Currently, the PWRON STRAP values in NPCM7XX boards are magic
numbers. Similar to the aspeed ones in hw/arm/aspeed.c, we
define bit fields constants for them and use these fields instead
of the magic numbers in the current implementation. The code
should behave exactly the same as the existing one.

-- Changes since v1
* Fix errors and apply suggestions Peter made on v1.

Hao Wu (2):
  hw/misc: Add PWRON STRAP bit fields in GCR module
  hw/arm: Use bit fields for NPCM7XX PWRON STRAPs

 hw/arm/npcm7xx_boards.c       | 24 +++++++++++++++++++-----
 include/hw/misc/npcm7xx_gcr.h | 30 ++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+), 5 deletions(-)

-- 
2.35.1.1178.g4f1659d476-goog
Re: [PATCH v2 0/2] Define NPCM7XX PWRON bit fields
Posted by Peter Maydell 3 years, 9 months ago
On Mon, 11 Apr 2022 at 17:58, Hao Wu <wuhaotsh@google.com> wrote:
>
> Currently, the PWRON STRAP values in NPCM7XX boards are magic
> numbers. Similar to the aspeed ones in hw/arm/aspeed.c, we
> define bit fields constants for them and use these fields instead
> of the magic numbers in the current implementation. The code
> should behave exactly the same as the existing one.
>
> -- Changes since v1
> * Fix errors and apply suggestions Peter made on v1.



Applied to target-arm.next, thanks.

-- PMM