From patchwork Fri May 4 08:55:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Holger Brunck X-Patchwork-Id: 156829 X-Patchwork-Delegate: kim.phillips@freescale.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 035D3B6FD4 for ; Fri, 4 May 2012 18:57:22 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 88A80280B6; Fri, 4 May 2012 10:56:50 +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 R-lXCjH2Ty3a; Fri, 4 May 2012 10:56:50 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7A6F228085; Fri, 4 May 2012 10:56:23 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E34762807F for ; Fri, 4 May 2012 10:56: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 yrNgtyzCLR8n for ; Fri, 4 May 2012 10:56:14 +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-de.keymile.com (mail-de.keymile.com [195.8.104.1]) by theia.denx.de (Postfix) with SMTP id A13012807E for ; Fri, 4 May 2012 10:56:12 +0200 (CEST) Received: from mailrelay.de.keymile.net ([10.9.1.54]) by eSafe SMTP Relay 1336117350; Fri, 04 May 2012 10:56:11 +0200 Received: from pc005093.de.keymile.net.de.keymile.net (pc005093.de.keymile.net.de.keymile.net [172.30.2.67]) by mailrelay.de.keymile.net (8.12.2/8.12.2) with ESMTP id q448tKjT020744; Fri, 4 May 2012 10:55:21 +0200 (MEST) From: Holger Brunck To: u-boot@lists.denx.de Date: Fri, 4 May 2012 10:55:57 +0200 Message-Id: <1336121758-30759-6-git-send-email-holger.brunck@keymile.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1336121758-30759-1-git-send-email-holger.brunck@keymile.com> References: <1336121758-30759-1-git-send-email-holger.brunck@keymile.com> X-ESAFE-STATUS: [srvhellgate.de.keymile.net] Mail clean Cc: valentin.longchamp@keymile.com, kim.phillips@freescale.com, Holger Brunck , Thomas Herzmann Subject: [U-Boot] [PATCH 5/6] powerpc/83xx/km: readout dip_switch on kmcoge5ne 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: Thomas Herzmann On kmcoge5ne we have a dip switch present. If this switch was switched on the actual_bank is set to 0 and this SW will be booted. Signed-off-by: Thomas Herzmann Signed-off-by: Holger Brunck --- board/keymile/km83xx/km83xx.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c index f05cdfd..e01a633 100644 --- a/board/keymile/km83xx/km83xx.c +++ b/board/keymile/km83xx/km83xx.c @@ -195,6 +195,17 @@ int misc_init_r(void) int last_stage_init(void) { +#if defined(CONFIG_KMCOGE5NE) + struct bfticu_iomap *base = + (struct bfticu_iomap *)CONFIG_SYS_BFTIC3_BASE; + u8 dip_switch = in_8((u8 *)&(base->mswitch)) & BFTICU_DIPSWITCH_MASK; + + if (dip_switch != 0) { + /* start bootloader */ + puts("DIP: Enabled\n"); + setenv("actual_bank", "0"); + } +#endif set_km_env(); return 0; }