From patchwork Fri Dec 14 06:49:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 206358 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 301062C009B for ; Fri, 14 Dec 2012 18:04:42 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 98EDB4A4D3; Fri, 14 Dec 2012 08:04:17 +0100 (CET) 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 oVhwCljB1FTI; Fri, 14 Dec 2012 08:04:17 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 278124A291; Fri, 14 Dec 2012 07:56:04 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0B3AB4A141 for ; Fri, 14 Dec 2012 07:53:45 +0100 (CET) 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 H3Vk8VJ+kHUW for ; Fri, 14 Dec 2012 07:53:43 +0100 (CET) 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-gh0-f202.google.com (mail-gh0-f202.google.com [209.85.160.202]) by theia.denx.de (Postfix) with ESMTPS id 639184A16F for ; Fri, 14 Dec 2012 07:50:24 +0100 (CET) Received: by mail-gh0-f202.google.com with SMTP id z10so309869ghb.3 for ; Thu, 13 Dec 2012 22:50:22 -0800 (PST) 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=K8CMBU5Ux3Yu5NBwulHGWNPu+uNubMzuPuP18u/B8+M=; b=joD20aLKlQgFD+pce6r6/vupROi5rWk+wIfeqTNPtyvRwiTq8EeG+PP98nJbBj/gpk YBNr4s0+ZY6x9qhlKtBIBWskbQ73SW6v+qeyQdFAIaQUXK9PDOAiVRuUwYMPOjYgXmnj 1KCW/Of/SLeIps3JZ+wSQILbOpj5QFBE2ta2FxqPf82r+FoByB3THv38/CYKG2SGDLzw VfAwmeI5HnRr0oRQbJCwYldFb6LpJ3BCYRdv1k/18OtGvYaRLCRchJijmXmMfQ7AHVQW 2vUi6eNex1zAYnD8y0H1VZXfWxxtbLSxFdEkcvB06anaQs6rgG2J9keFpvWQTKaBgroj 7BHQ== Received: by 10.236.92.144 with SMTP id j16mr2221114yhf.44.1355467822251; Thu, 13 Dec 2012 22:50:22 -0800 (PST) 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 s78si347956yhh.3.2012.12.13.22.50.22 (version=TLSv1/SSLv3 cipher=AES128-SHA); Thu, 13 Dec 2012 22:50:22 -0800 (PST) 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 102B782004A; Thu, 13 Dec 2012 22:50:22 -0800 (PST) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id E33A81608F3; Thu, 13 Dec 2012 22:50:21 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Date: Thu, 13 Dec 2012 22:49:04 -0800 Message-Id: <1355467767-29575-36-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1355467767-29575-1-git-send-email-sjg@chromium.org> References: <1355467767-29575-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQmG/xmS+QNa1WcDybdBXj8IrBQoj1Rz+j7MiZO3eR4ZIFXarG8U42bpMcoWw9ha6BfvIN9UuAZLN7KqH6/UHm4oDBZpx2pC7QlfCOMkq0CWjEwKmfIfSq1PJGpSctvePNuFaYSwAFEkd6k3f/6HLvsFxxP3VUZCwvwxLRuRyo9HZObGS8pBXI2SI82C0i1vxkUkVsO5 Cc: Kim Phillips , Kumar Gala , Andy Fleming , Tom Rini , Stefan Roese Subject: [U-Boot] [PATCH v2 35/58] ppc: Move kbd_status to arch_global_data 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 Move this field into arch_global_data and tidy up. Signed-off-by: Simon Glass --- Changes in v2: None arch/powerpc/include/asm/global_data.h | 6 +++--- board/lwmon/lwmon.c | 10 +++++----- board/lwmon5/kbd.c | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/powerpc/include/asm/global_data.h b/arch/powerpc/include/asm/global_data.h index b138e64..ea67537 100644 --- a/arch/powerpc/include/asm/global_data.h +++ b/arch/powerpc/include/asm/global_data.h @@ -128,6 +128,9 @@ struct arch_global_data { #if defined(CONFIG_WD_MAX_RATE) unsigned long long wdt_last; /* trace watch-dog triggering rate */ #endif +#if defined(CONFIG_LWMON) || defined(CONFIG_LWMON5) + unsigned long kbd_status; +#endif }; /* @@ -173,9 +176,6 @@ typedef struct global_data { unsigned long do_mdm_init; unsigned long be_quiet; #endif -#if defined(CONFIG_LWMON) || defined(CONFIG_LWMON5) - unsigned long kbd_status; -#endif void **jt; /* jump table */ char env_buf[32]; /* buffer for getenv() before reloc. */ struct arch_global_data arch; /* architecture-specific data */ diff --git a/board/lwmon/lwmon.c b/board/lwmon/lwmon.c index b5e524b..34c6675 100644 --- a/board/lwmon/lwmon.c +++ b/board/lwmon/lwmon.c @@ -482,7 +482,7 @@ static void kbd_init (void) i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); - gd->kbd_status = 0; + gd->arch.kbd_status = 0; /* Forced by PIC. Delays <= 175us loose */ udelay(1000); @@ -496,7 +496,7 @@ static void kbd_init (void) /* clear "irrelevant" bits. Recommended by Martin Rajek, LWN */ errcd &= ~(KEYBD_STATUS_H_RESET|KEYBD_STATUS_BROWNOUT); if (errcd) { - gd->kbd_status |= errcd << 8; + gd->arch.kbd_status |= errcd << 8; } /* Reset error code and verify */ val = KEYBD_CMD_RESET_ERRORS; @@ -509,7 +509,7 @@ static void kbd_init (void) val &= KEYBD_STATUS_MASK; /* clear unused bits */ if (val) { /* permanent error, report it */ - gd->kbd_status |= val; + gd->arch.kbd_status |= val; return; } @@ -568,8 +568,8 @@ int misc_init_r (void) { uchar kbd_data[KEYBD_DATALEN]; char keybd_env[2 * KEYBD_DATALEN + 1]; - uchar kbd_init_status = gd->kbd_status >> 8; - uchar kbd_status = gd->kbd_status; + uchar kbd_init_status = gd->arch.kbd_status >> 8; + uchar kbd_status = gd->arch.kbd_status; uchar val; char *str; int i; diff --git a/board/lwmon5/kbd.c b/board/lwmon5/kbd.c index 5231c7a..b66f681 100644 --- a/board/lwmon5/kbd.c +++ b/board/lwmon5/kbd.c @@ -113,7 +113,7 @@ static void kbd_init (void) i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); - gd->kbd_status = 0; + gd->arch.kbd_status = 0; /* Forced by PIC. Delays <= 175us loose */ udelay(1000); @@ -127,7 +127,7 @@ static void kbd_init (void) /* clear "irrelevant" bits. Recommended by Martin Rajek, LWN */ errcd &= ~(KEYBD_STATUS_H_RESET|KEYBD_STATUS_BROWNOUT); if (errcd) { - gd->kbd_status |= errcd << 8; + gd->arch.kbd_status |= errcd << 8; } /* Reset error code and verify */ val = KEYBD_CMD_RESET_ERRORS; @@ -140,7 +140,7 @@ static void kbd_init (void) val &= KEYBD_STATUS_MASK; /* clear unused bits */ if (val) { /* permanent error, report it */ - gd->kbd_status |= val; + gd->arch.kbd_status |= val; return; } @@ -216,8 +216,8 @@ int misc_init_r_kbd (void) { uchar kbd_data[KEYBD_DATALEN]; char keybd_env[2 * KEYBD_DATALEN + 1]; - uchar kbd_init_status = gd->kbd_status >> 8; - uchar kbd_status = gd->kbd_status; + uchar kbd_init_status = gd->arch.kbd_status >> 8; + uchar kbd_status = gd->arch.kbd_status; uchar val; ushort data, inv_data; char *str;