From patchwork Mon Mar 11 16:49:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 226613 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 8A2002C008E for ; Tue, 12 Mar 2013 03:53:06 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BE2504A298; Mon, 11 Mar 2013 17:53:04 +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 hc7oA7n-4gTc; Mon, 11 Mar 2013 17:53:04 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5AE294A280; Mon, 11 Mar 2013 17:53:03 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D49144A27E for ; Mon, 11 Mar 2013 17:53:01 +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 zakbEkuholZk for ; Mon, 11 Mar 2013 17:53:01 +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-yh0-f74.google.com (mail-yh0-f74.google.com [209.85.213.74]) by theia.denx.de (Postfix) with ESMTPS id 9329E4A296 for ; Mon, 11 Mar 2013 17:52:56 +0100 (CET) Received: by mail-yh0-f74.google.com with SMTP id z6so399816yhz.3 for ; Mon, 11 Mar 2013 09:52:55 -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=vo7B6aenlDaVUpTl4xCi/Bc7wL+qBmOlETpVCvA2b4Y=; b=ZPcozFD3thZkOzLXrUxOq6S/rtV+S/CupJdsohZrjUdREONfOqFpLMGl46DHH/D8Qi AARwdCZO3Qhf4u7cYI4EPx6To4xfAvPMOTdUrlRFXrE+sNMQvxLLSJOroD0k728agjIz CFDFsrVw0iYSAPT02zXEmIaQc0OnxraIGGkFMr0qgTCZ+RV4p1URm1iIhHE4Ch82ygMO 5KUrkndu75BXN9D7dW5+60pfrEC0/McCk/BrGAFkkg7RbLGGeNjM5t5xMOmNEGRcOpi0 HBFoyqym9QE6RnXnbGUboTUe2DnhzAiRCw/pSq3ifp8gT+ySL6kY5d4fveZdzdUDY0Ob WCJw== X-Received: by 10.236.79.6 with SMTP id h6mr7989101yhe.18.1363020775061; Mon, 11 Mar 2013 09:52:55 -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 i65si1097741yhh.5.2013.03.11.09.52.55 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Mon, 11 Mar 2013 09:52:55 -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 DCDFE31C271; Mon, 11 Mar 2013 09:52:54 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 99C5D16072B; Mon, 11 Mar 2013 09:52:54 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 11 Mar 2013 09:49:57 -0700 Message-Id: <1363020615-30923-14-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: ALoCoQmH0a8sot3YQPUwKjl70PFDVZUi8GnnnkaRBk+OQ9DgzNAUwPAOBq8R87hc17ajchf03h0psu9HLxTePwvtJxzfwGeUMxdR5QTyjuGMmwQZRZmzLIsQy0kOVYtENrP/Mnd73K+b/naayVo0r++n2pxTsS3+JhBmzk97MDj0nFq5ZltuzHUPIBJWvwf1h/jBb27vLhaa Cc: Graeme Russ , Tom Rini , Vadim Bendebury Subject: [U-Boot] [PATCH v9 13/31] arm: 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 ARM boards can define CONFIG_SYS_GENERIC_BOARD. Signed-off-by: Simon Glass --- Changes in v9: - Use !CONFIG instead of nCONFIG Changes in v8: - Define __HAVE_ARCH_GENERIC_BOARD in ARM's config.mk Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None arch/arm/config.mk | 3 +++ arch/arm/include/asm/u-boot.h | 9 +++++++++ arch/arm/lib/Makefile | 3 +++ 3 files changed, 15 insertions(+) diff --git a/arch/arm/config.mk b/arch/arm/config.mk index 24b9d7c..a0c89b7 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -31,6 +31,9 @@ CONFIG_STANDALONE_LOAD_ADDR = 0xc100000 endif endif +# Support generic board on ARM +__HAVE_ARCH_GENERIC_BOARD := y + PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__ # Choose between ARM/Thumb instruction sets diff --git a/arch/arm/include/asm/u-boot.h b/arch/arm/include/asm/u-boot.h index 2ba98bc..a33fefa 100644 --- a/arch/arm/include/asm/u-boot.h +++ b/arch/arm/include/asm/u-boot.h @@ -36,6 +36,12 @@ #ifndef _U_BOOT_H_ #define _U_BOOT_H_ 1 +#ifdef CONFIG_SYS_GENERIC_BOARD +/* Use the generic board which requires a unified bd_info */ +#include +#else + +#ifndef __ASSEMBLY__ typedef struct bd_info { unsigned int bi_baudrate; /* serial console baudrate */ ulong bi_arch_number; /* unique id for this board */ @@ -49,6 +55,9 @@ typedef struct bd_info { ulong size; } bi_dram[CONFIG_NR_DRAM_BANKS]; } bd_t; +#endif + +#endif /* !CONFIG_SYS_GENERIC_BOARD */ /* For image.h:image_check_target_arch() */ #define IH_ARCH_DEFAULT IH_ARCH_ARM diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 57111af..24c7e7a 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -39,7 +39,10 @@ GLCOBJS += div0.o SOBJS-y += crt0.o ifndef CONFIG_SPL_BUILD +ifndef CONFIG_SYS_GENERIC_BOARD COBJS-y += board.o +endif + COBJS-y += bootm.o COBJS-$(CONFIG_SYS_L2_PL310) += cache-pl310.o SOBJS-$(CONFIG_USE_ARCH_MEMSET) += memset.o