diff mbox

[U-Boot] ARM: tegra: enable STDIO deregistration

Message ID 1428945092-26697-1-git-send-email-swarren@wwwdotorg.org
State Superseded
Delegated to: Tom Warren
Headers show

Commit Message

Stephen Warren April 13, 2015, 5:11 p.m. UTC
From: Stephen Warren <swarren@nvidia.com>

At the very least when USB keyboard support is enabled, we need to enable
CONFIG_SYS_STDIO_DEREGISTER, so the "usb reset" is able to re-scan USB
ports and find new devices.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
This feels like a nice fix for the upcoming release if possible. Even if
this causes horrible fallout (which I do not expect), it'll only affect
Seaboard and Ventana boards, both of which have quite limited
distribution.
---
 include/configs/tegra-common-post.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Simon Glass April 13, 2015, 5:22 p.m. UTC | #1
Hi Stephen,

On 13 April 2015 at 11:11, Stephen Warren <swarren@wwwdotorg.org> wrote:
> From: Stephen Warren <swarren@nvidia.com>
>
> At the very least when USB keyboard support is enabled, we need to enable
> CONFIG_SYS_STDIO_DEREGISTER, so the "usb reset" is able to re-scan USB
> ports and find new devices.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
> This feels like a nice fix for the upcoming release if possible. Even if
> this causes horrible fallout (which I do not expect), it'll only affect
> Seaboard and Ventana boards, both of which have quite limited
> distribution.

Reviewed-by: Simon Glass <sjg@chromium.org>

I wonder whether you might want to (post-release) enable this always
on Tegra, except for SPL?

> ---
>  include/configs/tegra-common-post.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h
> index 31096d068bb1..e792e02fd923 100644
> --- a/include/configs/tegra-common-post.h
> +++ b/include/configs/tegra-common-post.h
> @@ -26,10 +26,11 @@
>  #define STDIN_KBD_KBC ""
>  #endif
>
> -#ifdef CONFIG_USB_KEYBOARD
> +#if defined(CONFIG_USB_KEYBOARD) && !defined(CONFIG_SPL_BUILD)
>  #define STDIN_KBD_USB ",usbkbd"
>  #define CONFIG_SYS_USB_EVENT_POLL
>  #define CONFIG_PREBOOT                 "usb start"
> +#define CONFIG_SYS_STDIO_DEREGISTER
>  #else
>  #define STDIN_KBD_USB ""
>  #endif
> --
> 1.9.1
>

Regards,
Simon
Stephen Warren April 13, 2015, 7:17 p.m. UTC | #2
On 04/13/2015 11:22 AM, Simon Glass wrote:
> Hi Stephen,
>
> On 13 April 2015 at 11:11, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> From: Stephen Warren <swarren@nvidia.com>
>>
>> At the very least when USB keyboard support is enabled, we need to enable
>> CONFIG_SYS_STDIO_DEREGISTER, so the "usb reset" is able to re-scan USB
>> ports and find new devices.
>>
>> Signed-off-by: Stephen Warren <swarren@nvidia.com>
>> ---
>> This feels like a nice fix for the upcoming release if possible. Even if
>> this causes horrible fallout (which I do not expect), it'll only affect
>> Seaboard and Ventana boards, both of which have quite limited
>> distribution.
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
>
> I wonder whether you might want to (post-release) enable this always
> on Tegra, except for SPL?

Was that referring to CONFIG_SYS_STDIO_DEREGISTER or USB keyboard 
support? I suspect we should simply enable USB keyboard support 
everywhere, since most systems don't have built-in keyboards? It's 
certainly missing from devices like Trimslice that need it. Or would you 
rather only enable keyboard support on devices without a keyboard, and 
enable CONFIG_SYS_STDIO_DEREGISTER everywhere?
Simon Glass April 13, 2015, 8:19 p.m. UTC | #3
Hi Stephen,

On 13 April 2015 at 13:17, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 04/13/2015 11:22 AM, Simon Glass wrote:
>>
>> Hi Stephen,
>>
>> On 13 April 2015 at 11:11, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>>
>>> From: Stephen Warren <swarren@nvidia.com>
>>>
>>> At the very least when USB keyboard support is enabled, we need to enable
>>> CONFIG_SYS_STDIO_DEREGISTER, so the "usb reset" is able to re-scan USB
>>> ports and find new devices.
>>>
>>> Signed-off-by: Stephen Warren <swarren@nvidia.com>
>>> ---
>>> This feels like a nice fix for the upcoming release if possible. Even if
>>> this causes horrible fallout (which I do not expect), it'll only affect
>>> Seaboard and Ventana boards, both of which have quite limited
>>> distribution.
>>
>>
>> Reviewed-by: Simon Glass <sjg@chromium.org>
>>
>> I wonder whether you might want to (post-release) enable this always
>> on Tegra, except for SPL?
>
>
> Was that referring to CONFIG_SYS_STDIO_DEREGISTER or USB keyboard support? I
> suspect we should simply enable USB keyboard support everywhere, since most
> systems don't have built-in keyboards? It's certainly missing from devices
> like Trimslice that need it. Or would you rather only enable keyboard
> support on devices without a keyboard, and enable
> CONFIG_SYS_STDIO_DEREGISTER everywhere?

I was thinking of the latter - enable CONFIG_SYS_STDIO_DEREGISTER
everywhere. Removing this is only a small win, and is mostly intended
for SPL.

Regards,
Simon
diff mbox

Patch

diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h
index 31096d068bb1..e792e02fd923 100644
--- a/include/configs/tegra-common-post.h
+++ b/include/configs/tegra-common-post.h
@@ -26,10 +26,11 @@ 
 #define STDIN_KBD_KBC ""
 #endif
 
-#ifdef CONFIG_USB_KEYBOARD
+#if defined(CONFIG_USB_KEYBOARD) && !defined(CONFIG_SPL_BUILD)
 #define STDIN_KBD_USB ",usbkbd"
 #define CONFIG_SYS_USB_EVENT_POLL
 #define CONFIG_PREBOOT			"usb start"
+#define CONFIG_SYS_STDIO_DEREGISTER
 #else
 #define STDIN_KBD_USB ""
 #endif