Patchwork [U-Boot,REFERENCE,DON'T,APPLY,3/3] beagle: Enable DFU support with stub functions for now

login
register
mail settings
Submitter stefan@datenfreihafen.org
Date April 3, 2012, 3:04 p.m.
Message ID <1333465497-29909-3-git-send-email-stefan@datenfreihafen.org>
Download mbox | patch
Permalink /patch/150462/
State RFC
Delegated to: Marek Vasut
Headers show

Comments

stefan@datenfreihafen.org - April 3, 2012, 3:04 p.m.
---
 board/ti/beagle/beagle.c       |   17 +++++++++++++++++
 board/ti/beagle/config.mk      |    4 ++++
 include/configs/omap3_beagle.h |    9 ++++++++-
 3 files changed, 29 insertions(+), 1 deletion(-)

Patch

diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index 9482c5e..e904b10 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -528,3 +528,20 @@  U_BOOT_CMD(
 	"Return the status of the BeagleBoard USER button",
 	""
 );
+
+void register_flash_areas(void);
+void unregister_flash_areas(void);
+
+void board_dfu_init(void)
+{
+   register_flash_areas();
+}
+
+void board_dfu_cleanup(void)
+{
+   unregister_flash_areas();
+}
+
+void dfu_init(void) {}
+void dfu_cleanup(void){}
+void usb_gadget_handle_interrupts(void){}
diff --git a/board/ti/beagle/config.mk b/board/ti/beagle/config.mk
index cf055db..203d920 100644
--- a/board/ti/beagle/config.mk
+++ b/board/ti/beagle/config.mk
@@ -31,3 +31,7 @@ 
 
 # For use with external or internal boots.
 CONFIG_SYS_TEXT_BASE = 0x80008000
+
+CONFIG_USB_DFU_VENDOR=0x1457
+CONFIG_USB_DFU_PRODUCT=0x5119
+CONFIG_USB_DFU_REVISION=0x0230
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 6be4d10..08c4699 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -139,8 +139,15 @@ 
 #define CONFIG_USB_ETHER_ASIX
 
 #define CONFIG_DFU_GADGET
+#define CONFIG_CMD_DEVICE_FIRMWARE_UPGRADE
 //#define CONFIG_USB_ETHER
 
+#define CONFIG_USBD_DFU                        1
+#define CONFIG_USBD_DFU_XFER_SIZE      0x1000
+#define CONFIG_USBD_DFU_INTERFACE      2
+
+#define DFU_NUM_ALTERNATES 6
+
 
 /* commands to include */
 #include <config_cmd_default.h>
@@ -341,7 +348,7 @@ 
  */
 #define CONFIG_STACKSIZE	(128 << 10)	/* regular stack 128 KiB */
 #ifdef CONFIG_USE_IRQ
-#define CONFIG_STACKSIZE_IRQ	(4 << 10)	/* IRQ stack 4 KiB */
+#define CONFIG_STACKSIZE_IRQ	(8 << 10)	/* IRQ stack 8 KiB */
 #define CONFIG_STACKSIZE_FIQ	(4 << 10)	/* FIQ stack 4 KiB */
 #endif