Skip to contentSkip to conversation

board: sifive: drop stuff related to unmatched revision 1

PATCH New Zong Li 1 participant 1 message Jul 20, 2021

Subsystems (2)
lore
Share & tools
lore

Zong Li

author
#0 lore raw

PATCH v2 1/1 board: sifive: drop stuff related to unmatched revision 1

This patch reverts the following commits:
- 4b4159d0f3 ("riscv: dts: add dts for unmatched rev1")
- ffe9a394df ("board: sifive: support spl multi-dtb on unmatched board")

We won't plan to support unmatched that the revision below 3 in u-boot, so they can be dropped because they might be useless.

Changed in v2:
- rebase codebase to the latest master branch

---
 arch/riscv/dts/Makefile                       |    2 +-
 .../fu740-hifive-unmatched-a00-ddr-rev1.dtsi  | 1489 -----------------
 .../dts/hifive-unmatched-a00-rev1-u-boot.dtsi |    7 -
 arch/riscv/dts/hifive-unmatched-a00-rev1.dts  |    4 -
 board/sifive/unmatched/spl.c                  |   28 +-
 configs/sifive_unmatched_defconfig            |    4 -
 6 files changed, 3 insertions(+), 1531 deletions(-)
 delete mode 100644 arch/riscv/dts/fu740-hifive-unmatched-a00-ddr-rev1.dtsi
 delete mode 100644 arch/riscv/dts/hifive-unmatched-a00-rev1-u-boot.dtsi
 delete mode 100644 arch/riscv/dts/hifive-unmatched-a00-rev1.dts
arch/riscv/dts/Makefile +1 -1
index ba69894eb5..b6e9166767 100644
@@ -5,7 +5,7 @@ dtb-$(CONFIG_TARGET_MICROCHIP_ICICLE) += microchip-mpfs-icicle-kit.dtb
 dtb-$(CONFIG_TARGET_QEMU_VIRT) += qemu-virt.dtb
 dtb-$(CONFIG_TARGET_OPENPITON_RISCV64) += openpiton-riscv64.dtb
 dtb-$(CONFIG_TARGET_SIFIVE_UNLEASHED) += hifive-unleashed-a00.dtb
-dtb-$(CONFIG_TARGET_SIFIVE_UNMATCHED) += hifive-unmatched-a00.dtb hifive-unmatched-a00-rev1.dtb
+dtb-$(CONFIG_TARGET_SIFIVE_UNMATCHED) += hifive-unmatched-a00.dtb
 dtb-$(CONFIG_TARGET_SIPEED_MAIX) += k210-maix-bit.dtb
 
 targets += $(dtb-y)
arch/riscv/dts/fu740-hifive-unmatched-a00-ddr-rev1.dtsi deleted +0 -1489

1,489 lines not on this page · raw message

arch/riscv/dts/hifive-unmatched-a00-rev1-u-boot.dtsi deleted +0 -7
deleted file mode 100644
index 70c9526f90..0000000000
@@ -1,7 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0 OR MIT)
-/*
- * Copyright (C) 2021 SiFive, Inc
- */
-
-#include "hifive-unmatched-a00-u-boot.dtsi"
-#include "fu740-hifive-unmatched-a00-ddr-rev1.dtsi"
arch/riscv/dts/hifive-unmatched-a00-rev1.dts deleted +0 -4
deleted file mode 100644
index 02edc4e60f..0000000000
@@ -1,4 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/* Copyright (c) 2021 SiFive, Inc */
-
-#include "hifive-unmatched-a00.dts"
board/sifive/unmatched/spl.c +2 -26
index 74134b03ee..5e1333b09a 100644
@@ -10,14 +10,11 @@
 #include <spl.h>
 #include <misc.h>
 #include <log.h>
-#include <fdtdec.h>
-#include <dm/root.h>
 #include <linux/delay.h>
 #include <linux/io.h>
 #include <asm/gpio.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/spl.h>
-#include <asm/arch/eeprom.h>
 
 #define GEM_PHY_RESET	SIFIVE_GENERIC_GPIO_NR(0, 12)
 
@@ -29,16 +26,6 @@ int spl_board_init_f(void)
 {
 	int ret;
 
-#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_MULTI_DTB_FIT)
-	int rescan;
-
-	ret = fdtdec_resetup(&rescan);
-	if (!ret && rescan) {
-		dm_uninit();
-		dm_init_and_scan(true);
-	}
-#endif
-
 	ret = spl_soc_init();
 	if (ret) {
 		debug("HiFive Unmatched FU740 SPL init failed: %d\n", ret);
@@ -92,18 +79,7 @@ u32 spl_boot_device(void)
 #ifdef CONFIG_SPL_LOAD_FIT
 int board_fit_config_name_match(const char *name)
 {
-	/*
-	 * Apply different DDR params on different board revision.
-	 * Use PCB revision which is byte 0x7 in I2C platform EEPROM
-	 * to distinguish that.
-	 */
-	if (get_pcb_revision_from_eeprom() == PCB_REVISION_REV3 &&
-	    !strcmp(name, "hifive-unmatched-a00"))
-		return 0;
-	else if (get_pcb_revision_from_eeprom() != PCB_REVISION_REV3 &&
-		 !strcmp(name, "hifive-unmatched-a00-rev1"))
-		return 0;
-
-	return -1;
+	/* boot using first FIT config */
+	return 0;
 }
 #endif
configs/sifive_unmatched_defconfig +0 -4
index a63eb751fc..4caf0de5dc 100644
@@ -5,7 +5,6 @@ CONFIG_NR_DRAM_BANKS=1
 CONFIG_SPL_DM_SPI=y
 CONFIG_DEFAULT_DEVICE_TREE="hifive-unmatched-a00"
 CONFIG_SPL_MMC_SUPPORT=y
-CONFIG_SPL_SYS_MALLOC_F_LEN=0x100000
 CONFIG_SPL=y
 CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_TARGET_SIFIVE_UNMATCHED=y
@@ -28,9 +27,6 @@ CONFIG_CMD_PWM=y
 CONFIG_CMD_GPT_RENAME=y
 CONFIG_CMD_PCI=y
 CONFIG_CMD_USB=y
-CONFIG_SPL_MULTI_DTB_FIT=y
-CONFIG_SPL_OF_LIST="hifive-unmatched-a00 hifive-unmatched-a00-rev1"
-CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SPL_CLK=y
 CONFIG_E1000=y
Signature · 1 line
2.31.1