From patchwork Wed Sep 11 07:56:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1160734 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=none (mailfrom) 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=none (p=none dis=none) header.from=xilinx.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="gxwUkAHP"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46SvRK46ycz9sCJ for ; Wed, 11 Sep 2019 17:58:37 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 666DCC21DB6; Wed, 11 Sep 2019 07:57:30 +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=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 90E34C21C2C; Wed, 11 Sep 2019 07:57:29 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 91523C21DF3; Wed, 11 Sep 2019 07:56:58 +0000 (UTC) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by lists.denx.de (Postfix) with ESMTPS id DA52BC21DD3 for ; Wed, 11 Sep 2019 07:56:55 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id t9so2269557wmi.5 for ; Wed, 11 Sep 2019 00:56:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=VwZEtk3Lwv/EQ8nF466TUdcrIDle/drI25//1JVk65g=; b=gxwUkAHP6qBcRjt3uz4mcW3i9MBbW6rLA7IAG3nBsCIalIGS+6gAIjF8AHtgXRhnp/ xuoFtF9BChIyK3eqpJ6Oek7Ohedbx7dF4T5k6Z8jrwWWHQSC6d3UsFaHANSLHFc9x7uU TjAF9iK4C0T/3v8ByJCl2HlzSBm1QV+Hc9NW9OJbBV5XLN7+t9L2Wd73GlDSZxt+WmCF 1KFAequE/Nh1Pen554/w9EQ5t1Z0TtWm3xUnOjccZw80DEQtR2bec+xAWQolb+YpSKv3 3JeKzEw+hHhr6cRRV/El4aHM22cCeTCmQuDpcrSFXRGOoJflApnSO4ClH/3FB9+lRq9s /t3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:in-reply-to:references; bh=VwZEtk3Lwv/EQ8nF466TUdcrIDle/drI25//1JVk65g=; b=rueibua8ipYAKgfk//Nr6sc23e2oBywj6aG2VCrkg3AWwf7uPzGCGOXqM3OWWusxrh ZRKLEn64u65QP7ZOFy3MvKE4ADa9FolFbQ9k85ooMauDdXQpOkwiQn/aC2RMs/xNVUYz kmd0N2DVsNvcsi17yAgUlW7k1hZNO0DvCZcJdL6QQ2+F1ntU/U5tM19/6cZvckTmNH4i c3TSsCNGXNiu5yuEXRkLQVStuum7yfQ6Y+kPALxAJSZl4IyrlzYdqOqUg7Guw7D1tq8W nRVq+snxNJiFlJ/AGGtQ953tqIK1jj0YAwo1rssZm/MDkjD5sn/PrFVXf4kEiyMWHnLz OIfg== X-Gm-Message-State: APjAAAW7R2TlM7HCFY5BgcmixytLWXHCvWBbRP6hpTSrkip5F290FXFd cmJvRscsjSAK1joxaFH2Hv8wNAhkZRw= X-Google-Smtp-Source: APXvYqxp39sAIkn/MzSj40bSDp/5vLs/GohulTTOA0SsV0TgzT5BY3NkVsDFsf5e1Ao34VLn5iplgA== X-Received: by 2002:a1c:4e06:: with SMTP id g6mr2808938wmh.149.1568188615305; Wed, 11 Sep 2019 00:56:55 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id q124sm3161663wma.5.2019.09.11.00.56.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Sep 2019 00:56:54 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Date: Wed, 11 Sep 2019 09:56:47 +0200 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Cc: T Karthik Reddy Subject: [U-Boot] [PATCH 3/4] arm64: versal: Add new dfu usb distro boot command 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: T Karthik Reddy This patch adds new dfu usb distro boot command to look for bootscript from dfu-util and runs it. Signed-off-by: T Karthik Reddy Signed-off-by: Michal Simek --- board/xilinx/versal/board.c | 4 ++++ include/configs/xilinx_versal.h | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c index 68d6177e2c38..9001c8df9576 100644 --- a/board/xilinx/versal/board.c +++ b/board/xilinx/versal/board.c @@ -106,6 +106,10 @@ int board_late_init(void) puts("Bootmode: "); switch (bootmode) { + case USB_MODE: + puts("USB_MODE\n"); + mode = "dfu_usb"; + break; case JTAG_MODE: puts("JTAG_MODE\n"); mode = "jtag pxe dhcp"; diff --git a/include/configs/xilinx_versal.h b/include/configs/xilinx_versal.h index 2f1cddbb6f07..67f5739555f3 100644 --- a/include/configs/xilinx_versal.h +++ b/include/configs/xilinx_versal.h @@ -123,10 +123,21 @@ #define BOOTENV_DEV_NAME_JTAG(devtypeu, devtypel, instance) \ "jtag " +#define BOOT_TARGET_DEVICES_DFU_USB(func) func(DFU_USB, dfu_usb, 0) + +#define BOOTENV_DEV_DFU_USB(devtypeu, devtypel, instance) \ + "bootcmd_dfu_usb=setenv dfu_alt_info boot.scr ram $scriptaddr " \ + "$script_size_f; dfu 0 ram 0 && source $scriptaddr; " \ + "echo SCRIPT FAILED: continuing...;\0" + +#define BOOTENV_DEV_NAME_DFU_USB(devtypeu, devtypel, instance) \ + "dfu_usb " + #define BOOT_TARGET_DEVICES(func) \ BOOT_TARGET_DEVICES_JTAG(func) \ BOOT_TARGET_DEVICES_MMC(func) \ BOOT_TARGET_DEVICES_XSPI(func) \ + BOOT_TARGET_DEVICES_DFU_USB(func) \ func(PXE, pxe, na) \ func(DHCP, dhcp, na)