From patchwork Mon Jul 6 00:05:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Christophe Dubois X-Patchwork-Id: 491389 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 70026140DB4 for ; Mon, 6 Jul 2015 10:13:25 +1000 (AEST) Received: from localhost ([::1]:48071 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBu2F-0001RI-AL for incoming@patchwork.ozlabs.org; Sun, 05 Jul 2015 20:13:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36585) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBtuC-0003qC-Vi for qemu-devel@nongnu.org; Sun, 05 Jul 2015 20:05:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZBtuA-0003Zw-8H for qemu-devel@nongnu.org; Sun, 05 Jul 2015 20:05:04 -0400 Received: from zose-mta02.web4all.fr ([185.49.20.43]:46610) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBtuA-0003Xm-3H for qemu-devel@nongnu.org; Sun, 05 Jul 2015 20:05:02 -0400 Received: from localhost (localhost [127.0.0.1]) by zose-mta02.web4all.fr (Postfix) with ESMTP id ACCD54029E for ; Mon, 6 Jul 2015 02:05:01 +0200 (CEST) Received: from zose-mta02.web4all.fr ([127.0.0.1]) by localhost (zose-mta02.web4all.fr [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id oSKteEffDANc; Mon, 6 Jul 2015 02:05:01 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zose-mta02.web4all.fr (Postfix) with ESMTP id 553014071E; Mon, 6 Jul 2015 02:05:01 +0200 (CEST) X-Virus-Scanned: amavisd-new at zose-mta-02.w4a.fr Received: from zose-mta02.web4all.fr ([127.0.0.1]) by localhost (zose-mta02.web4all.fr [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id JqWCHNtj_nJq; Mon, 6 Jul 2015 02:05:01 +0200 (CEST) Received: from localhost.localdomain (smm49-1-78-235-240-156.fbx.proxad.net [78.235.240.156]) by zose-mta02.web4all.fr (Postfix) with ESMTPSA id 232A34029E; Mon, 6 Jul 2015 02:05:01 +0200 (CEST) From: Jean-Christophe Dubois To: qemu-devel@nongnu.org Date: Mon, 6 Jul 2015 02:05:00 +0200 Message-Id: <9977fa8a82dd525f7702337570c983e227209920.1436138841.git.jcd@tribudubois.net> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 185.49.20.43 Cc: Jean-Christophe Dubois Subject: [Qemu-devel] [PATCH v10 09/21] i.MX: Move Qdev EPIT construction helper as inline function. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 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 Signed-off-by: Jean-Christophe Dubois --- Changes since v1: * not present on v1 Changes since v2: * not present on v2 Changes since v3: * not present on v3 Changes since v4: * not present on v4 Changes since v5: * not present on v5 Changes since v6: * not present on v6 Changes since v7: * not present on v7 Changes since v8: * remove qdev construction helper Changes since v9: * Qdev construction helper is reintegrated and moved to a header file as an inline function. hw/timer/imx_epit.c | 11 ----------- include/hw/arm/imx.h | 17 ++++++++++++++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/hw/timer/imx_epit.c b/hw/timer/imx_epit.c index f1f82e9..68dc0bc 100644 --- a/hw/timer/imx_epit.c +++ b/hw/timer/imx_epit.c @@ -12,7 +12,6 @@ * */ -#include "hw/arm/imx.h" #include "hw/timer/imx_epit.h" #include "hw/misc/imx_ccm.h" #include "qemu/main-loop.h" @@ -287,16 +286,6 @@ static void imx_epit_cmp(void *opaque) imx_epit_update_int(s); } -void imx_timerp_create(const hwaddr addr, qemu_irq irq, DeviceState *ccm) -{ - IMXEPITState *pp; - DeviceState *dev; - - dev = sysbus_create_simple(TYPE_IMX_EPIT, addr, irq); - pp = IMX_EPIT(dev); - pp->ccm = ccm; -} - static const MemoryRegionOps imx_epit_ops = { .read = imx_epit_read, .write = imx_epit_write, diff --git a/include/hw/arm/imx.h b/include/hw/arm/imx.h index 0e8cc5a..c6cb192 100644 --- a/include/hw/arm/imx.h +++ b/include/hw/arm/imx.h @@ -15,6 +15,7 @@ #include "hw/sysbus.h" #include "hw/char/imx_serial.h" #include "hw/misc/imx_ccm.h" +#include "hw/timer/imx_epit.h" /*** * This Qdev construction helper is going to be removed soon @@ -41,12 +42,22 @@ static inline void imx_serial_create(int uart, const hwaddr addr, qemu_irq irq) } } +static inline void imx_timerp_create(const hwaddr addr, qemu_irq irq, - DeviceState *ccm); + DeviceState *ccm) +{ + IMXEPITState *pp; + DeviceState *dev; + + dev = sysbus_create_simple(TYPE_IMX_EPIT, addr, irq); + pp = IMX_EPIT(dev); + pp->ccm = ccm; +} + void imx_timerg_create(const hwaddr addr, - qemu_irq irq, - DeviceState *ccm); + qemu_irq irq, + DeviceState *ccm);