From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Mon, 22 Oct 2012 17:13:48 -0600 Subject: [U-Boot] [PATCH 2/2] tegra: seaboard: Enable USB keyboard In-Reply-To: <20121022225838.GD13201@badger> References: <1350941971-10282-1-git-send-email-amartin@nvidia.com> <1350941971-10282-2-git-send-email-amartin@nvidia.com> <5085C11C.80505@wwwdotorg.org> <20121022225838.GD13201@badger> Message-ID: <5085D32C.4030407@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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.