[PATCH v3 0/2] implement `FIELDx_1CLEAR() macro

Wilfred Mallawa posted 2 patches 1 year, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20221017054950.317584-1-wilfred.mallawa@opensource.wdc.com
Maintainers: Alistair Francis <Alistair.Francis@wdc.com>
hw/ssi/ibex_spi_host.c      | 21 +++++++++------------
include/hw/registerfields.h | 22 ++++++++++++++++++++++
2 files changed, 31 insertions(+), 12 deletions(-)
[PATCH v3 0/2] implement `FIELDx_1CLEAR() macro
Posted by Wilfred Mallawa 1 year, 7 months ago
From: Wilfred Mallawa <wilfred.mallawa@wdc.com>

This patch series implements a `FIELDx_1CLEAR()` macro and implements it
in the `hw/ssi/ibex_spi.c` model.

		    *** Changelog ***
Since v2:
	- change the macro arguments name to match
	  the existing macros.
	 (reg_val, reg, field) -> (storage, reg, field)
	
	- Add the use of this macro to `ibex_spi`

Since v1: 
	- Instead of needing all field bits to be set 
	  we clear the field if any are set.
	  If the field is 0/clear then no change.

Wilfred Mallawa (2):
  hw/registerfields: add `FIELDx_1CLEAR()` macro
  hw/ssi/ibex_spi:  implement `FIELD32_1CLEAR` macro

 hw/ssi/ibex_spi_host.c      | 21 +++++++++------------
 include/hw/registerfields.h | 22 ++++++++++++++++++++++
 2 files changed, 31 insertions(+), 12 deletions(-)

-- 
2.37.3
Re: [PATCH v3 0/2] implement `FIELDx_1CLEAR() macro
Posted by Alistair Francis 1 year, 6 months ago
On Mon, Oct 17, 2022 at 3:52 PM Wilfred Mallawa
<wilfred.mallawa@opensource.wdc.com> wrote:
>
> From: Wilfred Mallawa <wilfred.mallawa@wdc.com>
>
> This patch series implements a `FIELDx_1CLEAR()` macro and implements it
> in the `hw/ssi/ibex_spi.c` model.
>
>                     *** Changelog ***
> Since v2:
>         - change the macro arguments name to match
>           the existing macros.
>          (reg_val, reg, field) -> (storage, reg, field)
>
>         - Add the use of this macro to `ibex_spi`
>
> Since v1:
>         - Instead of needing all field bits to be set
>           we clear the field if any are set.
>           If the field is 0/clear then no change.
>
> Wilfred Mallawa (2):
>   hw/registerfields: add `FIELDx_1CLEAR()` macro
>   hw/ssi/ibex_spi:  implement `FIELD32_1CLEAR` macro

Thanks!

Applied to riscv-to-apply.next

Alistair

>
>  hw/ssi/ibex_spi_host.c      | 21 +++++++++------------
>  include/hw/registerfields.h | 22 ++++++++++++++++++++++
>  2 files changed, 31 insertions(+), 12 deletions(-)
>
> --
> 2.37.3
>
>