From patchwork Mon Jan 21 09:07:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Goldschmidt X-Patchwork-Id: 1028502 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="qzIXS7s1"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 43jm1D4cgtz9s55 for ; Mon, 21 Jan 2019 20:08:16 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 3B2F8C21E44; Mon, 21 Jan 2019 09:08:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 411EEC21DA2; Mon, 21 Jan 2019 09:08:05 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 9B819C21DAF; Mon, 21 Jan 2019 09:08:04 +0000 (UTC) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by lists.denx.de (Postfix) with ESMTPS id 3FB06C21DA2 for ; Mon, 21 Jan 2019 09:08:04 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id f188so9893003wmf.5 for ; Mon, 21 Jan 2019 01:08:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=b6ei/1bH/72biGN2c01i2W6KHVCeYS1A82Dnpps0EUw=; b=qzIXS7s1yxOoq82JKTE+Ips4sr9sLDc6yduJe2cg6c5X+ac5NLDsxXbWj15sRphGMk IxPf5QA2f2qkMhFh2lBRtW1G9QSBXvtfCLKmXnGGnh919HDFB0tPlh0qfIFS0CnYV4D/ qA2/tn1fkrOoVT15zP/ynu8mNXFM6IeYEf+mgY9ykPnGInbjFNoGwJhddXWfAD2bx3ls rkx/xkqJX+nAL2+XmmtceCDBawznj5l+72khmD+tSyg9xeZ43KeANfTfUc7iF7u+mMxI A8UnrpmJYZtIdYRK9c2p61KMPUvzXmp5h0x5kfyuGbaY9nmZD285A7twByld5H5atTJ+ o2Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=b6ei/1bH/72biGN2c01i2W6KHVCeYS1A82Dnpps0EUw=; b=sLKifYCdKZwACsyIj4b1RJ62OgTVFzy6XMydMhjhCT6O438ohJbrcBGPH/cDrUPpNR UVyKIryRZEtF1ZS90FYxJGpcHCk4FXLMzORIL7s6cD1lTdiEruNqJTuHe6g+gIsFH6Gb hHhEL2tMd16Acl1c+YcjG06fiRP8KVsnSz/p+Dc85ANzGL8wcsVe/2TyNHugVdzR+tWv I1EVKJVp7h4SDSxoUf0/qqkmVoRjb2EjddC3LH4EayRbfUvwWfFxnpwHfLaPFX3HI3QB gebZGbuw3HIbc+mRCcwaEc6FBXrqbKob8y2r7AwOFx9GVX8ZTOfVRh4bDlFo5zMsSY2M 0rTQ== X-Gm-Message-State: AJcUukeN7y9ClnaEuf8OaJLmHt/adGV+xl9oM4V3jyT3PQZoSR9EPNgH jxI6oaKvBWs5FQcXN+xyMIE= X-Google-Smtp-Source: ALg8bN4qE6br9KxuWEiNTjOTlLxSMd7BzC0GvLxEC/Ogm/MedSeGtoBlkFKyXzvTC2O2SjAQWzCcoQ== X-Received: by 2002:a1c:2007:: with SMTP id g7mr23306657wmg.79.1548061683699; Mon, 21 Jan 2019 01:08:03 -0800 (PST) Received: from ubuntu.home ([2a02:8071:6a3:700:8c22:ee0c:efc8:ed86]) by smtp.gmail.com with ESMTPSA id r77sm63938439wmd.22.2019.01.21.01.08.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Jan 2019 01:08:03 -0800 (PST) From: Simon Goldschmidt To: Simon Glass , u-boot@lists.denx.de Date: Mon, 21 Jan 2019 10:07:55 +0100 Message-Id: <20190121090755.31376-1-simon.k.r.goldschmidt@gmail.com> X-Mailer: git-send-email 2.17.1 Subject: [U-Boot] [PATCH] tests: dtoc: adapt tests to changed dtoc output X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The dtoc tests need to be adapted to dtoc being changed to output platdata structs as const, which has been introduced in commit 7d05d3a8e35f ("dtoc: make generated platdata structs const"). Fixes: 7d05d3a8e35f ("dtoc: make generated platdata structs const") Signed-off-by: Simon Goldschmidt Reviewed-by: Simon Glass Tested-by: Simon Glass --- tools/dtoc/test_dtoc.py | 54 ++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/tools/dtoc/test_dtoc.py b/tools/dtoc/test_dtoc.py index 11bead1260..cb6d6e7baf 100644 --- a/tools/dtoc/test_dtoc.py +++ b/tools/dtoc/test_dtoc.py @@ -196,7 +196,7 @@ struct dtd_sandbox_spl_test_2 { with open(output) as infile: data = infile.read() self._CheckStrings(C_HEADER + ''' -static struct dtd_sandbox_spl_test dtv_spl_test = { +static const struct dtd_sandbox_spl_test dtv_spl_test = { \t.bytearray\t\t= {0x6, 0x0, 0x0}, \t.byteval\t\t= 0x5, \t.intval\t\t\t= 0x1, @@ -214,7 +214,7 @@ U_BOOT_DEVICE(spl_test) = { \t.platdata_size\t= sizeof(dtv_spl_test), }; -static struct dtd_sandbox_spl_test dtv_spl_test2 = { +static const struct dtd_sandbox_spl_test dtv_spl_test2 = { \t.bytearray\t\t= {0x1, 0x23, 0x34}, \t.byteval\t\t= 0x8, \t.intval\t\t\t= 0x3, @@ -230,7 +230,7 @@ U_BOOT_DEVICE(spl_test2) = { \t.platdata_size\t= sizeof(dtv_spl_test2), }; -static struct dtd_sandbox_spl_test dtv_spl_test3 = { +static const struct dtd_sandbox_spl_test dtv_spl_test3 = { \t.stringarray\t\t= {"one", "", ""}, }; U_BOOT_DEVICE(spl_test3) = { @@ -239,7 +239,7 @@ U_BOOT_DEVICE(spl_test3) = { \t.platdata_size\t= sizeof(dtv_spl_test3), }; -static struct dtd_sandbox_spl_test_2 dtv_spl_test4 = { +static const struct dtd_sandbox_spl_test_2 dtv_spl_test4 = { }; U_BOOT_DEVICE(spl_test4) = { \t.name\t\t= "sandbox_spl_test_2", @@ -247,7 +247,7 @@ U_BOOT_DEVICE(spl_test4) = { \t.platdata_size\t= sizeof(dtv_spl_test4), }; -static struct dtd_sandbox_i2c_test dtv_i2c_at_0 = { +static const struct dtd_sandbox_i2c_test dtv_i2c_at_0 = { }; U_BOOT_DEVICE(i2c_at_0) = { \t.name\t\t= "sandbox_i2c_test", @@ -255,7 +255,7 @@ U_BOOT_DEVICE(i2c_at_0) = { \t.platdata_size\t= sizeof(dtv_i2c_at_0), }; -static struct dtd_sandbox_pmic_test dtv_pmic_at_9 = { +static const struct dtd_sandbox_pmic_test dtv_pmic_at_9 = { \t.low_power\t\t= true, \t.reg\t\t\t= {0x9, 0x0}, }; @@ -287,7 +287,7 @@ struct dtd_target { with open(output) as infile: data = infile.read() self._CheckStrings(C_HEADER + ''' -static struct dtd_target dtv_phandle_target = { +static const struct dtd_target dtv_phandle_target = { \t.intval\t\t\t= 0x0, }; U_BOOT_DEVICE(phandle_target) = { @@ -296,7 +296,7 @@ U_BOOT_DEVICE(phandle_target) = { \t.platdata_size\t= sizeof(dtv_phandle_target), }; -static struct dtd_target dtv_phandle2_target = { +static const struct dtd_target dtv_phandle2_target = { \t.intval\t\t\t= 0x1, }; U_BOOT_DEVICE(phandle2_target) = { @@ -305,7 +305,7 @@ U_BOOT_DEVICE(phandle2_target) = { \t.platdata_size\t= sizeof(dtv_phandle2_target), }; -static struct dtd_target dtv_phandle3_target = { +static const struct dtd_target dtv_phandle3_target = { \t.intval\t\t\t= 0x2, }; U_BOOT_DEVICE(phandle3_target) = { @@ -314,7 +314,7 @@ U_BOOT_DEVICE(phandle3_target) = { \t.platdata_size\t= sizeof(dtv_phandle3_target), }; -static struct dtd_source dtv_phandle_source = { +static const struct dtd_source dtv_phandle_source = { \t.clocks\t\t\t= { \t\t\t{&dtv_phandle_target, {}}, \t\t\t{&dtv_phandle2_target, {11}}, @@ -327,7 +327,7 @@ U_BOOT_DEVICE(phandle_source) = { \t.platdata_size\t= sizeof(dtv_phandle_source), }; -static struct dtd_source dtv_phandle_source2 = { +static const struct dtd_source dtv_phandle_source2 = { \t.clocks\t\t\t= { \t\t\t{&dtv_phandle_target, {}},}, }; @@ -363,7 +363,7 @@ struct dtd_target { with open(output) as infile: data = infile.read() self._CheckStrings(C_HEADER + ''' -static struct dtd_target dtv_phandle_target = { +static const struct dtd_target dtv_phandle_target = { }; U_BOOT_DEVICE(phandle_target) = { \t.name\t\t= "target", @@ -371,7 +371,7 @@ U_BOOT_DEVICE(phandle_target) = { \t.platdata_size\t= sizeof(dtv_phandle_target), }; -static struct dtd_source dtv_phandle_source2 = { +static const struct dtd_source dtv_phandle_source2 = { \t.clocks\t\t\t= { \t\t\t{&dtv_phandle_target, {}},}, }; @@ -422,7 +422,7 @@ struct dtd_compat1 { with open(output) as infile: data = infile.read() self._CheckStrings(C_HEADER + ''' -static struct dtd_compat1 dtv_spl_test = { +static const struct dtd_compat1 dtv_spl_test = { \t.intval\t\t\t= 0x1, }; U_BOOT_DEVICE(spl_test) = { @@ -456,7 +456,7 @@ struct dtd_test3 { with open(output) as infile: data = infile.read() self._CheckStrings(C_HEADER + ''' -static struct dtd_test1 dtv_test1 = { +static const struct dtd_test1 dtv_test1 = { \t.reg\t\t\t= {0x1234, 0x5678}, }; U_BOOT_DEVICE(test1) = { @@ -465,7 +465,7 @@ U_BOOT_DEVICE(test1) = { \t.platdata_size\t= sizeof(dtv_test1), }; -static struct dtd_test2 dtv_test2 = { +static const struct dtd_test2 dtv_test2 = { \t.reg\t\t\t= {0x1234567890123456, 0x9876543210987654}, }; U_BOOT_DEVICE(test2) = { @@ -474,7 +474,7 @@ U_BOOT_DEVICE(test2) = { \t.platdata_size\t= sizeof(dtv_test2), }; -static struct dtd_test3 dtv_test3 = { +static const struct dtd_test3 dtv_test3 = { \t.reg\t\t\t= {0x1234567890123456, 0x9876543210987654, 0x2, 0x3}, }; U_BOOT_DEVICE(test3) = { @@ -505,7 +505,7 @@ struct dtd_test2 { with open(output) as infile: data = infile.read() self._CheckStrings(C_HEADER + ''' -static struct dtd_test1 dtv_test1 = { +static const struct dtd_test1 dtv_test1 = { \t.reg\t\t\t= {0x1234, 0x5678}, }; U_BOOT_DEVICE(test1) = { @@ -514,7 +514,7 @@ U_BOOT_DEVICE(test1) = { \t.platdata_size\t= sizeof(dtv_test1), }; -static struct dtd_test2 dtv_test2 = { +static const struct dtd_test2 dtv_test2 = { \t.reg\t\t\t= {0x12345678, 0x98765432, 0x2, 0x3}, }; U_BOOT_DEVICE(test2) = { @@ -548,7 +548,7 @@ struct dtd_test3 { with open(output) as infile: data = infile.read() self._CheckStrings(C_HEADER + ''' -static struct dtd_test1 dtv_test1 = { +static const struct dtd_test1 dtv_test1 = { \t.reg\t\t\t= {0x123400000000, 0x5678}, }; U_BOOT_DEVICE(test1) = { @@ -557,7 +557,7 @@ U_BOOT_DEVICE(test1) = { \t.platdata_size\t= sizeof(dtv_test1), }; -static struct dtd_test2 dtv_test2 = { +static const struct dtd_test2 dtv_test2 = { \t.reg\t\t\t= {0x1234567890123456, 0x98765432}, }; U_BOOT_DEVICE(test2) = { @@ -566,7 +566,7 @@ U_BOOT_DEVICE(test2) = { \t.platdata_size\t= sizeof(dtv_test2), }; -static struct dtd_test3 dtv_test3 = { +static const struct dtd_test3 dtv_test3 = { \t.reg\t\t\t= {0x1234567890123456, 0x98765432, 0x2, 0x3}, }; U_BOOT_DEVICE(test3) = { @@ -600,7 +600,7 @@ struct dtd_test3 { with open(output) as infile: data = infile.read() self._CheckStrings(C_HEADER + ''' -static struct dtd_test1 dtv_test1 = { +static const struct dtd_test1 dtv_test1 = { \t.reg\t\t\t= {0x1234, 0x567800000000}, }; U_BOOT_DEVICE(test1) = { @@ -609,7 +609,7 @@ U_BOOT_DEVICE(test1) = { \t.platdata_size\t= sizeof(dtv_test1), }; -static struct dtd_test2 dtv_test2 = { +static const struct dtd_test2 dtv_test2 = { \t.reg\t\t\t= {0x12345678, 0x9876543210987654}, }; U_BOOT_DEVICE(test2) = { @@ -618,7 +618,7 @@ U_BOOT_DEVICE(test2) = { \t.platdata_size\t= sizeof(dtv_test2), }; -static struct dtd_test3 dtv_test3 = { +static const struct dtd_test3 dtv_test3 = { \t.reg\t\t\t= {0x12345678, 0x9876543210987654, 0x2, 0x3}, }; U_BOOT_DEVICE(test3) = { @@ -667,7 +667,7 @@ struct dtd_sandbox_spl_test { with open(output) as infile: data = infile.read() self._CheckStrings(C_HEADER + ''' -static struct dtd_sandbox_spl_test dtv_spl_test = { +static const struct dtd_sandbox_spl_test dtv_spl_test = { \t.intval\t\t\t= 0x1, }; U_BOOT_DEVICE(spl_test) = { @@ -676,7 +676,7 @@ U_BOOT_DEVICE(spl_test) = { \t.platdata_size\t= sizeof(dtv_spl_test), }; -static struct dtd_sandbox_spl_test dtv_spl_test2 = { +static const struct dtd_sandbox_spl_test dtv_spl_test2 = { \t.intarray\t\t= 0x5, }; U_BOOT_DEVICE(spl_test2) = {