Merge tag 'uniphier-v2020.07' of https://gitlab.denx.de/u-boot/custodians/u-boot-uniphier
UniPhier SoC updates for v2020.07
- De-assert write protect for Denali NAND driver
- Clean up include directives
- Migrate to DM_ETH, and remove legacy board_eth_init()
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index ef7da27..21df1c4 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1582,6 +1582,7 @@
bool "Socionext UniPhier SoCs"
select BOARD_LATE_INIT
select DM
+ select DM_ETH
select DM_GPIO
select DM_I2C
select DM_MMC
diff --git a/arch/arm/mach-uniphier/arm32/cache-uniphier.c b/arch/arm/mach-uniphier/arm32/cache-uniphier.c
index b6e4abb..cde2a81 100644
--- a/arch/arm/mach-uniphier/arm32/cache-uniphier.c
+++ b/arch/arm/mach-uniphier/arm32/cache-uniphier.c
@@ -5,7 +5,6 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
#include <cpu_func.h>
#include <linux/io.h>
#include <linux/kernel.h>
diff --git a/arch/arm/mach-uniphier/arm32/psci.c b/arch/arm/mach-uniphier/arm32/psci.c
index e231e7b..a4d260a 100644
--- a/arch/arm/mach-uniphier/arm32/psci.c
+++ b/arch/arm/mach-uniphier/arm32/psci.c
@@ -4,9 +4,7 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
#include <cpu_func.h>
-#include <asm/cache.h>
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/io.h>
@@ -17,6 +15,7 @@
#include <asm/processor.h>
#include <asm/psci.h>
#include <asm/secure.h>
+#include <asm/system.h>
#include "../debug.h"
#include "../soc-info.h"
diff --git a/arch/arm/mach-uniphier/arm32/timer.c b/arch/arm/mach-uniphier/arm32/timer.c
index b3c907b..a40bdf1 100644
--- a/arch/arm/mach-uniphier/arm32/timer.c
+++ b/arch/arm/mach-uniphier/arm32/timer.c
@@ -3,7 +3,7 @@
* Copyright (C) 2012-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
+#include <config.h>
#include <init.h>
#include <linux/io.h>
diff --git a/arch/arm/mach-uniphier/arm64/mem_map.c b/arch/arm/mach-uniphier/arm64/mem_map.c
index 7653bd2..a8bd4ee 100644
--- a/arch/arm/mach-uniphier/arm64/mem_map.c
+++ b/arch/arm/mach-uniphier/arm64/mem_map.c
@@ -3,7 +3,6 @@
* Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
#include <linux/types.h>
#include <asm/armv8/mmu.h>
diff --git a/arch/arm/mach-uniphier/base-address.c b/arch/arm/mach-uniphier/base-address.c
index 5ee742e..d7456f8 100644
--- a/arch/arm/mach-uniphier/base-address.c
+++ b/arch/arm/mach-uniphier/base-address.c
@@ -3,9 +3,9 @@
// Copyright (C) 2019 Socionext Inc.
// Author: Masahiro Yamada <yamada.masahiro@socionext.com>
-#include <common.h>
#include <dm/of.h>
#include <fdt_support.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/libfdt.h>
#include <linux/sizes.h>
diff --git a/arch/arm/mach-uniphier/board_init.c b/arch/arm/mach-uniphier/board_init.c
index 6bf0811..4f9cd6e 100644
--- a/arch/arm/mach-uniphier/board_init.c
+++ b/arch/arm/mach-uniphier/board_init.c
@@ -5,7 +5,6 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <log.h>
#include <linux/errno.h>
#include <linux/io.h>
#include <linux/printk.h>
diff --git a/arch/arm/mach-uniphier/board_late_init.c b/arch/arm/mach-uniphier/board_late_init.c
index 378aad0..b800e8b 100644
--- a/arch/arm/mach-uniphier/board_late_init.c
+++ b/arch/arm/mach-uniphier/board_late_init.c
@@ -5,7 +5,6 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
#include <env.h>
#include <init.h>
#include <spl.h>
diff --git a/arch/arm/mach-uniphier/boards.c b/arch/arm/mach-uniphier/boards.c
index d9a8d2f..3e2ec9b 100644
--- a/arch/arm/mach-uniphier/boards.c
+++ b/arch/arm/mach-uniphier/boards.c
@@ -4,9 +4,9 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
#include <linux/libfdt.h>
#include <linux/kernel.h>
+#include <asm/global_data.h>
#include "init.h"
diff --git a/arch/arm/mach-uniphier/boot-device/boot-device-ld11.c b/arch/arm/mach-uniphier/boot-device/boot-device-ld11.c
index 11e70a9..4689ed79 100644
--- a/arch/arm/mach-uniphier/boot-device/boot-device-ld11.c
+++ b/arch/arm/mach-uniphier/boot-device/boot-device-ld11.c
@@ -4,7 +4,6 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
#include <spl.h>
#include <linux/io.h>
#include <linux/kernel.h>
diff --git a/arch/arm/mach-uniphier/boot-device/boot-device-ld4.c b/arch/arm/mach-uniphier/boot-device/boot-device-ld4.c
index 02b2394..c6aef18 100644
--- a/arch/arm/mach-uniphier/boot-device/boot-device-ld4.c
+++ b/arch/arm/mach-uniphier/boot-device/boot-device-ld4.c
@@ -5,7 +5,6 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
#include <spl.h>
#include <linux/io.h>
#include <linux/kernel.h>
diff --git a/arch/arm/mach-uniphier/boot-device/boot-device-pro5.c b/arch/arm/mach-uniphier/boot-device/boot-device-pro5.c
index 5545248..efd07a3 100644
--- a/arch/arm/mach-uniphier/boot-device/boot-device-pro5.c
+++ b/arch/arm/mach-uniphier/boot-device/boot-device-pro5.c
@@ -4,7 +4,6 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
#include <spl.h>
#include <linux/io.h>
#include <linux/kernel.h>
diff --git a/arch/arm/mach-uniphier/boot-device/boot-device-pxs2.c b/arch/arm/mach-uniphier/boot-device/boot-device-pxs2.c
index 49c5da1..677470c 100644
--- a/arch/arm/mach-uniphier/boot-device/boot-device-pxs2.c
+++ b/arch/arm/mach-uniphier/boot-device/boot-device-pxs2.c
@@ -4,7 +4,6 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
#include <spl.h>
#include <linux/io.h>
#include <linux/kernel.h>
diff --git a/arch/arm/mach-uniphier/boot-device/boot-device-pxs3.c b/arch/arm/mach-uniphier/boot-device/boot-device-pxs3.c
index 4aee50f..6888099 100644
--- a/arch/arm/mach-uniphier/boot-device/boot-device-pxs3.c
+++ b/arch/arm/mach-uniphier/boot-device/boot-device-pxs3.c
@@ -4,7 +4,6 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
#include <spl.h>
#include <linux/bitops.h>
#include <linux/io.h>
diff --git a/arch/arm/mach-uniphier/boot-device/boot-device.c b/arch/arm/mach-uniphier/boot-device/boot-device.c
index 2fb6255..69a35f5 100644
--- a/arch/arm/mach-uniphier/boot-device/boot-device.c
+++ b/arch/arm/mach-uniphier/boot-device/boot-device.c
@@ -4,12 +4,12 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
#include <command.h>
#include <spl.h>
#include <stdio.h>
#include <linux/bitops.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/log2.h>
diff --git a/arch/arm/mach-uniphier/clk/clk-dram-ld4.c b/arch/arm/mach-uniphier/clk/clk-dram-ld4.c
index c796d36..3b721ea 100644
--- a/arch/arm/mach-uniphier/clk/clk-dram-ld4.c
+++ b/arch/arm/mach-uniphier/clk/clk-dram-ld4.c
@@ -4,7 +4,6 @@
* Copyright (C) 2015-2017 Socionext Inc.
*/
-#include <common.h>
#include <spl.h>
#include <linux/io.h>
diff --git a/arch/arm/mach-uniphier/clk/clk-dram-pxs2.c b/arch/arm/mach-uniphier/clk/clk-dram-pxs2.c
index b78bd01..75d3e70 100644
--- a/arch/arm/mach-uniphier/clk/clk-dram-pxs2.c
+++ b/arch/arm/mach-uniphier/clk/clk-dram-pxs2.c
@@ -3,7 +3,6 @@
* Copyright (C) 2016-2017 Socionext Inc.
*/
-#include <common.h>
#include <spl.h>
#include <linux/io.h>
diff --git a/arch/arm/mach-uniphier/clk/clk-early-ld4.c b/arch/arm/mach-uniphier/clk/clk-early-ld4.c
index 0f9ce65..25b72d8 100644
--- a/arch/arm/mach-uniphier/clk/clk-early-ld4.c
+++ b/arch/arm/mach-uniphier/clk/clk-early-ld4.c
@@ -4,7 +4,6 @@
* Copyright (C) 2015-2017 Socionext Inc.
*/
-#include <common.h>
#include <spl.h>
#include <linux/io.h>
diff --git a/arch/arm/mach-uniphier/clk/clk-ld11.c b/arch/arm/mach-uniphier/clk/clk-ld11.c
index 94b9d90..d241a65 100644
--- a/arch/arm/mach-uniphier/clk/clk-ld11.c
+++ b/arch/arm/mach-uniphier/clk/clk-ld11.c
@@ -3,7 +3,6 @@
* Copyright (C) 2016 Socionext Inc.
*/
-#include <common.h>
#include <spl.h>
#include <linux/bitops.h>
#include <linux/delay.h>
diff --git a/arch/arm/mach-uniphier/clk/dpll-ld4.c b/arch/arm/mach-uniphier/clk/dpll-ld4.c
index fd77aa7..3ccaf02 100644
--- a/arch/arm/mach-uniphier/clk/dpll-ld4.c
+++ b/arch/arm/mach-uniphier/clk/dpll-ld4.c
@@ -4,7 +4,6 @@
* Copyright (C) 2015-2016 Socionext Inc.
*/
-#include <common.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/io.h>
diff --git a/arch/arm/mach-uniphier/clk/dpll-pro4.c b/arch/arm/mach-uniphier/clk/dpll-pro4.c
index c86881d..44006ae 100644
--- a/arch/arm/mach-uniphier/clk/dpll-pro4.c
+++ b/arch/arm/mach-uniphier/clk/dpll-pro4.c
@@ -4,7 +4,6 @@
* Copyright (C) 2015-2016 Socionext Inc.
*/
-#include <common.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/io.h>
diff --git a/arch/arm/mach-uniphier/debug-uart/debug-uart.c b/arch/arm/mach-uniphier/debug-uart/debug-uart.c
index a70ce59..d116d46 100644
--- a/arch/arm/mach-uniphier/debug-uart/debug-uart.c
+++ b/arch/arm/mach-uniphier/debug-uart/debug-uart.c
@@ -3,7 +3,6 @@
* Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
#include <debug_uart.h>
#include <linux/io.h>
#include <linux/serial_reg.h>
diff --git a/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c b/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c
index a6c0735..629f8b9 100644
--- a/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c
+++ b/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c
@@ -4,7 +4,6 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
#include <command.h>
#include <stdio.h>
#include <linux/io.h>
diff --git a/arch/arm/mach-uniphier/dram/cmd_ddrphy.c b/arch/arm/mach-uniphier/dram/cmd_ddrphy.c
index 476c5b3..ca519d1 100644
--- a/arch/arm/mach-uniphier/dram/cmd_ddrphy.c
+++ b/arch/arm/mach-uniphier/dram/cmd_ddrphy.c
@@ -5,7 +5,6 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
#include <command.h>
#include <stdio.h>
#include <linux/io.h>
diff --git a/arch/arm/mach-uniphier/dram/ddrphy-training.c b/arch/arm/mach-uniphier/dram/ddrphy-training.c
index c26f563..1decdf1 100644
--- a/arch/arm/mach-uniphier/dram/ddrphy-training.c
+++ b/arch/arm/mach-uniphier/dram/ddrphy-training.c
@@ -4,7 +4,6 @@
* Copyright (C) 2015-2016 Socionext Inc.
*/
-#include <log.h>
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/errno.h>
diff --git a/arch/arm/mach-uniphier/dram/umc-ld4.c b/arch/arm/mach-uniphier/dram/umc-ld4.c
index 2d1f3e3..96acca2 100644
--- a/arch/arm/mach-uniphier/dram/umc-ld4.c
+++ b/arch/arm/mach-uniphier/dram/umc-ld4.c
@@ -5,7 +5,6 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
#include <linux/errno.h>
#include <linux/io.h>
#include <linux/sizes.h>
diff --git a/arch/arm/mach-uniphier/dram/umc-pro4.c b/arch/arm/mach-uniphier/dram/umc-pro4.c
index 012e5f8..cde39b4 100644
--- a/arch/arm/mach-uniphier/dram/umc-pro4.c
+++ b/arch/arm/mach-uniphier/dram/umc-pro4.c
@@ -5,7 +5,6 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
#include <linux/errno.h>
#include <linux/io.h>
#include <linux/sizes.h>
diff --git a/arch/arm/mach-uniphier/dram/umc-pxs2.c b/arch/arm/mach-uniphier/dram/umc-pxs2.c
index 3f7e5f3..7357420 100644
--- a/arch/arm/mach-uniphier/dram/umc-pxs2.c
+++ b/arch/arm/mach-uniphier/dram/umc-pxs2.c
@@ -7,8 +7,6 @@
* Copyright (C) 2015 Socionext Inc.
*/
-#include <init.h>
-#include <log.h>
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/errno.h>
diff --git a/arch/arm/mach-uniphier/dram/umc-sld8.c b/arch/arm/mach-uniphier/dram/umc-sld8.c
index b55b044..a115869 100644
--- a/arch/arm/mach-uniphier/dram/umc-sld8.c
+++ b/arch/arm/mach-uniphier/dram/umc-sld8.c
@@ -5,7 +5,6 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
#include <linux/errno.h>
#include <linux/io.h>
#include <linux/sizes.h>
diff --git a/arch/arm/mach-uniphier/dram_init.c b/arch/arm/mach-uniphier/dram_init.c
index 1127373..7f27531 100644
--- a/arch/arm/mach-uniphier/dram_init.c
+++ b/arch/arm/mach-uniphier/dram_init.c
@@ -5,7 +5,6 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
#include <init.h>
#include <linux/errno.h>
#include <linux/io.h>
@@ -13,6 +12,7 @@
#include <linux/printk.h>
#include <linux/sizes.h>
#include <asm/global_data.h>
+#include <asm/u-boot.h>
#include "init.h"
#include "sg-regs.h"
diff --git a/arch/arm/mach-uniphier/fdt-fixup.c b/arch/arm/mach-uniphier/fdt-fixup.c
index 6f3c29d..980c260 100644
--- a/arch/arm/mach-uniphier/fdt-fixup.c
+++ b/arch/arm/mach-uniphier/fdt-fixup.c
@@ -4,11 +4,11 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
#include <fdt_support.h>
#include <fdtdec.h>
#include <jffs2/load_kernel.h>
#include <mtd_node.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/printk.h>
diff --git a/arch/arm/mach-uniphier/memconf.c b/arch/arm/mach-uniphier/memconf.c
index f69b489..57192f0 100644
--- a/arch/arm/mach-uniphier/memconf.c
+++ b/arch/arm/mach-uniphier/memconf.c
@@ -5,7 +5,6 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
#include <linux/errno.h>
#include <linux/io.h>
#include <linux/sizes.h>
diff --git a/arch/arm/mach-uniphier/micro-support-card.c b/arch/arm/mach-uniphier/micro-support-card.c
index 18435dc..b09ec54 100644
--- a/arch/arm/mach-uniphier/micro-support-card.c
+++ b/arch/arm/mach-uniphier/micro-support-card.c
@@ -5,14 +5,13 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
-#include <fdt_support.h>
-#include <log.h>
-#include <net.h>
+#include <config.h>
#include <dm/of.h>
+#include <fdt_support.h>
#include <linux/ctype.h>
#include <linux/delay.h>
#include <linux/io.h>
+#include <asm/global_data.h>
#include "micro-support-card.h"
@@ -108,18 +107,6 @@
support_card_show_revision();
}
-#if defined(CONFIG_SMC911X)
-#include <netdev.h>
-
-int board_eth_init(bd_t *bis)
-{
- if (!support_card_found)
- return 0;
-
- return smc911x_initialize(0, (unsigned long)support_card_base + SMC911X_OFFSET);
-}
-#endif
-
#if defined(CONFIG_MTD_NOR_FLASH)
#include <mtd/cfi_flash.h>
diff --git a/arch/arm/mach-uniphier/mmc-boot-mode.c b/arch/arm/mach-uniphier/mmc-boot-mode.c
index b484953..e47e5df 100644
--- a/arch/arm/mach-uniphier/mmc-boot-mode.c
+++ b/arch/arm/mach-uniphier/mmc-boot-mode.c
@@ -4,7 +4,6 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
#include <mmc.h>
#include <spl.h>
diff --git a/arch/arm/mach-uniphier/mmc-first-dev.c b/arch/arm/mach-uniphier/mmc-first-dev.c
index 7f29b6b..45bb10f 100644
--- a/arch/arm/mach-uniphier/mmc-first-dev.c
+++ b/arch/arm/mach-uniphier/mmc-first-dev.c
@@ -4,7 +4,6 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
#include <command.h>
#include <env.h>
#include <mmc.h>
diff --git a/arch/arm/mach-uniphier/nand-reset.c b/arch/arm/mach-uniphier/nand-reset.c
index dbf54aa..11cadaa 100644
--- a/arch/arm/mach-uniphier/nand-reset.c
+++ b/arch/arm/mach-uniphier/nand-reset.c
@@ -4,7 +4,6 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <log.h>
#include <linux/errno.h>
#include <dm.h>
#include <dm/uclass-internal.h>
diff --git a/arch/arm/mach-uniphier/pinctrl-glue.c b/arch/arm/mach-uniphier/pinctrl-glue.c
index b45f72f..2e07264 100644
--- a/arch/arm/mach-uniphier/pinctrl-glue.c
+++ b/arch/arm/mach-uniphier/pinctrl-glue.c
@@ -4,7 +4,6 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
#include <linux/errno.h>
#include <dm.h>
#include <dm/pinctrl.h>
diff --git a/arch/arm/mach-uniphier/reset.c b/arch/arm/mach-uniphier/reset.c
index 92a8b92..5fffd23 100644
--- a/arch/arm/mach-uniphier/reset.c
+++ b/arch/arm/mach-uniphier/reset.c
@@ -5,7 +5,6 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
#include <cpu_func.h>
#include <linux/io.h>
#include <asm/secure.h>
diff --git a/arch/arm/mach-uniphier/sbc/sbc-ld11.c b/arch/arm/mach-uniphier/sbc/sbc-ld11.c
index 21972ac..a0162e1 100644
--- a/arch/arm/mach-uniphier/sbc/sbc-ld11.c
+++ b/arch/arm/mach-uniphier/sbc/sbc-ld11.c
@@ -3,7 +3,6 @@
* Copyright (C) 2016-2017 Socionext Inc.
*/
-#include <common.h>
#include <spl.h>
#include <linux/io.h>
diff --git a/arch/arm/mach-uniphier/sbc/sbc.c b/arch/arm/mach-uniphier/sbc/sbc.c
index af8d6f4..2100f49 100644
--- a/arch/arm/mach-uniphier/sbc/sbc.c
+++ b/arch/arm/mach-uniphier/sbc/sbc.c
@@ -5,7 +5,6 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
#include <linux/io.h>
#include <asm/global_data.h>
diff --git a/arch/arm/mach-uniphier/spl_board_init.c b/arch/arm/mach-uniphier/spl_board_init.c
index 48764a1..a93b8cd 100644
--- a/arch/arm/mach-uniphier/spl_board_init.c
+++ b/arch/arm/mach-uniphier/spl_board_init.c
@@ -4,7 +4,6 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
-#include <common.h>
#include <debug_uart.h>
#include <hang.h>
#include <spl.h>
diff --git a/configs/uniphier_ld4_sld8_defconfig b/configs/uniphier_ld4_sld8_defconfig
index 0bc8543..4ed7353 100644
--- a/configs/uniphier_ld4_sld8_defconfig
+++ b/configs/uniphier_ld4_sld8_defconfig
@@ -52,7 +52,6 @@
CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
CONFIG_SPL_NAND_DENALI=y
CONFIG_SMC911X=y
-CONFIG_SMC911X_BASE=0x0
CONFIG_SMC911X_32_BIT=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/uniphier_v7_defconfig b/configs/uniphier_v7_defconfig
index 6485ab7..e46bdca 100644
--- a/configs/uniphier_v7_defconfig
+++ b/configs/uniphier_v7_defconfig
@@ -51,7 +51,6 @@
CONFIG_NAND_DENALI_DT=y
CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
CONFIG_SPL_NAND_DENALI=y
-CONFIG_DM_ETH=y
CONFIG_SNI_AVE=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
diff --git a/configs/uniphier_v8_defconfig b/configs/uniphier_v8_defconfig
index 4514468a..a130bbb 100644
--- a/configs/uniphier_v8_defconfig
+++ b/configs/uniphier_v8_defconfig
@@ -50,7 +50,6 @@
CONFIG_MTD_RAW_NAND=y
CONFIG_NAND_DENALI_DT=y
CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
-CONFIG_DM_ETH=y
CONFIG_SNI_AVE=y
CONFIG_PINCONF=y
CONFIG_SPI=y
diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
index c4d9d31..06b2ff9 100644
--- a/drivers/mtd/nand/raw/Kconfig
+++ b/drivers/mtd/nand/raw/Kconfig
@@ -121,15 +121,6 @@
Enable the driver for NAND flash on platforms using a Denali NAND
controller as a DT device.
-config NAND_DENALI_SPARE_AREA_SKIP_BYTES
- int "Number of bytes skipped in OOB area"
- depends on NAND_DENALI
- range 0 63
- help
- This option specifies the number of bytes to skip from the beginning
- of OOB area before last ECC sector data starts. This is potentially
- used to preserve the bad block marker in the OOB area.
-
config NAND_LPC32XX_SLC
bool "Support LPC32XX_SLC controller"
help
@@ -404,6 +395,15 @@
This is a small implementation of the Denali NAND controller
for use on SPL.
+config NAND_DENALI_SPARE_AREA_SKIP_BYTES
+ int "Number of bytes skipped in OOB area"
+ depends on SPL_NAND_DENALI
+ range 0 63
+ help
+ This option specifies the number of bytes to skip from the beginning
+ of OOB area before last ECC sector data starts. This is potentially
+ used to preserve the bad block marker in the OOB area.
+
config SPL_NAND_SIMPLE
bool "Use simple SPL NAND driver"
depends on !SPL_NAND_AM33XX_BCH
diff --git a/drivers/mtd/nand/raw/denali.c b/drivers/mtd/nand/raw/denali.c
index 5bae7f1..15e9029 100644
--- a/drivers/mtd/nand/raw/denali.c
+++ b/drivers/mtd/nand/raw/denali.c
@@ -1095,6 +1095,7 @@
iowrite32(CHIP_EN_DONT_CARE__FLAG, denali->reg + CHIP_ENABLE_DONT_CARE);
iowrite32(0xffff, denali->reg + SPARE_AREA_MARKER);
+ iowrite32(WRITE_PROTECT__FLAG, denali->reg + WRITE_PROTECT);
}
int denali_calc_ecc_bytes(int step_size, int strength)