[PATCH v2 00/24] hw/arm: New board model mps3-an524

Peter Maydell posted 24 patches 3 years, 2 months ago
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210215115138.20465-1-peter.maydell@linaro.org
Maintainers: Peter Maydell <peter.maydell@linaro.org>
docs/system/arm/mps2.rst         |  24 +-
include/hw/arm/armsse.h          |   4 +-
include/hw/misc/armsse-cpuid.h   |   2 +-
include/hw/misc/armsse-mhu.h     |   2 +-
include/hw/misc/iotkit-secctl.h  |   2 +-
include/hw/misc/iotkit-sysctl.h  |   2 +-
include/hw/misc/iotkit-sysinfo.h |   2 +-
include/hw/misc/mps2-fpgaio.h    |   8 +-
include/hw/misc/mps2-scc.h       |  10 +-
hw/arm/mps2-tz.c                 | 632 +++++++++++++++++++++++++------
hw/arm/mps2.c                    |   5 +
hw/misc/armsse-cpuid.c           |   2 +-
hw/misc/armsse-mhu.c             |   2 +-
hw/misc/iotkit-sysctl.c          |   2 +-
hw/misc/iotkit-sysinfo.c         |   2 +-
hw/misc/mps2-fpgaio.c            |  43 ++-
hw/misc/mps2-scc.c               |  93 ++++-
17 files changed, 680 insertions(+), 157 deletions(-)
[PATCH v2 00/24] hw/arm: New board model mps3-an524
Posted by Peter Maydell 3 years, 2 months ago
This patchseries implements a new board model in the mps2/mps3 family,
based on Application Note AN524:
https://developer.arm.com/documentation/dai0524/latest/

v1->v2 changes (very minor):
 * renamed have-switches to has_switches
 * added missing initializations of num_leds and has_switches
   for new board model
Patches still needing review: 10 - 18, 20


Like the other MPS models, this board is an FPGA image; the AN524
image is based on the SSE-200, like the mps2-an521, but it is
for the MPS3 board rather than the MPS2+. The major differences
are QSPI flash and USB (which we don't model), and support for
2GB of RAM (which we do). Since the MPS3 is very similar to the
MPS2, I've implemented mps3-an524 as a subclass of TYPE_MPS2TZ_MACHINE,
sharing most of the code with mps2-an505 and mps2-an521.

The motivation for this model is two-fold:
 * Linaro's Zephyr team would like it, so they can test their
    code targeting the MPS3 on QEMU
 * It's a useful stepping-stone towards a future MPS family model
   which uses the SSE-300 and Cortex-M55. All the "make various bits
   of mps2-tz.c be driven by per-board data structures rather than
   hardcoding them" changes will be needed for that future board model.
   This way they can be code-reviewed now, rather than making the
   future patchseries even bigger (it will be pretty large even so,
   because of all the "implement SSE-300 model" patches).

thanks
-- PMM


Peter Maydell (24):
  hw/arm/mps2-tz: Make SYSCLK frequency board-specific
  hw/misc/mps2-scc: Support configurable number of OSCCLK values
  hw/arm/mps2-tz: Correct the OSCCLK settings for mps2-an505 and
    mps2-an511
  hw/arm/mps2-tz: Make the OSCCLK settings be configurable per-board
  hw/misc/mps2-fpgaio: Make number of LEDs configurable by board
  hw/misc/mps2-fpgaio: Support SWITCH register
  hw/arm/mps2-tz: Make FPGAIO switch and LED config per-board
  hw/arm/mps2-tz: Condition IRQ splitting on number of CPUs, not board
    type
  hw/arm/mps2-tz: Make number of IRQs board-specific
  hw/misc/mps2-scc: Implement CFG_REG5 and CFG_REG6 for MPS3 AN524
  hw/arm/mps2-tz: Correct wrong interrupt numbers for DMA and SPI
  hw/arm/mps2-tz: Allow PPCPortInfo structures to specify device
    interrupts
  hw/arm/mps2-tz: Move device IRQ info to data structures
  hw/arm/mps2-tz: Size the uart-irq-orgate based on the number of UARTs
  hw/arm/mps2-tz: Allow boards to have different PPCInfo data
  hw/arm/mps2-tz: Make RAM arrangement board-specific
  hw/arm/mps2-tz: Set MachineClass default_ram info from RAMInfo data
  hw/arm/mps2-tz: Support ROMs as well as RAMs
  hw/arm/mps2-tz: Get armv7m_load_kernel() size argument from RAMInfo
  hw/arm/mps2-tz: Add new mps3-an524 board
  hw/arm/mps2-tz: Stub out USB controller for mps3-an524
  hw/arm/mps2-tz: Provide PL031 RTC on mps3-an524
  docs/system/arm/mps2.rst: Document the new mps3-an524 board
  hw/arm/mps2: Update old infocenter.arm.com URLs

 docs/system/arm/mps2.rst         |  24 +-
 include/hw/arm/armsse.h          |   4 +-
 include/hw/misc/armsse-cpuid.h   |   2 +-
 include/hw/misc/armsse-mhu.h     |   2 +-
 include/hw/misc/iotkit-secctl.h  |   2 +-
 include/hw/misc/iotkit-sysctl.h  |   2 +-
 include/hw/misc/iotkit-sysinfo.h |   2 +-
 include/hw/misc/mps2-fpgaio.h    |   8 +-
 include/hw/misc/mps2-scc.h       |  10 +-
 hw/arm/mps2-tz.c                 | 632 +++++++++++++++++++++++++------
 hw/arm/mps2.c                    |   5 +
 hw/misc/armsse-cpuid.c           |   2 +-
 hw/misc/armsse-mhu.c             |   2 +-
 hw/misc/iotkit-sysctl.c          |   2 +-
 hw/misc/iotkit-sysinfo.c         |   2 +-
 hw/misc/mps2-fpgaio.c            |  43 ++-
 hw/misc/mps2-scc.c               |  93 ++++-
 17 files changed, 680 insertions(+), 157 deletions(-)

-- 
2.20.1


Re: [PATCH v2 00/24] hw/arm: New board model mps3-an524
Posted by no-reply@patchew.org 3 years, 2 months ago
Patchew URL: https://patchew.org/QEMU/20210215115138.20465-1-peter.maydell@linaro.org/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20210215115138.20465-1-peter.maydell@linaro.org
Subject: [PATCH v2 00/24] hw/arm: New board model mps3-an524

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 - [tag update]      patchew/20210211225246.17315-1-danielhb413@gmail.com -> patchew/20210211225246.17315-1-danielhb413@gmail.com
 - [tag update]      patchew/20210212123622.15834-1-cfontana@suse.de -> patchew/20210212123622.15834-1-cfontana@suse.de
 - [tag update]      patchew/20210213032318.346093-1-brogers@suse.com -> patchew/20210213032318.346093-1-brogers@suse.com
 - [tag update]      patchew/20210215103215.4944-1-peter.maydell@linaro.org -> patchew/20210215103215.4944-1-peter.maydell@linaro.org
 * [new tag]         patchew/20210215115138.20465-1-peter.maydell@linaro.org -> patchew/20210215115138.20465-1-peter.maydell@linaro.org
Switched to a new branch 'test'
b05c305 hw/arm/mps2: Update old infocenter.arm.com URLs
b6187ec docs/system/arm/mps2.rst: Document the new mps3-an524 board
f10fab9 hw/arm/mps2-tz: Provide PL031 RTC on mps3-an524
6121e0b hw/arm/mps2-tz: Stub out USB controller for mps3-an524
22e8b2a hw/arm/mps2-tz: Add new mps3-an524 board
8542f40 hw/arm/mps2-tz: Get armv7m_load_kernel() size argument from RAMInfo
dfb6c1d hw/arm/mps2-tz: Support ROMs as well as RAMs
dfbf27f hw/arm/mps2-tz: Set MachineClass default_ram info from RAMInfo data
465fa4d hw/arm/mps2-tz: Make RAM arrangement board-specific
f411586 hw/arm/mps2-tz: Allow boards to have different PPCInfo data
70e500a hw/arm/mps2-tz: Size the uart-irq-orgate based on the number of UARTs
e304bf7 hw/arm/mps2-tz: Move device IRQ info to data structures
58795b7 hw/arm/mps2-tz: Allow PPCPortInfo structures to specify device interrupts
798a0a0 hw/arm/mps2-tz: Correct wrong interrupt numbers for DMA and SPI
7dc23f1 hw/misc/mps2-scc: Implement CFG_REG5 and CFG_REG6 for MPS3 AN524
1c88be5 hw/arm/mps2-tz: Make number of IRQs board-specific
4b07e84 hw/arm/mps2-tz: Condition IRQ splitting on number of CPUs, not board type
29a99f6 hw/arm/mps2-tz: Make FPGAIO switch and LED config per-board
af56152 hw/misc/mps2-fpgaio: Support SWITCH register
75a5b02 hw/misc/mps2-fpgaio: Make number of LEDs configurable by board
4acb8f6 hw/arm/mps2-tz: Make the OSCCLK settings be configurable per-board
7a676dc hw/arm/mps2-tz: Correct the OSCCLK settings for mps2-an505 and mps2-an511
dee7995 hw/misc/mps2-scc: Support configurable number of OSCCLK values
ec200b3 hw/arm/mps2-tz: Make SYSCLK frequency board-specific

=== OUTPUT BEGIN ===
1/24 Checking commit ec200b31a6f5 (hw/arm/mps2-tz: Make SYSCLK frequency board-specific)
2/24 Checking commit dee79959d543 (hw/misc/mps2-scc: Support configurable number of OSCCLK values)
3/24 Checking commit 7a676dcedb14 (hw/arm/mps2-tz: Correct the OSCCLK settings for mps2-an505 and mps2-an511)
4/24 Checking commit 4acb8f66dd89 (hw/arm/mps2-tz: Make the OSCCLK settings be configurable per-board)
5/24 Checking commit 75a5b021c178 (hw/misc/mps2-fpgaio: Make number of LEDs configurable by board)
6/24 Checking commit af5615277b2e (hw/misc/mps2-fpgaio: Support SWITCH register)
7/24 Checking commit 29a99f61b491 (hw/arm/mps2-tz: Make FPGAIO switch and LED config per-board)
8/24 Checking commit 4b07e843722a (hw/arm/mps2-tz: Condition IRQ splitting on number of CPUs, not board type)
9/24 Checking commit 1c88be588715 (hw/arm/mps2-tz: Make number of IRQs board-specific)
10/24 Checking commit 7dc23f166b0c (hw/misc/mps2-scc: Implement CFG_REG5 and CFG_REG6 for MPS3 AN524)
11/24 Checking commit 798a0a0fd3ca (hw/arm/mps2-tz: Correct wrong interrupt numbers for DMA and SPI)
12/24 Checking commit 58795b72d0a4 (hw/arm/mps2-tz: Allow PPCPortInfo structures to specify device interrupts)
13/24 Checking commit e304bf7f11e7 (hw/arm/mps2-tz: Move device IRQ info to data structures)
WARNING: line over 80 characters
#115: FILE: hw/arm/mps2-tz.c:557:
+                { "uart0", make_uart, &mms->uart[0], 0x40200000, 0x1000, { 32, 33, 42 } },

WARNING: line over 80 characters
#116: FILE: hw/arm/mps2-tz.c:558:
+                { "uart1", make_uart, &mms->uart[1], 0x40201000, 0x1000, { 34, 35, 43 } },

WARNING: line over 80 characters
#117: FILE: hw/arm/mps2-tz.c:559:
+                { "uart2", make_uart, &mms->uart[2], 0x40202000, 0x1000, { 36, 37, 44 } },

WARNING: line over 80 characters
#118: FILE: hw/arm/mps2-tz.c:560:
+                { "uart3", make_uart, &mms->uart[3], 0x40203000, 0x1000, { 38, 39, 45 } },

WARNING: line over 80 characters
#119: FILE: hw/arm/mps2-tz.c:561:
+                { "uart4", make_uart, &mms->uart[4], 0x40204000, 0x1000, { 40, 41, 46 } },

WARNING: line over 80 characters
#137: FILE: hw/arm/mps2-tz.c:588:
+                { "dma0", make_dma, &mms->dma[0], 0x40110000, 0x1000, { 58, 56, 57 } },

WARNING: line over 80 characters
#138: FILE: hw/arm/mps2-tz.c:589:
+                { "dma1", make_dma, &mms->dma[1], 0x40111000, 0x1000, { 61, 59, 60 } },

WARNING: line over 80 characters
#139: FILE: hw/arm/mps2-tz.c:590:
+                { "dma2", make_dma, &mms->dma[2], 0x40112000, 0x1000, { 64, 62, 63 } },

WARNING: line over 80 characters
#140: FILE: hw/arm/mps2-tz.c:591:
+                { "dma3", make_dma, &mms->dma[3], 0x40113000, 0x1000, { 67, 65, 66 } },

total: 0 errors, 9 warnings, 114 lines checked

Patch 13/24 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
14/24 Checking commit 70e500a8ec27 (hw/arm/mps2-tz: Size the uart-irq-orgate based on the number of UARTs)
15/24 Checking commit f411586e8539 (hw/arm/mps2-tz: Allow boards to have different PPCInfo data)
16/24 Checking commit 465fa4d5bf17 (hw/arm/mps2-tz: Make RAM arrangement board-specific)
17/24 Checking commit dfbf27f85917 (hw/arm/mps2-tz: Set MachineClass default_ram info from RAMInfo data)
18/24 Checking commit dfb6c1d66afa (hw/arm/mps2-tz: Support ROMs as well as RAMs)
19/24 Checking commit 8542f40185e4 (hw/arm/mps2-tz: Get armv7m_load_kernel() size argument from RAMInfo)
20/24 Checking commit 22e8b2ae276a (hw/arm/mps2-tz: Add new mps3-an524 board)
WARNING: Block comments use a leading /* on a separate line
#165: FILE: hw/arm/mps2-tz.c:784:
+                { /* port 7 reserved */ },

WARNING: line over 80 characters
#175: FILE: hw/arm/mps2-tz.c:794:
+                { "uart0", make_uart, &mms->uart[0], 0x41303000, 0x1000, { 32, 33, 42 } },

WARNING: line over 80 characters
#176: FILE: hw/arm/mps2-tz.c:795:
+                { "uart1", make_uart, &mms->uart[1], 0x41304000, 0x1000, { 34, 35, 43 } },

WARNING: line over 80 characters
#177: FILE: hw/arm/mps2-tz.c:796:
+                { "uart2", make_uart, &mms->uart[2], 0x41305000, 0x1000, { 36, 37, 44 } },

WARNING: line over 80 characters
#178: FILE: hw/arm/mps2-tz.c:797:
+                { "uart3", make_uart, &mms->uart[3], 0x41306000, 0x1000, { 38, 39, 45 } },

WARNING: line over 80 characters
#179: FILE: hw/arm/mps2-tz.c:798:
+                { "uart4", make_uart, &mms->uart[4], 0x41307000, 0x1000, { 40, 41, 46 } },

ERROR: line over 90 characters
#180: FILE: hw/arm/mps2-tz.c:799:
+                { "uart5", make_uart, &mms->uart[5], 0x41308000, 0x1000, { 124, 125, 126 } },

WARNING: Block comments use a leading /* on a separate line
#182: FILE: hw/arm/mps2-tz.c:801:
+                { /* port 9 reserved */ },

total: 1 errors, 7 warnings, 224 lines checked

Patch 20/24 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

21/24 Checking commit 6121e0bc7dbf (hw/arm/mps2-tz: Stub out USB controller for mps3-an524)
22/24 Checking commit f10fab9e215a (hw/arm/mps2-tz: Provide PL031 RTC on mps3-an524)
23/24 Checking commit b6187ec767a4 (docs/system/arm/mps2.rst: Document the new mps3-an524 board)
24/24 Checking commit b05c305efae8 (hw/arm/mps2: Update old infocenter.arm.com URLs)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20210215115138.20465-1-peter.maydell@linaro.org/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [PATCH v2 00/24] hw/arm: New board model mps3-an524
Posted by Philippe Mathieu-Daudé 3 years, 1 month ago
On 2/15/21 12:51 PM, Peter Maydell wrote:
> This patchseries implements a new board model in the mps2/mps3 family,
> based on Application Note AN524:
> https://developer.arm.com/documentation/dai0524/latest/

> Peter Maydell (24):
>   hw/arm/mps2-tz: Make SYSCLK frequency board-specific
>   hw/misc/mps2-scc: Support configurable number of OSCCLK values
>   hw/arm/mps2-tz: Correct the OSCCLK settings for mps2-an505 and
>     mps2-an511
>   hw/arm/mps2-tz: Make the OSCCLK settings be configurable per-board
>   hw/misc/mps2-fpgaio: Make number of LEDs configurable by board
>   hw/misc/mps2-fpgaio: Support SWITCH register
>   hw/arm/mps2-tz: Make FPGAIO switch and LED config per-board
>   hw/arm/mps2-tz: Condition IRQ splitting on number of CPUs, not board
>     type
>   hw/arm/mps2-tz: Make number of IRQs board-specific
>   hw/misc/mps2-scc: Implement CFG_REG5 and CFG_REG6 for MPS3 AN524
>   hw/arm/mps2-tz: Correct wrong interrupt numbers for DMA and SPI
>   hw/arm/mps2-tz: Allow PPCPortInfo structures to specify device
>     interrupts
>   hw/arm/mps2-tz: Move device IRQ info to data structures
>   hw/arm/mps2-tz: Size the uart-irq-orgate based on the number of UARTs
>   hw/arm/mps2-tz: Allow boards to have different PPCInfo data
>   hw/arm/mps2-tz: Make RAM arrangement board-specific
>   hw/arm/mps2-tz: Set MachineClass default_ram info from RAMInfo data
>   hw/arm/mps2-tz: Support ROMs as well as RAMs
>   hw/arm/mps2-tz: Get armv7m_load_kernel() size argument from RAMInfo
>   hw/arm/mps2-tz: Add new mps3-an524 board
>   hw/arm/mps2-tz: Stub out USB controller for mps3-an524
>   hw/arm/mps2-tz: Provide PL031 RTC on mps3-an524
>   docs/system/arm/mps2.rst: Document the new mps3-an524 board
>   hw/arm/mps2: Update old infocenter.arm.com URLs
> 
>  docs/system/arm/mps2.rst         |  24 +-
>  include/hw/arm/armsse.h          |   4 +-
>  include/hw/misc/armsse-cpuid.h   |   2 +-
>  include/hw/misc/armsse-mhu.h     |   2 +-
>  include/hw/misc/iotkit-secctl.h  |   2 +-
>  include/hw/misc/iotkit-sysctl.h  |   2 +-
>  include/hw/misc/iotkit-sysinfo.h |   2 +-
>  include/hw/misc/mps2-fpgaio.h    |   8 +-
>  include/hw/misc/mps2-scc.h       |  10 +-
>  hw/arm/mps2-tz.c                 | 632 +++++++++++++++++++++++++------
>  hw/arm/mps2.c                    |   5 +
>  hw/misc/armsse-cpuid.c           |   2 +-
>  hw/misc/armsse-mhu.c             |   2 +-
>  hw/misc/iotkit-sysctl.c          |   2 +-
>  hw/misc/iotkit-sysinfo.c         |   2 +-
>  hw/misc/mps2-fpgaio.c            |  43 ++-
>  hw/misc/mps2-scc.c               |  93 ++++-
>  17 files changed, 680 insertions(+), 157 deletions(-)

Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>