From patchwork Thu Nov 28 13:56:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1202073 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) 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="cqB4OZcH"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 47Nzhv1hTgz9sP6 for ; Fri, 29 Nov 2019 00:57:03 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id E2E5CC22063; Thu, 28 Nov 2019 13:56:40 +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_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 3F067C220C4; Thu, 28 Nov 2019 13:56:30 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 67A31C21ECA; Thu, 28 Nov 2019 13:56:26 +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 16D4FC21C29 for ; Thu, 28 Nov 2019 13:56:26 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id g206so11077647wme.1 for ; Thu, 28 Nov 2019 05:56:26 -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:in-reply-to:references; bh=6SVkeGGqZ44hwvlLnDNlfxLlcOTlgdFslSmmjFeG7zY=; b=cqB4OZcHvk2dDQg428HmqcDHPpc63pherbg7DF46MEnftS3P5deCQG4oOsL6gDshzT mVsUR9792Bxg6Co9obFIjEnNIejBuIATElaaE/HFQGaH/SSfD8L8ejPM4BCj7iKG4NIv yDQKjuQ+Q6l8vGjLyCCJ4x84LDkHfmnfhCiNs/+xRpK5eJM8g98KU0yeUsx5yJohC8dA eIXglOEe5Bsunu5zrVEzuWv3didMwAzjwOA6PRKf4q9NXBZrSSJJjkh3Mwyh08sdyV6o z2DXq1S7MwuVmrNKHaEp6uyZPB1WaHpihw//mk1WlipenYdKGXYgXF+UTvRnl/k9Y+h+ 7LuQ== 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:in-reply-to :references; bh=6SVkeGGqZ44hwvlLnDNlfxLlcOTlgdFslSmmjFeG7zY=; b=VBuDj4yfSmEx0Mx1NCSGDdwrSSy/AzixCBz8n3b3sTjKS6oulvprGYXYnCaJKTGAf5 9HMw56fv0rfLtsrKiP7OCFg9uObiMrRTLXUOCklioiOk27yOQrV7Tov9b7BxrwJhMvGv gJjbla5ZqUmnlFVQ1jr98unZHZC+3sOdU8FDLNvsLhmqqkRKr6GyT0KjnknQlKTRwPXe tmWJsHLaQdYYmMhnr834Ub9xppRF+AVonfLmyO9E1VxquC1bQqGNU7ffqyh53thN19Qb t06o3L6dxtqTKHSOTrgXEcCggCqyqJh1OZPfIfnPDr793FfgzaAITWxI2+EkOtWh3dGf nPLQ== X-Gm-Message-State: APjAAAVYICVCBmyKEkS4foAb+4mx+9i5Mp1rjZwSLDJwDm/uQOevp0P3 FPZAX0A6o2RNEDqAGNIZWeqsR5yzusA= X-Google-Smtp-Source: APXvYqwVuCbJ0CLv+E9bNkGl7dLeC86qaahdGTyAQdDNwAaycbGr/6lReCu89ciOhkLw26+yd3aJLQ== X-Received: by 2002:a1c:3d87:: with SMTP id k129mr10215229wma.26.1574949385359; Thu, 28 Nov 2019 05:56:25 -0800 (PST) Received: from localhost ([194.105.145.90]) by smtp.gmail.com with ESMTPSA id w12sm10510061wmi.17.2019.11.28.05.56.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Nov 2019 05:56:24 -0800 (PST) From: Igor Opaniuk To: u-boot@lists.denx.de Date: Thu, 28 Nov 2019 15:56:20 +0200 Message-Id: <20191128135621.12719-2-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191128135621.12719-1-igor.opaniuk@gmail.com> References: <20191128135621.12719-1-igor.opaniuk@gmail.com> Cc: "NXP i.MX U-Boot Team" , Marcel Ziswiler , Igor Opaniuk , Max Krummenacher Subject: [U-Boot] [PATCH v2 2/3] mach-imx: bootaux: add dcache flushing before enabling M4 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" From: Igor Opaniuk This patch fixes the issue with broken bootaux command, when M4 binary is loaded and data cache isn't flushed before M4 core is enabled. Reproducing: > tftpboot ${loadaddr} ${board_name}/hello_world.bin > cp.b ${loadaddr} 0x7F8000 $filesize > bootaux 0x7F8000 Signed-off-by: Igor Opaniuk Reviewed-by: Oleksandr Suvorov --- arch/arm/mach-imx/imx_bootaux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-imx/imx_bootaux.c b/arch/arm/mach-imx/imx_bootaux.c index ee786f7d06..c750cee60c 100644 --- a/arch/arm/mach-imx/imx_bootaux.c +++ b/arch/arm/mach-imx/imx_bootaux.c @@ -27,6 +27,8 @@ int arch_auxiliary_core_up(u32 core_id, ulong boot_private_data) writel(stack, M4_BOOTROM_BASE_ADDR); writel(pc, M4_BOOTROM_BASE_ADDR + 4); + flush_dcache_all(); + /* Enable M4 */ #ifdef CONFIG_IMX8M call_imx_sip(IMX_SIP_SRC, IMX_SIP_SRC_M4_START, 0, 0, 0);