Patchwork [U-Boot,6/6] usb:g_dnl: Support for g_dnl download usb gadget for TRATS board

login
register
mail settings
Submitter Łukasz Majewski
Date April 12, 2012, 7:17 a.m.
Message ID <1334215049-20362-7-git-send-email-l.majewski@samsung.com>
Download mbox | patch
Permalink /patch/151993/
State Changes Requested
Delegated to: Marek Vasut
Headers show

Comments

Łukasz Majewski - April 12, 2012, 7:17 a.m.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
---
 board/samsung/trats/trats.c |    8 ++++++++
 include/configs/trats.h     |   17 +++++++++++++++++
 2 files changed, 25 insertions(+), 0 deletions(-)
Wolfgang Denk - April 14, 2012, 1:40 p.m.
Dear Lukasz Majewski,

In message <1334215049-20362-7-git-send-email-l.majewski@samsung.com> you wrote:
> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Minkyu Kang <mk7.kang@samsung.com>

See comments as for GONI board.

> +#ifdef CONFIG_USBDOWNLOAD_GADGET
> +void usbd_thor_udc_probe(void)
> +{
> +	puts("USB_udc_probe\n");
> +	s3c_udc_probe(&s5pc210_otg_data);
> +}
> +#endif

Duplicated code.  Please move to common location and avoid
duplication.

Best regards,

Wolfgang Denk

Patch

diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index a7b4e4a..31826a0 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -244,6 +244,14 @@  struct s3c_plat_otg_data s5pc210_otg_data = {
 };
 #endif
 
+#ifdef CONFIG_USBDOWNLOAD_GADGET
+void usbd_thor_udc_probe(void)
+{
+	puts("USB_udc_probe\n");
+	s3c_udc_probe(&s5pc210_otg_data);
+}
+#endif
+
 static void pmic_reset(void)
 {
 	struct exynos4_gpio_part2 *gpio =
diff --git a/include/configs/trats.h b/include/configs/trats.h
index 585fd71..af0bbd1 100644
--- a/include/configs/trats.h
+++ b/include/configs/trats.h
@@ -95,6 +95,14 @@ 
 #undef CONFIG_CMD_MTDPARTS
 #define CONFIG_CMD_MMC
 
+/* FAT */
+#define CONFIG_CMD_FAT
+#define CONFIG_FAT_WRITE
+
+/* USB Composite download gadget - g_dnl */
+#define CONFIG_USBDOWNLOAD_GADGET
+#define CONFIG_USBDOWNLOAD_FUNCTION
+
 #define CONFIG_BOOTDELAY		1
 #define CONFIG_ZERO_BOOTDELAY_CHECK
 #define CONFIG_BOOTARGS			"Please use defined boot"
@@ -104,6 +112,12 @@ 
 #define CONFIG_BOOTBLOCK		"10"
 #define CONFIG_ENV_COMMON_BOOT		"${console} ${meminfo}"
 
+#define CONFIG_DNL_INFO \
+	"dnl_info=" \
+	"u-boot mmc 80 200;" \
+	"uImage fat 0 2;" \
+	"platform.img raw 0 3\0" \
+
 #define CONFIG_ENV_OVERWRITE
 #define CONFIG_SYS_CONSOLE_INFO_QUIET
 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
@@ -213,5 +227,8 @@ 
 #define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_S3C_UDC_OTG
 #define CONFIG_USB_GADGET_DUALSPEED
+#define CONFIG_USB_GADGET_VBUS_DRAW	2
+
+#define CONFIG_SYS_DOWN_ADDR	CONFIG_SYS_SDRAM_BASE
 
 #endif	/* __CONFIG_H */