From patchwork Thu Sep 1 11:34:30 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 112879 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 037F1B6F6F for ; Thu, 1 Sep 2011 21:36:16 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 888652813F; Thu, 1 Sep 2011 13:36:10 +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 2pKoyvesIapC; Thu, 1 Sep 2011 13:36:10 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 93DCE28146; Thu, 1 Sep 2011 13:36:09 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1AFC42813E for ; Thu, 1 Sep 2011 13:36:08 +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 i3dWOj9Y2O9L for ; Thu, 1 Sep 2011 13:36:07 +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-bw0-f44.google.com (mail-bw0-f44.google.com [209.85.214.44]) by theia.denx.de (Postfix) with ESMTPS id 80BB52813F for ; Thu, 1 Sep 2011 13:36:05 +0200 (CEST) Received: by mail-bw0-f44.google.com with SMTP id r4so1508588bka.3 for ; Thu, 01 Sep 2011 04:36:05 -0700 (PDT) Received: by 10.204.146.137 with SMTP id h9mr859282bkv.317.1314876965232; Thu, 01 Sep 2011 04:36:05 -0700 (PDT) Received: from Pali-EliteBook.kolej.mff.cuni.cz (rohar.kolej.mff.cuni.cz [78.128.193.202]) by mx.google.com with ESMTPS id a17sm159596bku.56.2011.09.01.04.36.03 (version=SSLv3 cipher=OTHER); Thu, 01 Sep 2011 04:36:04 -0700 (PDT) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: u-boot@lists.denx.de Date: Thu, 1 Sep 2011 13:34:30 +0200 Message-Id: <1314876881-9669-4-git-send-email-pali.rohar@gmail.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1314876881-9669-1-git-send-email-pali.rohar@gmail.com> References: <201109011304.46581.marek.vasut@gmail.com> <1314876881-9669-1-git-send-email-pali.rohar@gmail.com> Subject: [U-Boot] [PATCH 04/15] Only delay boot if keyboard open X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 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: Matan Ziv-Av --- board/nokia/rx51/rx51.c | 7 +++++++ include/configs/nokia_rx51.h | 1 + 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c index 3149a79..347d08a 100644 --- a/board/nokia/rx51/rx51.c +++ b/board/nokia/rx51/rx51.c @@ -104,6 +104,13 @@ int misc_init_r(void) setenv("nolo_atagaddr", buf); #endif + // set environment variable slide_sw + // if keyboard slide is open/close + omap_set_gpio_direction(71, 1); + unsigned val = omap_get_gpio_datain(71); + omap_free_gpio(71); + setenv("slide_sw", val ? "close" : "open"); + dieid_num_r(); return 0; diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h index 45b942a..5c3b068 100644 --- a/include/configs/nokia_rx51.h +++ b/include/configs/nokia_rx51.h @@ -200,6 +200,7 @@ int rx51_kp_getc(void); "bootm ${nolo_kernaddr}\0" #define CONFIG_PREBOOT \ + "if test $slide_sw != open ; then run noloboot; fi ;" \ "echo Extra commands:;" \ "echo run sercon - Use serial port for control.;" \ "echo run usbcon - Use usbtty for control.;" \