From patchwork Fri Oct 12 01:15:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 191029 X-Patchwork-Delegate: trini@ti.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 6ECAA2C007B for ; Fri, 12 Oct 2012 12:16:51 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 819934A023; Fri, 12 Oct 2012 03:16:44 +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 RlDbRcUPZP0J; Fri, 12 Oct 2012 03:16:44 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BA54D4A02D; Fri, 12 Oct 2012 03:16:36 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2F2004A021 for ; Fri, 12 Oct 2012 03:16:33 +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 XgGs1+1HgMIy for ; Fri, 12 Oct 2012 03:16:30 +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 mail-yh0-f74.google.com (mail-yh0-f74.google.com [209.85.213.74]) by theia.denx.de (Postfix) with ESMTPS id 8574D4A025 for ; Fri, 12 Oct 2012 03:16:21 +0200 (CEST) Received: by mail-yh0-f74.google.com with SMTP id 10so294487yhl.3 for ; Thu, 11 Oct 2012 18:16:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=gSlnRGPRm7j+ElVJTwBCcVQJV2zyNrXDvhlbxDkGb7Y=; b=U/KHS0ghmmk2qtpnVG9UDeTrLM2aq7Ys11+yncLKtAGUt3rG1dOdlW0V3Ox7OzMqjo VJ5h9BOl0YBGoewjW6gis5Riw9I1ezL+LC2WTm6XrwuGgIjUWuaxIaj+Cm//ldVfUHKu 7EKQ4RkmH+hXNyJk5xyyZ6V5YEEAlfOKcFSJKBpF4FitHDO/NszeyI3enDKACdbHazWk J5UnphoXFiquxJv+is7ZSWiKWLT+Ycjgci/ZHepUS2ahfiawRdMR4lUdgRWk5utZH13O dpXGs4XBA9bH3hMGgEjqoQTAQEQWX/awlttkrR+xcvZM+4fuk47yogQdwvawNhc0B+Fl BMFA== Received: by 10.236.85.51 with SMTP id t39mr1709799yhe.15.1350004580718; Thu, 11 Oct 2012 18:16:20 -0700 (PDT) Received: from wpzn4.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id h50si515822yhi.3.2012.10.11.18.16.20 (version=TLSv1/SSLv3 cipher=AES128-SHA); Thu, 11 Oct 2012 18:16:20 -0700 (PDT) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by wpzn4.hot.corp.google.com (Postfix) with ESMTP id 9B7671E0043; Thu, 11 Oct 2012 18:16:20 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 59D88160EA0; Thu, 11 Oct 2012 18:16:20 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Thu, 11 Oct 2012 18:15:50 -0700 Message-Id: <1350004554-18506-2-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1350004554-18506-1-git-send-email-sjg@chromium.org> References: <1350004554-18506-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQmhl8Ey3e5IQnf8BOZwZvQ5JiRsup2gcmrBSrgpY4NAeu6BDzsQGrSXIQ5vdpblnh21umn7FJNjHoezXUjuKxDnH03frA+8vWfsFMXLhluiH0Tcd2vJ29qd1niZzY7J78gi01oTFRw4wQ8Df1LKRKShh4nP/3T3jLhEZClgq+3vucVcpH3zCSrNsrEqJX8PGxYloR/v Cc: Tom Rini Subject: [U-Boot] [PATCH 2/5] input: Provide a board specific mechanism to decide whether to skip i8042 init 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: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Gabe Black This change adds a board overridable function which can be used to decide whether or not to initialize the i8042 keyboard controller. On systems where it isn't actually connected to anything, this can save a significant amount of boot time. On Stumpy, this saves about 200ms on boot. Signed-off-by: Gabe Black Signed-off-by: Simon Glass --- drivers/input/i8042.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/drivers/input/i8042.c b/drivers/input/i8042.c index 99254e4..cae2d0a 100644 --- a/drivers/input/i8042.c +++ b/drivers/input/i8042.c @@ -320,6 +320,17 @@ static int kbd_controller_present(void) return in8(I8042_STATUS_REG) != 0xff; } +/* + * Implement a weak default function for boards that optionally + * need to skip the i8042 initialization. + */ +int __board_i8042_skip(void) +{ + /* As default, don't skip */ + return 0; +} +int board_i8042_skip(void) __attribute__((weak, alias("__board_i8042_skip"))); + /******************************************************************************* * * i8042_kbd_init - reset keyboard and init state flags @@ -329,7 +340,7 @@ int i8042_kbd_init(void) int keymap, try; char *penv; - if (!kbd_controller_present()) + if (!kbd_controller_present() || board_i8042_skip()) return -1; #ifdef CONFIG_USE_CPCIDVI