Re: [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
Hi Marek, On Friday, March 27, 2015 at 07:15:18 PM, Tom Rini wrote: On Fri, Mar 27, 2015 at 11:23:08PM +0530, Dileep Katta wrote: Experts, Please send your valuable comments if this patch needs any change. Assuming everything has acks I'll pick it up for the next release, thanks. Lukasz can pick it through the correct tree for next release just fine I think. And adding Lukasz to CC would really speed up the process :-) Best regards, Marek Vasut -- Best regards, Lukasz Majewski Samsung RD Institute Poland (SRPOL) | Linux Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
Experts, Please send your valuable comments if this patch needs any change. Regards, Dileep On 14/03/2015, Lukasz Majewski l.majew...@majess.pl wrote: On Sat, 14 Mar 2015 00:58:51 +0530 Dileep Katta dileep.ka...@linaro.org wrote: Hi Lukasz, On 13 March 2015 at 13:23, Lukasz Majewski l.majew...@samsung.com wrote: Hi Dileep, g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running cmd_fastboot. Calling board_usb_init() to fix this. fastboot command is now added with an optional controller index argument with default value as 0, to facilitate configurable controller index. Signed-off-by: Angela Stegmaier angelaba...@ti.com Signed-off-by: Dileep Katta dileep.ka...@linaro.org --- Changes in v2: - Changed fastboot command to facilitate passing controller index - Added board_usb_cleanup() This patch considers the following change by Inha Song, without which the build will be broken on BeagleBone Black platform https://patchwork.ozlabs.org/patch/430303/ common/cmd_fastboot.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index 346ab80..9ca4a2f 100644 --- a/common/cmd_fastboot.c +++ b/common/cmd_fastboot.c @@ -10,11 +10,19 @@ #include common.h #include command.h #include g_dnl.h +#include usb.h static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { int ret; + int controller_index = 0; + if (argc == 2) { + char *usb_controller = argv[1]; + controller_index = simple_strtoul(usb_controller, NULL, 0); + } + + board_usb_init(controller_index, USB_INIT_DEVICE); g_dnl_clear_detach(); ret = g_dnl_register(usb_dnl_fastboot); if (ret) @@ -36,12 +44,13 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) g_dnl_unregister(); g_dnl_clear_detach(); + board_usb_cleanup(controller_index, USB_INIT_DEVICE); return CMD_RET_SUCCESS; } U_BOOT_CMD( - fastboot, 1, 0, do_fastboot, + fastboot, 2, 0, do_fastboot, use USB Fastboot protocol, - \nLukasz Majewski l.majew...@samsung.com - - run as a fastboot usb device + [USB_controller]\n + - run as a fastboot usb device via USB_controller ); Acked-by: Lukasz Majewski l.majew...@samsung.com Since I'm not CC'ed to all patches, I assume that this work would go via other tree? Other patches are TI board specific and I am working on next version of the patches as per the review comments. I felt that this is generic functionality and hence sent it separately. Do you want me send all patches? No, it is not necessary. Regarding above, I assume that Tom will probably fetch those patches. I was just concern about tree to which this patch should belong. Regards, Lukasz Regards, Dileep -- Best regards, Lukasz Majewski Samsung RD Institute Poland (SRPOL) | Linux Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
On Friday, March 27, 2015 at 07:15:18 PM, Tom Rini wrote: On Fri, Mar 27, 2015 at 11:23:08PM +0530, Dileep Katta wrote: Experts, Please send your valuable comments if this patch needs any change. Assuming everything has acks I'll pick it up for the next release, thanks. Lukasz can pick it through the correct tree for next release just fine I think. Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
On Fri, Mar 27, 2015 at 11:23:08PM +0530, Dileep Katta wrote: Experts, Please send your valuable comments if this patch needs any change. Assuming everything has acks I'll pick it up for the next release, thanks. Regards, Dileep On 14/03/2015, Lukasz Majewski l.majew...@majess.pl wrote: On Sat, 14 Mar 2015 00:58:51 +0530 Dileep Katta dileep.ka...@linaro.org wrote: Hi Lukasz, On 13 March 2015 at 13:23, Lukasz Majewski l.majew...@samsung.com wrote: Hi Dileep, g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running cmd_fastboot. Calling board_usb_init() to fix this. fastboot command is now added with an optional controller index argument with default value as 0, to facilitate configurable controller index. Signed-off-by: Angela Stegmaier angelaba...@ti.com Signed-off-by: Dileep Katta dileep.ka...@linaro.org --- Changes in v2: - Changed fastboot command to facilitate passing controller index - Added board_usb_cleanup() This patch considers the following change by Inha Song, without which the build will be broken on BeagleBone Black platform https://patchwork.ozlabs.org/patch/430303/ common/cmd_fastboot.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index 346ab80..9ca4a2f 100644 --- a/common/cmd_fastboot.c +++ b/common/cmd_fastboot.c @@ -10,11 +10,19 @@ #include common.h #include command.h #include g_dnl.h +#include usb.h static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { int ret; + int controller_index = 0; + if (argc == 2) { + char *usb_controller = argv[1]; + controller_index = simple_strtoul(usb_controller, NULL, 0); + } + + board_usb_init(controller_index, USB_INIT_DEVICE); g_dnl_clear_detach(); ret = g_dnl_register(usb_dnl_fastboot); if (ret) @@ -36,12 +44,13 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) g_dnl_unregister(); g_dnl_clear_detach(); + board_usb_cleanup(controller_index, USB_INIT_DEVICE); return CMD_RET_SUCCESS; } U_BOOT_CMD( - fastboot, 1, 0, do_fastboot, + fastboot, 2, 0, do_fastboot, use USB Fastboot protocol, - \nLukasz Majewski l.majew...@samsung.com - - run as a fastboot usb device + [USB_controller]\n + - run as a fastboot usb device via USB_controller ); Acked-by: Lukasz Majewski l.majew...@samsung.com Since I'm not CC'ed to all patches, I assume that this work would go via other tree? Other patches are TI board specific and I am working on next version of the patches as per the review comments. I felt that this is generic functionality and hence sent it separately. Do you want me send all patches? No, it is not necessary. Regarding above, I assume that Tom will probably fetch those patches. I was just concern about tree to which this patch should belong. Regards, Lukasz Regards, Dileep -- Best regards, Lukasz Majewski Samsung RD Institute Poland (SRPOL) | Linux Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
Hi Lukasz, On 13 March 2015 at 13:23, Lukasz Majewski l.majew...@samsung.com wrote: Hi Dileep, g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running cmd_fastboot. Calling board_usb_init() to fix this. fastboot command is now added with an optional controller index argument with default value as 0, to facilitate configurable controller index. Signed-off-by: Angela Stegmaier angelaba...@ti.com Signed-off-by: Dileep Katta dileep.ka...@linaro.org --- Changes in v2: - Changed fastboot command to facilitate passing controller index - Added board_usb_cleanup() This patch considers the following change by Inha Song, without which the build will be broken on BeagleBone Black platform https://patchwork.ozlabs.org/patch/430303/ common/cmd_fastboot.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index 346ab80..9ca4a2f 100644 --- a/common/cmd_fastboot.c +++ b/common/cmd_fastboot.c @@ -10,11 +10,19 @@ #include common.h #include command.h #include g_dnl.h +#include usb.h static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { int ret; + int controller_index = 0; + if (argc == 2) { + char *usb_controller = argv[1]; + controller_index = simple_strtoul(usb_controller, NULL, 0); + } + + board_usb_init(controller_index, USB_INIT_DEVICE); g_dnl_clear_detach(); ret = g_dnl_register(usb_dnl_fastboot); if (ret) @@ -36,12 +44,13 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) g_dnl_unregister(); g_dnl_clear_detach(); + board_usb_cleanup(controller_index, USB_INIT_DEVICE); return CMD_RET_SUCCESS; } U_BOOT_CMD( - fastboot, 1, 0, do_fastboot, + fastboot, 2, 0, do_fastboot, use USB Fastboot protocol, - \nLukasz Majewski l.majew...@samsung.com - - run as a fastboot usb device + [USB_controller]\n + - run as a fastboot usb device via USB_controller ); Acked-by: Lukasz Majewski l.majew...@samsung.com Since I'm not CC'ed to all patches, I assume that this work would go via other tree? Other patches are TI board specific and I am working on next version of the patches as per the review comments. I felt that this is generic functionality and hence sent it separately. Do you want me send all patches? Regards, Dileep -- Best regards, Lukasz Majewski Samsung RD Institute Poland (SRPOL) | Linux Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
On Sat, 14 Mar 2015 00:58:51 +0530 Dileep Katta dileep.ka...@linaro.org wrote: Hi Lukasz, On 13 March 2015 at 13:23, Lukasz Majewski l.majew...@samsung.com wrote: Hi Dileep, g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running cmd_fastboot. Calling board_usb_init() to fix this. fastboot command is now added with an optional controller index argument with default value as 0, to facilitate configurable controller index. Signed-off-by: Angela Stegmaier angelaba...@ti.com Signed-off-by: Dileep Katta dileep.ka...@linaro.org --- Changes in v2: - Changed fastboot command to facilitate passing controller index - Added board_usb_cleanup() This patch considers the following change by Inha Song, without which the build will be broken on BeagleBone Black platform https://patchwork.ozlabs.org/patch/430303/ common/cmd_fastboot.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index 346ab80..9ca4a2f 100644 --- a/common/cmd_fastboot.c +++ b/common/cmd_fastboot.c @@ -10,11 +10,19 @@ #include common.h #include command.h #include g_dnl.h +#include usb.h static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { int ret; + int controller_index = 0; + if (argc == 2) { + char *usb_controller = argv[1]; + controller_index = simple_strtoul(usb_controller, NULL, 0); + } + + board_usb_init(controller_index, USB_INIT_DEVICE); g_dnl_clear_detach(); ret = g_dnl_register(usb_dnl_fastboot); if (ret) @@ -36,12 +44,13 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) g_dnl_unregister(); g_dnl_clear_detach(); + board_usb_cleanup(controller_index, USB_INIT_DEVICE); return CMD_RET_SUCCESS; } U_BOOT_CMD( - fastboot, 1, 0, do_fastboot, + fastboot, 2, 0, do_fastboot, use USB Fastboot protocol, - \nLukasz Majewski l.majew...@samsung.com - - run as a fastboot usb device + [USB_controller]\n + - run as a fastboot usb device via USB_controller ); Acked-by: Lukasz Majewski l.majew...@samsung.com Since I'm not CC'ed to all patches, I assume that this work would go via other tree? Other patches are TI board specific and I am working on next version of the patches as per the review comments. I felt that this is generic functionality and hence sent it separately. Do you want me send all patches? No, it is not necessary. Regarding above, I assume that Tom will probably fetch those patches. I was just concern about tree to which this patch should belong. Regards, Lukasz Regards, Dileep -- Best regards, Lukasz Majewski Samsung RD Institute Poland (SRPOL) | Linux Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot pgpZd6mcS2zPG.pgp Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
Hi Dileep, g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running cmd_fastboot. Calling board_usb_init() to fix this. fastboot command is now added with an optional controller index argument with default value as 0, to facilitate configurable controller index. Signed-off-by: Angela Stegmaier angelaba...@ti.com Signed-off-by: Dileep Katta dileep.ka...@linaro.org --- Changes in v2: - Changed fastboot command to facilitate passing controller index - Added board_usb_cleanup() This patch considers the following change by Inha Song, without which the build will be broken on BeagleBone Black platform https://patchwork.ozlabs.org/patch/430303/ common/cmd_fastboot.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index 346ab80..9ca4a2f 100644 --- a/common/cmd_fastboot.c +++ b/common/cmd_fastboot.c @@ -10,11 +10,19 @@ #include common.h #include command.h #include g_dnl.h +#include usb.h static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { int ret; + int controller_index = 0; + if (argc == 2) { + char *usb_controller = argv[1]; + controller_index = simple_strtoul(usb_controller, NULL, 0); + } + + board_usb_init(controller_index, USB_INIT_DEVICE); g_dnl_clear_detach(); ret = g_dnl_register(usb_dnl_fastboot); if (ret) @@ -36,12 +44,13 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) g_dnl_unregister(); g_dnl_clear_detach(); + board_usb_cleanup(controller_index, USB_INIT_DEVICE); return CMD_RET_SUCCESS; } U_BOOT_CMD( - fastboot, 1, 0, do_fastboot, + fastboot, 2, 0, do_fastboot, use USB Fastboot protocol, - \nLukasz Majewski l.majew...@samsung.com - - run as a fastboot usb device + [USB_controller]\n + - run as a fastboot usb device via USB_controller ); Acked-by: Lukasz Majewski l.majew...@samsung.com Since I'm not CC'ed to all patches, I assume that this work would go via other tree? -- Best regards, Lukasz Majewski Samsung RD Institute Poland (SRPOL) | Linux Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
Hi Dileep, Marek On 5 March 2015 at 20:07, Tom Rini tr...@konsulko.com wrote: On Thu, Mar 05, 2015 at 12:36:57AM +0530, Dileep Katta wrote: On 4 March 2015 at 23:59, Tom Rini tr...@konsulko.com wrote: On Wed, Mar 04, 2015 at 05:05:11PM +, Stegmaier, Angela wrote: Hi Dileep, -Original Message- From: Dileep Katta [mailto:dileep.ka...@linaro.org] Sent: Tuesday, March 03, 2015 5:11 AM To: u-boot@lists.denx.de; robherri...@gmail.com; Rini, Tom; rob.herr...@linaro.org; s...@broadcom.com; l.majew...@samsung.com; Stegmaier, Angela Cc: Dileep Katta Subject: [U-Boot][PATCH v2 2/4] fastboot: call board_usb_init() to enable usb g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running cmd_fastboot. Calling board_usb_init() fixes this. Signed-off-by: Angela Stegmaier angelaba...@ti.com Signed-off-by: Dileep Katta dileep.ka...@linaro.org --- common/cmd_fastboot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index 346ab80..d7b8f6d 100644 --- a/common/cmd_fastboot.c +++ b/common/cmd_fastboot.c @@ -10,11 +10,13 @@ #include common.h #include command.h #include g_dnl.h +#include usb.h static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { int ret; + board_usb_init(0, USB_INIT_DEVICE); The controller index should be configurable. We are not getting controller Index as an argument for fastboot function. Might have to add extra logic to get the same. But do we need configurable index here for fastboot? Experts, please advise. Some time ago we have changed syntax of all gadget related commands (from e.g. dfu mmc 0 - dfu 0 mmc 0) to support different controllers. Rationale was to prepare ourself for future changes. IMHO it would be feasible to do the same with fastboot command. However, lets wait for Marek's opinion. Also, should board_usb_cleanup be called at the end? I _really_ _really_ want to see if we can modify things so that we don't have to sprinkle ever gadget driver with a cleanup() and every gadget too if we don't have to. Thanks! Most of the boards have board_usb_cleanup() as just a stub. For some, the function is not present, and adding board_usb_cleanup() here breaks the build for others with fastboot enabled. That's a problem that needs fixing since those boards without a functional board_usb_cleanup() are likely causing breakage in Linux. Will add the board_usb_cleanup() function at the end. +1 -- Tom -- Best regards, Lukasz Majewski Samsung RD Institute Poland (SRPOL) | Linux Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
On Thursday, March 12, 2015 at 09:55:57 AM, Lukasz Majewski wrote: Hi! [...] We are not getting controller Index as an argument for fastboot function. Might have to add extra logic to get the same. But do we need configurable index here for fastboot? Experts, please advise. Some time ago we have changed syntax of all gadget related commands (from e.g. dfu mmc 0 - dfu 0 mmc 0) to support different controllers. Rationale was to prepare ourself for future changes. IMHO it would be feasible to do the same with fastboot command. However, lets wait for Marek's opinion. I'm all for that. Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running cmd_fastboot. Calling board_usb_init() to fix this. fastboot command is now added with an optional controller index argument with default value as 0, to facilitate configurable controller index. Signed-off-by: Angela Stegmaier angelaba...@ti.com Signed-off-by: Dileep Katta dileep.ka...@linaro.org --- Changes in v2: - Changed fastboot command to facilitate passing controller index - Added board_usb_cleanup() This patch considers the following change by Inha Song, without which the build will be broken on BeagleBone Black platform https://patchwork.ozlabs.org/patch/430303/ common/cmd_fastboot.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index 346ab80..9ca4a2f 100644 --- a/common/cmd_fastboot.c +++ b/common/cmd_fastboot.c @@ -10,11 +10,19 @@ #include common.h #include command.h #include g_dnl.h +#include usb.h static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { int ret; + int controller_index = 0; + if (argc == 2) { + char *usb_controller = argv[1]; + controller_index = simple_strtoul(usb_controller, NULL, 0); + } + + board_usb_init(controller_index, USB_INIT_DEVICE); g_dnl_clear_detach(); ret = g_dnl_register(usb_dnl_fastboot); if (ret) @@ -36,12 +44,13 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) g_dnl_unregister(); g_dnl_clear_detach(); + board_usb_cleanup(controller_index, USB_INIT_DEVICE); return CMD_RET_SUCCESS; } U_BOOT_CMD( - fastboot, 1, 0, do_fastboot, + fastboot, 2, 0, do_fastboot, use USB Fastboot protocol, - \n - - run as a fastboot usb device + [USB_controller]\n + - run as a fastboot usb device via USB_controller ); -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
On 5 March 2015 at 20:07, Tom Rini tr...@konsulko.com wrote: On Thu, Mar 05, 2015 at 12:36:57AM +0530, Dileep Katta wrote: On 4 March 2015 at 23:59, Tom Rini tr...@konsulko.com wrote: On Wed, Mar 04, 2015 at 05:05:11PM +, Stegmaier, Angela wrote: Hi Dileep, -Original Message- From: Dileep Katta [mailto:dileep.ka...@linaro.org] Sent: Tuesday, March 03, 2015 5:11 AM To: u-boot@lists.denx.de; robherri...@gmail.com; Rini, Tom; rob.herr...@linaro.org; s...@broadcom.com; l.majew...@samsung.com; Stegmaier, Angela Cc: Dileep Katta Subject: [U-Boot][PATCH v2 2/4] fastboot: call board_usb_init() to enable usb g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running cmd_fastboot. Calling board_usb_init() fixes this. Signed-off-by: Angela Stegmaier angelaba...@ti.com Signed-off-by: Dileep Katta dileep.ka...@linaro.org --- common/cmd_fastboot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index 346ab80..d7b8f6d 100644 --- a/common/cmd_fastboot.c +++ b/common/cmd_fastboot.c @@ -10,11 +10,13 @@ #include common.h #include command.h #include g_dnl.h +#include usb.h static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { int ret; + board_usb_init(0, USB_INIT_DEVICE); The controller index should be configurable. We are not getting controller Index as an argument for fastboot function. Might have to add extra logic to get the same. But do we need configurable index here for fastboot? Experts, please advise. Also, should board_usb_cleanup be called at the end? I _really_ _really_ want to see if we can modify things so that we don't have to sprinkle ever gadget driver with a cleanup() and every gadget too if we don't have to. Thanks! Most of the boards have board_usb_cleanup() as just a stub. For some, the function is not present, and adding board_usb_cleanup() here breaks the build for others with fastboot enabled. That's a problem that needs fixing since those boards without a functional board_usb_cleanup() are likely causing breakage in Linux. Will add the board_usb_cleanup() function at the end. -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
On Thu, Mar 05, 2015 at 12:36:57AM +0530, Dileep Katta wrote: On 4 March 2015 at 23:59, Tom Rini tr...@konsulko.com wrote: On Wed, Mar 04, 2015 at 05:05:11PM +, Stegmaier, Angela wrote: Hi Dileep, -Original Message- From: Dileep Katta [mailto:dileep.ka...@linaro.org] Sent: Tuesday, March 03, 2015 5:11 AM To: u-boot@lists.denx.de; robherri...@gmail.com; Rini, Tom; rob.herr...@linaro.org; s...@broadcom.com; l.majew...@samsung.com; Stegmaier, Angela Cc: Dileep Katta Subject: [U-Boot][PATCH v2 2/4] fastboot: call board_usb_init() to enable usb g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running cmd_fastboot. Calling board_usb_init() fixes this. Signed-off-by: Angela Stegmaier angelaba...@ti.com Signed-off-by: Dileep Katta dileep.ka...@linaro.org --- common/cmd_fastboot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index 346ab80..d7b8f6d 100644 --- a/common/cmd_fastboot.c +++ b/common/cmd_fastboot.c @@ -10,11 +10,13 @@ #include common.h #include command.h #include g_dnl.h +#include usb.h static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { int ret; + board_usb_init(0, USB_INIT_DEVICE); The controller index should be configurable. Also, should board_usb_cleanup be called at the end? I _really_ _really_ want to see if we can modify things so that we don't have to sprinkle ever gadget driver with a cleanup() and every gadget too if we don't have to. Thanks! Most of the boards have board_usb_cleanup() as just a stub. For some, the function is not present, and adding board_usb_cleanup() here breaks the build for others with fastboot enabled. That's a problem that needs fixing since those boards without a functional board_usb_cleanup() are likely causing breakage in Linux. -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
Hi Dileep, -Original Message- From: Dileep Katta [mailto:dileep.ka...@linaro.org] Sent: Tuesday, March 03, 2015 5:11 AM To: u-boot@lists.denx.de; robherri...@gmail.com; Rini, Tom; rob.herr...@linaro.org; s...@broadcom.com; l.majew...@samsung.com; Stegmaier, Angela Cc: Dileep Katta Subject: [U-Boot][PATCH v2 2/4] fastboot: call board_usb_init() to enable usb g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running cmd_fastboot. Calling board_usb_init() fixes this. Signed-off-by: Angela Stegmaier angelaba...@ti.com Signed-off-by: Dileep Katta dileep.ka...@linaro.org --- common/cmd_fastboot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index 346ab80..d7b8f6d 100644 --- a/common/cmd_fastboot.c +++ b/common/cmd_fastboot.c @@ -10,11 +10,13 @@ #include common.h #include command.h #include g_dnl.h +#include usb.h static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { int ret; + board_usb_init(0, USB_INIT_DEVICE); The controller index should be configurable. Also, should board_usb_cleanup be called at the end? Thanks, Angela g_dnl_clear_detach(); ret = g_dnl_register(usb_dnl_fastboot); if (ret) -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
On 4 March 2015 at 23:59, Tom Rini tr...@konsulko.com wrote: On Wed, Mar 04, 2015 at 05:05:11PM +, Stegmaier, Angela wrote: Hi Dileep, -Original Message- From: Dileep Katta [mailto:dileep.ka...@linaro.org] Sent: Tuesday, March 03, 2015 5:11 AM To: u-boot@lists.denx.de; robherri...@gmail.com; Rini, Tom; rob.herr...@linaro.org; s...@broadcom.com; l.majew...@samsung.com; Stegmaier, Angela Cc: Dileep Katta Subject: [U-Boot][PATCH v2 2/4] fastboot: call board_usb_init() to enable usb g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running cmd_fastboot. Calling board_usb_init() fixes this. Signed-off-by: Angela Stegmaier angelaba...@ti.com Signed-off-by: Dileep Katta dileep.ka...@linaro.org --- common/cmd_fastboot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index 346ab80..d7b8f6d 100644 --- a/common/cmd_fastboot.c +++ b/common/cmd_fastboot.c @@ -10,11 +10,13 @@ #include common.h #include command.h #include g_dnl.h +#include usb.h static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { int ret; + board_usb_init(0, USB_INIT_DEVICE); The controller index should be configurable. Also, should board_usb_cleanup be called at the end? I _really_ _really_ want to see if we can modify things so that we don't have to sprinkle ever gadget driver with a cleanup() and every gadget too if we don't have to. Thanks! Most of the boards have board_usb_cleanup() as just a stub. For some, the function is not present, and adding board_usb_cleanup() here breaks the build for others with fastboot enabled. -- Tom Regards, Dileep ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
On Wed, Mar 04, 2015 at 05:05:11PM +, Stegmaier, Angela wrote: Hi Dileep, -Original Message- From: Dileep Katta [mailto:dileep.ka...@linaro.org] Sent: Tuesday, March 03, 2015 5:11 AM To: u-boot@lists.denx.de; robherri...@gmail.com; Rini, Tom; rob.herr...@linaro.org; s...@broadcom.com; l.majew...@samsung.com; Stegmaier, Angela Cc: Dileep Katta Subject: [U-Boot][PATCH v2 2/4] fastboot: call board_usb_init() to enable usb g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running cmd_fastboot. Calling board_usb_init() fixes this. Signed-off-by: Angela Stegmaier angelaba...@ti.com Signed-off-by: Dileep Katta dileep.ka...@linaro.org --- common/cmd_fastboot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index 346ab80..d7b8f6d 100644 --- a/common/cmd_fastboot.c +++ b/common/cmd_fastboot.c @@ -10,11 +10,13 @@ #include common.h #include command.h #include g_dnl.h +#include usb.h static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { int ret; + board_usb_init(0, USB_INIT_DEVICE); The controller index should be configurable. Also, should board_usb_cleanup be called at the end? I _really_ _really_ want to see if we can modify things so that we don't have to sprinkle ever gadget driver with a cleanup() and every gadget too if we don't have to. Thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
Hi Dileep, g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running cmd_fastboot. Calling board_usb_init() fixes this. Signed-off-by: Angela Stegmaier angelaba...@ti.com Signed-off-by: Dileep Katta dileep.ka...@linaro.org --- common/cmd_fastboot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index 346ab80..d7b8f6d 100644 --- a/common/cmd_fastboot.c +++ b/common/cmd_fastboot.c @@ -10,11 +10,13 @@ #include common.h #include command.h #include g_dnl.h +#include usb.h static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { int ret; + board_usb_init(0, USB_INIT_DEVICE); g_dnl_clear_detach(); ret = g_dnl_register(usb_dnl_fastboot); if (ret) Acked-by: Lukasz Majewski l.majew...@samsung.com -- Best regards, Lukasz Majewski Samsung RD Institute Poland (SRPOL) | Linux Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running cmd_fastboot. Calling board_usb_init() fixes this. Signed-off-by: Angela Stegmaier angelaba...@ti.com Signed-off-by: Dileep Katta dileep.ka...@linaro.org --- common/cmd_fastboot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index 346ab80..d7b8f6d 100644 --- a/common/cmd_fastboot.c +++ b/common/cmd_fastboot.c @@ -10,11 +10,13 @@ #include common.h #include command.h #include g_dnl.h +#include usb.h static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { int ret; + board_usb_init(0, USB_INIT_DEVICE); g_dnl_clear_detach(); ret = g_dnl_register(usb_dnl_fastboot); if (ret) -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot