summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2015-04-10 12:39:13 -0400
committerTom Rini <trini@konsulko.com>2015-04-10 12:39:13 -0400
commitc175f306b3f8885965f63ff6c71df5c0f899b4c9 (patch)
tree99a0fc3ea90f7da2db7363d499e02d94912f61d5
parenta7b00a7bf6d92648827d94f4f1dcdb0b5336fe0e (diff)
parenta811492e4f386f79b122b210ac8e66915c27f767 (diff)
Merge git://git.denx.de/u-boot-arc
-rw-r--r--arch/arc/cpu/u-boot.lds1
-rw-r--r--arch/arc/lib/Makefile3
-rw-r--r--board/synopsys/axs101/axs101.c14
-rw-r--r--board/synopsys/axs101/axs10x.h16
-rw-r--r--board/synopsys/axs101/nand.c7
-rw-r--r--include/configs/axs101.h6
6 files changed, 46 insertions, 1 deletions
diff --git a/arch/arc/cpu/u-boot.lds b/arch/arc/cpu/u-boot.lds
index ccddbf7dc9..693df74061 100644
--- a/arch/arc/cpu/u-boot.lds
+++ b/arch/arc/cpu/u-boot.lds
@@ -13,6 +13,7 @@ SECTIONS
.text : {
*(.__text_start)
*(.__image_copy_start)
+ arch/arc/lib/start.o (.text*)
*(.text*)
}
diff --git a/arch/arc/lib/Makefile b/arch/arc/lib/Makefile
index b88790492d..e592802907 100644
--- a/arch/arc/lib/Makefile
+++ b/arch/arc/lib/Makefile
@@ -4,6 +4,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
+extra-y = start.o
+head-y := start.o
obj-y += cache.o
obj-y += cpu.o
obj-y += interrupts.o
@@ -18,7 +20,6 @@ obj-y += memcpy-700.o
obj-y += memset.o
obj-y += reset.o
obj-y += timer.o
-obj-y += start.o
obj-y += ints_low.o
obj-y += init_helpers.o
diff --git a/board/synopsys/axs101/axs101.c b/board/synopsys/axs101/axs101.c
index 774204976e..8c16410944 100644
--- a/board/synopsys/axs101/axs101.c
+++ b/board/synopsys/axs101/axs101.c
@@ -9,6 +9,7 @@
#include <malloc.h>
#include <netdev.h>
#include <phy.h>
+#include "axs10x.h"
DECLARE_GLOBAL_DATA_PTR;
@@ -42,3 +43,16 @@ int board_eth_init(bd_t *bis)
return 0;
}
+
+
+#define AXS_MB_CREG 0xE0011000
+
+int board_early_init_f(void)
+{
+ if (readl((void __iomem *)AXS_MB_CREG + 0x234) & (1 << 28))
+ gd->board_type = AXS_MB_V3;
+ else
+ gd->board_type = AXS_MB_V2;
+
+ return 0;
+}
diff --git a/board/synopsys/axs101/axs10x.h b/board/synopsys/axs101/axs10x.h
new file mode 100644
index 0000000000..8e8c41f865
--- /dev/null
+++ b/board/synopsys/axs101/axs10x.h
@@ -0,0 +1,16 @@
+/*
+ * Copyright (C) 2015 Synopsys, Inc. All rights reserved.
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef _BOARD_SYNOPSYS_AXS10X_H
+#define _BOARD_SYNOPSYS_AXS10X_H
+
+enum {
+ AXS_MB_V2,
+ AXS_MB_V3
+};
+
+#endif /* _BOARD_SYNOPSYS_AXS10X_H */
+
diff --git a/board/synopsys/axs101/nand.c b/board/synopsys/axs101/nand.c
index ff35286c6e..4be52e22c0 100644
--- a/board/synopsys/axs101/nand.c
+++ b/board/synopsys/axs101/nand.c
@@ -9,6 +9,9 @@
#include <malloc.h>
#include <nand.h>
#include <asm/io.h>
+#include "axs10x.h"
+
+DECLARE_GLOBAL_DATA_PTR;
#define BUS_WIDTH 8 /* AXI data bus width in bytes */
@@ -232,5 +235,9 @@ int board_nand_init(struct nand_chip *nand)
nand->write_buf = axs101_nand_write_buf;
nand->read_buf = axs101_nand_read_buf;
+ /* MBv3 has NAND IC with 16-bit data bus */
+ if (gd->board_type == AXS_MB_V3)
+ nand->options |= NAND_BUSWIDTH_16;
+
return 0;
}
diff --git a/include/configs/axs101.h b/include/configs/axs101.h
index 5fb8aca4bc..8a7095c5b2 100644
--- a/include/configs/axs101.h
+++ b/include/configs/axs101.h
@@ -34,6 +34,12 @@
#define CONFIG_SYS_LOAD_ADDR 0x82000000
/*
+ * This board might be of different versions so handle it
+ */
+#define CONFIG_BOARD_TYPES
+#define CONFIG_BOARD_EARLY_INIT_F
+
+/*
* NAND Flash configuration
*/
#define CONFIG_SYS_NO_FLASH