From patchwork Mon Jul 4 09:00:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Grinberg X-Patchwork-Id: 103049 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 CD94EB6F67 for ; Mon, 4 Jul 2011 19:01:13 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 225A7280A4; Mon, 4 Jul 2011 11:00:55 +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 Xzt1+wGV4gpJ; Mon, 4 Jul 2011 11:00:54 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CF139280A7; Mon, 4 Jul 2011 11:00:43 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 040B52807C for ; Mon, 4 Jul 2011 11:00:39 +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 r1rbXbBt6F7C for ; Mon, 4 Jul 2011 11:00:37 +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 softlayer.compulab.co.il (50.23.254.54-static.reverse.softlayer.com [50.23.254.54]) by theia.denx.de (Postfix) with ESMTPS id B1D6A28081 for ; Mon, 4 Jul 2011 11:00:35 +0200 (CEST) Received: from [62.90.235.247] (port=51440 helo=zimbra-mta.compulab.co.il) by softlayer.compulab.co.il with esmtp (Exim 4.69) (envelope-from ) id 1Qdf0z-0000Xn-T0; Mon, 04 Jul 2011 12:00:26 +0300 Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 801327E998F; Mon, 4 Jul 2011 12:00:24 +0300 (IDT) X-Virus-Scanned: amavisd-new at 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 10024) with ESMTP id Za1FEqW8SPLw; Mon, 4 Jul 2011 12:00:23 +0300 (IDT) Received: from grinberg-linux (grinberg-pc.compulab.local [10.1.1.13]) by zimbra-mta.compulab.co.il (Postfix) with SMTP id E10C57E9989; Mon, 4 Jul 2011 12:00:22 +0300 (IDT) Received: by grinberg-linux (sSMTP sendmail emulation); Mon, 04 Jul 2011 12:00:24 +0300 From: Igor Grinberg To: Albert Aribaud Date: Mon, 4 Jul 2011 12:00:19 +0300 Message-Id: <1309770021-9908-1-git-send-email-grinberg@compulab.co.il> X-Mailer: git-send-email 1.7.3.4 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 Cc: u-boot@lists.denx.de, Tom Warren Subject: [U-Boot] [PATCH 1/3] arm: add CONFIG_MACH_TYPE option and documentation 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 CONFIG_MACH_TYPE can be used to set the machine type number in the common arm code instead of setting it in the board code. Signed-off-by: Igor Grinberg --- README | 12 ++++++++++++ arch/arm/lib/board.c | 5 +++++ 2 files changed, 17 insertions(+), 0 deletions(-) diff --git a/README b/README index 446966d..a9ccb0a 100644 --- a/README +++ b/README @@ -442,6 +442,18 @@ The following options need to be configured: crash. This is needed for buggy hardware (uc101) where no pull down resistor is connected to the signal IDE5V_DD7. + CONFIG_MACH_TYPE [relevant for ARM only] + + This option can be used to specify the machine type number + as it appears in the ARM machine registry + (see http://www.arm.linux.org.uk/developer/machines/). + If this option is not defined, then your board code + will have to set this up like: + gd->bd->bi_arch_number = ; + Note: This option is not suitable if you have multiple + boards supported in a single configuration file and the + machine type is runtime discoverable. + - vxWorks boot parameters: bootvx constructs a valid bootline using the following diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index 169dfeb..ee77d05 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -451,6 +451,11 @@ void board_init_r (gd_t *id, ulong dest_addr) monitor_flash_len = _end_ofs; debug ("monitor flash len: %08lX\n", monitor_flash_len); + +#ifdef CONFIG_MACH_TYPE + bd->bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */ +#endif + board_init(); /* Setup chipselects */ #ifdef CONFIG_SERIAL_MULTI