From patchwork Mon Sep 23 09:29:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Beschow X-Patchwork-Id: 1988454 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=e9GvLZ0q; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XBySH1mY0z1xsN for ; Mon, 23 Sep 2024 19:31:59 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ssfPO-0001ah-7A; Mon, 23 Sep 2024 05:31:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ssfPM-0001Wt-CE; Mon, 23 Sep 2024 05:31:04 -0400 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ssfPK-0006wU-J0; Mon, 23 Sep 2024 05:31:04 -0400 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a8d24f98215so558139566b.1; Mon, 23 Sep 2024 02:31:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727083859; x=1727688659; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=JV0fe214eWya3VLAdHWiH6CiRck5Drm7MecD1y0pT1U=; b=e9GvLZ0qHnqS4S0CgThpn0l1J4H06O1t7Huf6HYUBAxyK7+LW70n4zwe9FyNVb/C8t J5Ml1ibuCCcbWEryBWzh7PzNhRcNF+s1WhqzmuqsKd3rZvGkX/Wd0Nt8LjK6yI6Ij0sq 08LPUs/Db7fAMSkg+/mdN82VNZjqIDwW0db6VDcu5Qxcv/UDZBwzvj3HpjCdqx1p7aHi WYJBzIM19cdoZJOb8kGyfbRjHsR4VfQE145YdwPrAGHUAhAiMr9g6CTqv2ksk6Y1Aw9+ 8US12uuabNcMPt1Na2PF87mBl2F/H5hXy+uw5gkgMZGRZd17rLRKoBo9ZQ4ngdEoBX8Y qMrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727083859; x=1727688659; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JV0fe214eWya3VLAdHWiH6CiRck5Drm7MecD1y0pT1U=; b=S6Ry13IOZiNpq03ZPW4gUUiZF5q0RJ0aY+YjUzAb4uCkWBDg+tUX6bOPuLLBJuMddX sB/tig5Qwjd2/lQvCkrc5JsVJV/nupRmR1M5NayrluVnw6Veys93zIhQ2isPkPwoQMJd dopPShu0dZpA7bd/aBfMooF1cYkNa9MB57nulqxkYDIftQbAlldIxiFkTelF9viKiBbx cGKbEF5iduar8ctEX95pjFGwZqXTJSGaLqVQKgKh685sZlP5VmiMmudh+EjOHsujq/hW 9/ogo8EmlubemrYXcWdoiM8bi7GwqC/DuridHItPmBRAv6sOAFVvy1ybF4yY6kSmN24O k2pg== X-Forwarded-Encrypted: i=1; AJvYcCVnxXyzx1MVkBrJfoGqen0WN6+mYk1T26hxXIUGXHtoI9Oh3WlxtbQJS+BEqRNX6Fyf3kApAnRD2uY=@nongnu.org, AJvYcCWCChhqiHJK92TgsH2/iCim91KfZDIOR1F+vxzSpkcZpwSnCjF2waGjRvP+GllG85C1695lJipYo0IL@nongnu.org X-Gm-Message-State: AOJu0Ywy2TFVAN0iCBNHXrJwGRHMq0i3ie4sUp4V1AAhIc6ak0hFNgNr LIxtqcLbqRy2hv4i7DZfefSV6vpvXbVi+zqPNcsKnlWZw96J+X72MqWH7Q== X-Google-Smtp-Source: AGHT+IEAQKaHnzdMkLbwW/Zq3uAWWGFJ3n3C9cbcspfWrnGZE95cFlHk0TQMp7ik1HnAke4+JXFGGg== X-Received: by 2002:a17:907:3f25:b0:a8a:ead3:8515 with SMTP id a640c23a62f3a-a90d514a83fmr1115692566b.65.1727083859022; Mon, 23 Sep 2024 02:30:59 -0700 (PDT) Received: from archlinux.. (90-181-218-29.rco.o2.cz. [90.181.218.29]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a90612b3f6fsm1188747166b.107.2024.09.23.02.30.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2024 02:30:58 -0700 (PDT) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Hanna Reitz , qemu-ppc@nongnu.org, Kevin Wolf , Corey Minyard , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , Alex Williamson , Jason Wang , Daniel Henrique Barboza , qemu-block@nongnu.org, Nicholas Piggin , Bin Meng , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Bernhard Beschow Subject: [PATCH 00/23] E500 Cleanup Date: Mon, 23 Sep 2024 11:29:53 +0200 Message-ID: <20240923093016.66437-1-shentey@gmail.com> X-Mailer: git-send-email 2.46.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=shentey@gmail.com; helo=mail-ej1-x634.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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, then proceeds with machine-specific device models and concludes with more or less loosely related devices. Device cleanup mostly consists of using the DEFINE_TYPES() macro. [1] https://github.com/shentok/qemu/tree/e500-fdt Bernhard Beschow (23): hw/ppc/e500: Do not leak struct boot_info hw/ppc/e500: Reduce scope of env pointer hw/ppc/e500: Prefer QOM cast hw/ppc/e500: Remove unused "irqs" parameter hw/ppc/e500: Add missing device tree properties to i2c controller node hw/ppc/e500: Use SysBusDevice API to access TYPE_CCSR's internal resources hw/ppc/e500: Extract ppce500_ccsr.c hw/ppc/ppce500_ccsr: Log access to unimplemented registers hw/ppc/mpc8544_guts: Populate POR PLL ratio status register hw/i2c/mpc_i2c: Convert DPRINTF to trace events for register access hw/i2c/mpc_i2c: Prefer DEFINE_TYPES() macro hw/pci-host/ppce500: Reuse TYPE_PPC_E500_PCI_BRIDGE define hw/pci-host/ppce500: Prefer DEFINE_TYPES() macro hw/gpio/mpc8xxx: Prefer DEFINE_TYPES() macro hw/ppc/mpc8544_guts: Prefer DEFINE_TYPES() macro hw/net/fsl_etsec/etsec: Prefer DEFINE_TYPES() macro hw/intc: Guard openpic_kvm.c by dedicated OPENPIC_KVM Kconfig switch hw/sd/sdhci: Prefer DEFINE_TYPES() macro hw/block/pflash_cfi01: Prefer DEFINE_TYPES() macro hw/i2c/smbus_eeprom: Prefer DEFINE_TYPES() macro hw/rtc/ds1338: Prefer DEFINE_TYPES() macro hw/usb/hcd-ehci-sysbus: Prefer DEFINE_TYPES() macro hw/vfio/platform: Let vfio_start_eventfd_injection() take VFIOPlatformDevice pointer MAINTAINERS | 2 +- hw/ppc/e500-ccsr.h | 2 + hw/ppc/e500.h | 8 +++ hw/block/pflash_cfi01.c | 21 +++---- hw/gpio/mpc8xxx.c | 22 +++----- hw/i2c/mpc_i2c.c | 29 +++++----- hw/i2c/smbus_eeprom.c | 19 +++---- hw/net/fsl_etsec/etsec.c | 22 +++----- hw/pci-host/ppce500.c | 54 ++++++++---------- hw/ppc/e500.c | 61 +++++--------------- hw/ppc/mpc8544_guts.c | 32 +++++++---- hw/ppc/ppce500_ccsr.c | 67 ++++++++++++++++++++++ hw/rtc/ds1338.c | 20 +++---- hw/sd/sdhci.c | 62 +++++++++----------- hw/usb/hcd-ehci-sysbus.c | 118 +++++++++++++++++---------------------- hw/vfio/platform.c | 7 +-- hw/i2c/trace-events | 5 ++ hw/intc/Kconfig | 4 ++ hw/intc/meson.build | 3 +- hw/ppc/meson.build | 1 + hw/ppc/trace-events | 3 + 21 files changed, 285 insertions(+), 277 deletions(-) create mode 100644 hw/ppc/ppce500_ccsr.c