From patchwork Mon Aug 17 16:08:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 508017 X-Patchwork-Delegate: hdegoede@redhat.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 3CBEC1402B4 for ; Tue, 18 Aug 2015 02:09:09 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 306E24B8DF; Mon, 17 Aug 2015 18:08:58 +0200 (CEST) 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 wmIKxxVpgA2t; Mon, 17 Aug 2015 18:08:58 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6C57A4B8DA; Mon, 17 Aug 2015 18:08:45 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DF9114B7C7 for ; Mon, 17 Aug 2015 18:08:35 +0200 (CEST) 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 AAelYY1uiXcW for ; Mon, 17 Aug 2015 18:08:35 +0200 (CEST) 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 mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by theia.denx.de (Postfix) with ESMTPS id 923B54B7AD for ; Mon, 17 Aug 2015 18:08:35 +0200 (CEST) Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 24A748E3EC; Mon, 17 Aug 2015 16:08:34 +0000 (UTC) Received: from shalem.localdomain.com (vpn1-6-253.ams2.redhat.com [10.36.6.253]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t7HG8RHV020664; Mon, 17 Aug 2015 12:08:32 -0400 From: Hans de Goede To: Ian Campbell , Simon Glass , Tom Rini Date: Mon, 17 Aug 2015 18:08:26 +0200 Message-Id: <1439827706-1748-4-git-send-email-hdegoede@redhat.com> In-Reply-To: <1439827706-1748-1-git-send-email-hdegoede@redhat.com> References: <1439827706-1748-1-git-send-email-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH 3/3] sunxi: sunxi-common.h cleanup X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Move some #define-s around from one #ifdef block to another to reduce the number of #ifdef blocks (note this causes no functional changes even though the conditions are not always exactly the same) and move generic #include statements to the top. Signed-off-by: Hans de Goede Acked-by: Ian Campbell --- include/configs/sunxi-common.h | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 1776609..915b597 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -13,6 +13,7 @@ #ifndef _SUNXI_COMMON_CONFIG_H #define _SUNXI_COMMON_CONFIG_H +#include #include #ifdef CONFIG_OLD_SUNXI_KERNEL_COMPAT @@ -35,27 +36,15 @@ * High Level Configuration Options */ #define CONFIG_SUNXI /* sunxi family */ -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SYS_THUMB_BUILD /* Thumbs mode to save space in SPL */ -#endif - -#include /* get chip and board defs */ - -#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_DM_SERIAL) -# define CONFIG_DW_SERIAL -#endif - -/* - * Display CPU information - */ -#define CONFIG_DISPLAY_CPUINFO /* Serial & console */ #define CONFIG_SYS_NS16550 #define CONFIG_SYS_NS16550_SERIAL /* ns16550 reg in the low bits of cpu reg */ #define CONFIG_SYS_NS16550_CLK 24000000 -#ifndef CONFIG_DM_SERIAL +#ifdef CONFIG_DM_SERIAL +# define CONFIG_DW_SERIAL +#else # define CONFIG_SYS_NS16550_REG_SIZE -4 # define CONFIG_SYS_NS16550_COM1 SUNXI_UART0_BASE # define CONFIG_SYS_NS16550_COM2 SUNXI_UART1_BASE @@ -65,6 +54,7 @@ #endif /* CPU */ +#define CONFIG_DISPLAY_CPUINFO #define CONFIG_SYS_CACHELINE_SIZE 64 /* @@ -96,6 +86,7 @@ #define CONFIG_SPL_MALLOC_F_LEN 0x00080000 /* 512 KiB */ #ifdef CONFIG_SPL_BUILD +#define CONFIG_SYS_THUMB_BUILD /* Thumbs mode to save space in SPL */ #define CONFIG_SYS_MALLOC_SIMPLE /* Use malloc_simple to save space */ #undef CONFIG_SYS_MALLOC_F_LEN #define CONFIG_SYS_MALLOC_F_LEN CONFIG_SPL_MALLOC_F_LEN