From patchwork Tue Oct 23 21:37:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Martin X-Patchwork-Id: 193579 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 856222C0100 for ; Wed, 24 Oct 2012 08:38:46 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 602CC4A3DE; Tue, 23 Oct 2012 23:38:30 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id inhJ341cQ5hB; Tue, 23 Oct 2012 23:38:30 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 21EEF4A39D; Tue, 23 Oct 2012 23:38:28 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B89964A3A6 for ; Tue, 23 Oct 2012 23:38:14 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MiQFClryxWe7 for ; Tue, 23 Oct 2012 23:38:10 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from hqemgate03.nvidia.com (hqemgate03.nvidia.com [216.228.121.140]) by theia.denx.de (Postfix) with ESMTPS id 7C4674A374 for ; Tue, 23 Oct 2012 23:38:07 +0200 (CEST) Received: from hqnvupgp06.nvidia.com (Not Verified[216.228.121.13]) by hqemgate03.nvidia.com id ; Tue, 23 Oct 2012 14:40:25 -0700 Received: from hqemhub02.nvidia.com ([172.17.108.22]) by hqnvupgp06.nvidia.com (PGP Universal service); Tue, 23 Oct 2012 14:38:00 -0700 X-PGP-Universal: processed; by hqnvupgp06.nvidia.com on Tue, 23 Oct 2012 14:38:00 -0700 Received: from badger.nvidia.com (172.20.144.16) by hqemhub02.nvidia.com (172.20.150.31) with Microsoft SMTP Server id 8.3.279.1; Tue, 23 Oct 2012 14:37:59 -0700 From: Allen Martin To: , , Date: Tue, 23 Oct 2012 14:37:53 -0700 Message-ID: <1351028274-30301-2-git-send-email-amartin@nvidia.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1351028274-30301-1-git-send-email-amartin@nvidia.com> References: <1351028274-30301-1-git-send-email-amartin@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v3 2/3] tegra: move TEGRA_DEVICE_SETTINGS to tegra-common-post.h X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Move environment settings for stdin/stdout/stderr to tegra-common-post.h and generate them automaticaly based on input device selection. Signed-off-by: Allen Martin Acked-by: Stephen Warren Tested-by: Stephen Warren --- v3: no changes v2: new patch --- include/configs/seaboard.h | 5 ----- include/configs/tegra-common-post.h | 19 +++++++++++++++++++ include/configs/tegra20-common.h | 4 ---- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h index 0727a4c..2cb3ac9 100644 --- a/include/configs/seaboard.h +++ b/include/configs/seaboard.h @@ -98,11 +98,6 @@ #define CONFIG_TEGRA_KEYBOARD #define CONFIG_KEYBOARD -#undef TEGRA_DEVICE_SETTINGS -#define TEGRA_DEVICE_SETTINGS "stdin=serial,tegra-kbc\0" \ - "stdout=serial\0" \ - "stderr=serial\0" - #include "tegra-common-post.h" /* NAND support */ diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h index 9698c23..8d21d9c 100644 --- a/include/configs/tegra-common-post.h +++ b/include/configs/tegra-common-post.h @@ -140,6 +140,25 @@ #endif +#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" +#define CONFIG_SYS_USB_EVENT_POLL +#define CONFIG_PREBOOT "usb start" +#else +#define STDIN_KBD_USB "" +#endif + +#define TEGRA_DEVICE_SETTINGS \ + "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB "\0" \ + "stdout=serial\0" \ + "stderr=serial\0" \ + #define CONFIG_EXTRA_ENV_SETTINGS \ TEGRA_DEVICE_SETTINGS \ "fdt_load=0x01000000\0" \ diff --git a/include/configs/tegra20-common.h b/include/configs/tegra20-common.h index dc7444d..ea89d76 100644 --- a/include/configs/tegra20-common.h +++ b/include/configs/tegra20-common.h @@ -125,12 +125,8 @@ #define CONFIG_SYS_NO_FLASH -/* Environment information, boards can override if required */ #define CONFIG_CONSOLE_MUX #define CONFIG_SYS_CONSOLE_IS_IN_ENV -#define TEGRA_DEVICE_SETTINGS "stdin=serial\0" \ - "stdout=serial\0" \ - "stderr=serial\0" #define CONFIG_LOADADDR 0x408000 /* def. location for kernel */ #define CONFIG_BOOTDELAY 2 /* -1 to disable auto boot */