[PATCH v3 00/16] hw/intc/loongarch_pch: Cleanup with memory region ops

Bibo Mao posted 16 patches 10 months ago
Only 15 patches received!
hw/intc/loongarch_pch_pic.c            | 344 +++++++++----------------
hw/intc/trace-events                   |   8 +-
hw/loongarch/virt.c                    |   6 -
include/hw/intc/loongarch_pic_common.h |  57 ++--
4 files changed, 152 insertions(+), 263 deletions(-)
[PATCH v3 00/16] hw/intc/loongarch_pch: Cleanup with memory region ops
Posted by Bibo Mao 10 months ago
This series patchset is to clean up with memory regions of loongarch pch
pic interrupt controller. Originally there are three iomem regions:
iomem32_low, iomem8, iomem32_highm. Since these regions only support
4 bytes/1 byte/4 bytes access, it is divided into three regions.

Now it is merged into one region, this regions supports 1/2/4/8 bytes
access.

Patch 1-6 is to replace register name, no function change.
Patch 7-16 is to use unifed memory region iomem, and supports 1/2/4/8
bytes access with read/write ops for this region, and merge three
regions above into one.

---
  v2 ... v3:
    1. Set address aligned with 8 bytes in memory region function
       pch_pic_read() and pch_pic_write(), and only compare register
       base address with 8 bytes aligned one.
    2. Replace 0xff/0xffff with UCHAR_MAX/USHRT_MAX.

  v1 ... v2:
    1. Add 1/2/4/8 bytes access support with memory region read and
       write ops.
    2. Merge three memory regions iomem32_low, iomem8 and iomem32_high
       into one region iomem.
    3. Merge trace functions for ops in above three memory regions into
       one trace function
---

Bibo Mao (16):
  hw/intc/loongarch_pch: Modify name of some registers
  hw/intc/loongarch_pch: Modify register name PCH_PIC_xxx_OFFSET with
    PCH_PIC_xxx
  hw/intc/loongarch_pch: Remove some duplicate macro
  hw/intc/loongarch_pch: Set version information at initial stage
  hw/intc/loongarch_pch: Use relative address in MemoryRegionOps
  hw/intc/loongarch_pch: Discard write operation with ISR register
  hw/intc/loongarch_pch: Use generic read callback for iomem32_low
    region
  hw/intc/loongarch_pch: Use generic read callback for iomem32_high
    region
  hw/intc/loongarch_pch: Use generic read callback for iomem8 region
  hw/intc/loongarch_pch: Use generic write callback for iomem32_low
    region
  hw/intc/loongarch_pch: Use generic write callback for iomem32_high
    region
  hw/intc/loongarch_pch: Use generic write callback for iomem8 region
  hw/intc/loongarch_pch: Use unified trace event for memory region ops
  hw/intc/loongarch_pch: Rename memory region iomem32_low with iomem
  hw/intc/loongarch_pch: Set flexible memory access size with iomem
    region
  hw/intc/loongarch_pch: Merge three memory region into one

 hw/intc/loongarch_pch_pic.c            | 344 +++++++++----------------
 hw/intc/trace-events                   |   8 +-
 hw/loongarch/virt.c                    |   6 -
 include/hw/intc/loongarch_pic_common.h |  57 ++--
 4 files changed, 152 insertions(+), 263 deletions(-)


base-commit: dfaecc04c46d298e9ee81bd0ca96d8754f1c27ed
-- 
2.39.3