From patchwork Tue Aug 6 10:50:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mateusz Zalega X-Patchwork-Id: 265014 X-Patchwork-Delegate: promsoft@gmail.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 749492C007A for ; Tue, 6 Aug 2013 21:08:18 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9809E4A118; Tue, 6 Aug 2013 13:06:50 +0200 (CEST) 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 J5I+V5Di3hKx; Tue, 6 Aug 2013 13:06:50 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E77604A11B; Tue, 6 Aug 2013 13:04:26 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2E91A4A01B for ; Tue, 6 Aug 2013 13:02:11 +0200 (CEST) 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 zsysZjzx3qYK for ; Tue, 6 Aug 2013 13:02:06 +0200 (CEST) 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 mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by theia.denx.de (Postfix) with ESMTP id F22434A028 for ; Tue, 6 Aug 2013 13:01:49 +0200 (CEST) Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MR300M2CVEJSG70@mailout2.w1.samsung.com> for u-boot@lists.denx.de; Tue, 06 Aug 2013 11:51:39 +0100 (BST) X-AuditID: cbfec7f4-b7f5f6d000000ff6-9c-5200d53b4765 Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 50.E1.04086.B35D0025; Tue, 06 Aug 2013 11:51:39 +0100 (BST) Received: from kernelpanic.DIGITAL.local ([106.120.53.14]) by eusync2.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0MR3007NVVI2HX60@eusync2.samsung.com>; Tue, 06 Aug 2013 11:51:39 +0100 (BST) From: Mateusz Zalega To: u-boot@lists.denx.de Date: Tue, 06 Aug 2013 12:50:54 +0200 Message-id: <1375786257-11781-3-git-send-email-m.zalega@samsung.com> X-Mailer: git-send-email 1.8.2.1 In-reply-to: <1375786257-11781-1-git-send-email-m.zalega@samsung.com> References: <1375786257-11781-1-git-send-email-m.zalega@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrDJMWRmVeSWpSXmKPExsVy+t/xK7rWVxmCDN42yFrc+9fPZHG26Q27 xdx3U5gsOo60MFq83dvJ7sDqcfbODkaPvi2rGAOYorhsUlJzMstSi/TtErgymr44FbSLV2zo v83awLhCuIuRk0NCwETiyp15LBC2mMSFe+vZuhi5OIQEljJK7Gjewg6SEBLoZ5KY+K0KxGYT 0Ja4sXc+WFxEQELiV/9VRpAGZoG1jBKN06+xgSSEBbwl5n0+BzSVg4NFQFWi8ZMOSJhXwEXi REsDO8QyBYnj27cxgticAq4Sx870MULscpGYcX8B4wRG3gWMDKsYRVNLkwuKk9JzDfWKE3OL S/PS9ZLzczcxQkLkyw7GxcesDjEKcDAq8fAmXP0fKMSaWFZcmXuIUYKDWUmEV2UnQ5AQb0pi ZVVqUX58UWlOavEhRiYOTqkGRk2Pe2k3gjLPeS7KeNR3evnD0B+3ZLZki65dU8gcHBRp7DVl +a+b/6dOW7r3nZ9b/6o9xzg7t8qrq9e0f+Jh6wqoW/A0RObkrXmnRXbN0cgJWvSUJXTdu1J3 fvdnTtwP9xZldaWJr1GSVvu1kefS/7jVf77/8DaIc33zvIx9UeFKk/b3U1M9zyqxFGckGmox FxUnAgC/baop7wEAAA== X-Mailman-Approved-At: Tue, 06 Aug 2013 13:04:03 +0200 Cc: Arkadiusz Wlodarczyk , Kyungmin Park , Mateusz Zalega Subject: [U-Boot] [PATCH RESEND 2/5] arm:goni:dfu Add support for DFU at GONI target 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: Arkadiusz Wlodarczyk Proper adjustment for supporting DFU at GONI target has been made. The s5p_goni.h file has been updated. Moreover the code for low level USB initialization has been added to GONI board code. The malloc pool has been enlarged in order to support larger buffer sizes needed by DFU implementation. Signed-off-by: Arkadiusz Wlodarczyk Signed-off-by: Kyungmin Park Signed-off-by: Mateusz Zalega Tested-by: Arkadiusz Wlodarczyk Tested-by: Mateusz Zalega Cc: Minkyu Kang --- board/samsung/goni/goni.c | 7 +++++++ include/configs/s5p_goni.h | 22 ++++++++++++++++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c index c05801d..c605bf5 100644 --- a/board/samsung/goni/goni.c +++ b/board/samsung/goni/goni.c @@ -139,4 +139,11 @@ struct s3c_plat_otg_data s5pc110_otg_data = { .regs_otg = S5PC110_OTG_BASE, .usb_phy_ctrl = S5PC110_USB_PHY_CONTROL, }; + +void board_usb_init(void) +{ + debug("USB_udc_probe\n"); + s3c_udc_probe(&s5pc110_otg_data); +} + #endif diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h index 6d88874..192acaa 100644 --- a/include/configs/s5p_goni.h +++ b/include/configs/s5p_goni.h @@ -38,7 +38,7 @@ * Size of malloc() pool * 1MB = 0x100000, 0x100000 = 1024 * 1024 */ -#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (1 << 20)) +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (16 << 20)) /* * select serial console configuration */ @@ -70,6 +70,17 @@ #define CONFIG_CMD_ONENAND #define CONFIG_CMD_MTDPARTS #define CONFIG_CMD_MMC +#define CONFIG_CMD_DFU + +/* USB Composite download gadget - g_dnl */ +#define CONFIG_USBDOWNLOAD_GADGET +#define CONFIG_DFU_FUNCTION +#define CONFIG_DFU_MMC + +/* USB Samsung's IDs */ +#define CONFIG_G_DNL_VENDOR_NUM 0x04E8 +#define CONFIG_G_DNL_PRODUCT_NUM 0x6601 +#define CONFIG_G_DNL_MANUFACTURER "Samsung" #define CONFIG_BOOTDELAY 1 #define CONFIG_ZERO_BOOTDELAY_CHECK @@ -89,6 +100,10 @@ ",60m(qboot)"\ ",-(UBI)\0" +#define CONFIG_DFU_ALT \ + "u-boot mmc 80 400;" \ + "uImage fat 0 2\0" \ + #define NORMAL_MTDPARTS_DEFAULT MTDPARTS_DEFAULT #define CONFIG_BOOTCOMMAND "run mmcboot" @@ -159,7 +174,9 @@ "bootblock=9\0" \ "ubiblock=8\0" \ "ubi=enabled\0" \ - "opts=always_resume=1" + "opts=always_resume=1\0" \ + "dfu_alt_info=" CONFIG_DFU_ALT + /* Miscellaneous configurable options */ #define CONFIG_SYS_LONGHELP /* undef to save memory */ @@ -228,5 +245,6 @@ #define CONFIG_USB_GADGET #define CONFIG_USB_GADGET_S3C_UDC_OTG #define CONFIG_USB_GADGET_DUALSPEED +#define CONFIG_USB_GADGET_VBUS_DRAW 2 #endif /* __CONFIG_H */