From patchwork Wed Mar 6 00:39:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 225230 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 82D352C0369 for ; Wed, 6 Mar 2013 11:45:24 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 522564A263; Wed, 6 Mar 2013 01:44:15 +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 uv8NiHRPiYig; Wed, 6 Mar 2013 01:44:15 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1B92B4A264; Wed, 6 Mar 2013 01:41:59 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BD8B94A211 for ; Wed, 6 Mar 2013 01:41:27 +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 d7Fo1NEVSH67 for ; Wed, 6 Mar 2013 01:41:25 +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-vb0-f74.google.com (mail-vb0-f74.google.com [209.85.212.74]) by theia.denx.de (Postfix) with ESMTPS id 0B3E74A1E6 for ; Wed, 6 Mar 2013 01:41:03 +0100 (CET) Received: by mail-vb0-f74.google.com with SMTP id r6so272535vbi.1 for ; Tue, 05 Mar 2013 16:41:02 -0800 (PST) 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=5k9GW2sgznv5HBUs/KdxYxyXMMagmvg9ZbIiMLT961Q=; b=dQM05oHWjfuUv4gb9pSz4SS8IZPH47+cfVOm9papgrUdfTLiA5d1Vzg5uhyEUKWV1S yGNf7uggDtoEblMG3WfpwsbCjmBg5ZHNNjsf4vObtCONBxLz/Cq14JrboIuBVP93aMdz hkaCy6qNzndwU1mnCpSxU2IHOrEYUSTDJG7QOVijYYg3ELOANmuAj56nFPZIDsxAwDcp p4LOXXaWsXd2AE8iHiYoi4LDtZE8vD1FmJ+4LXm0QhIAqkkE378tg4f35N+sE1O9Ef27 /gcDyyyR69PBqAz7Dmho/pWG1+AbnK1xko1TO8cu++FBvC+us5gO91rnxOkYrFRg/jE+ eoRw== X-Received: by 10.236.76.73 with SMTP id a49mr15968557yhe.30.1362530462001; Tue, 05 Mar 2013 16:41:02 -0800 (PST) Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id h26si445217yhf.3.2013.03.05.16.41.01 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Tue, 05 Mar 2013 16:41:01 -0800 (PST) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id D37B05A4253; Tue, 5 Mar 2013 16:41:01 -0800 (PST) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id B2B8D1607C8; Tue, 5 Mar 2013 16:41:01 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Date: Tue, 5 Mar 2013 16:39:55 -0800 Message-Id: <1362530405-10824-22-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.8.1.3 In-Reply-To: <1362530405-10824-1-git-send-email-sjg@chromium.org> References: <1362530405-10824-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQkXvooiGrPH1wowgJZlNZiQ0tYMp+bPHnrFLRPx1Z+eHoMnNqKDgn+QaE569QWDm8kIPy3D4YbRv4bzLl8mrewHsguSYi9aJWu9jhtFDPAYFRZ7dd+4vRaGZ0JlW+S5w3BT6lWNksHReAWvtPhnJOmRoL2hglMnxqHDWm+GqUo5BDpciDmh58YXDqHbjY8135et2JaF Cc: Graeme Russ , Tom Rini , Vadim Bendebury Subject: [U-Boot] [PATCH v6 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 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/config.mk | 3 --- arch/x86/include/asm/u-boot.h | 11 +++++++++++ arch/x86/lib/Makefile | 3 +++ common/board_r.c | 2 ++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/arch/x86/config.mk b/arch/x86/config.mk index 7be3036..23cacff 100644 --- a/arch/x86/config.mk +++ b/arch/x86/config.mk @@ -48,6 +48,3 @@ NORMAL_LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) PREFIXED_LIBGCC = $(OBJTREE)/arch/$(ARCH)/lib/$(shell basename $(NORMAL_LIBGCC)) export USE_PRIVATE_LIBGCC=$(shell dirname $(PREFIXED_LIBGCC)) - -# Move to unified board system later -CONFIG_SYS_LEGACY_BOARD := y diff --git a/arch/x86/include/asm/u-boot.h b/arch/x86/include/asm/u-boot.h index 2f45c7b..19c038a 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 /* nCONFIG_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)