arm:goni: Update GONI configuration
cover arm:goni: Update GONI configuration
Samsung's GONI target has been updated to support:
- New GPT partition layout
- USB Mass Storage Gadget
- DFU support
- Loading uImage from eMMC not OneNAND
Arkadiusz Wlodarczyk (4):
arm:goni: Update configuration for goni target arm:goni:dfu Add support for DFU at GONI target arm:goni: Update of GONI partitioning scheme at eMMC arm:goni: Add support for USB mass storage
board/samsung/goni/goni.c | 75 +++++++++++++++++++++++++++++++++++++ include/configs/s5p_goni.h | 88 ++++++++++++++++++++++++++++++++------------ 2 files changed, 139 insertions(+), 24 deletions(-)
Signature · 1 line
1.7.10.4
PATCH 1/4 arm:goni: Update configuration for goni target
From: Arkadiusz Wlodarczyk <[email protected]>
Configuration file for GONI has been updated to support FAT file system, new mmc partitioning scheme and read linux kernel from eMMC instead of OneNAND.
--- include/configs/s5p_goni.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)
include/configs/s5p_goni.h +13 -4
@@ -107,7 +107,7 @@#define NORMAL_MTDPARTS_DEFAULT MTDPARTS_DEFAULT -#define CONFIG_BOOTCOMMAND "run ubifsboot" +#define CONFIG_BOOTCOMMAND "run mmcboot"#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0"
@@ -137,7 +137,7 @@"onenand erase 0x01560000 0x1eaa0000;" \"onenand write 0x32000000 0x1260000 0x8C0000\0" \"bootk=" \ -"onenand read 0x30007FC0 0xc00000 0x600000;" \ +"run loaduimage;" \"bootm 0x30007FC0\0" \"flashboot=" \"set bootargs root=/dev/mtdblock${bootblock} " \
@@ -156,16 +156,21 @@"set bootargs " CONFIG_RAMDISK_BOOT \" initrd=0x33000000,8M ramdisk=8192\0" \"mmcboot=" \ -"set bootargs root=${mmcblk} rootfstype=${rootfstype}" \ +"set bootargs root=/dev/mmcblk${mmcdev}p${mmcrootpart} " \ +"rootfstype=${rootfstype}" \CONFIG_UBI_MTD " ${opts} ${lcdinfo} " \CONFIG_COMMON_BOOT "; run bootk\0" \"boottrace=setenv opts initcall_debug; run bootcmd\0" \"bootchart=set opts init=/sbin/bootchartd; run bootcmd\0" \"verify=n\0" \ -"rootfstype=cramfs\0" \ +"rootfstype=ext4\0" \"console=" CONFIG_DEFAULT_CONSOLE \"mtdparts=" MTDPARTS_DEFAULT \"meminfo=mem=80M mem=256M at 0x40000000 mem=128M at 0x50000000\0" \ +"loaduimage=fatload mmc ${mmcdev}:${mmcbootpart} 0x30007FC0 uImage\0" \ +"mmcdev=0\0" \ +"mmcbootpart=2\0" \ +"mmcrootpart=5\0" \"mmcblk=/dev/mmcblk1p1\0" \"bootblock=9\0" \"ubiblock=8\0" \
@@ -211,6 +216,10 @@#define CONFIG_DOS_PARTITION 1 +/* FAT */ +#define CONFIG_CMD_FAT +#define CONFIG_FAT_WRITE +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR - 0x1000000)#define CONFIG_SYS_CACHELINE_SIZE 64
Signature · 1 line
1.7.10.4
PATCH 2/4 arm:goni:dfu Add support for DFU at GONI target
In reply to Lukasz MajewskiFrom: Arkadiusz Wlodarczyk <[email protected]>
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.
--- board/samsung/goni/goni.c | 7 +++++++ include/configs/s5p_goni.h | 20 +++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-)
board/samsung/goni/goni.c +7 -0
@@ -155,4 +155,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
include/configs/s5p_goni.h +19 -1
@@ -86,6 +86,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
@@ -105,6 +116,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"
@@ -175,7 +190,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 */
@@ -242,5 +259,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 */
Signature · 1 line
1.7.10.4
PATCH 2/4 arm:goni:dfu Add support for DFU at GONI target
Hi Lukasz,
I put the dfu support into am335x board even i able to download all
images from dfu-util, but when i trying to upload images, (from dfu devices to PC), my system failed.
Could you tell me what is the problem and where should i look into?
Thanks & Regards
~Sumit gemini
Quoted 90 lines · Lukasz Majewski
From: Arkadiusz Wlodarczyk <[email protected]>
Proper adjustment for supporting DFU at GONI target has been made. The
s5p_goni.hfile has been updated. Moreover the code for low level USB initialization has been added to GONI board code.Signed-off-by Arkadiusz Wlodarczyk <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Tested-by Arkadiusz Wlodarczyk <[email protected]>Cc Minkyu Kang <[email protected]>--- board/samsung/goni/goni.c | 7 +++++++ include/configs/s5p_goni.h | 20 +++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-)board/samsung/goni/goni.c +7
-0@@ -155,4 +155,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 include/configs/s5p_goni.h +19
-2@@ -86,6 +86,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 @@ -105,6 +116,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"@@ -175,7 +190,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 */@@ -242,5 +259,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 */ --1.7.10.4
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH 2/4 arm:goni:dfu Add support for DFU at GONI target
Hi Sumit,
Quoted 7 lines
Hi Lukasz,
I put the dfu support into am335x board even i able to download
all images from dfu-util, but when i trying to upload images, (from dfu devices to PC), my system failed.Could you tell me what is the problem and where should i look into?
Indeed dfu upload doesn't work on Trats anymore (it uses eMMC backend). I've checked and fixed problem with dfu write yesterday (also with eMMC).
Recently the dfu subsystem has been reworked to get rid of fixed buffer size, so please regard it as "under heavy development".
I will look into this problem (for eMMC, not NAND - since my Trats doesn't have NAND memory).
BTW: Which version of dfu-util do you use? (Mine is 0.5, but for debian 5.0 / 6.0 there also was very ancient 0.1 version - which doesn't work with current dfu code).
Quoted 99 lines
Thanks & Regards
~Sumit geminiQuoted 90 lines · Lukasz Majewski
From: Arkadiusz Wlodarczyk <[email protected]>
Proper adjustment for supporting DFU at GONI target has been made. The
s5p_goni.hfile has been updated. Moreover the code for low level USB initialization has been added to GONI board code.Signed-off-by Arkadiusz Wlodarczyk <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Tested-by Arkadiusz Wlodarczyk <[email protected]>Cc Minkyu Kang <[email protected]>--- board/samsung/goni/goni.c | 7 +++++++ include/configs/s5p_goni.h | 20 +++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-)board/samsung/goni/goni.c +7
-0@@ -155,4 +155,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 include/configs/s5p_goni.h +19
-2@@ -86,6 +86,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 @@ -105,6 +116,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"@@ -175,7 +190,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 */@@ -242,5 +259,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 */ --1.7.10.4
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
Signature · 5 lines
Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
PATCH 2/4 arm:goni:dfu Add support for DFU at GONI target
Hi Lukasz,
My dfu version is 1.0 and am using SPI flash NOR. downloading is fine
but uploading failed.
I am trying lot to upload binary from dfu-device to pc but not able to
do that.
I am facing following error :-
when i apply
dfu-util -v -a u-boot -U dfu-UBOOT from my host
machine,
I got such log on Host machine :-
Device returned transfer size 4096
bytes_per_hash=4096
Copying data from DFU device to PC
Starting upload: [] finished!
Received a total of 1 bytes
and finally dfu-SPL file created with 4kb size.
but on target machine, i got
Running: sf read 0x00000000 0x20000 0x0
Failed to map physical memory.
May i know why i got such error or user have to specify address over which we read our binary.
Any help will appreciate and if any body has related pointer, please let me know, I have stuck in this error.
and further more,
After analyzing a lot, i got a function "dfu_upload" in dfu.c file, calling another function "libusb_control_transfer" which return only 1, might be it is not getting interface, because when i pass
dfu-util -a u-boot -U SPL-uboot in host machine
i got in target machine :-
SF: Detected N25Q256 with page size 64 KiB, total 32 MiB
Running: sf read 0x00000000 0x20000 0x0
Failed to map physical memory
So, how can i analyze flash memory, why it is getting fail to map itself with physical memory.
Thanks
Quoted 135 lines · Lukasz Majewski
Hi Sumit,
Quoted 7 lines
Hi Lukasz,
I put the dfu support into am335x board even i able to download
all images from dfu-util, but when i trying to upload images, (from dfu devices to PC), my system failed.Could you tell me what is the problem and where should i look into?
Indeed dfu upload doesn't work on Trats anymore (it uses eMMC backend). I've checked and fixed problem with dfu write yesterday (also with eMMC).
Recently the dfu subsystem has been reworked to get rid of fixed buffer size, so please regard it as "under heavy development".
I will look into this problem (for eMMC, not NAND - since my Trats doesn't have NAND memory).
BTW: Which version of dfu-util do you use? (Mine is 0.5, but for debian 5.0 / 6.0 there also was very ancient 0.1 version - which doesn't work with current dfu code).
Quoted 94 lines
Thanks & Regards
~Sumit geminiQuoted 85 lines · Lukasz Majewski
From: Arkadiusz Wlodarczyk <[email protected]>
Proper adjustment for supporting DFU at GONI target has been made. The
s5p_goni.hfile has been updated. Moreover the code for low level USB initialization has been added to GONI board code.Signed-off-by Arkadiusz Wlodarczyk <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Tested-by Arkadiusz Wlodarczyk <[email protected]>Cc Minkyu Kang <[email protected]>--- board/samsung/goni/goni.c | 7 +++++++ include/configs/s5p_goni.h | 20 +++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-)board/samsung/goni/goni.c +7
-0@@ -155,4 +155,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 include/configs/s5p_goni.h +19
-2@@ -86,6 +86,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 @@ -105,6 +116,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"@@ -175,7 +190,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 */@@ -242,5 +259,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 */ --1.7.10.4
Quoted 5 lines
Quoted 5 lines
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot--
Best regards,Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
PATCH 2/4 arm:goni:dfu Add support for DFU at GONI target
Hi Sumit,
Quoted 17 lines
Hi Lukasz,
My dfu version is 1.0 and am using SPI flash NOR. downloading is
fine but uploading failed.I am trying lot to upload binary from dfu-device to pc but not
able to do that.I am facing following error :-
when i apply
dfu-util -v -a u-boot -U dfu-UBOOT from my host
machine,I got such log on Host machine :-
Quoted 7 lines
Device returned transfer size 4096
bytes_per_hash=4096
Copying data from DFU device to PC
Starting upload: [] finished!
Received a total of 1 bytesand finally dfu-SPL file created with 4kb size.
Why dfu-SPL? Not dfu-BOOT? (you are calling the dfu-util command with -U dfu-UBOOT)
Quoted 6 lines
but on target machine, i got
Running: sf read
0x000000000x200000x0
Failed to map physical memory.
I'm not the right person to answer. You ought to ask Tom Rini or other developers involved in flash development (e.g. Pantelis, Heiko).
Quoted 19 lines
May i know why i got such error or user have to specify address over which we read our binary.
Any help will appreciate and if any body has related pointer, please let me know, I have stuck in this error.
and further more,
After analyzing a lot, i got a function "
dfu_upload" indfu.cfile, calling another function "libusb_control_transfer" which return only 1, might be it is not getting interface, because when i passdfu-util -a u-boot -U SPL-uboot in host machine
i got in target machine :-
Quoted 8 lines
SF: Detected N25Q256 with page size 64 KiB, total 32 MiB
Running: sf read
0x000000000x200000x0
Failed to map physical memorySo, how can i analyze flash memory, why it is getting fail to map itself with physical memory.
What I can do is to check if the USB gadget DFU layer works with upload. With the NAND backend I'm not able to help much here (I don't have NAND memory on my targets).
Quoted 144 lines
Thanks
Quoted 137 lines · Lukasz Majewski
Hi Sumit,
Quoted 8 lines
Hi Lukasz,
I put the dfu support into am335x board even i able to
download all images from dfu-util, but when i trying to upload images, (from dfu devices to PC), my system failed.Could you tell me what is the problem and where should i look
into?Indeed dfu upload doesn't work on Trats anymore (it uses eMMC backend). I've checked and fixed problem with dfu write yesterday (also with eMMC).
Recently the dfu subsystem has been reworked to get rid of fixed buffer size, so please regard it as "under heavy development".
I will look into this problem (for eMMC, not NAND - since my Trats doesn't have NAND memory).
BTW: Which version of dfu-util do you use? (Mine is 0.5, but for debian 5.0 / 6.0 there also was very ancient 0.1 version - which doesn't work with current dfu code).
Quoted 95 lines
Thanks & Regards
~Sumit geminiQuoted 86 lines · Lukasz Majewski
From: Arkadiusz Wlodarczyk <[email protected]>
Proper adjustment for supporting DFU at GONI target has been made. The
s5p_goni.hfile has been updated. Moreover the code for low level USB initialization has been added to GONI board code.Signed-off-by Arkadiusz Wlodarczyk <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Tested-by Arkadiusz Wlodarczyk <[email protected]>Cc Minkyu Kang <[email protected]>--- board/samsung/goni/goni.c | 7 +++++++ include/configs/s5p_goni.h | 20 +++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-)(quoted diff) +0
-0
b/board/samsung/goni/goni.cindex ff76963..3c53106 100644board/samsung/goni/goni.c +7
-0@@ -155,4 +155,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 (quoted diff) +0
-0
b/include/configs/s5p_goni.hindex ec43652..8a824c7 100644include/configs/s5p_goni.h +18
-1@@ -86,6 +86,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 @@ -105,6 +116,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"@@ -175,7 +190,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*/ @@ -242,5 +259,6 @@
#defineCONFIG_USB_GADGET
#defineCONFIG_USB_GADGET_S3C_UDC_OTG
#defineCONFIG_USB_GADGET_DUALSPEED
+#defineCONFIG_USB_GADGET_VBUS_DRAW2#endif /*
__CONFIG_H*/
--
1.7.10.4Quoted 5 lines
Quoted 5 lines
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot--
Best regards,Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
Signature · 5 lines
Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
PATCH 2/4 arm:goni:dfu Add support for DFU at GONI target
Hi Lukasz,
sorry i just copy and paste that...
"why dfu-SPL? Not dfu-BOOT"
dfu-Boot will come instead of dfu-SPL
and thanks for help, i talk to Pantelis, Heiko for the same.
Thanks & Regards
~Sumit Gemini
Quoted 226 lines · Lukasz Majewski
Hi Sumit,
Quoted 17 lines
Hi Lukasz,
My dfu version is 1.0 and am using SPI flash NOR. downloading is
fine but uploading failed.I am trying lot to upload binary from dfu-device to pc but not
able to do that.I am facing following error :-
when i apply
dfu-util -v -a u-boot -U dfu-UBOOT from my host
machine,I got such log on Host machine :-
Quoted 7 lines
Device returned transfer size 4096
bytes_per_hash=4096
Copying data from DFU device to PC
Starting upload: [] finished!
Received a total of 1 bytesand finally dfu-SPL file created with 4kb size.
Why dfu-SPL? Not dfu-BOOT? (you are calling the dfu-util command with -U dfu-UBOOT)
Quoted 6 lines
but on target machine, i got
Running: sf read
0x000000000x200000x0
Failed to map physical memory.I'm not the right person to answer. You ought to ask Tom Rini or other developers involved in flash development (e.g. Pantelis, Heiko).
Quoted 19 lines
May i know why i got such error or user have to specify address over which we read our binary.
Any help will appreciate and if any body has related pointer, please let me know, I have stuck in this error.
and further more,
After analyzing a lot, i got a function "
dfu_upload" indfu.cfile, calling another function "libusb_control_transfer" which return only 1, might be it is not getting interface, because when i passdfu-util -a u-boot -U SPL-uboot in host machine
i got in target machine :-
Quoted 8 lines
SF: Detected N25Q256 with page size 64 KiB, total 32 MiB
Running: sf read
0x000000000x200000x0
Failed to map physical memorySo, how can i analyze flash memory, why it is getting fail to map itself with physical memory.
What I can do is to check if the USB gadget DFU layer works with upload. With the NAND backend I'm not able to help much here (I don't have NAND memory on my targets).
Quoted 144 lines
Thanks
Quoted 137 lines · Lukasz Majewski
Hi Sumit,
Quoted 8 lines
Hi Lukasz,
I put the dfu support into am335x board even i able to
download all images from dfu-util, but when i trying to upload images, (from dfu devices to PC), my system failed.Could you tell me what is the problem and where should i look
into?Indeed dfu upload doesn't work on Trats anymore (it uses eMMC backend). I've checked and fixed problem with dfu write yesterday (also with eMMC).
Recently the dfu subsystem has been reworked to get rid of fixed buffer size, so please regard it as "under heavy development".
I will look into this problem (for eMMC, not NAND - since my Trats doesn't have NAND memory).
BTW: Which version of dfu-util do you use? (Mine is 0.5, but for debian 5.0 / 6.0 there also was very ancient 0.1 version - which doesn't work with current dfu code).
Quoted 95 lines
Thanks & Regards
~Sumit geminiQuoted 86 lines · Lukasz Majewski
From: Arkadiusz Wlodarczyk <[email protected]>
Proper adjustment for supporting DFU at GONI target has been made. The
s5p_goni.hfile has been updated. Moreover the code for low level USB initialization has been added to GONI board code.Signed-off-by Arkadiusz Wlodarczyk <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Tested-by Arkadiusz Wlodarczyk <[email protected]>Cc Minkyu Kang <[email protected]>--- board/samsung/goni/goni.c | 7 +++++++ include/configs/s5p_goni.h | 20 +++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-)(quoted diff) +0
-0
b/board/samsung/goni/goni.cindex ff76963..3c53106 100644board/samsung/goni/goni.c +7
-0@@ -155,4 +155,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 (quoted diff) +0
-0
b/include/configs/s5p_goni.hindex ec43652..8a824c7 100644include/configs/s5p_goni.h +18
-1@@ -86,6 +86,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 @@ -105,6 +116,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"@@ -175,7 +190,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*/ @@ -242,5 +259,6 @@
#defineCONFIG_USB_GADGET
#defineCONFIG_USB_GADGET_S3C_UDC_OTG
#defineCONFIG_USB_GADGET_DUALSPEED
+#defineCONFIG_USB_GADGET_VBUS_DRAW2#endif /*
__CONFIG_H*/
--
1.7.10.4Quoted 5 lines
Quoted 5 lines
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot--
Best regards,Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
--
Best regards,Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
PATCH 2/4 arm:goni:dfu Add support for DFU at GONI target
In reply to Lukasz MajewskiQuoted 65 lines · Lukasz Majewski
From: Arkadiusz Wlodarczyk <[email protected]>
Proper adjustment for supporting DFU at GONI target has been made. The
s5p_goni.hfile has been updated. Moreover the code for low level USB initialization has been added to GONI board code.Signed-off-by Arkadiusz Wlodarczyk <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Tested-by Arkadiusz Wlodarczyk <[email protected]>Cc Minkyu Kang <[email protected]>--- board/samsung/goni/goni.c | 7 +++++++ include/configs/s5p_goni.h | 20 +++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-)board/samsung/goni/goni.c +7
-0@@ -155,4 +155,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 include/configs/s5p_goni.h +15
-0@@ -86,6 +86,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 @@ -105,6 +116,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"
include/configs/s5p_goni.h line 195
Quoted 7 lines
include/configs/s5p_goni.h +3
-1@@ -175,7 +190,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 +
please remove this blank line.
include/configs/s5p_goni.h line 264
Quoted 11 lines
include/configs/s5p_goni.h +1
-0/* Miscellaneous configurable options */ #define CONFIG_SYS_LONGHELP /* undef to save memory */ @@ -242,5 +259,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 */
Thanks,
Minkyu Kang.
PATCH v2 2/4 arm:goni:dfu Add support for DFU at GONI target
In reply to Lukasz MajewskiFrom: Arkadiusz Wlodarczyk <[email protected]>
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.
---
Changes for v2:
- Remove blank line
--- board/samsung/goni/goni.c | 7 +++++++ include/configs/s5p_goni.h | 20 +++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-)
board/samsung/goni/goni.c +7 -0
@@ -155,4 +155,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
include/configs/s5p_goni.h +18 -1
@@ -86,6 +86,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
@@ -105,6 +116,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"
@@ -175,7 +190,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 */
@@ -242,5 +259,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 */
Signature · 1 line
1.7.10.4
PATCH v2 2/4 arm:goni:dfu Add support for DFU at GONI target
Quoted 80 lines · Lukasz Majewski
From: Arkadiusz Wlodarczyk <[email protected]>
Proper adjustment for supporting DFU at GONI target has been made. The
s5p_goni.hfile has been updated. Moreover the code for low level USB initialization has been added to GONI board code.Signed-off-by Arkadiusz Wlodarczyk <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Tested-by Arkadiusz Wlodarczyk <[email protected]>Cc Minkyu Kang <[email protected]>---
Changes for v2:
- Remove blank line--- board/samsung/goni/goni.c | 7 +++++++ include/configs/s5p_goni.h | 20 +++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-)board/samsung/goni/goni.c +7
-0@@ -155,4 +155,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 include/configs/s5p_goni.h +17
-1@@ -86,6 +86,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 @@ -105,6 +116,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"@@ -175,7 +190,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 */
include/configs/s5p_goni.h line 264
Quoted 6 lines
include/configs/s5p_goni.h +1
-0@@ -242,5 +259,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 */
failed to apply your patch.
$ git am -s U-Boot-2-4-arm-goni-dfu-Add-support-for-DFU-at-GONI-target.patch Applying: arm:goni:dfu Add support for DFU at GONI target fatal: corrupt patch at line 75 Patch failed at 0001 arm:goni:dfu Add support for DFU at GONI target
$ patch --dry-run -p1 < U-Boot-2-4-arm-goni-dfu-Add-support-for-DFU-at-GONI-target.patch patching file board/samsung/goni/goni.c patching file include/configs/s5p_goni.h patch: **** malformed patch@line 99: @@ -242,5 +259,6 @@
please check.
Thanks,
Minkyu Kang.
PATCH 3/4 arm:goni: Update of GONI partitioning scheme at eMMC
In reply to Lukasz MajewskiFrom: Arkadiusz Wlodarczyk <[email protected]>
New partitioning scheme has been defined at GONI target. It complies with new GPT partitioning introduced previously.
Default partition layout has been defined at s5p_goni.h
--- include/configs/s5p_goni.h | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-)
include/configs/s5p_goni.h +26 -18
@@ -84,9 +84,9 @@#define CONFIG_CMD_CACHE #define CONFIG_CMD_REGINFO #define CONFIG_CMD_ONENAND -#define CONFIG_CMD_MTDPARTS #define CONFIG_CMD_MMC #define CONFIG_CMD_DFU +#define CONFIG_CMD_GPT /* USB Composite download gadget - g_dnl */ #define CONFIG_USBDOWNLOAD_GADGET
@@ -101,26 +101,30 @@#define CONFIG_BOOTDELAY 1#define CONFIG_ZERO_BOOTDELAY_CHECK -#define CONFIG_MTD_DEVICE -#define CONFIG_MTD_PARTITIONS - -/* Actual modem binary size is 16MiB. Add 2MiB for bad block handling */ -#define MTDIDS_DEFAULT "onenand0=samsung-onenand" -#define MTDPARTS_DEFAULT "mtdparts=samsung-onenand:1m(bootloader)"\ - ",256k(params)"\ - ",2816k(config)"\ - ",8m(csa)"\ - ",7m(kernel)"\ - ",1m(log)"\ - ",12m(modem)"\ - ",60m(qboot)"\ - ",-(UBI)\0" -#define CONFIG_DFU_ALT \ "u-boot mmc 80 400;" \ "uImage fat 0 2\0" \ -#define NORMAL_MTDPARTS_DEFAULT MTDPARTS_DEFAULT +/* partitions definitions */ +#define PARTS_CSA "csa-mmc" +#define PARTS_BOOTLOADER "u-boot" +#define PARTS_BOOT "boot" +#define PARTS_ROOT "platform" +#define PARTS_DATA "data" +#define PARTS_CSC "csc" +#define PARTS_UMS "ums" + +#define PARTS_DEFAULT \ + "uuid_disk=${uuid_gpt_disk};" \ + "name="PARTS_CSA",size=8MiB,uuid=${uuid_gpt_"PARTS_CSA"};" \ + "name="PARTS_BOOTLOADER",size=60MiB," \ + "uuid=${uuid_gpt_"PARTS_BOOTLOADER"};" \ + "name="PARTS_BOOT",size=100MiB,uuid=${uuid_gpt_"PARTS_BOOT"};" \ + "name="PARTS_ROOT",size=1GiB,uuid=${uuid_gpt_"PARTS_ROOT"};" \ + "name="PARTS_DATA",size=3GiB,uuid=${uuid_gpt_"PARTS_DATA"};" \ + "name="PARTS_CSC",size=150MiB,uuid=${uuid_gpt_"PARTS_CSC"};" \ + "name="PARTS_UMS",size=-,uuid=${uuid_gpt_"PARTS_UMS"}\0" \ +#define CONFIG_BOOTCOMMAND "run mmcboot"
@@ -180,12 +184,12 @@"verify=n\0" \"rootfstype=ext4\0" \"console=" CONFIG_DEFAULT_CONSOLE \ -"mtdparts=" MTDPARTS_DEFAULT \"meminfo=mem=80M mem=256M at 0x40000000 mem=128M at 0x50000000\0" \"loaduimage=fatload mmc ${mmcdev}:${mmcbootpart} 0x30007FC0 uImage\0" \"mmcdev=0\0" \"mmcbootpart=2\0" \"mmcrootpart=5\0" \ +"partitions=" PARTS_DEFAULT \"mmcblk=/dev/mmcblk1p1\0" \"bootblock=9\0" \"ubiblock=8\0" \
@@ -237,6 +241,10 @@#define CONFIG_CMD_FAT #define CONFIG_FAT_WRITE +/* GPT */ +#define CONFIG_EFI_PARTITION +#define CONFIG_PARTITION_UUIDS +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR - 0x1000000)#define CONFIG_SYS_CACHELINE_SIZE 64
Signature · 1 line
1.7.10.4
PATCH 4/4 arm:goni: Add support for USB mass storage
In reply to Lukasz MajewskiFrom: Arkadiusz Wlodarczyk <[email protected]>
This commit enables support for USB mass storage composite function. It defines platform code and enables it at config file.
--- board/samsung/goni/goni.c | 68 ++++++++++++++++++++++++++++++++++++++++++++ include/configs/s5p_goni.h | 5 ++++ 2 files changed, 73 insertions(+)
board/samsung/goni/goni.c +68 -0
@@ -29,6 +29,7 @@#include <usb/s3c_udc.h> #include <asm/arch/cpu.h> #include <power/max8998_pmic.h> +#include <usb_mass_storage.h> DECLARE_GLOBAL_DATA_PTR ;static struct s5pc110_gpio *s5pc110_gpio;
@@ -163,3 +164,70 @@ void board_usb_init(void) }#endif + +#ifdef CONFIG_USB_GADGET_MASS_STORAGE +static int ums_read_sector (struct ums_device *ums_dev, +ulong start,lbaint_t blkcnt,void *buf) +{ +if (ums_dev->mmc->block_dev.block_read (ums_dev->dev_num, + start + ums_dev->offset, blkcnt, buf) != blkcnt) +return -1 ; + +return 0 ; +} + +static int ums_write_sector (struct ums_device *ums_dev, +ulong start,lbaint_t blkcnt,const void *buf) +{ +if (ums_dev->mmc->block_dev.block_write (ums_dev->dev_num, + start + ums_dev->offset, blkcnt, buf) != blkcnt) +return -1 ; + +return 0 ; +} + +static void ums_get_capacity (struct ums_device *ums_dev, +long long int *capacity) +{ +long long int tmp_capacity; + + tmp_capacity = (long long int ) ((ums_dev->offset + ums_dev->part_size) + *SECTOR_SIZE ); + *capacity = ums_dev->mmc->capacity - tmp_capacity; +} + +static struct ums_board_info ums_board = { + .read_sector = ums_read_sector, + .write_sector = ums_write_sector, + .get_capacity = ums_get_capacity, + .name ="GONI UMS disk" , + .ums_dev = { + .mmc =NULL , + .dev_num =0 , + .offset =0 , + .part_size =0. + }, +}; + +struct ums_board_info *board_ums_init (unsigned int dev_num,unsigned int offset, +unsigned int part_size) +{ +struct mmc *mmc; + + mmc =find_mmc_device (dev_num); +/* mmc initialization is necessary prior to the ums command usage +* due to fact that on goni target environment is read from oneNand +* memory, so the mmc remains uninitialized whenu-boot prompt appears +* */ +if (!mmc ||mmc_init (mmc)) +return NULL ; + + ums_board.ums_dev.mmc = mmc; + ums_board.ums_dev.dev_num = dev_num; + ums_board.ums_dev.offset = offset; + ums_board.ums_dev.part_size = part_size; + +return &ums_board; +} + +#endif
include/configs/s5p_goni.h +5 -0
@@ -269,4 +269,9 @@#define CONFIG_USB_GADGET_DUALSPEED #define CONFIG_USB_GADGET_VBUS_DRAW 2 +#define CONFIG_CMD_USB_MASS_STORAGE +#if defined(CONFIG_CMD_USB_MASS_STORAGE ) +#define CONFIG_USB_GADGET_MASS_STORAGE +#endif +#endif /* __CONFIG_H */
Signature · 1 line
1.7.10.4
cover arm:goni: Update GONI configuration
In reply to Lukasz MajewskiSamsung's GONI target has been updated to support:
- New GPT partition layout
- USB Mass Storage Gadget
- DFU support
- Loading uImage from eMMC not OneNAND
Arkadiusz Wlodarczyk (4):
arm:goni: Update configuration for goni target arm:goni:dfu Add support for DFU at GONI target arm:goni: Update of GONI partitioning scheme at eMMC arm:goni: Add support for USB mass storage
board/samsung/goni/goni.c | 75 +++++++++++++++++++++++++++++++++++++ include/configs/s5p_goni.h | 88 ++++++++++++++++++++++++++++++++------------ 2 files changed, 139 insertions(+), 24 deletions(-)
Signature · 1 line
1.7.10.4
PATCH RESEND 1/4 arm:goni: Update configuration for goni target
From: Arkadiusz Wlodarczyk <[email protected]>
Configuration file for GONI has been updated to support FAT file system, new mmc partitioning scheme and read linux kernel from eMMC instead of OneNAND.
--- include/configs/s5p_goni.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)
include/configs/s5p_goni.h +13 -4
@@ -107,7 +107,7 @@#define NORMAL_MTDPARTS_DEFAULT MTDPARTS_DEFAULT -#define CONFIG_BOOTCOMMAND "run ubifsboot" +#define CONFIG_BOOTCOMMAND "run mmcboot"#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0"
@@ -137,7 +137,7 @@"onenand erase 0x01560000 0x1eaa0000;" \"onenand write 0x32000000 0x1260000 0x8C0000\0" \"bootk=" \ -"onenand read 0x30007FC0 0xc00000 0x600000;" \ +"run loaduimage;" \"bootm 0x30007FC0\0" \"flashboot=" \"set bootargs root=/dev/mtdblock${bootblock} " \
@@ -156,16 +156,21 @@"set bootargs " CONFIG_RAMDISK_BOOT \" initrd=0x33000000,8M ramdisk=8192\0" \"mmcboot=" \ -"set bootargs root=${mmcblk} rootfstype=${rootfstype}" \ +"set bootargs root=/dev/mmcblk${mmcdev}p${mmcrootpart} " \ +"rootfstype=${rootfstype}" \CONFIG_UBI_MTD " ${opts} ${lcdinfo} " \CONFIG_COMMON_BOOT "; run bootk\0" \"boottrace=setenv opts initcall_debug; run bootcmd\0" \"bootchart=set opts init=/sbin/bootchartd; run bootcmd\0" \"verify=n\0" \ -"rootfstype=cramfs\0" \ +"rootfstype=ext4\0" \"console=" CONFIG_DEFAULT_CONSOLE \"mtdparts=" MTDPARTS_DEFAULT \"meminfo=mem=80M mem=256M at 0x40000000 mem=128M at 0x50000000\0" \ +"loaduimage=fatload mmc ${mmcdev}:${mmcbootpart} 0x30007FC0 uImage\0" \ +"mmcdev=0\0" \ +"mmcbootpart=2\0" \ +"mmcrootpart=5\0" \"mmcblk=/dev/mmcblk1p1\0" \"bootblock=9\0" \"ubiblock=8\0" \
@@ -211,6 +216,10 @@#define CONFIG_DOS_PARTITION 1 +/* FAT */ +#define CONFIG_CMD_FAT +#define CONFIG_FAT_WRITE +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR - 0x1000000)#define CONFIG_SYS_CACHELINE_SIZE 64
Signature · 1 line
1.7.10.4
PATCH RESEND 1/4 arm:goni: Update configuration for goni target
Quoted 37 lines · Lukasz Majewski
From: Arkadiusz Wlodarczyk <[email protected]>
Configuration file for GONI has been updated to support FAT file system, new mmc partitioning scheme and read linux kernel from eMMC instead of OneNAND.
Signed-off-by Arkadiusz Wlodarczyk <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Tested-by Arkadiusz Wlodarczyk <[email protected]>Cc Minkyu Kang <[email protected]>--- include/configs/s5p_goni.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)include/configs/s5p_goni.h +2
-2@@ -107,7 +107,7 @@#define NORMAL_MTDPARTS_DEFAULT MTDPARTS_DEFAULT -#define CONFIG_BOOTCOMMAND "run ubifsboot" +#define CONFIG_BOOTCOMMAND "run mmcboot"#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0"@@ -137,7 +137,7 @@"onenand erase 0x01560000 0x1eaa0000;" \"onenand write 0x32000000 0x1260000 0x8C0000\0" \"bootk=" \ -"onenand read 0x30007FC0 0xc00000 0x600000;" \ +"run loaduimage;" \"bootm 0x30007FC0\0" \"flashboot=" \"set bootargs root=/dev/mtdblock${bootblock} " \
include/configs/s5p_goni.h line 160
Quoted 6 lines
include/configs/s5p_goni.h +2
-1@@ -156,16 +156,21 @@"set bootargs " CONFIG_RAMDISK_BOOT \" initrd=0x33000000,8M ramdisk=8192\0" \"mmcboot=" \ -"set bootargs root=${mmcblk} rootfstype=${rootfstype}" \ +"set bootargs root=/dev/mmcblk${mmcdev}p${mmcrootpart} " \ +"rootfstype=${rootfstype}" \
Could you add the "rootwait"?
Quoted 5 lines
include/configs/s5p_goni.h +0
-0CONFIG_UBI_MTD " ${opts} ${lcdinfo} " \CONFIG_COMMON_BOOT "; run bootk\0" \"boottrace=setenv opts initcall_debug; run bootcmd\0" \"bootchart=set opts init=/sbin/bootchartd; run bootcmd\0" \"verify=n\0" \
include/configs/s5p_goni.h line 174
Quoted 10 lines
include/configs/s5p_goni.h +5
-1-"rootfstype=cramfs\0" \ +"rootfstype=ext4\0" \"console=" CONFIG_DEFAULT_CONSOLE \"mtdparts=" MTDPARTS_DEFAULT \"meminfo=mem=80M mem=256M at 0x40000000 mem=128M at 0x50000000\0" \ +"loaduimage=fatload mmc ${mmcdev}:${mmcbootpart} 0x30007FC0 uImage\0" \ +"mmcdev=0\0" \ +"mmcbootpart=2\0" \ +"mmcrootpart=5\0" \"mmcblk=/dev/mmcblk1p1\0" \
mmcblk can be removed?
Best Regards,
Jaehoon Chung
Quoted 14 lines
include/configs/s5p_goni.h +4
-0"bootblock=9\0" \"ubiblock=8\0" \@@ -211,6 +216,10 @@#define CONFIG_DOS_PARTITION 1 +/* FAT */ +#define CONFIG_CMD_FAT +#define CONFIG_FAT_WRITE +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR - 0x1000000)#define CONFIG_SYS_CACHELINE_SIZE 64
PATCH RESEND 1/4 arm:goni: Update configuration for goni target
Quoted 39 lines · Jaehoon Chung
Quoted 38 lines · Lukasz Majewski
From: Arkadiusz Wlodarczyk <[email protected]>
Configuration file for GONI has been updated to support FAT file system, new mmc partitioning scheme and read linux kernel from eMMC instead of OneNAND.
Signed-off-by Arkadiusz Wlodarczyk <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Tested-by Arkadiusz Wlodarczyk <[email protected]>Cc Minkyu Kang <[email protected]>--- include/configs/s5p_goni.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)include/configs/s5p_goni.h +2
-2@@ -107,7 +107,7 @@#define NORMAL_MTDPARTS_DEFAULT MTDPARTS_DEFAULT -#define CONFIG_BOOTCOMMAND "run ubifsboot" +#define CONFIG_BOOTCOMMAND "run mmcboot"#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0"@@ -137,7 +137,7 @@"onenand erase 0x01560000 0x1eaa0000;" \"onenand write 0x32000000 0x1260000 0x8C0000\0" \"bootk=" \ -"onenand read 0x30007FC0 0xc00000 0x600000;" \ +"run loaduimage;" \"bootm 0x30007FC0\0" \"flashboot=" \"set bootargs root=/dev/mtdblock${bootblock} " \@@ -156,16 +156,21 @@"set bootargs " CONFIG_RAMDISK_BOOT \
Quoted 8 lines
include/configs/s5p_goni.h line 162
Quoted 7 lines
include/configs/s5p_goni.h +2
-1" initrd=0x33000000,8M ramdisk=8192\0" \ "mmcboot=" \ -"set bootargs root=${mmcblk} rootfstype=${rootfstype}" \ + "set bootargs root=/dev/mmcblk${mmcdev}p${mmcrootpart} " \ + "rootfstype=${rootfstype}" \Could you add the "rootwait"?
Yes, correct. Thanks for pointing.
Quoted 10 lines
Quoted 10 lines
include/configs/s5p_goni.h +1
-1CONFIG_UBI_MTD " ${opts} ${lcdinfo} " \CONFIG_COMMON_BOOT "; run bootk\0" \"boottrace=setenv opts initcall_debug; run bootcmd\0" \"bootchart=set opts init=/sbin/bootchartd; run bootcmd\0" \"verify=n\0" \ -"rootfstype=cramfs\0" \ +"rootfstype=ext4\0" \"console=" CONFIG_DEFAULT_CONSOLE \"mtdparts=" MTDPARTS_DEFAULT \ "meminfo=mem=80M mem=256M at 0x40000000
Quoted 8 lines
include/configs/s5p_goni.h line 174
Quoted 7 lines
include/configs/s5p_goni.h +1
-0mem=128M at 0x50000000\0" \ + "loaduimage=fatload mmc ${mmcdev}:${mmcbootpart}
0x30007FC0uImage\0" \include/configs/s5p_goni.h +3
-0+"mmcdev=0\0" \ +"mmcbootpart=2\0" \ +"mmcrootpart=5\0" \"mmcblk=/dev/mmcblk1p1\0" \mmcblk can be removed?
Yes, it seems redundant here.
Quoted 9 lines
Best Regards,
Jaehoon ChungQuoted 6 lines
include/configs/s5p_goni.h +0
-0"bootblock=9\0" \"ubiblock=8\0" \@@ -211,6 +216,10 @@#define CONFIG_DOS_PARTITION 1
Quoted 9 lines
include/configs/s5p_goni.h line 225
Quoted 8 lines
include/configs/s5p_goni.h +4
-0+/* FAT */ +#define CONFIG_CMD_FAT +#define CONFIG_FAT_WRITE +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR - 0x1000000)#define CONFIG_SYS_CACHELINE_SIZE 64
Thanks for review.
Signature · 5 lines
Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
PATCH RESEND 2/4 arm:goni:dfu Add support for DFU at GONI target
In reply to Lukasz MajewskiFrom: Arkadiusz Wlodarczyk <[email protected]>
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.
--- board/samsung/goni/goni.c | 7 +++++++ include/configs/s5p_goni.h | 20 +++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-)
board/samsung/goni/goni.c +7 -0
@@ -155,4 +155,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
include/configs/s5p_goni.h +19 -1
@@ -86,6 +86,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
@@ -105,6 +116,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"
@@ -175,7 +190,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 */
@@ -242,5 +259,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 */
Signature · 1 line
1.7.10.4
PATCH RESEND 2/4 arm:goni:dfu Add support for DFU at GONI target
Dear Lukasz,
Quoted 6 lines · Lukasz Majewski
From: Arkadiusz Wlodarczyk <[email protected]>
Proper adjustment for supporting DFU at GONI target has been made. The
s5p_goni.hfile has been updated. Moreover the code for low level USB initialization has been added to GONI board code.
Quoted 6 lines
Signed-off-by Arkadiusz Wlodarczyk <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Tested-by Arkadiusz Wlodarczyk <[email protected]>Cc Minkyu Kang <[email protected]>---
Please add change log here.
And this patch seem version 3 (or 2?), but you did not mention it.
Quoted 54 lines
board/samsung/goni/goni.c | 7 +++++++ include/configs/s5p_goni.h | 20 +++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-)board/samsung/goni/goni.c +7
-0@@ -155,4 +155,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 include/configs/s5p_goni.h +15
-0@@ -86,6 +86,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 @@ -105,6 +116,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"
include/configs/s5p_goni.h line 196
Quoted 8 lines
include/configs/s5p_goni.h +3
-1@@ -175,7 +190,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 +
seems redundant blank line.
Quoted 13 lines
include/configs/s5p_goni.h +1
-1/* Miscellaneous configurable options */ #define CONFIG_SYS_LONGHELP /* undef to save memory */ @@ -242,5 +259,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 */ --1.7.10.4
Quoted 5 lines
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
Thanks,
Minkyu Kang.
PATCH RESEND 2/4 arm:goni:dfu Add support for DFU at GONI target
On Sun, 07 Jul 2013 14:48:18 +0900, Minkyu Kang wrote:
Dear Minkyu,
Quoted 18 lines
Dear Lukasz,
Quoted 6 lines · Lukasz Majewski
From: Arkadiusz Wlodarczyk <[email protected]>
Proper adjustment for supporting DFU at GONI target has been made. The
s5p_goni.hfile has been updated. Moreover the code for low level USB initialization has been added to GONI board code.Quoted 6 lines
Signed-off-by Arkadiusz Wlodarczyk <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Tested-by Arkadiusz Wlodarczyk <[email protected]>Cc Minkyu Kang <[email protected]>---
Quoted 2 lines
Please add change log here.
And this patch seem version 3 (or 2?), but you did not mention it.
To be honest it is RESEND to v2 of this patch. Since v2 didn't applied to u-boot-samsung/master branch.
Why I did resend? You have only replied on the PATCH 2/4 and I thought that other patches are still under review. I didn't want to send v3 over patches which might be under review.
Quoted 54 lines
Quoted 54 lines
board/samsung/goni/goni.c | 7 +++++++ include/configs/s5p_goni.h | 20 +++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-)board/samsung/goni/goni.c +7
-0@@ -155,4 +155,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 include/configs/s5p_goni.h +15
-0@@ -86,6 +86,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 @@ -105,6 +116,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
Quoted 12 lines
include/configs/s5p_goni.h line 196
Quoted 10 lines
include/configs/s5p_goni.h +3
-1#define CONFIG_BOOTCOMMAND "run mmcboot"@@ -175,7 +190,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 +seems redundant blank line.
Ok.
Quoted 24 lines
Quoted 15 lines
include/configs/s5p_goni.h +1
-1/* Miscellaneous configurable options */ #define CONFIG_SYS_LONGHELP /* undef to save memory */ @@ -242,5 +259,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 */ --1.7.10.4
Quoted 5 lines
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-bootThanks,
Minkyu Kang.
Signature · 5 lines
Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
PATCH RESEND 2/4 arm:goni:dfu Add support for DFU at GONI target
Quoted 22 lines · Lukasz Majewski
On Sun, 07 Jul 2013 14:48:18 +0900, Minkyu Kang wrote:
Dear Minkyu,
Quoted 18 lines
Dear Lukasz,
Quoted 12 lines · Lukasz Majewski
From: Arkadiusz Wlodarczyk <[email protected]>
Proper adjustment for supporting DFU at GONI target has been made. The
s5p_goni.hfile has been updated. Moreover the code for low level USB initialization has been added to GONI board code.Signed-off-by Arkadiusz Wlodarczyk <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Tested-by Arkadiusz Wlodarczyk <[email protected]>Cc Minkyu Kang <[email protected]>---
Quoted 5 lines
Quoted 2 lines
Please add change log here.
And this patch seem version 3 (or 2?), but you did not mention it.To be honest it is RESEND to v2 of this patch. Since v2 didn't applied to u-boot-samsung/master branch.
why you resend v1 patch?
Quoted 4 lines
Why I did resend? You have only replied on the PATCH 2/4 and I thought that other patches are still under review. I didn't want to send v3 over patches which might be under review.
Suit yourself.
Quoted 96 lines
Quoted 55 lines
Quoted 55 lines
board/samsung/goni/goni.c | 7 +++++++ include/configs/s5p_goni.h | 20 +++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-)board/samsung/goni/goni.c +7
-0@@ -155,4 +155,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 include/configs/s5p_goni.h +15
-0@@ -86,6 +86,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 @@ -105,6 +116,10 @@",60m(qboot)" \ ",-(UBI)\0" +#define CONFIG_DFU_ALT \ + "u-boot mmc 80 400;" \ + "uImage fat 0 2\0" \ +#define NORMAL_MTDPARTS_DEFAULT MTDPARTS_DEFAULTQuoted 12 lines
include/configs/s5p_goni.h line 196
Quoted 10 lines
include/configs/s5p_goni.h +3
-1#define CONFIG_BOOTCOMMAND "run mmcboot"@@ -175,7 +190,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 +seems redundant blank line.
Ok.
Quoted 24 lines
Quoted 15 lines
include/configs/s5p_goni.h +1
-1/* Miscellaneous configurable options */ #define CONFIG_SYS_LONGHELP /* undef to save memory */ @@ -242,5 +259,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 */ --1.7.10.4
Quoted 5 lines
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-bootThanks,
Minkyu Kang.
PATCH RESEND 3/4 arm:goni: Update of GONI partitioning scheme at eMMC
In reply to Lukasz MajewskiFrom: Arkadiusz Wlodarczyk <[email protected]>
New partitioning scheme has been defined at GONI target. It complies with new GPT partitioning introduced previously.
Default partition layout has been defined at s5p_goni.h
--- include/configs/s5p_goni.h | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-)
include/configs/s5p_goni.h +26 -18
@@ -84,9 +84,9 @@#define CONFIG_CMD_CACHE #define CONFIG_CMD_REGINFO #define CONFIG_CMD_ONENAND -#define CONFIG_CMD_MTDPARTS #define CONFIG_CMD_MMC #define CONFIG_CMD_DFU +#define CONFIG_CMD_GPT /* USB Composite download gadget - g_dnl */ #define CONFIG_USBDOWNLOAD_GADGET
@@ -101,26 +101,30 @@#define CONFIG_BOOTDELAY 1#define CONFIG_ZERO_BOOTDELAY_CHECK -#define CONFIG_MTD_DEVICE -#define CONFIG_MTD_PARTITIONS - -/* Actual modem binary size is 16MiB. Add 2MiB for bad block handling */ -#define MTDIDS_DEFAULT "onenand0=samsung-onenand" -#define MTDPARTS_DEFAULT "mtdparts=samsung-onenand:1m(bootloader)"\ - ",256k(params)"\ - ",2816k(config)"\ - ",8m(csa)"\ - ",7m(kernel)"\ - ",1m(log)"\ - ",12m(modem)"\ - ",60m(qboot)"\ - ",-(UBI)\0" -#define CONFIG_DFU_ALT \ "u-boot mmc 80 400;" \ "uImage fat 0 2\0" \ -#define NORMAL_MTDPARTS_DEFAULT MTDPARTS_DEFAULT +/* partitions definitions */ +#define PARTS_CSA "csa-mmc" +#define PARTS_BOOTLOADER "u-boot" +#define PARTS_BOOT "boot" +#define PARTS_ROOT "platform" +#define PARTS_DATA "data" +#define PARTS_CSC "csc" +#define PARTS_UMS "ums" + +#define PARTS_DEFAULT \ + "uuid_disk=${uuid_gpt_disk};" \ + "name="PARTS_CSA",size=8MiB,uuid=${uuid_gpt_"PARTS_CSA"};" \ + "name="PARTS_BOOTLOADER",size=60MiB," \ + "uuid=${uuid_gpt_"PARTS_BOOTLOADER"};" \ + "name="PARTS_BOOT",size=100MiB,uuid=${uuid_gpt_"PARTS_BOOT"};" \ + "name="PARTS_ROOT",size=1GiB,uuid=${uuid_gpt_"PARTS_ROOT"};" \ + "name="PARTS_DATA",size=3GiB,uuid=${uuid_gpt_"PARTS_DATA"};" \ + "name="PARTS_CSC",size=150MiB,uuid=${uuid_gpt_"PARTS_CSC"};" \ + "name="PARTS_UMS",size=-,uuid=${uuid_gpt_"PARTS_UMS"}\0" \ +#define CONFIG_BOOTCOMMAND "run mmcboot"
@@ -180,12 +184,12 @@"verify=n\0" \"rootfstype=ext4\0" \"console=" CONFIG_DEFAULT_CONSOLE \ -"mtdparts=" MTDPARTS_DEFAULT \"meminfo=mem=80M mem=256M at 0x40000000 mem=128M at 0x50000000\0" \"loaduimage=fatload mmc ${mmcdev}:${mmcbootpart} 0x30007FC0 uImage\0" \"mmcdev=0\0" \"mmcbootpart=2\0" \"mmcrootpart=5\0" \ +"partitions=" PARTS_DEFAULT \"mmcblk=/dev/mmcblk1p1\0" \"bootblock=9\0" \"ubiblock=8\0" \
@@ -237,6 +241,10 @@#define CONFIG_CMD_FAT #define CONFIG_FAT_WRITE +/* GPT */ +#define CONFIG_EFI_PARTITION +#define CONFIG_PARTITION_UUIDS +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR - 0x1000000)#define CONFIG_SYS_CACHELINE_SIZE 64
Signature · 1 line
1.7.10.4
PATCH RESEND 4/4 arm:goni: Add support for USB mass storage
In reply to Lukasz MajewskiFrom: Arkadiusz Wlodarczyk <[email protected]>
This commit enables support for USB mass storage composite function. It defines platform code and enables it at config file.
--- board/samsung/goni/goni.c | 68 ++++++++++++++++++++++++++++++++++++++++++++ include/configs/s5p_goni.h | 5 ++++ 2 files changed, 73 insertions(+)
board/samsung/goni/goni.c +68 -0
@@ -29,6 +29,7 @@#include <usb/s3c_udc.h> #include <asm/arch/cpu.h> #include <power/max8998_pmic.h> +#include <usb_mass_storage.h> DECLARE_GLOBAL_DATA_PTR ;static struct s5pc110_gpio *s5pc110_gpio;
@@ -163,3 +164,70 @@ void board_usb_init(void) }#endif + +#ifdef CONFIG_USB_GADGET_MASS_STORAGE +static int ums_read_sector (struct ums_device *ums_dev, +ulong start,lbaint_t blkcnt,void *buf) +{ +if (ums_dev->mmc->block_dev.block_read (ums_dev->dev_num, + start + ums_dev->offset, blkcnt, buf) != blkcnt) +return -1 ; + +return 0 ; +} + +static int ums_write_sector (struct ums_device *ums_dev, +ulong start,lbaint_t blkcnt,const void *buf) +{ +if (ums_dev->mmc->block_dev.block_write (ums_dev->dev_num, + start + ums_dev->offset, blkcnt, buf) != blkcnt) +return -1 ; + +return 0 ; +} + +static void ums_get_capacity (struct ums_device *ums_dev, +long long int *capacity) +{ +long long int tmp_capacity; + + tmp_capacity = (long long int ) ((ums_dev->offset + ums_dev->part_size) + *SECTOR_SIZE ); + *capacity = ums_dev->mmc->capacity - tmp_capacity; +} + +static struct ums_board_info ums_board = { + .read_sector = ums_read_sector, + .write_sector = ums_write_sector, + .get_capacity = ums_get_capacity, + .name ="GONI UMS disk" , + .ums_dev = { + .mmc =NULL , + .dev_num =0 , + .offset =0 , + .part_size =0. + }, +}; + +struct ums_board_info *board_ums_init (unsigned int dev_num,unsigned int offset, +unsigned int part_size) +{ +struct mmc *mmc; + + mmc =find_mmc_device (dev_num); +/* mmc initialization is necessary prior to the ums command usage +* due to fact that on goni target environment is read from oneNand +* memory, so the mmc remains uninitialized whenu-boot prompt appears +* */ +if (!mmc ||mmc_init (mmc)) +return NULL ; + + ums_board.ums_dev.mmc = mmc; + ums_board.ums_dev.dev_num = dev_num; + ums_board.ums_dev.offset = offset; + ums_board.ums_dev.part_size = part_size; + +return &ums_board; +} + +#endif
include/configs/s5p_goni.h +5 -0
@@ -269,4 +269,9 @@#define CONFIG_USB_GADGET_DUALSPEED #define CONFIG_USB_GADGET_VBUS_DRAW 2 +#define CONFIG_CMD_USB_MASS_STORAGE +#if defined(CONFIG_CMD_USB_MASS_STORAGE ) +#define CONFIG_USB_GADGET_MASS_STORAGE +#endif +#endif /* __CONFIG_H */
Signature · 1 line
1.7.10.4
PATCH RESEND 4/4 arm:goni: Add support for USB mass storage
Quoted 5 lines · Lukasz Majewski
From: Arkadiusz Wlodarczyk <[email protected]>
This commit enables support for USB mass storage composite function. It defines platform code and enables it at config file.
Quoted 9 lines
Signed-off-by Arkadiusz Wlodarczyk <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Tested-by Arkadiusz Wlodarczyk <[email protected]>Cc Minkyu Kang <[email protected]>--- board/samsung/goni/goni.c | 68 ++++++++++++++++++++++++++++++++++++++++++++ include/configs/s5p_goni.h | 5 ++++ 2 files changed, 73 insertions(+)
please run checkpatch before submitting.
CHECK: Alignment should match open parenthesis
#51: FILE: board/samsung/goni/goni.c:173:
+ if (ums_dev->mmc->block_dev.block_read(ums_dev->dev_num,
+ start + ums_dev->offset, blkcnt, buf) != blkcnt)
CHECK: Alignment should match open parenthesis
#61: FILE: board/samsung/goni/goni.c:183:
+ if (ums_dev->mmc->block_dev.block_write(ums_dev->dev_num,
+ start + ums_dev->offset, blkcnt, buf) != blkcnt)
total: 0 errors, 0 warnings, 2 checks, 86 lines checked
Quoted 24 lines
board/samsung/goni/goni.c +9
-0@@ -29,6 +29,7 @@#include <usb/s3c_udc.h> #include <asm/arch/cpu.h> #include <power/max8998_pmic.h> +#include <usb_mass_storage.h> DECLARE_GLOBAL_DATA_PTR ;static struct s5pc110_gpio *s5pc110_gpio;@@ -163,3 +164,70 @@ void board_usb_init(void) }#endif + +#ifdef CONFIG_USB_GADGET_MASS_STORAGE +static int ums_read_sector (struct ums_device *ums_dev, +ulong start,lbaint_t blkcnt,void *buf) +{ +if (ums_dev->mmc->block_dev.block_read (ums_dev->dev_num, + start + ums_dev->offset, blkcnt, buf) != blkcnt) +return -1 ;
board/samsung/goni/goni.c void board_usb_init(void) · line 184
Quoted 10 lines
board/samsung/goni/goni.c +10
-0+ +return 0 ; +} + +static int ums_write_sector (struct ums_device *ums_dev, +ulong start,lbaint_t blkcnt,const void *buf) +{ +if (ums_dev->mmc->block_dev.block_write (ums_dev->dev_num, + start + ums_dev->offset, blkcnt, buf) != blkcnt) +return -1 ;
indentation error.
Quoted 54 lines
board/samsung/goni/goni.c +49
-0+ +return 0 ; +} + +static void ums_get_capacity (struct ums_device *ums_dev, +long long int *capacity) +{ +long long int tmp_capacity; + + tmp_capacity = (long long int ) ((ums_dev->offset + ums_dev->part_size) + *SECTOR_SIZE ); + *capacity = ums_dev->mmc->capacity - tmp_capacity; +} + +static struct ums_board_info ums_board = { + .read_sector = ums_read_sector, + .write_sector = ums_write_sector, + .get_capacity = ums_get_capacity, + .name ="GONI UMS disk" , + .ums_dev = { + .mmc =NULL , + .dev_num =0 , + .offset =0 , + .part_size =0. + }, +}; + +struct ums_board_info *board_ums_init (unsigned int dev_num,unsigned int offset, +unsigned int part_size) +{ +struct mmc *mmc; + + mmc =find_mmc_device (dev_num); +/* mmc initialization is necessary prior to the ums command usage +* due to fact that on goni target environment is read from oneNand +* memory, so the mmc remains uninitialized whenu-boot prompt appears +* */ +if (!mmc ||mmc_init (mmc)) +return NULL ; + + ums_board.ums_dev.mmc = mmc; + ums_board.ums_dev.dev_num = dev_num; + ums_board.ums_dev.offset = offset; + ums_board.ums_dev.part_size = part_size; + +return &ums_board; +} + +#endif include/configs/s5p_goni.h +0
-0
include/configs/s5p_goni.h line 273
Quoted 5 lines
include/configs/s5p_goni.h +2
-0@@ -269,4 +269,9 @@#define CONFIG_USB_GADGET_DUALSPEED #define CONFIG_USB_GADGET_VBUS_DRAW 2 +#define CONFIG_CMD_USB_MASS_STORAGE +#if defined(CONFIG_CMD_USB_MASS_STORAGE )
unnecessary ifdef.
this file is board specific and we already knew that CONFIG_CMD_USB_MASS_STORAGE is defined.
Quoted 5 lines
include/configs/s5p_goni.h +3
-0+#define CONFIG_USB_GADGET_MASS_STORAGE +#endif +#endif /* __CONFIG_H */
PATCH 4/4 arm:goni: Add support for USB mass storage
Quoted 101 lines · Minkyu Kang
Quoted 5 lines · Lukasz Majewski
From: Arkadiusz Wlodarczyk <[email protected] <javascript:;>>
This commit enables support for USB mass storage composite function. It defines platform code and enables it at config file.
Quoted 8 lines
Signed-off-by Arkadiusz Wlodarczyk <[email protected]<javascript:;>Signed-off-by Kyungmin Park <[email protected] <javascript:;>>Tested-by Arkadiusz Wlodarczyk <[email protected] <javascript:;>Cc Minkyu Kang <[email protected] <javascript:;>>--- board/samsung/goni/goni.c | 68++++++++++++++++++++++++++++++++++++++++++++
Quoted 3 lines
include/configs/s5p_goni.h | 5 ++++ 2 files changed, 73 insertions(+)please run checkpatch before submitting.
CHECK: Alignment should match open parenthesis
#51: FILE:board/samsung/goni/goni.c:173:(quoted diff) +2
-0+ if (ums_dev->mmc->block_dev.block_read(ums_dev->dev_num, + start + ums_dev->offset, blkcnt, buf) != blkcnt)CHECK: Alignment should match open parenthesis
#61: FILE:board/samsung/goni/goni.c:183:board/samsung/goni/goni.c +2
-0+if (ums_dev->mmc->block_dev.block_write (ums_dev->dev_num, + start + ums_dev->offset, blkcnt, buf) != blkcnt)total: 0 errors, 0 warnings, 2 checks, 86 lines checked
Quoted 20 lines
board/samsung/goni/goni.c +5
-0@@ -29,6 +29,7 @@#include <usb/s3c_udc.h> #include <asm/arch/cpu.h> #include <power/max8998_pmic.h> +#include <usb_mass_storage.h> DECLARE_GLOBAL_DATA_PTR ;static struct s5pc110_gpio *s5pc110_gpio;@@ -163,3 +164,70 @@ void board_usb_init(void) }#endif + +#ifdef CONFIG_USB_GADGET_MASS_STORAGE +static int ums_read_sector (struct ums_device *ums_dev, +ulong start,lbaint_t blkcnt,void *buf)board/samsung/goni/goni.c void board_usb_init(void) · line 180
Quoted 10 lines
board/samsung/goni/goni.c +10
-0+{ +if (ums_dev->mmc->block_dev.block_read (ums_dev->dev_num, + start + ums_dev->offset, blkcnt, buf) != blkcnt) +return -1 ; + +return 0 ; +} + +static int ums_write_sector (struct ums_device *ums_dev, + ulong start, lbaint_t blkcnt, const void*buf)
board/samsung/goni/goni.c void board_usb_init(void) · line 184
Quoted 4 lines
board/samsung/goni/goni.c +4
-0+{ +if (ums_dev->mmc->block_dev.block_write (ums_dev->dev_num, + start + ums_dev->offset, blkcnt, buf) != blkcnt) +return -1 ;indentation error.
board/samsung/goni/goni.c void board_usb_init(void)
Quoted 10 lines
board/samsung/goni/goni.c +10
-0+ +return 0 ; +} + +static void ums_get_capacity (struct ums_device *ums_dev, +long long int *capacity) +{ +long long int tmp_capacity; + + tmp_capacity = (long long int) ((ums_dev->offset +
ums_dev->part_size)Quoted 8 lines
board/samsung/goni/goni.c +8
-0+ * SECTOR_SIZE); + *capacity = ums_dev->mmc->capacity - tmp_capacity; +} + +static struct ums_board_info ums_board = { + .read_sector = ums_read_sector, + .write_sector = ums_write_sector, + .get_capacity = ums_get_capacity,board/samsung/goni/goni.c void board_usb_init(void)
Quoted 10 lines
board/samsung/goni/goni.c +10
-0+ .name = "GONI UMS disk", + .ums_dev = { + .mmc = NULL, + .dev_num = 0, + .offset = 0, + .part_size =0. + }, +}; + +struct ums_board_info *board_ums_init(unsigned int dev_num, unsignedint offset,
Quoted 10 lines
board/samsung/goni/goni.c void board_usb_init(void)
Quoted 8 lines
board/samsung/goni/goni.c +8
-0+ unsigned int part_size) +{ +struct mmc *mmc; + + mmc =find_mmc_device (dev_num); +/* mmc initialization is necessary prior to the ums command usage +* due to fact that on goni target environment is read from oneNand +* memory, so the mmc remains uninitialized whenu-boot prompt appears
Quoted 1 line
board/samsung/goni/goni.c +1
-0+* */
please fix multiline comment style.
Quoted 38 lines
Quoted 17 lines
board/samsung/goni/goni.c +12
-0+if (!mmc ||mmc_init (mmc)) +return NULL ; + + ums_board.ums_dev.mmc = mmc; + ums_board.ums_dev.dev_num = dev_num; + ums_board.ums_dev.offset = offset; + ums_board.ums_dev.part_size = part_size; + + return &ums_board; +} + +#endif include/configs/s5p_goni.h +0
-0include/configs/s5p_goni.h line 273
Quoted 5 lines
include/configs/s5p_goni.h +2
-0@@ -269,4 +269,9 @@#define CONFIG_USB_GADGET_DUALSPEED #define CONFIG_USB_GADGET_VBUS_DRAW 2 +#define CONFIG_CMD_USB_MASS_STORAGE +#if defined(CONFIG_CMD_USB_MASS_STORAGE )unnecessary ifdef.
this file is board specific and we already knew thatCONFIG_CMD_USB_MASS_STORAGEis defined.include/configs/s5p_goni.h line 277
Quoted 5 lines
include/configs/s5p_goni.h +3
-0+#define CONFIG_USB_GADGET_MASS_STORAGE +#endif +#endif /* __CONFIG_H */ _______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de <javascript:;>
http://lists.denx.de/mailman/listinfo/u-boot
Signature · 2 lines
Thanks. Minkyu Kang.