From patchwork Sun Oct 7 15:56:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Herrmann X-Patchwork-Id: 189851 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 E03B92C0281 for ; Mon, 8 Oct 2012 02:57:57 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 27F9B280C1; Sun, 7 Oct 2012 17:57:41 +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 sFJKAKfHNs6e; Sun, 7 Oct 2012 17:57:40 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 38465280D2; Sun, 7 Oct 2012 17:57:06 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 62E8E280C3 for ; Sun, 7 Oct 2012 17:56:57 +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 8uY-BHFGA49G for ; Sun, 7 Oct 2012 17:56:57 +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-wg0-f52.google.com (mail-wg0-f52.google.com [74.125.82.52]) by theia.denx.de (Postfix) with ESMTPS id A6426280AC for ; Sun, 7 Oct 2012 17:56:47 +0200 (CEST) Received: by mail-wg0-f52.google.com with SMTP id fg15so2653912wgb.9 for ; Sun, 07 Oct 2012 08:56:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=vEy2i8Lsg+lqokpjfUiqX7ZD4nZh4pGFugW06crPpYQ=; b=TgeAM40z+9iGQ0RgpG/G2FVIxGetCaWMTqXLr0Bh8we073pHdjI5fqC5S78a4ti/wG Z7+X/xEF5o2OULnY5DRob6lkF3UyStT4t/FRff01leK6Ljuv/TrGQVshj/Y6s+5vnoNV JRRUTQC49iUoYFnIjgG/4GZxMFohb1X0YaFUcv36FT7mGlMcwYfQ2pVd8FiJkexEq72n +2hbBPL+VI8cUdVuHiFQv+aK8OhkvPdxbse0I0lfJxd06rRXUC4IZu8gvddkxRW8dVCF gLWVZJhg+hXyA52by+SJP8PoKALa1snip+uLpl0dPmagmaXsDRY+6+2gZJAED1PuxQ1j Ed3Q== Received: by 10.180.86.34 with SMTP id m2mr15142946wiz.14.1349625406889; Sun, 07 Oct 2012 08:56:46 -0700 (PDT) Received: from Bloomfield.kolej.mff.cuni.cz (pavelherrmann.kolej.mff.cuni.cz. [78.128.197.20]) by mx.google.com with ESMTPS id ay10sm16450042wib.2.2012.10.07.08.56.45 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 07 Oct 2012 08:56:46 -0700 (PDT) From: Pavel Herrmann To: u-boot@lists.denx.de Date: Sun, 7 Oct 2012 17:56:11 +0200 Message-Id: <1349625374-12391-8-git-send-email-morpheus.ibis@gmail.com> X-Mailer: git-send-email 1.7.12 In-Reply-To: <1349625374-12391-1-git-send-email-morpheus.ibis@gmail.com> References: <1349625374-12391-1-git-send-email-morpheus.ibis@gmail.com> Cc: marex@denx.de Subject: [U-Boot] [PATCH 07/10] move CPC45 ide_led to the same file as other IDE hooks 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 Keep all IDE-related hooks and overrides in a single file, to avoid confusion. Signed-off-by: Pavel Herrmann --- board/cpc45/cpc45.c | 15 --------------- board/cpc45/ide.c | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/board/cpc45/cpc45.c b/board/cpc45/cpc45.c index 1178822..2200806 100644 --- a/board/cpc45/cpc45.c +++ b/board/cpc45/cpc45.c @@ -260,21 +260,6 @@ int pcmcia_init(void) #endif -# ifdef CONFIG_IDE_LED -void ide_led (uchar led, uchar status) -{ - u_char val; - /* We have one PCMCIA slot and use LED H4 for the IDE Interface */ - val = readb(BCSR_BASE + 0x04); - if (status) { /* led on */ - val |= B_CTRL_LED0; - } else { - val &= ~B_CTRL_LED0; - } - writeb(val, BCSR_BASE + 0x04); -} -# endif - int board_eth_init(bd_t *bis) { return pci_eth_init(bis); diff --git a/board/cpc45/ide.c b/board/cpc45/ide.c index 7b7237b..aafe127 100644 --- a/board/cpc45/ide.c +++ b/board/cpc45/ide.c @@ -27,6 +27,7 @@ #include #include #include +#include #define EIEIO __asm__ volatile ("eieio") #define SYNC __asm__ volatile ("sync") @@ -128,3 +129,17 @@ void ide_output_data_shorts(int dev, ushort *sect_buf, int shorts) *pbuf_odd = *dbuf++; } } + +void ide_led(uchar led, uchar status) +{ + u_char val; + /* We have one PCMCIA slot and use LED H4 for the IDE Interface */ + val = readb(BCSR_BASE + 0x04); + if (status) { /* led on */ + val |= B_CTRL_LED0; + } else { + val &= ~B_CTRL_LED0; + } + writeb(val, BCSR_BASE + 0x04); +} +