[U-Boot] [PATCH 2/2] tegra: seaboard: Enable USB keyboard
Stephen Warren
swarren at wwwdotorg.org
Tue Oct 23 01:13:48 CEST 2012
On 10/22/2012 04:58 PM, Allen Martin wrote:
> On Mon, Oct 22, 2012 at 02:56:44PM -0700, Stephen Warren wrote:
>> On 10/22/2012 03:39 PM, Allen Martin wrote:
>>> Enable USB keyboard for the springbank variant of seaboard
>>
>> This sounds nice!
>>
>>> diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h
>>
>>> #undef TEGRA_DEVICE_SETTINGS
>>> -#define TEGRA_DEVICE_SETTINGS "stdin=serial,tegra-kbc\0" \
>>> +#define TEGRA_DEVICE_SETTINGS "stdin=serial,tegra-kbc,usbkbd\0" \
>>> "stdout=serial\0" \
>>> "stderr=serial\0"
>>
>> Rather than duplicating this everywhere (and I imagine now that this
>> support works, most Tegra boards will want to turn on USB keyboard),
>> can't we do something automatic in tegra-common-post.h, like:
>>
>> #ifdef CONFIG_TEGRA_KEYBOARD
>> #define STDIN_KBD_KBC ",tegra-kbc"
>> #else
>> #define STDIN_KBD_KBC ""
>> #endif
>>
>> #ifdef CONFIG_USB_KEYBOARD
>> #define STDIN_KBD_USB ",usbkbd"
>> #else
>> #define STDIN_KBD_USB ""
>> #endif
>>
>> #define TEGRA_DEVICE_SETTINGS \
>> "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB "\" \
>> ...
>
> The only issue I see with that is TEGRA_DEVICE_SETTINGS can be used by
> boards today to add additional environment as well as override
> stdin/stdout/stderr. I don't think any boards actually do though, so
> we could just make a TEGRA_EXTRA_DEVICE_SETTINGS if that need comes
> up.
The common file could always only #define TEGRA_DEVICE_SETTINGS if the
board didn't already define a custom version.
> We might as well just put this directly in CONFIG_EXTRA_ENV_SETTINGS
> because if TEGRA_DEVICE_SETTINGS is private to tegra-common-post.h
> there's really no reason for it to exist.
It may be useful to keep it; I separated out MEM_LAYOUT_ENV_SETTINGS and
BOOTCMDS_COMMON for example just so that EXTRA_ENV_SETTINGS could be
built out of a few smaller and hence more manageable pieces.
More information about the U-Boot
mailing list