From patchwork Wed Jul 9 03:37:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 368066 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 9FB6D140087 for ; Wed, 9 Jul 2014 13:41:06 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9FEF4AB612; Wed, 9 Jul 2014 05:40:48 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v8yTQhgMCxx2; Wed, 9 Jul 2014 05:40:48 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9D072AB613; Wed, 9 Jul 2014 05:39:22 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EB2C4A74F2 for ; Wed, 9 Jul 2014 05:39:15 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2w2jEmmix6Bb for ; Wed, 9 Jul 2014 05:39:12 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-vc0-f201.google.com (mail-vc0-f201.google.com [209.85.220.201]) by theia.denx.de (Postfix) with ESMTPS id D3BD2AB5D4 for ; Wed, 9 Jul 2014 05:38:58 +0200 (CEST) Received: by mail-vc0-f201.google.com with SMTP id ij19so981388vcb.4 for ; Tue, 08 Jul 2014 20:38:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mLGdo3C2fewHV66WVy3uhnu2juqePKzHyDuZ0lpHIoQ=; b=BzlII5M34XeC1/8IHFnF14IkKTdriNT7E9EOjmKhKXTqcMKpdx7QDHkBEFHoDDAwf8 srkqK0DrZ/zE9EwAGL5qvVA5a7VJgchFg8XSWnkoImW7P3xdK0Mpzdv6yCAB5XCS45DO UdK1aA5x8UgAql/wlqNXwS3U3c43F33GEJbgqr3JYjtRAC+Cln2KkeEsOl9/8m01/dWb b4IdDH+Wyc/1uHGKEjfr3HoovNrgz8PyATFxnxtvTy/4Pui/HzkdzsncmomtQpVkyBMd JWIYVdSqdVVkJH84EEZMNCGlH2tlYrOsg/Ljl12/KLrMJy8rhSgTYiHi+WGq0Razt5O7 LbMA== X-Gm-Message-State: ALoCoQltpPPqh7DVjg06iNK6muEeRWWV0rllLFHXLBo+YX/hzWGgayscGKJUS3PadUBUDczZZvaM X-Received: by 10.58.48.194 with SMTP id o2mr18566845ven.16.1404877135994; Tue, 08 Jul 2014 20:38:55 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id b39si2683086yhj.0.2014.07.08.20.38.55 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 08 Jul 2014 20:38:55 -0700 (PDT) Received: from kaki.bld.corp.google.com (kaki.bld.corp.google.com [172.29.216.32]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 382AB31C4BE; Tue, 8 Jul 2014 20:38:55 -0700 (PDT) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id ABAC22206A7; Tue, 8 Jul 2014 21:38:54 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Tue, 8 Jul 2014 21:37:52 -0600 Message-Id: <1404877099-7314-3-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.0.0.526.g5318336 In-Reply-To: <1404877099-7314-1-git-send-email-sjg@chromium.org> References: <1404877099-7314-1-git-send-email-sjg@chromium.org> Subject: [U-Boot] [PATCH v2 02/29] dm: Use an explicit expect value in core tests X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Rather than reusing the 'reg' property, use an explicit property for the expected ping value used in testing. Signed-off-by: Simon Glass --- Changes in v2: None test/dm/test-fdt.c | 13 ++++++++----- test/dm/test.dts | 5 ++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c index 98e3936..0f50537 100644 --- a/test/dm/test-fdt.c +++ b/test/dm/test-fdt.c @@ -39,7 +39,8 @@ static int testfdt_ofdata_to_platdata(struct udevice *dev) pdata->ping_add = fdtdec_get_int(gd->fdt_blob, dev->of_offset, "ping-add", -1); - pdata->base = fdtdec_get_addr(gd->fdt_blob, dev->of_offset, "reg"); + pdata->base = fdtdec_get_addr(gd->fdt_blob, dev->of_offset, + "ping-expect"); return 0; } @@ -127,11 +128,13 @@ static int dm_test_fdt(struct dm_test_state *dms) ut_assert(!ret); /* - * Get the 'reg' property, which tells us what the ping add - * should be. We don't use the platdata because we want - * to test the code that sets that up (testfdt_drv_probe()). + * Get the 'ping-expect' property, which tells us what the + * ping add should be. We don't use the platdata because we + * want to test the code that sets that up + * (testfdt_drv_probe()). */ - base = fdtdec_get_addr(gd->fdt_blob, dev->of_offset, "reg"); + base = fdtdec_get_addr(gd->fdt_blob, dev->of_offset, + "ping-expect"); debug("dev=%d, base=%d: %s\n", i, base, fdt_get_name(gd->fdt_blob, dev->of_offset, NULL)); diff --git a/test/dm/test.dts b/test/dm/test.dts index ec5364f..74d236b 100644 --- a/test/dm/test.dts +++ b/test/dm/test.dts @@ -9,6 +9,7 @@ a-test { reg = <0>; compatible = "denx,u-boot-fdt-test"; + ping-expect = <0>; ping-add = <0>; }; @@ -24,13 +25,14 @@ b-test { reg = <3>; compatible = "denx,u-boot-fdt-test"; + ping-expect = <3>; ping-add = <3>; }; some-bus { #address-cells = <1>; #size-cells = <0>; - reg = <4>; + ping-expect = <4>; ping-add = <4>; c-test { compatible = "denx,u-boot-fdt-test"; @@ -41,6 +43,7 @@ d-test { reg = <6>; + ping-expect = <6>; ping-add = <6>; compatible = "google,another-fdt-test"; };