summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
Diffstat (limited to 'board')
-rw-r--r--board/AndesTech/ax25-ae350/Kconfig (renamed from board/AndesTech/nx25-ae250/Kconfig)10
-rw-r--r--board/AndesTech/ax25-ae350/MAINTAINERS6
-rw-r--r--board/AndesTech/ax25-ae350/Makefile (renamed from board/AndesTech/nx25-ae250/Makefile)2
-rw-r--r--board/AndesTech/ax25-ae350/ax25-ae350.c (renamed from board/AndesTech/nx25-ae250/nx25-ae250.c)36
-rw-r--r--board/AndesTech/nx25-ae250/MAINTAINERS6
5 files changed, 47 insertions, 13 deletions
diff --git a/board/AndesTech/nx25-ae250/Kconfig b/board/AndesTech/ax25-ae350/Kconfig
index 2fb3234bad..bb69ea3489 100644
--- a/board/AndesTech/nx25-ae250/Kconfig
+++ b/board/AndesTech/ax25-ae350/Kconfig
@@ -1,19 +1,19 @@
-if TARGET_NX25_AE250
+if TARGET_AX25_AE350
config SYS_CPU
- default "nx25"
+ default "ax25"
config SYS_BOARD
- default "nx25-ae250"
+ default "ax25-ae350"
config SYS_VENDOR
default "AndesTech"
config SYS_SOC
- default "ae250"
+ default "ae350"
config SYS_CONFIG_NAME
- default "nx25-ae250"
+ default "ax25-ae350"
config ENV_SIZE
default 0x2000 if ENV_IS_IN_SPI_FLASH
diff --git a/board/AndesTech/ax25-ae350/MAINTAINERS b/board/AndesTech/ax25-ae350/MAINTAINERS
new file mode 100644
index 0000000000..508c6ace72
--- /dev/null
+++ b/board/AndesTech/ax25-ae350/MAINTAINERS
@@ -0,0 +1,6 @@
+AX25-AE350 BOARD
+M: Rick Chen <rick@andestech.com>
+S: Maintained
+F: board/AndesTech/ax25-ae350/
+F: include/configs/ax25-ae350.h
+F: configs/ax25-ae350_defconfig
diff --git a/board/AndesTech/nx25-ae250/Makefile b/board/AndesTech/ax25-ae350/Makefile
index e30b2d3c27..0e4ba8d702 100644
--- a/board/AndesTech/nx25-ae250/Makefile
+++ b/board/AndesTech/ax25-ae350/Makefile
@@ -3,4 +3,4 @@
# Copyright (C) 2017 Andes Technology Corporation.
# Rick Chen, Andes Technology Corporation <rick@andestech.com>
-obj-y := nx25-ae250.o
+obj-y := ax25-ae350.o
diff --git a/board/AndesTech/nx25-ae250/nx25-ae250.c b/board/AndesTech/ax25-ae350/ax25-ae350.c
index 4bb618b32c..fd5aaa1579 100644
--- a/board/AndesTech/nx25-ae250/nx25-ae250.c
+++ b/board/AndesTech/ax25-ae350/ax25-ae350.c
@@ -10,6 +10,8 @@
#include <netdev.h>
#endif
#include <linux/io.h>
+#include <faraday/ftsmc020.h>
+#include <fdtdec.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -19,7 +21,7 @@ DECLARE_GLOBAL_DATA_PTR;
int board_init(void)
{
- gd->bd->bi_arch_number = MACH_TYPE_AE250;
+ gd->bd->bi_arch_number = MACH_TYPE_AE350;
gd->bd->bi_boot_params = PHYS_SDRAM_0 + 0x400;
return 0;
@@ -72,3 +74,35 @@ void *board_fdt_blob_setup(void)
return (void *)CONFIG_SYS_FDT_BASE;
}
+
+int smc_init(void)
+{
+ int node = -1;
+ const char *compat = "andestech,atfsmc020";
+ void *blob = (void *)gd->fdt_blob;
+ fdt_addr_t addr;
+ struct ftsmc020_bank *regs;
+
+ node = fdt_node_offset_by_compatible(blob, -1, compat);
+ if (node < 0)
+ return -FDT_ERR_NOTFOUND;
+
+ addr = fdtdec_get_addr(blob, node, "reg");
+
+ if (addr == FDT_ADDR_T_NONE)
+ return -EINVAL;
+
+ regs = (struct ftsmc020_bank *)addr;
+ regs->cr &= ~FTSMC020_BANK_WPROT;
+
+ return 0;
+}
+
+#ifdef CONFIG_BOARD_EARLY_INIT_F
+int board_early_init_f(void)
+{
+ smc_init();
+
+ return 0;
+}
+#endif
diff --git a/board/AndesTech/nx25-ae250/MAINTAINERS b/board/AndesTech/nx25-ae250/MAINTAINERS
deleted file mode 100644
index 1bff127c64..0000000000
--- a/board/AndesTech/nx25-ae250/MAINTAINERS
+++ /dev/null
@@ -1,6 +0,0 @@
-NX25-AE250 BOARD
-M: Rick Chen <rick@andestech.com>
-S: Maintained
-F: board/AndesTech/nx25-ae250/
-F: include/configs/nx25-ae250.h
-F: configs/nx25-ae250_defconfig