From patchwork Wed Nov 5 11:29:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Grinberg X-Patchwork-Id: 406949 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 370D7140098 for ; Wed, 5 Nov 2014 22:30:16 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 367334BD92; Wed, 5 Nov 2014 12:30:13 +0100 (CET) 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 V9AjFVkhuLs2; Wed, 5 Nov 2014 12:30:13 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B1FA04BD8E; Wed, 5 Nov 2014 12:30:12 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 732CD4BD8E for ; Wed, 5 Nov 2014 12:30:07 +0100 (CET) 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 8f0ZvlLtTe3t for ; Wed, 5 Nov 2014 12:30:07 +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 compulab.co.il (softlayer.compulab.co.il [50.23.254.55]) by theia.denx.de (Postfix) with ESMTPS id 14A214BD89 for ; Wed, 5 Nov 2014 12:30:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=compulab.co.il; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=kLaeezpFypXkGHx9tYibu+GmLy6+mRuEurXCZZm7a7U=; b=z4eYUc499U9cGNhF6NMFYC8ENeHe+nj1Odyjx2TLyJFf6PckSiZz4kkZv6LX8LTpxmnw8MYW7FFXSpf9B+jT+pNzR0mawmTFRJULM+RNN+x1u6APZXwp+Xh+YfI+HiZXWBtXyIMgybPcjzhvxv8H10barE4pMvXeup/k8jVRa8I=; Received: from [62.90.235.247] (port=28349 helo=zimbra-mta.compulab.co.il) by softlayer.compulab.co.il with esmtp (Exim 4.82) (envelope-from ) id 1Xlymn-00048h-Ff; Wed, 05 Nov 2014 13:30:01 +0200 Received: from localhost (localhost [127.0.0.1]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id A625C485DB2; Wed, 5 Nov 2014 13:30:00 +0200 (IST) Received: from zimbra-mta.compulab.co.il ([127.0.0.1]) by localhost (zimbra-mta.compulab.co.il [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id PFDfwjyykzDT; Wed, 5 Nov 2014 13:29:56 +0200 (IST) Received: from localhost (localhost [127.0.0.1]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 6FE31485DB0; Wed, 5 Nov 2014 13:29:56 +0200 (IST) X-Virus-Scanned: amavisd-new at zimbra-mta.compulab.co.il Received: from zimbra-mta.compulab.co.il ([127.0.0.1]) by localhost (zimbra-mta.compulab.co.il [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id mHzwMvy6KwdM; Wed, 5 Nov 2014 13:29:56 +0200 (IST) Received: from compulab.co.il (grinberg-linux.compulab.local [192.168.11.13]) by zimbra-mta.compulab.co.il (Postfix) with SMTP id 4FC18485DA7; Wed, 5 Nov 2014 13:29:56 +0200 (IST) Received: (nullmailer pid 12479 invoked by uid 1000); Wed, 05 Nov 2014 11:29:55 -0000 From: Igor Grinberg To: u-boot@lists.denx.de, Tom Rini Date: Wed, 5 Nov 2014 13:29:54 +0200 Message-Id: <1415186994-12439-1-git-send-email-grinberg@compulab.co.il> X-Mailer: git-send-email 2.0.4 In-Reply-To: <20141104164506.GN15133@bill-the-cat> References: <20141104164506.GN15133@bill-the-cat> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - softlayer.compulab.co.il X-AntiAbuse: Original Domain - lists.denx.de X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - compulab.co.il X-Get-Message-Sender-Via: softlayer.compulab.co.il: acl_c_relayhosts_text_entry: grinberg@compulab.co.il|compulab.co.il Subject: [U-Boot] [PATCH v2] am335x: make get_board_rev() function weak X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 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 Current get_board_rev() function returns a hard coded value which is obviously incorrect for the majority of boards. Allow boards to provide a correct implementation by making this function weak. In addition open code the trivial and useless BOARD_REV_ID define and adjust the comment. Signed-off-by: Igor Grinberg Cc: Tom Rini --- v2: Remove the BOARD_REV_ID define, adjust the comment and commit message. arch/arm/cpu/armv7/am33xx/sys_info.c | 7 ++++--- arch/arm/include/asm/arch-am33xx/sys_proto.h | 2 -- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/arm/cpu/armv7/am33xx/sys_info.c b/arch/arm/cpu/armv7/am33xx/sys_info.c index 2ce682f..781d83f 100644 --- a/arch/arm/cpu/armv7/am33xx/sys_info.c +++ b/arch/arm/cpu/armv7/am33xx/sys_info.c @@ -18,6 +18,7 @@ #include #include #include +#include struct ctrl_stat *cstat = (struct ctrl_stat *)CTRL_BASE; @@ -51,11 +52,11 @@ u32 get_cpu_type(void) /** * get_board_rev() - setup to pass kernel board revision information - * returns:(bit[0-3] sub version, higher bit[7-4] is higher version) + * returns: 0 for the ATAG REVISION tag value. */ -u32 get_board_rev(void) +u32 __weak get_board_rev(void) { - return BOARD_REV_ID; + return 0; } /** diff --git a/arch/arm/include/asm/arch-am33xx/sys_proto.h b/arch/arm/include/asm/arch-am33xx/sys_proto.h index 33a82fc..7eacf27 100644 --- a/arch/arm/include/asm/arch-am33xx/sys_proto.h +++ b/arch/arm/include/asm/arch-am33xx/sys_proto.h @@ -14,8 +14,6 @@ #include #include -#define BOARD_REV_ID 0x0 - u32 get_cpu_rev(void); u32 get_sysboot_value(void);