From patchwork Mon Mar 11 17:40:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 226623 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 D09352C02B4 for ; Tue, 12 Mar 2013 04:41:09 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 18EC34A257; Mon, 11 Mar 2013 18:41:08 +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 RyebeB7H3VKx; Mon, 11 Mar 2013 18:41:07 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8346A4A22E; Mon, 11 Mar 2013 18:41:05 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F1D674A22E for ; Mon, 11 Mar 2013 18:41:03 +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 6605mFoTOzQH for ; Mon, 11 Mar 2013 18:41:02 +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-f73.google.com (mail-vb0-f73.google.com [209.85.212.73]) by theia.denx.de (Postfix) with ESMTPS id 9BFBA4A22C for ; Mon, 11 Mar 2013 18:41:00 +0100 (CET) Received: by mail-vb0-f73.google.com with SMTP id fj18so332448vbb.0 for ; Mon, 11 Mar 2013 10:40:59 -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 :x-gm-message-state; bh=7IPB8k7XTrFW7idkPqRvU/QKuawbraqqziMp4k1pCzQ=; b=AJFIhXQ1UE3gKQPSbgh2uATZZl9AW2GZ9GLL2b+6VaS+SJ0TLewF1AkZcfxC1pEBd0 cjX+iQwXCfdneWKa2mCZZEUKnC8ApII6HuD90llKOdxoo+q/6mfPGLMgaZ69odefK5p8 6oJPITYx07t7FHqjyTJU42dYAxMECieHmWfLHpfe9HnbHIMuXhzP/1u+97OpVGhiAB6M euRN6SYuIBMnTXzHVTfaj22vD65i4IF9oBb4SGUIynwPwZ0LIEVdV9tfHKmj99CEs+pI r5Prv4JslC1rOQ3bXl+g/Ai9fSMfJQNTkpSzcQzUwa3P3LYmw42MGdqR1+1aJk0GWlv2 Jr6Q== X-Received: by 10.236.110.84 with SMTP id t60mr7956770yhg.50.1363023658441; Mon, 11 Mar 2013 10:40:58 -0700 (PDT) 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 f47si1108971yhg.4.2013.03.11.10.40.58 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Mon, 11 Mar 2013 10:40:58 -0700 (PDT) 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 448C65A4121; Mon, 11 Mar 2013 10:40:58 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id D19E016068E; Mon, 11 Mar 2013 10:40:57 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 11 Mar 2013 10:40:13 -0700 Message-Id: <1363023623-27143-22-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.8.1.3 X-Gm-Message-State: ALoCoQkbhGp3z++vJmPZybbsspMEVB9X+UJzQrI2+ns5Jmb3E4Tyr1PXD5QlxbRGTM4pYL4nUkQ2PmZt4UEhbgJr2xo1kWiAjOsnfLZaLgHzyWmp31GmlA5KGYsymwk74ACGSoNFBzWZx3bJByqFA22mOxOfFMcToURUflVFRwo47cZDZj57bn+9wXfgpEQ/opIhel5Bwq3q Cc: Graeme Russ , Tom Rini , Vadim Bendebury Subject: [U-Boot] [PATCH v10 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 v10: - Define __HAVE_ARCH_GENERIC_BOARD in the correct x86 patch 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/config.mk | 3 +++ arch/x86/include/asm/u-boot.h | 11 +++++++++++ arch/x86/lib/Makefile | 3 +++ common/board_r.c | 2 ++ 4 files changed, 19 insertions(+) diff --git a/arch/x86/config.mk b/arch/x86/config.mk index 23cacff..168dc24 100644 --- a/arch/x86/config.mk +++ b/arch/x86/config.mk @@ -36,6 +36,9 @@ PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_X86) PLATFORM_CPPFLAGS += -fno-dwarf2-cfi-asm PLATFORM_CPPFLAGS += -DREALMODE_BASE=0x7c0 +# Support generic board on x86 +__HAVE_ARCH_GENERIC_BOARD := y + PLATFORM_RELFLAGS += -ffunction-sections -fvisibility=hidden PLATFORM_LDFLAGS += --emit-relocs -Bsymbolic -Bsymbolic-functions 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)