From patchwork Mon Mar 11 16:50:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 226615 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 100D02C02C1 for ; Tue, 12 Mar 2013 03:53:26 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A084B4A2A9; Mon, 11 Mar 2013 17:53:21 +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 J0xiPGWAYVD8; Mon, 11 Mar 2013 17:53:21 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8187A4A2C3; Mon, 11 Mar 2013 17:53:15 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D35204A27E for ; Mon, 11 Mar 2013 17:53:12 +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 cJj-wjzn7Ygh for ; Mon, 11 Mar 2013 17:53:11 +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 3A0854A2A8 for ; Mon, 11 Mar 2013 17:53:04 +0100 (CET) Received: by mail-gh0-f202.google.com with SMTP id z10so398655ghb.5 for ; Mon, 11 Mar 2013 09:53:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=uEqNaqxqxHbHKeJveCvv0y9kNrJsKYnwCAnY/rL8Bx8=; b=NV3CbUw+br3b5myWNTJGGm43Z8bOHa9ZdUfuEiyc225N6AUJRc1uTTiWr2T1bkgFnO n0M2Pj3glZmF6/MbqD8CAV8YTAX8rXKy4/TJoFPnpKAVEsXX06PmcLbYUkyruHZRzA2O 6vIa1dwb++HJPWkpU3dH+e8pmt9ooEmg9cnjxjDppMrlO4flMkvmVcPY4xuwPuik9Tj1 HzTncRQayz9aoGVL0pv5EpgBWpBNqffZkxBFNIWrKaYZ8rHAUHcuf1rsBxzblINYhGZU PZuM0G9aKOozaClykFo+J7xjRTYLNBRDHTCNoaP5uuNoYP9aSbVLOXdDtD4HK0iFPpfZ jI1Q== X-Received: by 10.236.171.103 with SMTP id q67mr8373333yhl.35.1363020783408; Mon, 11 Mar 2013 09:53:03 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id k21si1098510yhh.1.2013.03.11.09.53.03 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Mon, 11 Mar 2013 09:53:03 -0700 (PDT) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 4135031C271; Mon, 11 Mar 2013 09:53:03 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 0184F16072B; Mon, 11 Mar 2013 09:53:02 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 11 Mar 2013 09:50:05 -0700 Message-Id: <1363020615-30923-22-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.8.1.3 In-Reply-To: <1363020615-30923-10-git-send-email-sjg@chromium.org> References: <1363020615-30923-10-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQkdUGkOD1ho6JsvXr0t4rJU4k4htC+q+V/cpkXu75Za+IfATOk6JHo1o4gP75goRmdlbbx0TzZcc+5A/Hfj3miHUHp7yOxkaGTe2497+IYepBaPNXSZ8WHPsRq5faABKns2VcKR93P5k21adewYzZmQMTebygkK3KrLJtqEsZHlNN7UcIW1HDzEAdWrRmi8LUCHafP/ Cc: Graeme Russ , Tom Rini , Vadim Bendebury Subject: [U-Boot] [PATCH v9 21/31] x86: Enable generic board support 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 This enables generic board support so that x86 boards can define CONFIG_SYS_GENERIC_BOARD. Signed-off-by: Simon Glass --- Changes in v9: - Use !CONFIG instead of nCONFIG Changes in v8: None Changes in v7: None Changes in v6: None Changes in v5: - Avoid setting up gd on x86 as it is already done Changes in v4: None Changes in v3: None Changes in v2: None arch/x86/include/asm/u-boot.h | 11 +++++++++++ arch/x86/lib/Makefile | 3 +++ common/board_r.c | 2 ++ 3 files changed, 16 insertions(+) diff --git a/arch/x86/include/asm/u-boot.h b/arch/x86/include/asm/u-boot.h index 2f45c7b..df759fa 100644 --- a/arch/x86/include/asm/u-boot.h +++ b/arch/x86/include/asm/u-boot.h @@ -39,6 +39,13 @@ #include #include +#ifdef CONFIG_SYS_GENERIC_BOARD +/* Use the generic board which requires a unified bd_info */ +#include +#else + +#ifndef __ASSEMBLY__ + typedef struct bd_info { unsigned long bi_memstart; /* start of DRAM memory */ phys_size_t bi_memsize; /* size of DRAM memory in bytes */ @@ -60,6 +67,10 @@ typedef struct bd_info { }bi_dram[CONFIG_NR_DRAM_BANKS]; } bd_t; +#endif /* __ASSEMBLY__ */ + +#endif /* !CONFIG_SYS_GENERIC_BOARD */ + /* For image.h:image_check_target_arch() */ #define IH_ARCH_DEFAULT IH_ARCH_I386 diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile index 9b24dc5..ee89354 100644 --- a/arch/x86/lib/Makefile +++ b/arch/x86/lib/Makefile @@ -25,7 +25,10 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(ARCH).o +ifeq ($(CONFIG_SYS_GENERIC_BOARD),) COBJS-y += board.o +endif + COBJS-y += bootm.o COBJS-y += cmd_boot.o COBJS-y += gcc.o diff --git a/common/board_r.c b/common/board_r.c index 29eccdf..230887d 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -509,11 +509,13 @@ static int show_model_r(void) #endif /* enable exceptions */ +#ifdef CONFIG_ARM static int initr_enable_interrupts(void) { enable_interrupts(); return 0; } +#endif #ifdef CONFIG_CMD_NET static int initr_ethaddr(void)