From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Fri, 13 Mar 2015 21:55:41 +0100 Subject: [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb In-Reply-To: References: <201503121828.17823.marex@denx.de> <1426194750-15213-1-git-send-email-dileep.katta@linaro.org> <20150313085303.094f4be7@amdc2363> Message-ID: <20150313215541.5e4719d9@jawa> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sat, 14 Mar 2015 00:58:51 +0530 Dileep Katta wrote: > Hi Lukasz, > > On 13 March 2015 at 13:23, Lukasz Majewski > 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 > > > Signed-off-by: Dileep Katta > > > --- > > > 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 > > > #include > > > #include > > > +#include > > > > > > 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 " > > > - " - run as a fastboot usb device" > > > + "[]\n" > > > + " - run as a fastboot usb device via " > > > ); > > > > Acked-by: Lukasz Majewski > > > > 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 R&D Institute Poland (SRPOL) | Linux Platform Group > > > _______________________________________________ > U-Boot mailing list > U-Boot at lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 181 bytes Desc: OpenPGP digital signature URL: