From patchwork Tue Nov 24 15:13:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Fiergolski X-Patchwork-Id: 1405607 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=fastree3d.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=fastree3d-com.20150623.gappssmtp.com header.i=@fastree3d-com.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=IPcc2t9s; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CgSHB2MMTz9sSf for ; Wed, 25 Nov 2020 02:14:22 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0460B825D0; Tue, 24 Nov 2020 16:14:08 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=fastree3d.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=fastree3d-com.20150623.gappssmtp.com header.i=@fastree3d-com.20150623.gappssmtp.com header.b="IPcc2t9s"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B8057825D8; Tue, 24 Nov 2020 16:14:05 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C9B74825C4 for ; Tue, 24 Nov 2020 16:14:02 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=fastree3d.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=adrian.fiergolski@fastree3d.com Received: by mail-wm1-x341.google.com with SMTP id a65so3239595wme.1 for ; Tue, 24 Nov 2020 07:14:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastree3d-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=pjBge3NnSHR+O9KlpmNu+jZ5C8WcTNwKWbM9vhHjc0A=; b=IPcc2t9s17Zg312/hbAqN6q7Q+qCA5x0v/b64tCzx/SftCclr5EGKuoU0UvVh4DLJO jvAS19KHkYpcmWFvzRkgULxcNErUXfV18n9AIhvMvoK2asz9YaEYnoLY1ClMY9x8ztN7 DX/yxrO2AsTlZJoFxrJs2mAx2qAQXzCZ0YuoCpYYUpYf2q+pifQvAV4Dw8PQzH7hQnhu LiZsceqQ0kpzmVqMJ/pLNJCbtanhLR8F3qrkw6CKX88QCzHQch62+7Y9U0ppxEF3jxZX c4jUJNLTxFsz/63VMy8gA0im5WPOYZtiSs1MJWiNaXikTXo9Dz5OSvw43QAgu+NMfH1K mbKQ== 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:mime-version :content-transfer-encoding; bh=pjBge3NnSHR+O9KlpmNu+jZ5C8WcTNwKWbM9vhHjc0A=; b=gVcmy5tOh+DC/Qpn2SR48GfZmQQhRAPodxLQHmVcgt5/edo7cPd17vY6zITDCPEzz0 CEC7UT/vcf+Bi7G53rmQnTaMDRV2/SArA3YemKP9L+ojFLUEKQlxKAaYj+BWKNP/iXs7 QHnf/d99EfbsmrGI2zwbjzdoDEFB/bweIgO0qtPKeZ56it2CwDY9C67GPbbBWBVaaiuu YM5uhTc62yC5OyVF8mxnGctjusRikM7sCOA3LgRYoKv4fnDrI24KRZ/ZdOf8XV1xVmS9 7Vs5voGAs7Rp+O5BYL2undQjsQK1BlIq2QjTnnF9QIiuFT4vf6KEUFZOpIlY+DwrM4As H+Ig== X-Gm-Message-State: AOAM530+tebDXtwG+hHbdwaXZRMboTxPEktywH+3zSv65mI44ACFQqWk pWfBYGO/zlwef/tBVWmpkmCszHCBLXDU X-Google-Smtp-Source: ABdhPJx5DJbuPdTqkE8BF52qk20NQ68kSgHap5MOj+YExBQqFzPr93dpBjauqKiC05EDRq1ApmT/zA== X-Received: by 2002:a1c:1982:: with SMTP id 124mr4942131wmz.74.1606230841750; Tue, 24 Nov 2020 07:14:01 -0800 (PST) Received: from adrian-laptop.lan (92.234.197.178.dynamic.wless.lssmb00p-cgnat.res.cust.swisscom.ch. [178.197.234.92]) by smtp.gmail.com with ESMTPSA id d3sm25786504wre.91.2020.11.24.07.13.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Nov 2020 07:13:59 -0800 (PST) From: Adrian Fiergolski To: u-boot@lists.denx.de Cc: luca@lucaceresoli.net, michal.simek@xilinx.com, Adrian Fiergolski Subject: [PATCH v2] tools: zynqmp: Fix regex expression around XPm_ConfigObject. Date: Tue, 24 Nov 2020 16:13:07 +0100 Message-Id: <20201124151306.153988-1-adrian.fiergolski@fastree3d.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean The XPm_ConfigObject array definition generated by Vitis 2020.1 differs from previous Vivado versions (before 2019.2). -const u32 XPm_ConfigObject[] __attribute__((used, section(".sys_cfg_data"))) = { +const u32 XPm_ConfigObject[] __attribute__((used, section(".sys_cfg_data"))) = +#elif defined (__ICCARM__) +#pragma location = ".sys_cfg_data" +__root const u32 XPm_ConfigObject[] = +#endif +{ Change the matching regex to handle both cases. Signed-off-by: Adrian Fiergolski Reviewed-by: Luca Ceresoli --- Changes in v2: Fix the patch tile. tools/zynqmp_pm_cfg_obj_convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/zynqmp_pm_cfg_obj_convert.py b/tools/zynqmp_pm_cfg_obj_convert.py index dd27f47921..0a44710e1e 100755 --- a/tools/zynqmp_pm_cfg_obj_convert.py +++ b/tools/zynqmp_pm_cfg_obj_convert.py @@ -289,7 +289,7 @@ code = in_file.read() code = re.sub('//.*?\n|/\*.*?\*/', '', code, flags=re.DOTALL) # remove everything outside the XPm_ConfigObject array definition -code = re.search('const u32 XPm_ConfigObject.*= {\n(.*)};', +code = re.search('const u32 XPm_ConfigObject.*=.*{\n(.*)};', code, flags=re.DOTALL).group(1) # Process each comma-separated array item