From nobody Tue Feb 10 01:14:53 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1552930698762773.0478924819588; Mon, 18 Mar 2019 10:38:18 -0700 (PDT) Received: from localhost ([127.0.0.1]:45061 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5wDF-0001eP-Lq for importer@patchew.org; Mon, 18 Mar 2019 13:38:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5w4x-000454-FJ for qemu-devel@nongnu.org; Mon, 18 Mar 2019 13:29:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h5vrI-0003SG-GT for qemu-devel@nongnu.org; Mon, 18 Mar 2019 13:15:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41974) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h5vrH-0003RD-MP for qemu-devel@nongnu.org; Mon, 18 Mar 2019 13:15:32 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2EDB730832C8 for ; Mon, 18 Mar 2019 17:15:30 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-112-67.ams2.redhat.com [10.36.112.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7EACF5D717 for ; Mon, 18 Mar 2019 17:15:29 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 18 Mar 2019 18:15:14 +0100 Message-Id: <20190318171521.8524-7-pbonzini@redhat.com> In-Reply-To: <20190318171521.8524-1-pbonzini@redhat.com> References: <20190318171521.8524-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Mon, 18 Mar 2019 17:15:30 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 06/13] imx25-pdk: create ds1338 for qtest inside the test 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" There is no need to have a test device created by the board. Instead, create it in the qtest so that we will be able to run it on other boards too. Signed-off-by: Paolo Bonzini Reviewed-by: Thomas Huth --- hw/arm/imx25_pdk.c | 9 --------- tests/ds1338-test.c | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/hw/arm/imx25_pdk.c b/hw/arm/imx25_pdk.c index 9f3ee14739..65e1768663 100644 --- a/hw/arm/imx25_pdk.c +++ b/hw/arm/imx25_pdk.c @@ -132,15 +132,6 @@ static void imx25_pdk_init(MachineState *machine) */ if (!qtest_enabled()) { arm_load_kernel(&s->soc.cpu, &imx25_pdk_binfo); - } else { - /* - * This I2C device doesn't exist on the real board. - * We add it here (only on qtest usage) to be able to do a bit - * of simple qtest. See "make check" for details. - */ - i2c_create_slave((I2CBus *)qdev_get_child_bus(DEVICE(&s->soc.i2c[0= ]), - "i2c-bus.0"), - "ds1338", 0x68); } } =20 diff --git a/tests/ds1338-test.c b/tests/ds1338-test.c index 88f829f241..bd72a159cb 100644 --- a/tests/ds1338-test.c +++ b/tests/ds1338-test.c @@ -54,7 +54,7 @@ int main(int argc, char **argv) =20 g_test_init(&argc, &argv, NULL); =20 - s =3D qtest_start("-display none -machine imx25-pdk"); + s =3D qtest_start("-display none -machine imx25-pdk -device ds1338,add= ress=3D0x68"); i2c =3D imx_i2c_create(s, IMX25_I2C_0_BASE); addr =3D DS1338_ADDR; =20 --=20 2.20.1