From patchwork Sun Sep 24 14:47:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Cave-Ayland X-Patchwork-Id: 817908 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3y0VVC3nqkz9sDB for ; Mon, 25 Sep 2017 00:49:23 +1000 (AEST) Received: from localhost ([::1]:38417 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dw8Dh-000341-CD for incoming@patchwork.ozlabs.org; Sun, 24 Sep 2017 10:49:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57155) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dw8Cb-0002gu-LQ for qemu-devel@nongnu.org; Sun, 24 Sep 2017 10:48:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dw8Ca-0002Hb-NY for qemu-devel@nongnu.org; Sun, 24 Sep 2017 10:48:13 -0400 Received: from chuckie.co.uk ([82.165.15.123]:49760 helo=s16892447.onlinehome-server.info) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dw8CV-00027z-RV; Sun, 24 Sep 2017 10:48:07 -0400 Received: from host86-191-82-173.range86-191.btcentralplus.com ([86.191.82.173] helo=kentang.home) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1dw8CQ-0006gI-5f; Sun, 24 Sep 2017 15:48:03 +0100 From: Mark Cave-Ayland To: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, david@gibson.dropbear.id.au Date: Sun, 24 Sep 2017 15:47:39 +0100 Message-Id: <1506264466-28252-1-git-send-email-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 1.7.10.4 X-SA-Exim-Connect-IP: 86.191.82.173 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 82.165.15.123 Subject: [Qemu-devel] [PATCH 0/7] mac_dbdma: tidy-up and QOMify X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 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" Whilst looking at implementing another DBDMA device for the Mac machines I noticed a couple of things: firstly there were some unused fields still in DBDMAState, and secondly the existing code still used global functions to register DMA channels and handle the relationship between macio IDE and DBDMA. This patchset removes the now-unused fields from DBDMA state, QOMifys the DBDMA device, uses a QOM object link to allow the macio IDE object to reference the DBDMA device, and then finally removes the global DBDMA_* functions substituting them instead for QOM methods. Note: this patchset does not apply to master but on top of David's ppc-for-2.11 branch since there are merge conflicts with my previous patchset. Hopefully the Based-On line below is enough to keep patchew happy, even though it wasn't the final version applied to the ppc-for-2.11 branch. Signed-off-by: Mark Cave-Ayland Based-on: 1505668548-16616-1-git-send-email-mark.cave-ayland@ilande.co.uk (ppc: more Mac-related fixups) Mark Cave-Ayland (7): mac_dbdma: remove unused IO fields from DBDMAState mac_dbdma: QOMify mac_dbdma: remove DBDMA_init() function macio: pass channel into MACIOIDEState via qdev property macio: use object link between MACIO_IDE and MAC_DBDMA object mac_dbdma: change DBDMA_register_channel to a MAC_DBDMA type method mac_dbdma: change DBDMA_kick to a MAC_DBDMA type method hw/ide/macio.c | 26 ++++++++++----- hw/misc/macio/mac_dbdma.c | 79 +++++++++++++++++++++++++++++--------------- hw/misc/macio/macio.c | 20 ++++++++--- hw/ppc/mac.h | 4 +-- include/hw/ppc/mac_dbdma.h | 22 ++++++------ 5 files changed, 97 insertions(+), 54 deletions(-)