diff mbox

[U-Boot,10/10] trats: Update TRATS config to support TIZEN download

Message ID 1380800841-21673-11-git-send-email-l.majewski@samsung.com
State Superseded
Delegated to: Marek Vasut
Headers show

Commit Message

Łukasz Majewski Oct. 3, 2013, 11:47 a.m. UTC
A set of environment variables needs to be updated to provide support for
TIZEN download command (tizendown).

Since DFU is used as a flashing backend, it is also necessary to extent
malloc pool size for DFU buffer allocation.
Moreover, for compatibility reasons (Win vs. Lin) new USB idProduct number
for download gadget had to be added.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
---
 include/configs/trats.h |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

Comments

Marek Vasut Oct. 3, 2013, 3:51 p.m. UTC | #1
Dear Lukasz Majewski,

> A set of environment variables needs to be updated to provide support for
> TIZEN download command (tizendown).
> 
> Since DFU is used as a flashing backend, it is also necessary to extent
> malloc pool size for DFU buffer allocation.
> Moreover, for compatibility reasons (Win vs. Lin) new USB idProduct number
> for download gadget had to be added.
> 
> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> Cc: Marek Vasut <marex@denx.de>
> ---
>  include/configs/trats.h |   13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/include/configs/trats.h b/include/configs/trats.h
> index 24ea06b..955bd20 100644
> --- a/include/configs/trats.h
> +++ b/include/configs/trats.h
> @@ -50,7 +50,7 @@
>  #define CONFIG_MACH_TYPE		MACH_TYPE_TRATS
> 
>  /* Size of malloc() pool */
> -#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (16 << 20))
> +#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (80 << 20))

Use SZ_1M instead of that l-shift by 20.

> 
>  /* select serial console configuration */
>  #define CONFIG_SERIAL2			/* use SERIAL 2 */
> @@ -91,12 +91,20 @@
> 
>  /* USB Composite download gadget - g_dnl */
>  #define CONFIG_USBDOWNLOAD_GADGET
> +
> +/* TIZEN THOR downloader support */
> +#define CONFIG_CMD_THOR_DOWNLOAD
> +#define CONFIG_THOR_FUNCTION
> +
> +#define CONFIG_SYS_DFU_DATA_BUF_SIZE (32 << 20)

DTTO

>  #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_THOR_VENDOR_NUM CONFIG_G_DNL_VENDOR_NUM
> +#define CONFIG_G_DNL_THOR_PRODUCT_NUM 0x685D
>  #define CONFIG_G_DNL_MANUFACTURER "Samsung"
> 
>  #define CONFIG_BOOTDELAY		1
> @@ -131,7 +139,8 @@
>  #define CONFIG_DFU_ALT \
>  	"u-boot mmc 80 400;" \
>  	"uImage ext4 0 2;" \
> -	"exynos4210-trats.dtb ext4 0 2\0"
> +	"exynos4210-trats.dtb ext4 0 2;" \
> +	""PARTS_ROOT" part 0 5\0"
> 
>  #define CONFIG_ENV_OVERWRITE
>  #define CONFIG_SYS_CONSOLE_INFO_QUIET

btw. I'm picking this patch before this set:

[PATCH v5] usb: new board-specific USB init interface

So you might want to wait until it's applied onto usb/next and then rebase and 
repost.

Best regards,
Marek Vasut
Łukasz Majewski Oct. 4, 2013, 8:32 a.m. UTC | #2
Hi Marek,

> Dear Lukasz Majewski,
> 
> > A set of environment variables needs to be updated to provide
> > support for TIZEN download command (tizendown).
> > 
> > Since DFU is used as a flashing backend, it is also necessary to
> > extent malloc pool size for DFU buffer allocation.
> > Moreover, for compatibility reasons (Win vs. Lin) new USB idProduct
> > number for download gadget had to be added.
> > 
> > Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> > Cc: Marek Vasut <marex@denx.de>
> > ---
> >  include/configs/trats.h |   13 +++++++++++--
> >  1 file changed, 11 insertions(+), 2 deletions(-)
> > 
> > diff --git a/include/configs/trats.h b/include/configs/trats.h
> > index 24ea06b..955bd20 100644
> > --- a/include/configs/trats.h
> > +++ b/include/configs/trats.h
> > @@ -50,7 +50,7 @@
> >  #define CONFIG_MACH_TYPE		MACH_TYPE_TRATS
> > 
> >  /* Size of malloc() pool */
> > -#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE +
> > (16 << 20)) +#define CONFIG_SYS_MALLOC_LEN
> > (CONFIG_ENV_SIZE + (80 << 20))
> 
> Use SZ_1M instead of that l-shift by 20.

Ok, I will use it.

> 
> > 
> >  /* select serial console configuration */
> >  #define CONFIG_SERIAL2			/* use SERIAL 2 */
> > @@ -91,12 +91,20 @@
> > 
> >  /* USB Composite download gadget - g_dnl */
> >  #define CONFIG_USBDOWNLOAD_GADGET
> > +
> > +/* TIZEN THOR downloader support */
> > +#define CONFIG_CMD_THOR_DOWNLOAD
> > +#define CONFIG_THOR_FUNCTION
> > +
> > +#define CONFIG_SYS_DFU_DATA_BUF_SIZE (32 << 20)
> 
> DTTO
> 
> >  #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_THOR_VENDOR_NUM CONFIG_G_DNL_VENDOR_NUM
> > +#define CONFIG_G_DNL_THOR_PRODUCT_NUM 0x685D
> >  #define CONFIG_G_DNL_MANUFACTURER "Samsung"
> > 
> >  #define CONFIG_BOOTDELAY		1
> > @@ -131,7 +139,8 @@
> >  #define CONFIG_DFU_ALT \
> >  	"u-boot mmc 80 400;" \
> >  	"uImage ext4 0 2;" \
> > -	"exynos4210-trats.dtb ext4 0 2\0"
> > +	"exynos4210-trats.dtb ext4 0 2;" \
> > +	""PARTS_ROOT" part 0 5\0"
> > 
> >  #define CONFIG_ENV_OVERWRITE
> >  #define CONFIG_SYS_CONSOLE_INFO_QUIET
> 
> btw. I'm picking this patch before this set:
> 
> [PATCH v5] usb: new board-specific USB init interface
> 
> So you might want to wait until it's applied onto usb/next and then
> rebase and repost.

I will do as you suggested. Thanks for review.

> 
> Best regards,
> Marek Vasut
diff mbox

Patch

diff --git a/include/configs/trats.h b/include/configs/trats.h
index 24ea06b..955bd20 100644
--- a/include/configs/trats.h
+++ b/include/configs/trats.h
@@ -50,7 +50,7 @@ 
 #define CONFIG_MACH_TYPE		MACH_TYPE_TRATS
 
 /* Size of malloc() pool */
-#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (16 << 20))
+#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (80 << 20))
 
 /* select serial console configuration */
 #define CONFIG_SERIAL2			/* use SERIAL 2 */
@@ -91,12 +91,20 @@ 
 
 /* USB Composite download gadget - g_dnl */
 #define CONFIG_USBDOWNLOAD_GADGET
+
+/* TIZEN THOR downloader support */
+#define CONFIG_CMD_THOR_DOWNLOAD
+#define CONFIG_THOR_FUNCTION
+
+#define CONFIG_SYS_DFU_DATA_BUF_SIZE (32 << 20)
 #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_THOR_VENDOR_NUM CONFIG_G_DNL_VENDOR_NUM
+#define CONFIG_G_DNL_THOR_PRODUCT_NUM 0x685D
 #define CONFIG_G_DNL_MANUFACTURER "Samsung"
 
 #define CONFIG_BOOTDELAY		1
@@ -131,7 +139,8 @@ 
 #define CONFIG_DFU_ALT \
 	"u-boot mmc 80 400;" \
 	"uImage ext4 0 2;" \
-	"exynos4210-trats.dtb ext4 0 2\0"
+	"exynos4210-trats.dtb ext4 0 2;" \
+	""PARTS_ROOT" part 0 5\0"
 
 #define CONFIG_ENV_OVERWRITE
 #define CONFIG_SYS_CONSOLE_INFO_QUIET