From patchwork Fri Sep 11 16:25:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 516901 X-Patchwork-Delegate: yamada.m@jp.panasonic.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 26155140180 for ; Sat, 12 Sep 2015 02:25:56 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9372D4B6EB; Fri, 11 Sep 2015 18:25:53 +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 VTNji9_ovv9a; Fri, 11 Sep 2015 18:25:53 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1E6F54B670; Fri, 11 Sep 2015 18:25:53 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D3F754B705 for ; Fri, 11 Sep 2015 18:25:48 +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 UrhAaELT4Ako for ; Fri, 11 Sep 2015 18:25:48 +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 conuserg012-v.nifty.com (conuserg012.nifty.com [202.248.44.38]) by theia.denx.de (Postfix) with ESMTPS id 0EEA14B670 for ; Fri, 11 Sep 2015 18:25:44 +0200 (CEST) Received: from grover.sesame (FL1-203-136-65-164.osk.mesh.ad.jp [203.136.65.164]) (authenticated) by conuserg012-v.nifty.com with ESMTP id t8BGPTBG026928; Sat, 12 Sep 2015 01:25:34 +0900 X-Nifty-SrcIP: [203.136.65.164] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Sat, 12 Sep 2015 01:25:26 +0900 Message-Id: <1441988727-19462-5-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1441988727-19462-1-git-send-email-yamada.masahiro@socionext.com> References: <1441988727-19462-1-git-send-email-yamada.masahiro@socionext.com> Subject: [U-Boot] [PATCH 4/5] ARM: uniphier: move CONFIG_SUPPORT_CARD_* macros to local file 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" It is no longer necessary to define CONFIG_SUPPORT_CARD_* globally. Move them to a C file as local macros. Also, rename the C file. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/Makefile | 2 +- .../{support_card.c => micro-support-card.c} | 15 +++++++++------ include/configs/uniphier.h | 11 ++--------- 3 files changed, 12 insertions(+), 16 deletions(-) rename arch/arm/mach-uniphier/{support_card.c => micro-support-card.c} (90%) diff --git a/arch/arm/mach-uniphier/Makefile b/arch/arm/mach-uniphier/Makefile index 5f17557..df6a569 100644 --- a/arch/arm/mach-uniphier/Makefile +++ b/arch/arm/mach-uniphier/Makefile @@ -29,7 +29,7 @@ endif obj-y += timer.o -obj-$(CONFIG_MICRO_SUPPORT_CARD) += support_card.o +obj-$(CONFIG_MICRO_SUPPORT_CARD) += micro-support-card.o obj-$(CONFIG_MACH_PH1_SLD3) += ph1-sld3/ obj-$(CONFIG_MACH_PH1_LD4) += ph1-ld4/ diff --git a/arch/arm/mach-uniphier/support_card.c b/arch/arm/mach-uniphier/micro-support-card.c similarity index 90% rename from arch/arm/mach-uniphier/support_card.c rename to arch/arm/mach-uniphier/micro-support-card.c index e2a8c1f..28dbfca 100644 --- a/arch/arm/mach-uniphier/support_card.c +++ b/arch/arm/mach-uniphier/micro-support-card.c @@ -9,10 +9,13 @@ #include #include -#define MICRO_SUPPORT_CARD_RESET \ - ((CONFIG_SUPPORT_CARD_BASE) + 0x000D0034) -#define MICRO_SUPPORT_CARD_REVISION \ - ((CONFIG_SUPPORT_CARD_BASE) + 0x000D00E0) +#define MICRO_SUPPORT_CARD_BASE 0x43f00000 +#define SMC911X_BASE ((MICRO_SUPPORT_CARD_BASE) + 0x00000) +#define LED_BASE ((MICRO_SUPPORT_CARD_BASE) + 0x90000) +#define NS16550A_BASE ((MICRO_SUPPORT_CARD_BASE) + 0xb0000) +#define MICRO_SUPPORT_CARD_RESET ((MICRO_SUPPORT_CARD_BASE) + 0xd0034) +#define MICRO_SUPPORT_CARD_REVISION ((MICRO_SUPPORT_CARD_BASE) + 0xd00E0) + /* * 0: reset deassert, 1: reset * @@ -60,7 +63,7 @@ void support_card_init(void) int board_eth_init(bd_t *bis) { - return smc911x_initialize(0, CONFIG_SMC911X_BASE); + return smc911x_initialize(0, SMC911X_BASE); } #endif @@ -224,5 +227,5 @@ void led_puts(const char *s) s++; } - writel(~val, CONFIG_SUPPORT_CARD_LED_BASE); + writel(~val, LED_BASE); } diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h index a15838b..6405961 100644 --- a/include/configs/uniphier.h +++ b/include/configs/uniphier.h @@ -59,14 +59,6 @@ #define CONFIG_I2C_EEPROM #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 -/* - * Support card address map - */ -#define CONFIG_SUPPORT_CARD_BASE 0x43f00000 -#define CONFIG_SUPPORT_CARD_ETHER_BASE (CONFIG_SUPPORT_CARD_BASE + 0x00000000) -#define CONFIG_SUPPORT_CARD_LED_BASE (CONFIG_SUPPORT_CARD_BASE + 0x00090000) -#define CONFIG_SUPPORT_CARD_UART_BASE (CONFIG_SUPPORT_CARD_BASE + 0x000b0000) - #ifdef CONFIG_SYS_NS16550_SERIAL #define CONFIG_SYS_NS16550 #define CONFIG_SYS_NS16550_COM1 CONFIG_SUPPORT_CARD_UART_BASE @@ -81,7 +73,8 @@ #define CONFIG_SMC911X -#define CONFIG_SMC911X_BASE CONFIG_SUPPORT_CARD_ETHER_BASE +/* dummy: referenced by examples/standalone/smc911x_eeprom.c */ +#define CONFIG_SMC911X_BASE 0 #define CONFIG_SMC911X_32_BIT /*-----------------------------------------------------------------------