]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: uniphier: move CONFIG_SUPPORT_CARD_* macros to local file
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 21 Sep 2015 15:27:32 +0000 (00:27 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 24 Sep 2015 15:27:53 +0000 (00:27 +0900)
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 <yamada.masahiro@socionext.com>
arch/arm/mach-uniphier/Makefile
arch/arm/mach-uniphier/micro-support-card.c [moved from arch/arm/mach-uniphier/support_card.c with 90% similarity]
include/configs/uniphier.h

index 5f175575e863e8c197df7d2399b003566059989a..df6a569b9a495ba843c8f73e723b65958dec5c7a 100644 (file)
@@ -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/
similarity index 90%
rename from arch/arm/mach-uniphier/support_card.c
rename to arch/arm/mach-uniphier/micro-support-card.c
index f8333060301e0013518a5b9dfecca74d446a88f4..4c34748c25cb89b970b7e49b8433e7bcec5ab707 100644 (file)
@@ -9,10 +9,13 @@
 #include <linux/io.h>
 #include <mach/micro-support-card.h>
 
-#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);
 }
index a15838b172534c59d6b69ca07305c2de3393dc1e..64059612f329c8bfcc2e94243f5a3139e0db27e5 100644 (file)
 #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
 
 /*-----------------------------------------------------------------------