summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-09-13 17:29:33 +0200
committerHans de Goede <hdegoede@redhat.com>2015-09-29 11:50:07 +0200
commitdaf6d399aef850447f55820457e4dbce91a0521d (patch)
tree5f7b94002d9b83c88adeb68df3d4ec235e8fb832 /include
parent861ba4aaac3e7fdfad00f268ff142e56979e50a2 (diff)
downloadu-boot-imx-daf6d399aef850447f55820457e4dbce91a0521d.zip
u-boot-imx-daf6d399aef850447f55820457e4dbce91a0521d.tar.gz
u-boot-imx-daf6d399aef850447f55820457e4dbce91a0521d.tar.bz2
sunxi: sunxi-common.h cleanup
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 <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
Diffstat (limited to 'include')
-rw-r--r--include/configs/sunxi-common.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 48cc4ed..7c1507b 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 <asm/arch/cpu.h>
#include <linux/stringify.h>
#ifdef CONFIG_OLD_SUNXI_KERNEL_COMPAT
@@ -39,23 +40,14 @@
#define CONFIG_SYS_THUMB_BUILD /* Thumbs mode to save space in SPL */
#endif
-#include <asm/arch/cpu.h> /* 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 +57,7 @@
#endif
/* CPU */
+#define CONFIG_DISPLAY_CPUINFO
#define CONFIG_SYS_CACHELINE_SIZE 64
/*