From patchwork Thu Feb 28 19:09:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 224146 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id CBD782C02C8 for ; Fri, 1 Mar 2013 06:10:48 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B6CC04A125; Thu, 28 Feb 2013 20:10:19 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id omLHGjvlnZjB; Thu, 28 Feb 2013 20:10:19 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 476234A13B; Thu, 28 Feb 2013 20:10:08 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 70D934A11E for ; Thu, 28 Feb 2013 20:09:48 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eEaxdWN8Otzh for ; Thu, 28 Feb 2013 20:09:46 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-gg0-f179.google.com (mail-gg0-f179.google.com [209.85.161.179]) by theia.denx.de (Postfix) with ESMTPS id 2FBB04A145 for ; Thu, 28 Feb 2013 20:09:23 +0100 (CET) Received: by mail-gg0-f179.google.com with SMTP id h4so319937ggn.10 for ; Thu, 28 Feb 2013 11:09:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=6YbRcF2++YyyiLEiQnR9X652tbxc/GPj1kA8LiK1xec=; b=c1vw9OaJnit/GY5S03xx+U8ABgUaR7w3Ob0KQNil3cEGtcInhwqj8Ei8bz201wb0GC kaiZNWX95fCor+oJloIBaCp2UfYFscX6RFQle/TGs2qugveDOj6VHYWj3f9Nv4bqNJT1 u9tYJIkUffnzpOM5tsrfbzvtjSTFp33O63hStpSF61Tcfctx02XHr4A4LGyPyv/OjlCJ Y18gv2Rf+H+ZQP8DhSDtf7U7A3pwrZr8t1gHdYimcDRndylhHwLNG0sGBUnLiEWDeLhn KrlRQeTsyNfNbjSZjjeG2LMjCyMeISskivTAtb3G7YenFEGJXZ9iUF+awNn4/ZMiONeA GSTA== X-Received: by 10.236.127.7 with SMTP id c7mr5564774yhi.115.1362078560698; Thu, 28 Feb 2013 11:09:20 -0800 (PST) Received: from localhost.localdomain (cpe-065-184-250-089.ec.res.rr.com. [65.184.250.89]) by mx.google.com with ESMTPS id b62sm14850159yhf.13.2013.02.28.11.09.17 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Feb 2013 11:09:19 -0800 (PST) From: Tom Rini To: u-boot@lists.denx.de Date: Thu, 28 Feb 2013 14:09:08 -0500 Message-Id: <1362078548-24308-5-git-send-email-trini@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1362078548-24308-1-git-send-email-trini@ti.com> References: <1362078548-24308-1-git-send-email-trini@ti.com> Cc: Tom Rini , Pantelis Antoniou Subject: [U-Boot] [PATCH v3 4/4] am335x_evm: Enable DFU for NAND and MMC, provide example alt_info for both X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Pantelis Antoniou - Add CONFIG_DFU_NAND, CONFIG_DFU_MMC - Set dfu_alt_info_nand and dfu_alt_info_mmc to show a working example for both. - Increase CONFIG_SYS_MAXARGS due to hush parsing bugs that would otherwise disallow 'setenv dfu_alt_info ${dfu_alt_info_nand}'. - Enable CONFIG_FAT_WRITE to allow updating on MMC Signed-off-by: Pantelis Antoniou Signed-off-by: Tom Rini --- Changes in v3: - Fix checkpatch.pl warnings in include/configs/am335x_evm.h Changes in v2: - Enable DFU for NAND and MMC, set dfu_alt_info_(nand|mmc) as examples for both in am335x_evm.h - Increase CONFIG_SYS_MAXARGS due to hush parsing bugs that would otherwise prevent 'setenv dfu_alt_info ${dfu_alt_info_nand}' on am335x_evm include/configs/am335x_evm.h | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 61b861d..14ffda7 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -62,6 +62,8 @@ "optargs=\0" \ "mtdids=" MTDIDS_DEFAULT "\0" \ "mtdparts=" MTDPARTS_DEFAULT "\0" \ + "dfu_alt_info_mmc=" DFU_ALT_INFO_MMC "\0" \ + "dfu_alt_info_nand=" DFU_ALT_INFO_NAND "\0" \ "mmcdev=0\0" \ "mmcroot=/dev/mmcblk0p2 ro\0" \ "mmcrootfstype=ext4 rootwait\0" \ @@ -118,8 +120,8 @@ #define CONFIG_CMD_ECHO -/* max number of command args */ -#define CONFIG_SYS_MAXARGS 16 +/* We set the max number of command args high to avoid HUSH bugs. */ +#define CONFIG_SYS_MAXARGS 64 /* Console I/O Buffer Size */ #define CONFIG_SYS_CBSIZE 512 @@ -148,6 +150,7 @@ #define CONFIG_CMD_MMC #define CONFIG_DOS_PARTITION #define CONFIG_CMD_FAT +#define CONFIG_FAT_WRITE #define CONFIG_CMD_EXT2 #define CONFIG_SPI @@ -158,6 +161,36 @@ #define CONFIG_CMD_SF #define CONFIG_SF_DEFAULT_SPEED (24000000) +/* USB Composite download gadget - g_dnl */ +#define CONFIG_USB_GADGET +#define CONFIG_USBDOWNLOAD_GADGET + +/* USB TI's IDs */ +#define CONFIG_USBD_HS +#define CONFIG_G_DNL_VENDOR_NUM 0x0403 +#define CONFIG_G_DNL_PRODUCT_NUM 0xBD00 +#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments" + +/* USB Device Firmware Update support */ +#define CONFIG_DFU_FUNCTION +#define CONFIG_DFU_MMC +#define CONFIG_DFU_NAND +#define CONFIG_CMD_DFU +#define DFU_ALT_INFO_MMC \ + "boot part 0 1;" \ + "rootfs part 0 2;" \ + "MLO fat 0 1;" \ + "u-boot.img fat 0 1;" \ + "uEnv.txt fat 0 1" +#define DFU_ALT_INFO_NAND \ + "SPL part 0 1;" \ + "SPL.backup1 part 0 2;" \ + "SPL.backup2 part 0 3;" \ + "SPL.backup3 part 0 4;" \ + "u-boot part 0 5;" \ + "kernel part 0 7;" \ + "rootfs part 0 8" + /* Physical Memory Map */ #define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */ #define PHYS_DRAM_1 0x80000000 /* DRAM Bank #1 */ @@ -302,6 +335,7 @@ #define CONFIG_MUSB_GADGET #define CONFIG_MUSB_PIO_ONLY #define CONFIG_USB_GADGET_DUALSPEED +#define CONFIG_USB_GADGET_VBUS_DRAW 2 #define CONFIG_MUSB_HOST #define CONFIG_AM335X_USB0 #define CONFIG_AM335X_USB0_MODE MUSB_PERIPHERAL