Re: [SPAM] [PATCH v1 1/8] aspeed/soc: Support RTC for AST2700

2024-11-02 Thread Cédric Le Goater
On 10/29/24 10:17, Jamin Lin wrote: The RTC controller between AST2600 and AST2700 are identical. Add RTC model for AST2700 RTC support. The RTC controller registers base address is start at 0x12C0_F000 and its alarm interrupt is connected to GICINT13. Signed-off-by: Jamin Lin Reviewed-by: C

Re: [SPAM] [PATCH v1 3/8] hw/timer/aspeed: Fix interrupt status does not be cleared for AST2600

2024-11-02 Thread Cédric Le Goater
On 10/29/24 10:17, Jamin Lin wrote: According to the datasheet of AST2600 description, interrupt status set by HW and clear to "0" by software writing "1" on the specific bit. Therefore, if firmware set the specific bit "1" in the interrupt status register(0x34), the specific bit of "s->irq_sts"

Re: [SPAM] [PATCH v1 4/8] hw/sd/sdhci: Fix coding style

2024-11-02 Thread Cédric Le Goater
On 10/29/24 10:17, Jamin Lin wrote: Fix coding style issues from checkpatch.pl Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Thanks, C. --- hw/sd/sdhci.c | 64 +-- 1 file changed, 42 insertions(+), 22 deletions(-) diff --git

Re: [SPAM] [PATCH v1 2/8] hw/timer/aspeed: Fix coding style

2024-11-02 Thread Cédric Le Goater
On 10/29/24 10:17, Jamin Lin wrote: Fix coding style issues from checkpatch.pl Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Thanks, C. --- hw/timer/aspeed_timer.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/hw/timer/aspeed_timer.c b/hw

Re: [SPAM] [PATCH v1 6/8] hw/sd/aspeed_sdhci: Introduce Capabilities Register 2 for SD slot 0 and 1

2024-11-02 Thread Cédric Le Goater
On 10/29/24 10:17, Jamin Lin wrote: The size of SDHCI capabilities register is 64bits, so introduces new Capabilities Register 2 for SD slot 0 (0x144) and SD slot1 (0x244). Signed-off-by: Jamin Lin I will fix the code alignment issues. Reviewed-by: Cédric Le Goater Thanks, C. --- hw/s

Re: [SPAM] [PATCH v1 0/8] Support RTC for AST2700

2024-11-02 Thread Cédric Le Goater
On 10/29/24 10:17, Jamin Lin wrote: change from v1: 1. Support RTC for AST2700. 2. Support SDHCI write protected pin inverted for AST2500 and AST2600. 3. Introduce Capabilities Register 2 for SD slot 0 and 1. 4. Support create flash devices via command line for AST1030. Jamin Lin (8): aspeed/

Re: [PATCH] hw/sd/sdcard: Fix calculation of size when using eMMC boot partitions

2024-11-02 Thread Cédric Le Goater
Philippe, I can take this patch through the aspeed branch. Thanks, C. On 10/28/24 17:23, Jan Luebbe wrote: The sd_bootpart_offset() function calculates the *runtime* offset which changes as the guest switches between accessing the main user data area and the boot partitions by writing to the

Re: [SPAM] [PATCH v1 8/8] aspeed: Support create flash devices via command line for AST1030

2024-11-02 Thread Cédric Le Goater
On 10/29/24 10:17, Jamin Lin wrote: Add a "if-statement" in aspeed_minibmc_machine_init function. If users add "-nodefaults" in command line, the flash devices should be created by users setting. Otherwise, the flash devices are created at machine init. Signed-off-by: Jamin Lin Reviewed-by:

Re: [PATCH v3 11/26] hw/i2c/mpc_i2c: Convert DPRINTF to trace events for register access

2024-11-02 Thread Corey Minyard
On Sun, Nov 03, 2024 at 12:08:22AM +0100, BALATON Zoltan wrote: > On Sat, 2 Nov 2024, Corey Minyard wrote: > > On Sat, Nov 02, 2024 at 02:17:00PM +0100, Bernhard Beschow wrote: > > > Reviewed-by: Cédric Le Goater > > > Signed-off-by: Bernhard Beschow > > > > Signed-off-by: Corey Minyard > > Di

Re: [PATCH v3 11/26] hw/i2c/mpc_i2c: Convert DPRINTF to trace events for register access

2024-11-02 Thread Corey Minyard
On Sat, Nov 02, 2024 at 02:17:00PM +0100, Bernhard Beschow wrote: > Reviewed-by: Cédric Le Goater > Signed-off-by: Bernhard Beschow Signed-off-by: Corey Minyard > --- > hw/i2c/mpc_i2c.c| 9 + > hw/i2c/trace-events | 5 + > 2 files changed, 10 insertions(+), 4 deletions(-) > >

Re: [PATCH v3 11/26] hw/i2c/mpc_i2c: Convert DPRINTF to trace events for register access

2024-11-02 Thread BALATON Zoltan
On Sat, 2 Nov 2024, Corey Minyard wrote: On Sat, Nov 02, 2024 at 02:17:00PM +0100, Bernhard Beschow wrote: Reviewed-by: Cédric Le Goater Signed-off-by: Bernhard Beschow Signed-off-by: Corey Minyard Did you mean Reviewed-by or was it your patch that Bernhard picked up? Regards, BALATON Zo

Re: [PATCH v3 22/26] hw/i2c/smbus_eeprom: Prefer DEFINE_TYPES() macro

2024-11-02 Thread Corey Minyard
On Sat, Nov 2, 2024 at 8:25 AM Bernhard Beschow wrote: > > Reviewed-by: Cédric Le Goater > Signed-off-by: Bernhard Beschow > --- > hw/i2c/smbus_eeprom.c | 19 --- > 1 file changed, 8 insertions(+), 11 deletions(-) > > diff --git a/hw/i2c/smbus_eeprom.c b/hw/i2c/smbus_eeprom.c >

Re: [PATCH v3 12/26] hw/i2c/mpc_i2c: Prefer DEFINE_TYPES() macro

2024-11-02 Thread Corey Minyard
On Sat, Nov 02, 2024 at 02:17:01PM +0100, Bernhard Beschow wrote: > Reviewed-by: Cédric Le Goater > Signed-off-by: Bernhard Beschow > --- > hw/i2c/mpc_i2c.c | 20 > 1 file changed, 8 insertions(+), 12 deletions(-) > > diff --git a/hw/i2c/mpc_i2c.c b/hw/i2c/mpc_i2c.c > index

[PATCH v3 20/26] hw/sd/sdhci: Prefer DEFINE_TYPES() macro

2024-11-02 Thread Bernhard Beschow
Reviewed-by: Cédric Le Goater Signed-off-by: Bernhard Beschow --- hw/sd/sdhci.c | 62 +-- 1 file changed, 26 insertions(+), 36 deletions(-) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index ed01499391..aa89513796 100644 --- a/hw/sd/sdhci.c +++ b/hw

[PATCH v3 09/26] hw/ppc/ppce500_ccsr: Trace access to CCSR region

2024-11-02 Thread Bernhard Beschow
The CCSR space is just a container which is meant to be covered by platform device memory regions. However, QEMU only implements a subset of these devices. Add some tracing to see which unimplemented devices a guest attempts to access. Signed-off-by: Bernhard Beschow --- hw/ppc/ppce500_ccsr.c |

[PATCH v3 01/26] hw/ppc/e500: Do not leak struct boot_info

2024-11-02 Thread Bernhard Beschow
The struct is allocated once with g_new0() but never free()'d. Fix the leakage by adding an attribute to struct PPCE500MachineState which avoids the allocation. While at it remove the obsolete /*< private >*/ markers. Signed-off-by: Bernhard Beschow --- hw/ppc/e500.h | 9 +++-- hw/ppc/e500

[PATCH v3 18/26] hw/ppc/mpc8544_guts: Prefer DEFINE_TYPES() macro

2024-11-02 Thread Bernhard Beschow
Reviewed-by: Cédric Le Goater Signed-off-by: Bernhard Beschow --- hw/ppc/mpc8544_guts.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/hw/ppc/mpc8544_guts.c b/hw/ppc/mpc8544_guts.c index c02b34ccde..cf2317b3ab 100644 --- a/hw/ppc/mpc8544_guts.c +++ b/hw

[PATCH v3 14/26] hw/pci-host/ppce500: Prefer DEFINE_TYPES() macro

2024-11-02 Thread Bernhard Beschow
Reviewed-by: Cédric Le Goater Signed-off-by: Bernhard Beschow --- hw/pci-host/ppce500.c | 42 ++ 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c index d7ff2ba778..1ce79ea20c 100644 --- a/hw/pci-

[PATCH v3 08/26] hw/ppc/e500: Extract ppce500_ccsr.c

2024-11-02 Thread Bernhard Beschow
The device model already has a header file, so extract its implementation into an accompanying source file like other e500 devices. While at it rename the header file to reflect the name of the structure defined there. This commit is also a preparation for the next commit. Signed-off-by: Bernhard

[PATCH v3 06/26] hw/ppc/e500: Reuse TYPE_GPIO_PWR

2024-11-02 Thread Bernhard Beschow
Taking inspiration from the ARM virt machine, port away from qemu_allocate_irq() by reusing TYPE_GPIO_PWR. Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 16 hw/ppc/Kconfig | 1 + 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.

[PATCH v3 03/26] hw/ppc/e500: Prefer QOM cast

2024-11-02 Thread Bernhard Beschow
Reviewed-by: BALATON Zoltan Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 0683629ac0..964a22c5b7 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -1008,7 +1008,7 @@ void ppce500_init(

[PATCH v3 00/26] E500 Cleanup

2024-11-02 Thread Bernhard Beschow
This series is part of a bigger series exploring data-driven machine creation using device tree blobs on top of the e500 machines [1]. It contains patches to make this exploration easier which are also expected to provide value in themselves. The cleanup starts with the e500 machine class itself,

[PATCH v3 13/26] hw/pci-host/ppce500: Reuse TYPE_PPC_E500_PCI_BRIDGE define

2024-11-02 Thread Bernhard Beschow
Prefer a macro rather than a string literal when instantiaging device models. Reviewed-by: BALATON Zoltan Signed-off-by: Bernhard Beschow --- hw/pci-host/ppce500.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c index 97e5d47cec.

[PATCH v3 02/26] hw/ppc/e500: Remove firstenv variable

2024-11-02 Thread Bernhard Beschow
The firstenv variable is never read, so remove it. The env variable is then only used inside the loop, so move it there to restrict its scope. Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500

[PATCH v3 21/26] hw/block/pflash_cfi01: Prefer DEFINE_TYPES() macro

2024-11-02 Thread Bernhard Beschow
Reviewed-by: Cédric Le Goater Reviewed-by: Kevin Wolf Signed-off-by: Bernhard Beschow --- hw/block/pflash_cfi01.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 7b6ec64442..cf11dada29 100644 ---

[PATCH v3 04/26] hw/ppc/e500: Remove unused "irqs" parameter

2024-11-02 Thread Bernhard Beschow
Reviewed-by: BALATON Zoltan Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 964a22c5b7..ecaaab1558 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -825,7 +825,7 @@ static DeviceState

[PATCH v3 12/26] hw/i2c/mpc_i2c: Prefer DEFINE_TYPES() macro

2024-11-02 Thread Bernhard Beschow
Reviewed-by: Cédric Le Goater Signed-off-by: Bernhard Beschow --- hw/i2c/mpc_i2c.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/hw/i2c/mpc_i2c.c b/hw/i2c/mpc_i2c.c index 3d79c15653..16f4309ea9 100644 --- a/hw/i2c/mpc_i2c.c +++ b/hw/i2c/mpc_i2c.c @@ -2

[PATCH v3 19/26] hw/intc: Guard openpic_kvm.c by dedicated OPENPIC_KVM Kconfig switch

2024-11-02 Thread Bernhard Beschow
Allows to clearly mark code sections relying on this device type. Reviewed-by: Cédric Le Goater Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 2 +- hw/intc/Kconfig | 4 hw/intc/meson.build | 3 +-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/ppc/e500.c

[PATCH v3 23/26] hw/rtc/ds1338: Prefer DEFINE_TYPES() macro

2024-11-02 Thread Bernhard Beschow
Signed-off-by: Bernhard Beschow --- hw/rtc/ds1338.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/hw/rtc/ds1338.c b/hw/rtc/ds1338.c index a5fe221418..6de13caf99 100644 --- a/hw/rtc/ds1338.c +++ b/hw/rtc/ds1338.c @@ -14,7 +14,6 @@ #include "hw/i2c/i2c.h

[PATCH v3 11/26] hw/i2c/mpc_i2c: Convert DPRINTF to trace events for register access

2024-11-02 Thread Bernhard Beschow
Reviewed-by: Cédric Le Goater Signed-off-by: Bernhard Beschow --- hw/i2c/mpc_i2c.c| 9 + hw/i2c/trace-events | 5 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/i2c/mpc_i2c.c b/hw/i2c/mpc_i2c.c index 2467d1a9aa..3d79c15653 100644 --- a/hw/i2c/mpc_i2c.c +++ b

[PATCH v3 17/26] hw/gpio/mpc8xxx: Prefer DEFINE_TYPES() macro

2024-11-02 Thread Bernhard Beschow
Reviewed-by: Cédric Le Goater Signed-off-by: Bernhard Beschow --- hw/gpio/mpc8xxx.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/hw/gpio/mpc8xxx.c b/hw/gpio/mpc8xxx.c index 63b7a5c881..de183c3be5 100644 --- a/hw/gpio/mpc8xxx.c +++ b/hw/gpio/mpc8xxx.

[PATCH v3 22/26] hw/i2c/smbus_eeprom: Prefer DEFINE_TYPES() macro

2024-11-02 Thread Bernhard Beschow
Reviewed-by: Cédric Le Goater Signed-off-by: Bernhard Beschow --- hw/i2c/smbus_eeprom.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/hw/i2c/smbus_eeprom.c b/hw/i2c/smbus_eeprom.c index 9e62c27a1a..1d4d9704bf 100644 --- a/hw/i2c/smbus_eeprom.c +++ b/hw/

[PATCH v3 24/26] hw/usb/hcd-ehci-sysbus: Prefer DEFINE_TYPES() macro

2024-11-02 Thread Bernhard Beschow
Reviewed-by: Cédric Le Goater Signed-off-by: Bernhard Beschow --- hw/usb/hcd-ehci-sysbus.c | 118 +-- 1 file changed, 50 insertions(+), 68 deletions(-) diff --git a/hw/usb/hcd-ehci-sysbus.c b/hw/usb/hcd-ehci-sysbus.c index 2b1652f7a8..87a3bebe3e 100644 --- a/

[PATCH v3 07/26] hw/ppc/e500: Use SysBusDevice API to access TYPE_CCSR's internal resources

2024-11-02 Thread Bernhard Beschow
Rather than accessing the attributes of TYPE_CCSR directly, use the SysBusDevice API which exists exactly for that purpose. Furthermore, registering the memory region with the SysBusDevice API makes it show up in QMP's `info qom-tree` command. Reviewed-by: BALATON Zoltan Signed-off-by: Bernhard B

[PATCH v3 26/26] MAINTAINERS: Add hw/gpio/gpio_pwr.c

2024-11-02 Thread Bernhard Beschow
The device is only used in the ARM virt machine and designed to be used on top of pl061 for use cases such as ARM Trusted Firmware. Add it to the same section as hw/gpio/pl061.c. Signed-off-by: Bernhard Beschow --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAI

[PATCH v3 05/26] hw/ppc/e500: Add missing device tree properties to i2c controller node

2024-11-02 Thread Bernhard Beschow
When compiling a decompiled device tree blob created with dumpdtb, dtc complains with: /soc@e000/i2c@3000: incorrect #address-cells for I2C bus /soc@e000/i2c@3000: incorrect #size-cells for I2C bus Fix this by adding the missing device tree properties. Reviewed-by: Cédric Le Goater

[PATCH v3 25/26] hw/vfio/platform: Let vfio_start_eventfd_injection() take VFIOPlatformDevice pointer

2024-11-02 Thread Bernhard Beschow
Avoids one downcast, making the code more type-safe. Reviewed-by: Cédric Le Goater Signed-off-by: Bernhard Beschow --- hw/vfio/platform.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index a85c199c76..77bbfbf62c 100644 --- a/

[PATCH v3 15/26] hw/net/fsl_etsec/miim: Reuse MII constants

2024-11-02 Thread Bernhard Beschow
Instead of defining redundant constants and using magic numbers reuse the existing MII constants. Signed-off-by: Bernhard Beschow --- hw/net/fsl_etsec/miim.c | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/hw/net/fsl_etsec/miim.c b/hw/net/fsl_etsec/miim.c

[PATCH v3 10/26] hw/ppc/mpc8544_guts: Populate POR PLL ratio status register

2024-11-02 Thread Bernhard Beschow
Populate this read-only register with some arbitrary values which avoids U-Boot's get_clocks() to hang(). Reviewed-by: BALATON Zoltan Signed-off-by: Bernhard Beschow --- hw/ppc/mpc8544_guts.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/ppc/mpc8544_guts.c b/hw/ppc/mpc854

[PATCH v3 16/26] hw/net/fsl_etsec/etsec: Prefer DEFINE_TYPES() macro

2024-11-02 Thread Bernhard Beschow
Reviewed-by: Cédric Le Goater Signed-off-by: Bernhard Beschow --- hw/net/fsl_etsec/etsec.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/hw/net/fsl_etsec/etsec.c b/hw/net/fsl_etsec/etsec.c index 3fdd16ef2e..9bd886b996 100644 --- a/hw/net/fsl_etsec/et

Re: [PATCH v5 02/15] hw/display/apple-gfx: Introduce ParavirtualizedGraphics.Framework support

2024-11-02 Thread Akihiko Odaki
On 2024/11/02 6:37, Phil Dennis-Jordan wrote: Thanks for taking a look at this latest iteration. Some thoughts on your comments inline: On Thu, 31 Oct 2024 at 10:32, Akihiko Odaki > wrote: On 2024/10/30 5:58, Phil Dennis-Jordan wrote: > MacOS provides