From patchwork Tue Sep 15 13:04:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pieter De Gendt X-Patchwork-Id: 1364335 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; 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.a=rsa-sha256 header.s=20161025 header.b=JO/G1bHn; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrNjb18wtz9sSs for ; Tue, 15 Sep 2020 23:04:34 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 71DA186322; Tue, 15 Sep 2020 13:04:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cVdCBQlGvME2; Tue, 15 Sep 2020 13:04:28 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 8E267864F4; Tue, 15 Sep 2020 13:04:28 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id D9F071BF842 for ; Tue, 15 Sep 2020 13:04:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D6297864F4 for ; Tue, 15 Sep 2020 13:04:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zkpeJnspYGp1 for ; Tue, 15 Sep 2020 13:04:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ej1-f65.google.com (mail-ej1-f65.google.com [209.85.218.65]) by whitealder.osuosl.org (Postfix) with ESMTPS id C73EA86322 for ; Tue, 15 Sep 2020 13:04:25 +0000 (UTC) Received: by mail-ej1-f65.google.com with SMTP id lo4so4927278ejb.8 for ; Tue, 15 Sep 2020 06:04:25 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=6KdLzujSeBE3ejw+KhS/8cQ1cixLh3+0iL9BdUcVAqo=; b=JO/G1bHnNQR3KaywYARd7vi6fTqmPW1g6hikJ6z7sMqsj9IV6Td6gANi4d2yLtZjx8 Oe5QBn2Yn/7IiFCL/v9ygqFO2+lR23FHJ6g5TgbdMwvZj/x4/lyKIj1joiEs5OtgZgyi aTlKgd2eoAHpfhhKSB5gZFhkQqgFmQV7IbobDEA7yfnS0igI9/CIWO+kGaOFu+5vp2+G 7RtZvYEMlXrQLROr+7NksSx8+85obvx20sODmBaF5AL33b3yGRwEYKaquuj2kQlkHGRY rf8j89prLkaGV/fhVZrp5krOdHPOMFZfhnx1lfujHb3xlKoPfqQwQZvFI4yw/fxbaZVS jKQg== 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:mime-version:content-transfer-encoding; bh=6KdLzujSeBE3ejw+KhS/8cQ1cixLh3+0iL9BdUcVAqo=; b=FtajIxMmTTzw67SZGONbt+qcywqm9h3I00Jo6xnjDv0MMKS517b8AaghSLS/m9AbnD BuySz6Oya5/7Tw+CquLLODuflF9haMISfmGg+hzx/RBGpWpXN52sz0F09HEahqrC4qSk FF4Fbxu4e00tDtWNqYSv0iM1mAkZSlvx0hdNc5WmCQU7BNy91lVgzBYhhziVj22lKMoH 7XCkQKr4NTPU5lC3tZSbgXBB/0YXCEUXt9u3SOKR1os4Lxwkhoi4fGXqoTQXU8sUX3o9 lXSDw9octs7CQishMT5crNp5dIW/o37/H8UejuhpyAg6w4xMJisuygUnlbUhdB/JfG/n eONA== X-Gm-Message-State: AOAM532NdNbCWu1zFX7g8bD9eLJaXSrPO4ZWytiWfBNnGXxNfkXJPEy7 eNGs3x+sA8znY9rb9Yo6XJdYVzOtsIk= X-Google-Smtp-Source: ABdhPJwKaG+6y7cb9siuIyYieozOeZnQselov5wS45hAIcfEba1OV37IfXQa4XUAQYiR3xEQF4WD9A== X-Received: by 2002:a17:906:2747:: with SMTP id a7mr19667959ejd.301.1600175063624; Tue, 15 Sep 2020 06:04:23 -0700 (PDT) Received: from pdgendt-dev.basalte.local (d5152f4f9.static.telenet.be. [81.82.244.249]) by smtp.gmail.com with ESMTPSA id r16sm10355854ejb.110.2020.09.15.06.04.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 06:04:22 -0700 (PDT) From: Pieter De Gendt X-Google-Original-From: Pieter De Gendt To: buildroot@buildroot.org Date: Tue, 15 Sep 2020 15:04:14 +0200 Message-Id: <20200915130414.3286332-1-pieter.degendt@basalte.be> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200910141843.3030855-1-pieter.degendt@basalte.be> References: <20200910141843.3030855-1-pieter.degendt@basalte.be> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 1/1] package/freescale-imx/firmware-imx: custom padding X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Refik Tuzakli , Pieter De Gendt , Tibault Damman , Gary Bisson Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Tibault Damman Some derivatives (such as Variscite imx8mm) expect the (LP)DDR4 training data to be padded to a different length. eg: https://github.com/varigit/uboot-imx/commit/5f8d814f This patch makes the padding length configurable. Signed-off-by: Tibault Damman Signed-off-by: Pieter De Gendt Reviewed-by: Gary Bisson Tested-by: Stephane Viau --- Changes v1 -> v2: - improved description - renamed variables to match U-Boot (suggested by Gary Bisson) Signed-off-by: Pieter De Gendt --- package/freescale-imx/firmware-imx/Config.in | 12 ++++++++++++ package/freescale-imx/firmware-imx/firmware-imx.mk | 6 ++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/package/freescale-imx/firmware-imx/Config.in b/package/freescale-imx/firmware-imx/Config.in index 5becf8b6a9..587f402426 100644 --- a/package/freescale-imx/firmware-imx/Config.in +++ b/package/freescale-imx/firmware-imx/Config.in @@ -69,6 +69,18 @@ config BR2_PACKAGE_FIRMWARE_IMX_DDR4 endchoice # DDR training FW +config BR2_PACKAGE_FIRMWARE_IMX_IMEM_LEN + hex "(LP)DDR IMEM padding length" + default 0x8000 + help + The IMEM firmware will be padded to this length + +config BR2_PACKAGE_FIRMWARE_IMX_DMEM_LEN + hex "(LP)DDR DMEM padding length" + default 0x4000 + help + The DMEM firmware will be padded to this length + endif # BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW endif # BR2_PACKAGE_FIRMWARE_IMX diff --git a/package/freescale-imx/firmware-imx/firmware-imx.mk b/package/freescale-imx/firmware-imx/firmware-imx.mk index eb8595f022..fb3cfe640b 100644 --- a/package/freescale-imx/firmware-imx/firmware-imx.mk +++ b/package/freescale-imx/firmware-imx/firmware-imx.mk @@ -23,10 +23,12 @@ endef # define FIRMWARE_IMX_PREPARE_DDR_FW - $(TARGET_OBJCOPY) -I binary -O binary --pad-to 0x8000 --gap-fill=0x0 \ + $(TARGET_OBJCOPY) -I binary -O binary \ + --pad-to $(BR2_PACKAGE_FIRMWARE_IMX_IMEM_LEN) --gap-fill=0x0 \ $(FIRMWARE_IMX_DDRFW_DIR)/$(strip $(1)).bin \ $(FIRMWARE_IMX_DDRFW_DIR)/$(strip $(1))_pad.bin - $(TARGET_OBJCOPY) -I binary -O binary --pad-to 0x4000 --gap-fill=0x0 \ + $(TARGET_OBJCOPY) -I binary -O binary \ + --pad-to $(BR2_PACKAGE_FIRMWARE_IMX_DMEM_LEN) --gap-fill=0x0 \ $(FIRMWARE_IMX_DDRFW_DIR)/$(strip $(2)).bin \ $(FIRMWARE_IMX_DDRFW_DIR)/$(strip $(2))_pad.bin cat $(FIRMWARE_IMX_DDRFW_DIR)/$(strip $(1))_pad.bin \