From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Mon, 22 Oct 2012 15:56:44 -0600 Subject: [U-Boot] [PATCH 2/2] tegra: seaboard: Enable USB keyboard In-Reply-To: <1350941971-10282-2-git-send-email-amartin@nvidia.com> References: <1350941971-10282-1-git-send-email-amartin@nvidia.com> <1350941971-10282-2-git-send-email-amartin@nvidia.com> Message-ID: <5085C11C.80505@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 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 "\" \ ... By the way, does tegra-kbc work now/yet? The last time I tried it, I don't think it did. > diff --git a/include/configs/tegra20-common.h b/include/configs/tegra20-common.h > +#ifdef CONFIG_USB_KEYBOARD > +#define CONFIG_SYS_USB_EVENT_POLL > +#define CONFIG_PREBOOT "usb start" > +#endif /* CONFIG_USB_KEYBOARD */ Similarly, we could also e.g. turn on CONFIG_KEYBOARD whenever CONFIG_TEGRA_KEYBOARD is turned on, and perhaps a bunch of other similar things, like moving much of the partition/filesystem/command/... support into the Tegra common files. That would be something for another patch though.