From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D78B8C61DA4 for ; Sat, 11 Feb 2023 10:08:18 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E1C3E85718; Sat, 11 Feb 2023 11:08:06 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=emagii.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=emagii.com header.i=@emagii.com header.b="dhI4dxZn"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C9CC585708; Sat, 11 Feb 2023 11:07:59 +0100 (CET) Received: from emagii.se (www.emagii.com [185.133.207.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8CFDD8575A for ; Sat, 11 Feb 2023 11:07:53 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=emagii.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot@emagii.com Received: from valinor.ownit.se (84-55-68-216.customers.ownit.se [84.55.68.216]) by emagii.se (Postfix) with ESMTPSA id C09D4120256; Sat, 11 Feb 2023 11:07:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emagii.com; s=default; t=1676110073; bh=ZbrZK1s4U40dHHmZXCmf1UKyfHBiGhUCRSaw2pYnZ6Q=; h=From:To:Subject; b=dhI4dxZnb4Ny9AkNRrn01N2KHpx5SmI5Nj20cRNn9S5hs93vcHUYXSk74FZnmz61M 902ysXNoAxE4BpUUWKMYf5V0rAaoL9zyDm1vrDrX+ouXpYAMvmr+Wn2GiB0Jg4QNru cCnZJHYnfJ4zKtvDHuUNDpftIHayK49AAkRnNyOI= Authentication-Results: emagii.beebytevps.io; spf=pass (sender IP is 84.55.68.216) smtp.mailfrom=u-boot@emagii.com smtp.helo=valinor.ownit.se Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) From: u-boot@emagii.com To: u-boot@lists.denx.de Cc: marex@denx.de, monstr@monstr.eu, sjg@chromium.org, Ulf Samuelsson Subject: [PATCH 2/4] cmd/mtd.c: Support FPGAs in mtd command Date: Sat, 11 Feb 2023 11:07:41 +0100 Message-Id: <20230211100743.12087-3-u-boot@emagii.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230211100743.12087-1-u-boot@emagii.com> References: <20230211100743.12087-1-u-boot@emagii.com> X-PPP-Message-ID: <167611007311.3658141.2516652863918295689@localhost.localdomain> X-PPP-Vhost: emagii.com X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: u-boot@emagii.com Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean From: Ulf Samuelsson Signed-off-by: Ulf Samuelsson --- cmd/mtd.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/mtd.c b/cmd/mtd.c index eb6e2d6892..09d5fdaa11 100644 --- a/cmd/mtd.c +++ b/cmd/mtd.c @@ -158,6 +158,9 @@ static void mtd_show_device(struct mtd_info *mtd) case MTD_MLCNANDFLASH: printf("MLC NAND flash\n"); break; + case MTD_FPGA: + printf("FPGA\n"); + break; case MTD_ABSENT: default: printf("Unknown\n"); @@ -275,6 +278,11 @@ static int do_mtd_io(struct cmd_tbl *cmdtp, int flag, int argc, raw = strstr(cmd, ".raw"); woob = strstr(cmd, ".oob"); write_empty_pages = !has_pages || strstr(cmd, ".dontskipff"); + if (mtd->type == MTD_FPGA) { + raw = true; + woob = false; + write_empty_pages = true; + } argc -= 2; argv += 2; -- 2.17.1