From patchwork Mon Jul 6 00:05:06 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: 491394 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 3FB261402A1 for ; Mon, 6 Jul 2015 10:41:43 +1000 (AEST) Received: from localhost ([::1]:48091 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBu44-0004v2-Ou for incoming@patchwork.ozlabs.org; Sun, 05 Jul 2015 20:15:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBtuI-00040R-9z for qemu-devel@nongnu.org; Sun, 05 Jul 2015 20:05:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZBtuG-000445-RM for qemu-devel@nongnu.org; Sun, 05 Jul 2015 20:05:10 -0400 Received: from zose-mta03.web4all.fr ([185.49.20.44]:48080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBtuG-00043N-J8 for qemu-devel@nongnu.org; Sun, 05 Jul 2015 20:05:08 -0400 Received: from localhost (localhost [127.0.0.1]) by zose-mta03.web4all.fr (Postfix) with ESMTP id 2A9AE412FB for ; Mon, 6 Jul 2015 02:05:08 +0200 (CEST) Received: from zose-mta03.web4all.fr ([127.0.0.1]) by localhost (zose-mta03.web4all.fr [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 3yP0o-AuyBjg; Mon, 6 Jul 2015 02:05:07 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zose-mta03.web4all.fr (Postfix) with ESMTP id CD98F414A2; Mon, 6 Jul 2015 02:05:07 +0200 (CEST) X-Virus-Scanned: amavisd-new at zose-mta-03.w4a.fr Received: from zose-mta03.web4all.fr ([127.0.0.1]) by localhost (zose-mta03.web4all.fr [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 39HNYUKmGAAf; Mon, 6 Jul 2015 02:05:07 +0200 (CEST) Received: from localhost.localdomain (smm49-1-78-235-240-156.fbx.proxad.net [78.235.240.156]) by zose-mta03.web4all.fr (Postfix) with ESMTPSA id 9D2AD412FB; Mon, 6 Jul 2015 02:05:07 +0200 (CEST) From: Jean-Christophe Dubois To: qemu-devel@nongnu.org Date: Mon, 6 Jul 2015 02:05:06 +0200 Message-Id: <95bca1622280d88cf214a3b71870e16ae9f4e5aa.1436138842.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.44 Cc: Jean-Christophe Dubois Subject: [Qemu-devel] [PATCH v10 12/21] i.MX: Move Qdev GPT 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_gpt.c | 11 ----------- include/hw/arm/imx.h | 12 ++++++++++-- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/hw/timer/imx_gpt.c b/hw/timer/imx_gpt.c index f61d4e5..218607b 100644 --- a/hw/timer/imx_gpt.c +++ b/hw/timer/imx_gpt.c @@ -12,7 +12,6 @@ * */ -#include "hw/arm/imx.h" #include "hw/timer/imx_gpt.h" #include "hw/misc/imx_ccm.h" #include "qemu/main-loop.h" @@ -449,16 +448,6 @@ static void imx_gpt_realize(DeviceState *dev, Error **errp) s->timer = ptimer_init(bh); } -void imx_timerg_create(const hwaddr addr, qemu_irq irq, DeviceState *ccm) -{ - IMXGPTState *pp; - DeviceState *dev; - - dev = sysbus_create_simple(TYPE_IMX_GPT, addr, irq); - pp = IMX_GPT(dev); - pp->ccm = ccm; -} - static void imx_gpt_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); diff --git a/include/hw/arm/imx.h b/include/hw/arm/imx.h index c6cb192..b7aa4b6 100644 --- a/include/hw/arm/imx.h +++ b/include/hw/arm/imx.h @@ -16,6 +16,7 @@ #include "hw/char/imx_serial.h" #include "hw/misc/imx_ccm.h" #include "hw/timer/imx_epit.h" +#include "hw/timer/imx_gpt.h" /*** * This Qdev construction helper is going to be removed soon @@ -55,10 +56,17 @@ void imx_timerp_create(const hwaddr addr, pp->ccm = ccm; } +static inline void imx_timerg_create(const hwaddr addr, qemu_irq irq, - DeviceState *ccm); - + DeviceState *ccm) +{ + IMXGPTState *pp; + DeviceState *dev; + dev = sysbus_create_simple(TYPE_IMX_GPT, addr, irq); + pp = IMX_GPT(dev); + pp->ccm = ccm; +} #endif /* IMX_H */