From patchwork Sun Oct 2 23:50:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jassi Brar X-Patchwork-Id: 611757 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp826598pvb; Sun, 2 Oct 2022 16:51:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7qQSkW7pNOlolaBeMG9ZiNF2dcz+uRTTcc5JfB705DqgnKRp3GGxBzWf6VuUgkhibRl8Xq X-Received: by 2002:a05:6402:1d4e:b0:451:d378:eed2 with SMTP id dz14-20020a0564021d4e00b00451d378eed2mr17182257edb.23.1664754664968; Sun, 02 Oct 2022 16:51:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664754664; cv=none; d=google.com; s=arc-20160816; b=Q6+Jj068hTb+KnLN7H8ucj9sKw4KYsBdZ4yLLlEfNnnttH/m6Iw3dQyR1LEsr5p//A jdpRxpfREzyfQUWkPqgLbsPM2oTjp2xT1fw9cTrlwKhsjXXKXRgNWPGdjo1hTjV5OPrb NgJOqlerxLN8ZKl2VSbX0uWHUCu07ErlMYsLaxGSP+OhC0xxF/oWceieb4mXgwi4wILs OdDm+WYNjfVjQuZuafuHNl2DGA4sKPJ2s/+KaCkZET7jNjHJ1pCBetDEQtbv+KUdoRQi tDlsG7EwixrtP0T32Xackz54huvppwk45fYhrIBxB6rsE2LY88VefPTJHdC6U1VCrckC G/eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JUBhYHVDJ/8hX7EZ5eJdDVMCwYOC+CyU8cysJlgJz2Y=; b=Rq+ihUgLMCNn/HeYlFqOu7euEGcNVrBTLtge0Bzh/NT8yul9zy5Zr8gmXLNn0ckbv9 T9sbvmMv8EdGGItZp+ahf5eOTtpf5kw322HioC0f5c8gR9y/zIjYWF+3KcYOmvyu5a7x cG4S/BNcWq+UTOx5uA6IvsZRtBybgbUGVCA1cn/FqN16DztceXPkEzg6HRgNveE2RtHr Fzfgc+2SG4VNYuOZfwxbTwQWvjwKAzjoYvKBDVV/SB/zmQfcLrG8Loiwh+eOCGhLmgRQ tUNiAHc0oBIRApt8abcjJAcDl30E62bhaNHI5x+jiZp4iZy8xdaSIXU7+r0L26BknC98 Vdmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=KCvHVUrc; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id hz5-20020a1709072ce500b007815ca78c38si6480341ejc.235.2022.10.02.16.51.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Oct 2022 16:51:04 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=KCvHVUrc; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 97F3884562; Mon, 3 Oct 2022 01:50:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="KCvHVUrc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 34532847F4; Mon, 3 Oct 2022 01:50:57 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) (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 1D5B38447D for ; Mon, 3 Oct 2022 01:50:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jassisinghbrar@gmail.com Received: by mail-il1-x131.google.com with SMTP id q11so4104001ilj.10 for ; Sun, 02 Oct 2022 16:50:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=JUBhYHVDJ/8hX7EZ5eJdDVMCwYOC+CyU8cysJlgJz2Y=; b=KCvHVUrc7vvxFoxfgVfAy06YAdup9ajpttvNgA2EdpncylsjPcKWqsHF9WanmTWaVS 07PgPOPLpdjSmLaWTnoCSwWH0e5Bf4lNKaRe5f3jH1a1VASh6xYKV8ihoZoiXcFW2WPH 61qertWDarcoWbH5nuagPLPmDztTy1UUqcyAunjKXohw2QffGpsYgtWbFACs2kllB0HZ URLl6pwmw1zuploxvpeNByihmCa7AoFYG6xUFXKEOuw+wSDu6uN4OpEKTNvONROAPDDz p1fpt+cBGP2eVwV6eaeeoM13mq8ytfAK5mvv2KU1MoX9dZzXQOYmwASEe8cOTHWn8fe/ 50zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=JUBhYHVDJ/8hX7EZ5eJdDVMCwYOC+CyU8cysJlgJz2Y=; b=dU3glcqfwAeoUhCkbIeZYoTZrM8JpgWTFfqnq+Ozavmy1avmHH1qRJ50hZXHOh4Gpw pVt5KThgtneawOwwgEDuSsVaObAORayDztrR74vS34CeJ20MD4adwFpSe/UdbQTJ8Uzh CGtiLa7mUGZwoR5i/LiFKSHFpdSdH94hfyn53GCQpLFcgQShT+whH/N/kOZLw760OV2N u2Xrn8X8JvoQfYBvLlRZhzDCDGvHlHWLpQfqQkO/Vob4TpjmAZC+wllhxbf/ZqGtUjsA TJsCC9E9YZLoLXMmV+vCRkPcnVxtxq0eTOFverm9ds3TM8nevHykyZPhOHQa9z63+8zC e8Lw== X-Gm-Message-State: ACrzQf1Z7y6FssGZ/eVNpheotmfjxb1vuSe4CyU0K4WJGwioAAdNT4x0 z1fRRnSMNoRb11rhCZvMBJLT7JjiyDk= X-Received: by 2002:a05:6e02:1c04:b0:2f1:aafc:a472 with SMTP id l4-20020a056e021c0400b002f1aafca472mr8363453ilh.0.1664754652015; Sun, 02 Oct 2022 16:50:52 -0700 (PDT) Received: from localhost.localdomain (wnpgmb0311w-ds01-45-179-115.dynamic.bellmts.net. [206.45.179.115]) by smtp.gmail.com with ESMTPSA id l15-20020a02cd8f000000b0034c107ac9bbsm3570522jap.8.2022.10.02.16.50.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Oct 2022 16:50:50 -0700 (PDT) From: jassisinghbrar@gmail.com To: u-boot@lists.denx.de Cc: xypron.glpk@gmx.de, ilias.apalodimas@linaro.org, takahiro.akashi@linaro.org, sjg@chromium.org, trini@konsulko.com, etienne.carriere@linaro.org, monstr@monstr.eu, Jassi Brar Subject: [PATCHv2 0/5] FWU: Add support for mtd backed feature on DeveloperBox Date: Sun, 2 Oct 2022 18:50:46 -0500 Message-Id: <20221002235046.344149-1-jassisinghbrar@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220928092956.2535777-1-sughosh.ganu@linaro.org> References: <20220928092956.2535777-1-sughosh.ganu@linaro.org> MIME-Version: 1.0 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: , 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: Jassi Brar Introduce support for mtd backed storage for FWU feature and enable it on Synquacer platform based DeveloperBox. The patchset has been rebased on latest(v11) submission of FWU Multi Bank Update feature by Sughosh[1]. [1] https://lore.kernel.org/u-boot/20220928092956.2535777-1-sughosh.ganu@linaro.org/ Masami Hiramatsu (3): dt: fwu: developerbox: enable fwu banks and mdata regions fwu: DeveloperBox: add support for FWU tools: Add mkfwumdata tool for FWU metadata image Sughosh Ganu (2): FWU: Add FWU metadata access driver for MTD storage regions FWU: mtd: Add helper functions for accessing FWU metadata .../synquacer-sc2a11-developerbox-u-boot.dtsi | 22 +- board/socionext/developerbox/Makefile | 1 + board/socionext/developerbox/developerbox.c | 8 + board/socionext/developerbox/fwu_plat.c | 68 ++++ configs/synquacer_developerbox_defconfig | 13 +- doc/board/socionext/developerbox.rst | 96 ++++++ drivers/fwu-mdata/Kconfig | 17 +- drivers/fwu-mdata/Makefile | 1 + drivers/fwu-mdata/raw_mtd.c | 305 +++++++++++++++++ include/configs/synquacer.h | 10 + include/fwu.h | 27 ++ lib/fwu_updates/Makefile | 1 + lib/fwu_updates/fwu_mtd.c | 178 ++++++++++ tools/Kconfig | 9 + tools/Makefile | 4 + tools/mkfwumdata.c | 323 ++++++++++++++++++ 16 files changed, 1079 insertions(+), 4 deletions(-) create mode 100644 board/socionext/developerbox/fwu_plat.c create mode 100644 drivers/fwu-mdata/raw_mtd.c create mode 100644 lib/fwu_updates/fwu_mtd.c create mode 100644 tools/mkfwumdata.c