From patchwork Fri Sep 2 14:59:04 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Longchamp X-Patchwork-Id: 113151 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 9B9D6B6F8A for ; Sat, 3 Sep 2011 01:00:11 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BC53928191; Fri, 2 Sep 2011 16:59: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 TBUPz1zlEKTz; Fri, 2 Sep 2011 16:59:50 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1CA90281B8; Fri, 2 Sep 2011 16:59:24 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5C2CF2817F for ; Fri, 2 Sep 2011 16:59:19 +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 IalGNiGh0hEv for ; Fri, 2 Sep 2011 16:59:15 +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.ch.keymile.com (mail.ch.keymile.com [193.17.201.103]) by theia.denx.de (Postfix) with SMTP id 1F0ED2817C for ; Fri, 2 Sep 2011 16:59:13 +0200 (CEST) Received: from SRVCHBER1212.ch.keymile.net ([172.31.32.9]) by eSafe SMTP Relay 1314887018; Fri, 02 Sep 2011 16:48:21 +0200 Received: from chber1-10533x.ch.keymile.net ([172.31.40.3]) by SRVCHBER1212.ch.keymile.net with Microsoft SMTPSVC(6.0.3790.4675); Fri, 2 Sep 2011 16:59:12 +0200 From: Valentin Longchamp To: u-boot@lists.denx.de Date: Fri, 2 Sep 2011 16:59:04 +0200 Message-Id: <1314975550-15766-3-git-send-email-valentin.longchamp@keymile.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1314975550-15766-1-git-send-email-valentin.longchamp@keymile.com> References: <1314975550-15766-1-git-send-email-valentin.longchamp@keymile.com> X-OriginalArrivalTime: 02 Sep 2011 14:59:12.0532 (UTC) FILETIME=[E036CD40:01CC6980] X-ESAFE-STATUS: Mail allowed X-ESAFE-DETAILS: Cc: Valentin Longchamp , Holger Brunck Subject: [U-Boot] [PATCH v3 2/8] POST: allow redefinition of post_word_load/store 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 The predefinde post_word_load/store functions do not fit all boards, so we introduce a way to define post_word_load/store as externs in post.h that then can be defined in board specific files. This is done with the CONFIG_POST_EXTERNAL_WORD_FUNCS #define Signed-off-by: Valentin Longchamp Signed-off-by: Holger Brunck --- include/post.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/include/post.h b/include/post.h index bb3138d..d859f9f 100644 --- a/include/post.h +++ b/include/post.h @@ -33,6 +33,7 @@ #if defined(CONFIG_POST) || defined(CONFIG_LOGBUFFER) +#ifndef CONFIG_POST_EXTERNAL_WORD_FUNCS #ifdef CONFIG_SYS_POST_WORD_ADDR #define _POST_WORD_ADDR CONFIG_SYS_POST_WORD_ADDR #else @@ -85,6 +86,13 @@ static inline void post_word_store (ulong value) { out_le32((volatile void *)(_POST_WORD_ADDR), value); } + +#else + +extern ulong post_word_load(void); +extern void post_word_store(ulong value); + +#endif /* CONFIG_POST_EXTERNAL_WORD_FUNCS */ #endif /* defined (CONFIG_POST) || defined(CONFIG_LOGBUFFER) */ #endif /* __ASSEMBLY__ */