From patchwork Fri Feb 8 15:12:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 219196 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 664922C0085 for ; Sat, 9 Feb 2013 02:17:58 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 34AA84A195; Fri, 8 Feb 2013 16:17:24 +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 rf04hzxleGz3; Fri, 8 Feb 2013 16:17:23 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BEA6D4A197; Fri, 8 Feb 2013 16:14:39 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 694974A14D for ; Fri, 8 Feb 2013 16:14:25 +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 VUQ+GTEFpqen for ; Fri, 8 Feb 2013 16:14:23 +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-bk0-f74.google.com (mail-bk0-f74.google.com [209.85.214.74]) by theia.denx.de (Postfix) with ESMTPS id 998094A112 for ; Fri, 8 Feb 2013 16:13:52 +0100 (CET) Received: by mail-bk0-f74.google.com with SMTP id jk13so266260bkc.3 for ; Fri, 08 Feb 2013 07:13:52 -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=lQyij3w2duONdFMqRDVRoxoDCTF5uSpogq3uzWYTsoI=; b=oIu3f8uEbnisq9KOSATtsYG2t/XeNghvZWTR9Wozrd+Z38VRg0tyEwSspwcg6eUHD9 alyT+mnjlSWwf5KkEUSdhqJAsAvdKCN/mTM2qf8iJ8eGmeQoSEGIKQLEly6qb6C1uT0d na4zAz54SoDV6tQcci7iHCPaLJdJtbk92pMuszRZK2JVtA3TSYo7tKzYOOujiclwRC5D idYSAW2lbzvCG86GIk+/BnkM3hJ4NkPIf7vMHt59w8upQ3D4NYvGlBkEkqzoaL0g/+iY akp7nc2SyRFK3vXV4XNGMJFnqBfFAiaFlrw9aHoakRFHhWWwQIxWIN/RTAoggkq946I4 tVPg== X-Received: by 10.14.211.1 with SMTP id v1mr5383124eeo.0.1360336432603; Fri, 08 Feb 2013 07:13:52 -0800 (PST) Received: from corp2gmr1-1.eem.corp.google.com (corp2gmr1-1.eem.corp.google.com [172.25.138.99]) by gmr-mx.google.com with ESMTPS id 6si4487663eej.0.2013.02.08.07.13.52 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Fri, 08 Feb 2013 07:13:52 -0800 (PST) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by corp2gmr1-1.eem.corp.google.com (Postfix) with ESMTP id 5D34D1CA1B3; Fri, 8 Feb 2013 07:13:52 -0800 (PST) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 192421607FD; Fri, 8 Feb 2013 07:13:52 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Date: Fri, 8 Feb 2013 07:12:18 -0800 Message-Id: <1360336339-10703-23-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.8.1 In-Reply-To: <1360336339-10703-1-git-send-email-sjg@chromium.org> References: <1360336339-10703-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQmtGUTjBEz5+ku/dKiASWCjYC2iusBf3rPBI7G5uLjJFL3otx7aHXkKBd1dbxYOBRoWKVXnkOtBDSveMyZ/EroxXRtRe9XD7Kl++WChgSVebd26YHYoMIVpwh230Zc22GPjVb6k1rTAxC/4F/FkQjwkS1xb1abNlUnmjQwFxhRq/fe6XDyV0LxQ+7gORHMwY4cUMYC6 Cc: Graeme Russ , Tom Rini , Vadim Bendebury Subject: [U-Boot] [PATCH v5 22/23] 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 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 0a52cc8..3d069c6 100644 --- a/arch/x86/lib/Makefile +++ b/arch/x86/lib/Makefile @@ -35,7 +35,10 @@ COBJS-$(CONFIG_SYS_PC_BIOS) += bios_setup.o COBJS-$(CONFIG_VIDEO_VGA) += video_bios.o endif +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 1a26a04..b2decae 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)