* [U-Boot] [PATCH 0/2] Invoke board specific board_usb_cleanup function
@ 2015-01-19 7:07 Inha Song
2015-01-19 7:07 ` [U-Boot] [PATCH 1/2] usb: common: provide a _weak board_usb_cleanup() function Inha Song
` (2 more replies)
0 siblings, 3 replies; 16+ messages in thread
From: Inha Song @ 2015-01-19 7:07 UTC (permalink / raw)
To: u-boot
This patches invoke board-specific usb cleanup interface (board_usb_cleanup)
After USB initalization.
Inha Song (2):
usb: common: provide a _weak board_usb_cleanup() function
usb: invoke board specific USB cleanup interface
common/cmd_dfu.c | 1 +
common/cmd_thordown.c | 1 +
common/cmd_usb_mass_storage.c | 1 +
common/usb.c | 6 ++++++
4 files changed, 9 insertions(+)
--
2.0.0.390.gcb682f8
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot] [PATCH 1/2] usb: common: provide a _weak board_usb_cleanup() function
2015-01-19 7:07 [U-Boot] [PATCH 0/2] Invoke board specific board_usb_cleanup function Inha Song
@ 2015-01-19 7:07 ` Inha Song
2015-02-24 11:56 ` Lukasz Majewski
2015-01-19 7:07 ` [U-Boot] [PATCH 2/2] usb: invoke board specific USB cleanup interface Inha Song
2015-01-19 8:50 ` [U-Boot] [PATCH 0/2] Invoke board specific board_usb_cleanup function Marek Vasut
2 siblings, 1 reply; 16+ messages in thread
From: Inha Song @ 2015-01-19 7:07 UTC (permalink / raw)
To: u-boot
This patch implement _weak function for board_usb_cleanup.
This function (usb_board_cleanup) implementation is board-specific
feature.
board_usb_cleanup function can be used to clean up after failed
board-specific USB initialization.
Signed-off-by: Inha Song <ideal.song@samsung.com>
---
common/usb.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/common/usb.c b/common/usb.c
index 736cd9f..fbb4495 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -1063,4 +1063,10 @@ int board_usb_init(int index, enum usb_init_type init)
{
return 0;
}
+
+__weak
+int board_usb_cleanup(int index, enum usb_init_type init)
+{
+ return 0;
+}
/* EOF */
--
2.0.0.390.gcb682f8
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [U-Boot] [PATCH 2/2] usb: invoke board specific USB cleanup interface
2015-01-19 7:07 [U-Boot] [PATCH 0/2] Invoke board specific board_usb_cleanup function Inha Song
2015-01-19 7:07 ` [U-Boot] [PATCH 1/2] usb: common: provide a _weak board_usb_cleanup() function Inha Song
@ 2015-01-19 7:07 ` Inha Song
2015-02-24 11:56 ` Lukasz Majewski
2015-02-24 16:20 ` Rob Herring
2015-01-19 8:50 ` [U-Boot] [PATCH 0/2] Invoke board specific board_usb_cleanup function Marek Vasut
2 siblings, 2 replies; 16+ messages in thread
From: Inha Song @ 2015-01-19 7:07 UTC (permalink / raw)
To: u-boot
This patch invoke board-specific USB cleanup (board_usb_cleanup)
interface.
Signed-off-by: Inha Song <ideal.song@samsung.com>
---
common/cmd_dfu.c | 1 +
common/cmd_thordown.c | 1 +
common/cmd_usb_mass_storage.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/common/cmd_dfu.c b/common/cmd_dfu.c
index e975abe..161d38b 100644
--- a/common/cmd_dfu.c
+++ b/common/cmd_dfu.c
@@ -68,6 +68,7 @@ static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
}
exit:
g_dnl_unregister();
+ board_usb_cleanup(controller_index, USB_INIT_DEVICE);
done:
dfu_free_entities();
diff --git a/common/cmd_thordown.c b/common/cmd_thordown.c
index 8ed1dc6..436b7f5 100644
--- a/common/cmd_thordown.c
+++ b/common/cmd_thordown.c
@@ -56,6 +56,7 @@ int do_thor_down(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
exit:
g_dnl_unregister();
+ board_usb_cleanup(controller_index, USB_INIT_DEVICE);
done:
dfu_free_entities();
diff --git a/common/cmd_usb_mass_storage.c b/common/cmd_usb_mass_storage.c
index 2c879ea..53a765e 100644
--- a/common/cmd_usb_mass_storage.c
+++ b/common/cmd_usb_mass_storage.c
@@ -154,6 +154,7 @@ int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag,
}
exit:
g_dnl_unregister();
+ board_usb_cleanup(controller_index, USB_INIT_DEVICE);
return CMD_RET_SUCCESS;
}
--
2.0.0.390.gcb682f8
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [U-Boot] [PATCH 0/2] Invoke board specific board_usb_cleanup function
2015-01-19 7:07 [U-Boot] [PATCH 0/2] Invoke board specific board_usb_cleanup function Inha Song
2015-01-19 7:07 ` [U-Boot] [PATCH 1/2] usb: common: provide a _weak board_usb_cleanup() function Inha Song
2015-01-19 7:07 ` [U-Boot] [PATCH 2/2] usb: invoke board specific USB cleanup interface Inha Song
@ 2015-01-19 8:50 ` Marek Vasut
2015-01-19 9:18 ` Inha Song
2 siblings, 1 reply; 16+ messages in thread
From: Marek Vasut @ 2015-01-19 8:50 UTC (permalink / raw)
To: u-boot
On Monday, January 19, 2015 at 08:07:14 AM, Inha Song wrote:
> This patches invoke board-specific usb cleanup interface
> (board_usb_cleanup) After USB initalization.
>
> Inha Song (2):
> usb: common: provide a _weak board_usb_cleanup() function
> usb: invoke board specific USB cleanup interface
Hi,
where do you plan to use this _weak function please ?
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot] [PATCH 0/2] Invoke board specific board_usb_cleanup function
2015-01-19 8:50 ` [U-Boot] [PATCH 0/2] Invoke board specific board_usb_cleanup function Marek Vasut
@ 2015-01-19 9:18 ` Inha Song
2015-01-19 15:02 ` Marek Vasut
0 siblings, 1 reply; 16+ messages in thread
From: Inha Song @ 2015-01-19 9:18 UTC (permalink / raw)
To: u-boot
Hi Marek,
I want to use this function for support Thor/DFU download in Odroid-XU3.
For Odroid-XU3 usb support, we need to DWC3 code. (As I know, DWC3 patchsets (Kishon Vijay Abraham I) are RFC state)
So, I used DWC3 patchset temporarily and I knew that I should be call dwc3_uboot_exit() function.
As a result, I have implemented board_usb_cleanup() function in smdk5420.c board file
for called dwc3_uboot_exit() function.
If "board_usb_cleanup" is dead code, I will fix it.
Best Regards,
Inha Song.
On Mon, 19 Jan 2015 09:50:34 +0100
Marek Vasut <marex@denx.de> wrote:
> On Monday, January 19, 2015 at 08:07:14 AM, Inha Song wrote:
> > This patches invoke board-specific usb cleanup interface
> > (board_usb_cleanup) After USB initalization.
> >
> > Inha Song (2):
> > usb: common: provide a _weak board_usb_cleanup() function
> > usb: invoke board specific USB cleanup interface
>
> Hi,
>
> where do you plan to use this _weak function please ?
>
> Best regards,
> Marek Vasut
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot] [PATCH 0/2] Invoke board specific board_usb_cleanup function
2015-01-19 9:18 ` Inha Song
@ 2015-01-19 15:02 ` Marek Vasut
0 siblings, 0 replies; 16+ messages in thread
From: Marek Vasut @ 2015-01-19 15:02 UTC (permalink / raw)
To: u-boot
On Monday, January 19, 2015 at 10:18:53 AM, Inha Song wrote:
> Hi Marek,
>
> I want to use this function for support Thor/DFU download in Odroid-XU3.
> For Odroid-XU3 usb support, we need to DWC3 code. (As I know, DWC3
> patchsets (Kishon Vijay Abraham I) are RFC state) So, I used DWC3 patchset
> temporarily and I knew that I should be call dwc3_uboot_exit() function.
>
> As a result, I have implemented board_usb_cleanup() function in smdk5420.c
> board file for called dwc3_uboot_exit() function.
>
> If "board_usb_cleanup" is dead code, I will fix it.
Hi!
(please do not top-post)
Thanks for the clarification. Do you plan to send the dwc3 stuff as well please
?
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot] [PATCH 1/2] usb: common: provide a _weak board_usb_cleanup() function
2015-01-19 7:07 ` [U-Boot] [PATCH 1/2] usb: common: provide a _weak board_usb_cleanup() function Inha Song
@ 2015-02-24 11:56 ` Lukasz Majewski
2015-02-24 16:05 ` Lukasz Majewski
0 siblings, 1 reply; 16+ messages in thread
From: Lukasz Majewski @ 2015-02-24 11:56 UTC (permalink / raw)
To: u-boot
Hi Marek
> This patch implement _weak function for board_usb_cleanup.
> This function (usb_board_cleanup) implementation is board-specific
> feature.
>
> board_usb_cleanup function can be used to clean up after failed
> board-specific USB initialization.
>
> Signed-off-by: Inha Song <ideal.song@samsung.com>
> ---
> common/usb.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/common/usb.c b/common/usb.c
> index 736cd9f..fbb4495 100644
> --- a/common/usb.c
> +++ b/common/usb.c
> @@ -1063,4 +1063,10 @@ int board_usb_init(int index, enum
> usb_init_type init) {
> return 0;
> }
> +
> +__weak
> +int board_usb_cleanup(int index, enum usb_init_type init)
> +{
> + return 0;
> +}
> /* EOF */
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Marek could you take this patch (and the following one) to -usb tree?
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot] [PATCH 2/2] usb: invoke board specific USB cleanup interface
2015-01-19 7:07 ` [U-Boot] [PATCH 2/2] usb: invoke board specific USB cleanup interface Inha Song
@ 2015-02-24 11:56 ` Lukasz Majewski
2015-02-24 16:20 ` Rob Herring
1 sibling, 0 replies; 16+ messages in thread
From: Lukasz Majewski @ 2015-02-24 11:56 UTC (permalink / raw)
To: u-boot
Hi Inha,
> This patch invoke board-specific USB cleanup (board_usb_cleanup)
> interface.
>
> Signed-off-by: Inha Song <ideal.song@samsung.com>
> ---
> common/cmd_dfu.c | 1 +
> common/cmd_thordown.c | 1 +
> common/cmd_usb_mass_storage.c | 1 +
> 3 files changed, 3 insertions(+)
>
> diff --git a/common/cmd_dfu.c b/common/cmd_dfu.c
> index e975abe..161d38b 100644
> --- a/common/cmd_dfu.c
> +++ b/common/cmd_dfu.c
> @@ -68,6 +68,7 @@ static int do_dfu(cmd_tbl_t *cmdtp, int flag, int
> argc, char * const argv[]) }
> exit:
> g_dnl_unregister();
> + board_usb_cleanup(controller_index, USB_INIT_DEVICE);
> done:
> dfu_free_entities();
>
> diff --git a/common/cmd_thordown.c b/common/cmd_thordown.c
> index 8ed1dc6..436b7f5 100644
> --- a/common/cmd_thordown.c
> +++ b/common/cmd_thordown.c
> @@ -56,6 +56,7 @@ int do_thor_down(cmd_tbl_t *cmdtp, int flag, int
> argc, char * const argv[])
> exit:
> g_dnl_unregister();
> + board_usb_cleanup(controller_index, USB_INIT_DEVICE);
> done:
> dfu_free_entities();
>
> diff --git a/common/cmd_usb_mass_storage.c
> b/common/cmd_usb_mass_storage.c index 2c879ea..53a765e 100644
> --- a/common/cmd_usb_mass_storage.c
> +++ b/common/cmd_usb_mass_storage.c
> @@ -154,6 +154,7 @@ int do_usb_mass_storage(cmd_tbl_t *cmdtp, int
> flag, }
> exit:
> g_dnl_unregister();
> + board_usb_cleanup(controller_index, USB_INIT_DEVICE);
> return CMD_RET_SUCCESS;
> }Lukasz Majewski <l.majewski@samsung.com>
>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot] [PATCH 1/2] usb: common: provide a _weak board_usb_cleanup() function
2015-02-24 11:56 ` Lukasz Majewski
@ 2015-02-24 16:05 ` Lukasz Majewski
2015-02-24 17:34 ` Marek Vasut
0 siblings, 1 reply; 16+ messages in thread
From: Lukasz Majewski @ 2015-02-24 16:05 UTC (permalink / raw)
To: u-boot
Hi Lukasz,
> Hi Marek
>
> > This patch implement _weak function for board_usb_cleanup.
> > This function (usb_board_cleanup) implementation is board-specific
> > feature.
> >
> > board_usb_cleanup function can be used to clean up after failed
> > board-specific USB initialization.
> >
> > Signed-off-by: Inha Song <ideal.song@samsung.com>
> > ---
> > common/usb.c | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/common/usb.c b/common/usb.c
> > index 736cd9f..fbb4495 100644
> > --- a/common/usb.c
> > +++ b/common/usb.c
> > @@ -1063,4 +1063,10 @@ int board_usb_init(int index, enum
> > usb_init_type init) {
> > return 0;
> > }
> > +
> > +__weak
> > +int board_usb_cleanup(int index, enum usb_init_type init)
> > +{
> > + return 0;
> > +}
> > /* EOF */
>
> Acked-by: Lukasz Majewski <l.majewski@samsung.com>
>
> Marek could you take this patch (and the following one) to -usb tree?
>
I've looked a bit more deep into this and it seems like this code is
also defined in patches provided by Kishon:
"common: cmd_dfu: invoke board_usb_cleanup() for cleaning up"
b607ea5d62bb0c295f10af86a6de6b33dd1fea75
Marek, it is your call to decide how we should proceed.
My recommendation - we should use Kishon's patches, since it is the
part of a larger patchset.
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot] [PATCH 2/2] usb: invoke board specific USB cleanup interface
2015-01-19 7:07 ` [U-Boot] [PATCH 2/2] usb: invoke board specific USB cleanup interface Inha Song
2015-02-24 11:56 ` Lukasz Majewski
@ 2015-02-24 16:20 ` Rob Herring
2015-02-25 9:58 ` Inha Song
1 sibling, 1 reply; 16+ messages in thread
From: Rob Herring @ 2015-02-24 16:20 UTC (permalink / raw)
To: u-boot
On Mon, Jan 19, 2015 at 1:07 AM, Inha Song <ideal.song@samsung.com> wrote:
> This patch invoke board-specific USB cleanup (board_usb_cleanup)
> interface.
>
> Signed-off-by: Inha Song <ideal.song@samsung.com>
> ---
> common/cmd_dfu.c | 1 +
> common/cmd_thordown.c | 1 +
> common/cmd_usb_mass_storage.c | 1 +
You missed fastboot at a minimum.
What about other gadget functions such as rndis/cdc_etherent?
> 3 files changed, 3 insertions(+)
>
> diff --git a/common/cmd_dfu.c b/common/cmd_dfu.c
> index e975abe..161d38b 100644
> --- a/common/cmd_dfu.c
> +++ b/common/cmd_dfu.c
> @@ -68,6 +68,7 @@ static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
> }
> exit:
> g_dnl_unregister();
> + board_usb_cleanup(controller_index, USB_INIT_DEVICE);
Perhaps this should be part of g_dnl_unregister since it is always
called immediately after.
> done:
> dfu_free_entities();
>
> diff --git a/common/cmd_thordown.c b/common/cmd_thordown.c
> index 8ed1dc6..436b7f5 100644
> --- a/common/cmd_thordown.c
> +++ b/common/cmd_thordown.c
> @@ -56,6 +56,7 @@ int do_thor_down(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
>
> exit:
> g_dnl_unregister();
> + board_usb_cleanup(controller_index, USB_INIT_DEVICE);
> done:
> dfu_free_entities();
>
> diff --git a/common/cmd_usb_mass_storage.c b/common/cmd_usb_mass_storage.c
> index 2c879ea..53a765e 100644
> --- a/common/cmd_usb_mass_storage.c
> +++ b/common/cmd_usb_mass_storage.c
> @@ -154,6 +154,7 @@ int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag,
> }
> exit:
> g_dnl_unregister();
> + board_usb_cleanup(controller_index, USB_INIT_DEVICE);
> return CMD_RET_SUCCESS;
> }
>
> --
> 2.0.0.390.gcb682f8
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot] [PATCH 1/2] usb: common: provide a _weak board_usb_cleanup() function
2015-02-24 16:05 ` Lukasz Majewski
@ 2015-02-24 17:34 ` Marek Vasut
2015-02-25 9:15 ` Lukasz Majewski
0 siblings, 1 reply; 16+ messages in thread
From: Marek Vasut @ 2015-02-24 17:34 UTC (permalink / raw)
To: u-boot
On Tuesday, February 24, 2015 at 05:05:29 PM, Lukasz Majewski wrote:
> Hi Lukasz,
Hi Lukasz,
is your other self doing good too ? ;-)
> > Hi Marek
> >
> > > This patch implement _weak function for board_usb_cleanup.
> > > This function (usb_board_cleanup) implementation is board-specific
> > > feature.
> > >
> > > board_usb_cleanup function can be used to clean up after failed
> > > board-specific USB initialization.
> > >
> > > Signed-off-by: Inha Song <ideal.song@samsung.com>
> > > ---
> > >
> > > common/usb.c | 6 ++++++
> > > 1 file changed, 6 insertions(+)
> > >
> > > diff --git a/common/usb.c b/common/usb.c
> > > index 736cd9f..fbb4495 100644
> > > --- a/common/usb.c
> > > +++ b/common/usb.c
> > > @@ -1063,4 +1063,10 @@ int board_usb_init(int index, enum
> > > usb_init_type init) {
> > >
> > > return 0;
> > >
> > > }
> > >
> > > +
> > > +__weak
> > > +int board_usb_cleanup(int index, enum usb_init_type init)
> > > +{
> > > + return 0;
> > > +}
> > >
> > > /* EOF */
> >
> > Acked-by: Lukasz Majewski <l.majewski@samsung.com>
> >
> > Marek could you take this patch (and the following one) to -usb tree?
>
> I've looked a bit more deep into this and it seems like this code is
> also defined in patches provided by Kishon:
>
> "common: cmd_dfu: invoke board_usb_cleanup() for cleaning up"
> b607ea5d62bb0c295f10af86a6de6b33dd1fea75
>
> Marek, it is your call to decide how we should proceed.
>
> My recommendation - we should use Kishon's patches, since it is the
> part of a larger patchset.
I'll stick with your recommendation, though I'd like to -- somehow -- work
in Inha's credit into those patches too. What do you think please ?
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot] [PATCH 1/2] usb: common: provide a _weak board_usb_cleanup() function
2015-02-24 17:34 ` Marek Vasut
@ 2015-02-25 9:15 ` Lukasz Majewski
2015-02-25 17:02 ` Marek Vasut
0 siblings, 1 reply; 16+ messages in thread
From: Lukasz Majewski @ 2015-02-25 9:15 UTC (permalink / raw)
To: u-boot
Hi Marek,
> On Tuesday, February 24, 2015 at 05:05:29 PM, Lukasz Majewski wrote:
> > Hi Lukasz,
>
> Hi Lukasz,
>
> is your other self doing good too ? ;-)
>
> > > Hi Marek
> > >
> > > > This patch implement _weak function for board_usb_cleanup.
> > > > This function (usb_board_cleanup) implementation is
> > > > board-specific feature.
> > > >
> > > > board_usb_cleanup function can be used to clean up after failed
> > > > board-specific USB initialization.
> > > >
> > > > Signed-off-by: Inha Song <ideal.song@samsung.com>
> > > > ---
> > > >
> > > > common/usb.c | 6 ++++++
> > > > 1 file changed, 6 insertions(+)
> > > >
> > > > diff --git a/common/usb.c b/common/usb.c
> > > > index 736cd9f..fbb4495 100644
> > > > --- a/common/usb.c
> > > > +++ b/common/usb.c
> > > > @@ -1063,4 +1063,10 @@ int board_usb_init(int index, enum
> > > > usb_init_type init) {
> > > >
> > > > return 0;
> > > >
> > > > }
> > > >
> > > > +
> > > > +__weak
> > > > +int board_usb_cleanup(int index, enum usb_init_type init)
> > > > +{
> > > > + return 0;
> > > > +}
> > > >
> > > > /* EOF */
> > >
> > > Acked-by: Lukasz Majewski <l.majewski@samsung.com>
> > >
> > > Marek could you take this patch (and the following one) to -usb
> > > tree?
> >
> > I've looked a bit more deep into this and it seems like this code is
> > also defined in patches provided by Kishon:
> >
> > "common: cmd_dfu: invoke board_usb_cleanup() for cleaning up"
> > b607ea5d62bb0c295f10af86a6de6b33dd1fea75
> >
> > Marek, it is your call to decide how we should proceed.
> >
> > My recommendation - we should use Kishon's patches, since it is the
> > part of a larger patchset.
>
> I'll stick with your recommendation, though I'd like to -- somehow --
> work in Inha's credit into those patches too. What do you think
> please ?
Rob Herring had some comments to Inha original patches, so now I'm
confused.
Lets see if Inha fixes issues with original patch.
It is also possible to drop only one patch from Kishon, namely
"common: cmd_dfu: invoke board_usb_cleanup() for cleaning up"
>
> Best regards,
> Marek Vasut
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot] [PATCH 2/2] usb: invoke board specific USB cleanup interface
2015-02-24 16:20 ` Rob Herring
@ 2015-02-25 9:58 ` Inha Song
2015-02-25 13:10 ` Tom Rini
0 siblings, 1 reply; 16+ messages in thread
From: Inha Song @ 2015-02-25 9:58 UTC (permalink / raw)
To: u-boot
Hi, Rob,
On Tue, 24 Feb 2015 10:20:13 -0600
Rob Herring <robh@kernel.org> wrote:
> On Mon, Jan 19, 2015 at 1:07 AM, Inha Song <ideal.song@samsung.com> wrote:
> > This patch invoke board-specific USB cleanup (board_usb_cleanup)
> > interface.
> >
> > Signed-off-by: Inha Song <ideal.song@samsung.com>
> > ---
> > common/cmd_dfu.c | 1 +
> > common/cmd_thordown.c | 1 +
> > common/cmd_usb_mass_storage.c | 1 +
>
> You missed fastboot at a minimum.
Ok, I will add board_usb_cleanup fuction also in fastboot.
>
> What about other gadget functions such as rndis/cdc_etherent?
I doesn't have any knowledge about rndis/cdc_etherent
So, Afraid that to fix these code.
>
> > 3 files changed, 3 insertions(+)
> >
> > diff --git a/common/cmd_dfu.c b/common/cmd_dfu.c
> > index e975abe..161d38b 100644
> > --- a/common/cmd_dfu.c
> > +++ b/common/cmd_dfu.c
> > @@ -68,6 +68,7 @@ static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
> > }
> > exit:
> > g_dnl_unregister();
> > + board_usb_cleanup(controller_index, USB_INIT_DEVICE);
>
> Perhaps this should be part of g_dnl_unregister since it is always
> called immediately after.
Hm, I am not sure we need to add board_usb_cleanup funtion to the gadget.
Best Regards,
Inha Song.
>
> > done:
> > dfu_free_entities();
> >
> > diff --git a/common/cmd_thordown.c b/common/cmd_thordown.c
> > index 8ed1dc6..436b7f5 100644
> > --- a/common/cmd_thordown.c
> > +++ b/common/cmd_thordown.c
> > @@ -56,6 +56,7 @@ int do_thor_down(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
> >
> > exit:
> > g_dnl_unregister();
> > + board_usb_cleanup(controller_index, USB_INIT_DEVICE);
> > done:
> > dfu_free_entities();
> >
> > diff --git a/common/cmd_usb_mass_storage.c b/common/cmd_usb_mass_storage.c
> > index 2c879ea..53a765e 100644
> > --- a/common/cmd_usb_mass_storage.c
> > +++ b/common/cmd_usb_mass_storage.c
> > @@ -154,6 +154,7 @@ int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag,
> > }
> > exit:
> > g_dnl_unregister();
> > + board_usb_cleanup(controller_index, USB_INIT_DEVICE);
> > return CMD_RET_SUCCESS;
> > }
> >
> > --
> > 2.0.0.390.gcb682f8
> >
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot] [PATCH 2/2] usb: invoke board specific USB cleanup interface
2015-02-25 9:58 ` Inha Song
@ 2015-02-25 13:10 ` Tom Rini
0 siblings, 0 replies; 16+ messages in thread
From: Tom Rini @ 2015-02-25 13:10 UTC (permalink / raw)
To: u-boot
On Wed, Feb 25, 2015 at 06:58:03PM +0900, Inha Song wrote:
> Hi, Rob,
>
>
> On Tue, 24 Feb 2015 10:20:13 -0600
> Rob Herring <robh@kernel.org> wrote:
>
> > On Mon, Jan 19, 2015 at 1:07 AM, Inha Song <ideal.song@samsung.com> wrote:
> > > This patch invoke board-specific USB cleanup (board_usb_cleanup)
> > > interface.
> > >
> > > Signed-off-by: Inha Song <ideal.song@samsung.com>
> > > ---
> > > common/cmd_dfu.c | 1 +
> > > common/cmd_thordown.c | 1 +
> > > common/cmd_usb_mass_storage.c | 1 +
> >
> > You missed fastboot at a minimum.
>
> Ok, I will add board_usb_cleanup fuction also in fastboot.
>
> >
> > What about other gadget functions such as rndis/cdc_etherent?
>
> I doesn't have any knowledge about rndis/cdc_etherent
> So, Afraid that to fix these code.
So that's the problem with this approach. Kishon reminded me that on TI
parts we see some PM problems because we don't always do a cleanup on
the USB side for gadgets. I think the right answer here is to mirror
the usb_stop() function in bootm_disable_interrupts() in common/bootm.c
for the gadget code as well.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150225/ea95d866/attachment.sig>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot] [PATCH 1/2] usb: common: provide a _weak board_usb_cleanup() function
2015-02-25 9:15 ` Lukasz Majewski
@ 2015-02-25 17:02 ` Marek Vasut
2015-02-26 8:20 ` Lukasz Majewski
0 siblings, 1 reply; 16+ messages in thread
From: Marek Vasut @ 2015-02-25 17:02 UTC (permalink / raw)
To: u-boot
On Wednesday, February 25, 2015 at 10:15:24 AM, Lukasz Majewski wrote:
> Hi Marek,
Hi!
> > On Tuesday, February 24, 2015 at 05:05:29 PM, Lukasz Majewski wrote:
> > > Hi Lukasz,
> >
[...]
> > I'll stick with your recommendation, though I'd like to -- somehow --
> > work in Inha's credit into those patches too. What do you think
> > please ?
>
> Rob Herring had some comments to Inha original patches, so now I'm
> confused.
>
> Lets see if Inha fixes issues with original patch.
> It is also possible to drop only one patch from Kishon, namely
> "common: cmd_dfu: invoke board_usb_cleanup() for cleaning up"
Gah, we're loosing traction here. Maybe we need to sync up and we
surely need to apply something, otherwise this will become a chaotic
mess.
I placed all of the patches into u-boot-usb branch topic/dwc3 . Can
you please check if it's working and what is possibly missing ? Let's
work on top of that please, OK ?
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot] [PATCH 1/2] usb: common: provide a _weak board_usb_cleanup() function
2015-02-25 17:02 ` Marek Vasut
@ 2015-02-26 8:20 ` Lukasz Majewski
0 siblings, 0 replies; 16+ messages in thread
From: Lukasz Majewski @ 2015-02-26 8:20 UTC (permalink / raw)
To: u-boot
Hi Marek,
> On Wednesday, February 25, 2015 at 10:15:24 AM, Lukasz Majewski wrote:
> > Hi Marek,
>
> Hi!
>
> > > On Tuesday, February 24, 2015 at 05:05:29 PM, Lukasz Majewski
> > > wrote:
> > > > Hi Lukasz,
> > >
>
> [...]
>
> > > I'll stick with your recommendation, though I'd like to --
> > > somehow -- work in Inha's credit into those patches too. What do
> > > you think please ?
> >
> > Rob Herring had some comments to Inha original patches, so now I'm
> > confused.
> >
> > Lets see if Inha fixes issues with original patch.
> > It is also possible to drop only one patch from Kishon, namely
> > "common: cmd_dfu: invoke board_usb_cleanup() for cleaning up"
>
> Gah, we're loosing traction here. Maybe we need to sync up and we
> surely need to apply something, otherwise this will become a chaotic
> mess.
>
> I placed all of the patches into u-boot-usb branch topic/dwc3 . Can
> you please check if it's working and what is possibly missing ? Let's
> work on top of that please, OK ?
Thanks for preparing the branch.
However, some fixes - those collected by me need some extra rework,
since there were some comments regarding them (mostly from Kishon).
Moreover, we could also add to this branch (on top of Kishon's dwc3
patch set) the linux compatibility rework. On top of that I would like
to add next version of dwc3 fixes.
>
> Best regards,
> Marek Vasut
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2015-02-26 8:20 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-19 7:07 [U-Boot] [PATCH 0/2] Invoke board specific board_usb_cleanup function Inha Song
2015-01-19 7:07 ` [U-Boot] [PATCH 1/2] usb: common: provide a _weak board_usb_cleanup() function Inha Song
2015-02-24 11:56 ` Lukasz Majewski
2015-02-24 16:05 ` Lukasz Majewski
2015-02-24 17:34 ` Marek Vasut
2015-02-25 9:15 ` Lukasz Majewski
2015-02-25 17:02 ` Marek Vasut
2015-02-26 8:20 ` Lukasz Majewski
2015-01-19 7:07 ` [U-Boot] [PATCH 2/2] usb: invoke board specific USB cleanup interface Inha Song
2015-02-24 11:56 ` Lukasz Majewski
2015-02-24 16:20 ` Rob Herring
2015-02-25 9:58 ` Inha Song
2015-02-25 13:10 ` Tom Rini
2015-01-19 8:50 ` [U-Boot] [PATCH 0/2] Invoke board specific board_usb_cleanup function Marek Vasut
2015-01-19 9:18 ` Inha Song
2015-01-19 15:02 ` Marek Vasut
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox