All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/11] pci: Remove unused FSL_PCI_INIT code
@ 2021-12-13  3:12 Tom Rini
  2021-12-13  3:12 ` [PATCH 02/11] Finish converting CONFIG_WATCHDOG, HW_WATCHDOG and WDT to Kconfig Tom Rini
                   ` (10 more replies)
  0 siblings, 11 replies; 23+ messages in thread
From: Tom Rini @ 2021-12-13  3:12 UTC (permalink / raw)
  To: u-boot

The symbol CONFIG_FSL_PCI_INIT is no longer enabled anywhere, removed
now unused code.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 board/xes/common/Makefile       |   1 -
 board/xes/common/fsl_8xxx_pci.c |  22 -
 drivers/pci/Makefile            |   1 -
 drivers/pci/fsl_pci_init.c      | 936 --------------------------------
 4 files changed, 960 deletions(-)
 delete mode 100644 board/xes/common/fsl_8xxx_pci.c
 delete mode 100644 drivers/pci/fsl_pci_init.c

diff --git a/board/xes/common/Makefile b/board/xes/common/Makefile
index 49320305470e..002821916c4b 100644
--- a/board/xes/common/Makefile
+++ b/board/xes/common/Makefile
@@ -3,7 +3,6 @@
 # (C) Copyright 2006
 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
 
-obj-$(CONFIG_FSL_PCI_INIT)	+= fsl_8xxx_pci.o
 obj-$(CONFIG_MPC86xx)		+= fsl_8xxx_clk.o
 obj-$(CONFIG_ARCH_P2020)		+= fsl_8xxx_clk.o
 obj-$(CONFIG_MPC85xx)		+= fsl_8xxx_misc.o board.o
diff --git a/board/xes/common/fsl_8xxx_pci.c b/board/xes/common/fsl_8xxx_pci.c
deleted file mode 100644
index c1fce7d33135..000000000000
--- a/board/xes/common/fsl_8xxx_pci.c
+++ /dev/null
@@ -1,22 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright 2008 Extreme Engineering Solutions, Inc.
- * Copyright 2007-2008 Freescale Semiconductor, Inc.
- */
-
-#include <common.h>
-#include <init.h>
-#include <pci.h>
-#include <asm/fsl_pci.h>
-#include <asm/fsl_serdes.h>
-#include <asm/io.h>
-#include <linux/compiler.h>
-#include <linux/libfdt.h>
-#include <fdt_support.h>
-
-#if defined(CONFIG_OF_BOARD_SETUP)
-void ft_board_pci_setup(void *blob, struct bd_info *bd)
-{
-	FT_FSL_PCI_SETUP;
-}
-#endif /* CONFIG_OF_BOARD_SETUP */
diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile
index 4a131bf5ca45..04f623652f09 100644
--- a/drivers/pci/Makefile
+++ b/drivers/pci/Makefile
@@ -13,7 +13,6 @@ obj-$(CONFIG_PCI) += pci_auto_common.o pci_common.o
 
 obj-$(CONFIG_PCIE_ECAM_GENERIC) += pcie_ecam_generic.o
 obj-$(CONFIG_PCIE_ECAM_SYNQUACER) += pcie_ecam_synquacer.o
-obj-$(CONFIG_FSL_PCI_INIT) += fsl_pci_init.o
 obj-$(CONFIG_PCI_GT64120) += pci_gt64120.o
 obj-$(CONFIG_PCI_MPC85XX) += pci_mpc85xx.o
 obj-$(CONFIG_PCI_MSC01) += pci_msc01.o
diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c
deleted file mode 100644
index c544af2a0b7a..000000000000
--- a/drivers/pci/fsl_pci_init.c
+++ /dev/null
@@ -1,936 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright 2007-2012 Freescale Semiconductor, Inc.
- */
-
-#include <common.h>
-#include <env.h>
-#include <init.h>
-#include <log.h>
-#include <malloc.h>
-#include <asm/fsl_serdes.h>
-#include <asm/global_data.h>
-#include <linux/delay.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-/*
- * PCI/PCIE Controller initialization for mpc85xx/mpc86xx soc's
- *
- * Initialize controller and call the common driver/pci pci_hose_scan to
- * scan for bridges and devices.
- *
- * Hose fields which need to be pre-initialized by board specific code:
- *   regions[]
- *   first_busno
- *
- * Fields updated:
- *   last_busno
- */
-
-#include <pci.h>
-#include <asm/io.h>
-#include <asm/fsl_pci.h>
-
-#define MAX_PCI_REGIONS 7
-
-#ifndef CONFIG_SYS_PCI_MEMORY_BUS
-#define CONFIG_SYS_PCI_MEMORY_BUS 0
-#endif
-
-#ifndef CONFIG_SYS_PCI_MEMORY_PHYS
-#define CONFIG_SYS_PCI_MEMORY_PHYS 0
-#endif
-
-#if defined(CONFIG_SYS_PCI_64BIT) && !defined(CONFIG_SYS_PCI64_MEMORY_BUS)
-#define CONFIG_SYS_PCI64_MEMORY_BUS (64ull*1024*1024*1024)
-#endif
-
-/* Setup one inbound ATMU window.
- *
- * We let the caller decide what the window size should be
- */
-static void set_inbound_window(volatile pit_t *pi,
-				struct pci_region *r,
-				u64 size)
-{
-	u32 sz = (__ilog2_u64(size) - 1);
-#ifdef CONFIG_SYS_FSL_ERRATUM_A005434
-	u32 flag = 0;
-#else
-	u32 flag = PIWAR_LOCAL;
-#endif
-
-	flag |= PIWAR_EN | PIWAR_READ_SNOOP | PIWAR_WRITE_SNOOP;
-
-	out_be32(&pi->pitar, r->phys_start >> 12);
-	out_be32(&pi->piwbar, r->bus_start >> 12);
-#ifdef CONFIG_SYS_PCI_64BIT
-	out_be32(&pi->piwbear, r->bus_start >> 44);
-#else
-	out_be32(&pi->piwbear, 0);
-#endif
-	if (r->flags & PCI_REGION_PREFETCH)
-		flag |= PIWAR_PF;
-	out_be32(&pi->piwar, flag | sz);
-}
-
-int fsl_setup_hose(struct pci_controller *hose, unsigned long addr)
-{
-	volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *) addr;
-
-	/* Reset hose to make sure its in a clean state */
-	memset(hose, 0, sizeof(struct pci_controller));
-
-	hose->regions = (struct pci_region *)
-		calloc(1, MAX_PCI_REGIONS * sizeof(struct pci_region));
-
-	pci_setup_indirect(hose, (u32)&pci->cfg_addr, (u32)&pci->cfg_data);
-
-	return fsl_is_pci_agent(hose);
-}
-
-static int fsl_pci_setup_inbound_windows(struct pci_controller *hose,
-					 u64 out_lo, u8 pcie_cap,
-					 volatile pit_t *pi)
-{
-	struct pci_region *r = hose->regions + hose->region_count;
-	u64 sz = min((u64)gd->ram_size, (1ull << 32));
-
-	phys_addr_t phys_start = CONFIG_SYS_PCI_MEMORY_PHYS;
-	pci_addr_t bus_start = CONFIG_SYS_PCI_MEMORY_BUS;
-	pci_size_t pci_sz;
-
-	/* we have no space available for inbound memory mapping */
-	if (bus_start > out_lo) {
-		printf ("no space for inbound mapping of memory\n");
-		return 0;
-	}
-
-	/* limit size */
-	if ((bus_start + sz) > out_lo) {
-		sz = out_lo - bus_start;
-		debug ("limiting size to %llx\n", sz);
-	}
-
-	pci_sz = 1ull << __ilog2_u64(sz);
-	/*
-	 * we can overlap inbound/outbound windows on PCI-E since RX & TX
-	 * links a separate
-	 */
-	if ((pcie_cap == PCI_CAP_ID_EXP) && (pci_sz < sz)) {
-		debug ("R0 bus_start: %llx phys_start: %llx size: %llx\n",
-			(u64)bus_start, (u64)phys_start, (u64)sz);
-		pci_set_region(r, bus_start, phys_start, sz,
-				PCI_REGION_MEM | PCI_REGION_SYS_MEMORY |
-				PCI_REGION_PREFETCH);
-
-		/* if we aren't an exact power of two match, pci_sz is smaller
-		 * round it up to the next power of two.  We report the actual
-		 * size to pci region tracking.
-		 */
-		if (pci_sz != sz)
-			sz = 2ull << __ilog2_u64(sz);
-
-		set_inbound_window(pi--, r++, sz);
-		sz = 0; /* make sure we dont set the R2 window */
-	} else {
-		debug ("R0 bus_start: %llx phys_start: %llx size: %llx\n",
-			(u64)bus_start, (u64)phys_start, (u64)pci_sz);
-		pci_set_region(r, bus_start, phys_start, pci_sz,
-				PCI_REGION_MEM | PCI_REGION_SYS_MEMORY |
-				PCI_REGION_PREFETCH);
-		set_inbound_window(pi--, r++, pci_sz);
-
-		sz -= pci_sz;
-		bus_start += pci_sz;
-		phys_start += pci_sz;
-
-		pci_sz = 1ull << __ilog2_u64(sz);
-		if (sz) {
-			debug ("R1 bus_start: %llx phys_start: %llx size: %llx\n",
-				(u64)bus_start, (u64)phys_start, (u64)pci_sz);
-			pci_set_region(r, bus_start, phys_start, pci_sz,
-					PCI_REGION_MEM | PCI_REGION_SYS_MEMORY |
-					PCI_REGION_PREFETCH);
-			set_inbound_window(pi--, r++, pci_sz);
-			sz -= pci_sz;
-			bus_start += pci_sz;
-			phys_start += pci_sz;
-		}
-	}
-
-#if defined(CONFIG_PHYS_64BIT) && defined(CONFIG_SYS_PCI_64BIT)
-	/*
-	 * On 64-bit capable systems, set up a mapping for all of DRAM
-	 * in high pci address space.
-	 */
-	pci_sz = 1ull << __ilog2_u64(gd->ram_size);
-	/* round up to the next largest power of two */
-	if (gd->ram_size > pci_sz)
-		pci_sz = 1ull << (__ilog2_u64(gd->ram_size) + 1);
-	debug ("R64 bus_start: %llx phys_start: %llx size: %llx\n",
-		(u64)CONFIG_SYS_PCI64_MEMORY_BUS,
-		(u64)CONFIG_SYS_PCI_MEMORY_PHYS,
-		(u64)pci_sz);
-	pci_set_region(r,
-			CONFIG_SYS_PCI64_MEMORY_BUS,
-			CONFIG_SYS_PCI_MEMORY_PHYS,
-			pci_sz,
-			PCI_REGION_MEM | PCI_REGION_SYS_MEMORY |
-			PCI_REGION_PREFETCH);
-	set_inbound_window(pi--, r++, pci_sz);
-#else
-	pci_sz = 1ull << __ilog2_u64(sz);
-	if (sz) {
-		debug ("R2 bus_start: %llx phys_start: %llx size: %llx\n",
-			(u64)bus_start, (u64)phys_start, (u64)pci_sz);
-		pci_set_region(r, bus_start, phys_start, pci_sz,
-				PCI_REGION_MEM | PCI_REGION_SYS_MEMORY |
-				PCI_REGION_PREFETCH);
-		sz -= pci_sz;
-		bus_start += pci_sz;
-		phys_start += pci_sz;
-		set_inbound_window(pi--, r++, pci_sz);
-	}
-#endif
-
-#ifdef CONFIG_PHYS_64BIT
-	if (sz && (((u64)gd->ram_size) < (1ull << 32)))
-		printf("Was not able to map all of memory via "
-			"inbound windows -- %lld remaining\n", sz);
-#endif
-
-	hose->region_count = r - hose->regions;
-
-	return 1;
-}
-
-#ifdef CONFIG_SRIO_PCIE_BOOT_MASTER
-static void fsl_pcie_boot_master(pit_t *pi)
-{
-	/* configure inbound window for slave's u-boot image */
-	debug("PCIEBOOT - MASTER: Inbound window for slave's image; "
-			"Local = 0x%llx, Bus = 0x%llx, Size = 0x%x\n",
-			(u64)CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_PHYS,
-			(u64)CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_BUS1,
-			CONFIG_SRIO_PCIE_BOOT_IMAGE_SIZE);
-	struct pci_region r_inbound;
-	u32 sz_inbound = __ilog2_u64(CONFIG_SRIO_PCIE_BOOT_IMAGE_SIZE)
-					- 1;
-	pci_set_region(&r_inbound,
-		CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_BUS1,
-		CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_PHYS,
-		sz_inbound,
-		PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
-
-	set_inbound_window(pi--, &r_inbound,
-		CONFIG_SRIO_PCIE_BOOT_IMAGE_SIZE);
-
-	/* configure inbound window for slave's u-boot image */
-	debug("PCIEBOOT - MASTER: Inbound window for slave's image; "
-			"Local = 0x%llx, Bus = 0x%llx, Size = 0x%x\n",
-			(u64)CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_PHYS,
-			(u64)CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_BUS2,
-			CONFIG_SRIO_PCIE_BOOT_IMAGE_SIZE);
-	pci_set_region(&r_inbound,
-		CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_BUS2,
-		CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_PHYS,
-		sz_inbound,
-		PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
-
-	set_inbound_window(pi--, &r_inbound,
-		CONFIG_SRIO_PCIE_BOOT_IMAGE_SIZE);
-
-	/* configure inbound window for slave's ucode and ENV */
-	debug("PCIEBOOT - MASTER: Inbound window for slave's "
-			"ucode and ENV; "
-			"Local = 0x%llx, Bus = 0x%llx, Size = 0x%x\n",
-			(u64)CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_MEM_PHYS,
-			(u64)CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_MEM_BUS,
-			CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_SIZE);
-	sz_inbound = __ilog2_u64(CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_SIZE)
-				- 1;
-	pci_set_region(&r_inbound,
-		CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_MEM_BUS,
-		CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_MEM_PHYS,
-		sz_inbound,
-		PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
-
-	set_inbound_window(pi--, &r_inbound,
-		CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_SIZE);
-}
-
-static void fsl_pcie_boot_master_release_slave(int port)
-{
-	unsigned long release_addr;
-
-	/* now release slave's core 0 */
-	switch (port) {
-	case 1:
-		release_addr = CONFIG_SYS_PCIE1_MEM_VIRT
-			+ CONFIG_SRIO_PCIE_BOOT_BRR_OFFSET;
-		break;
-#ifdef CONFIG_SYS_PCIE2_MEM_VIRT
-	case 2:
-		release_addr = CONFIG_SYS_PCIE2_MEM_VIRT
-			+ CONFIG_SRIO_PCIE_BOOT_BRR_OFFSET;
-		break;
-#endif
-#ifdef CONFIG_SYS_PCIE3_MEM_VIRT
-	case 3:
-		release_addr = CONFIG_SYS_PCIE3_MEM_VIRT
-			+ CONFIG_SRIO_PCIE_BOOT_BRR_OFFSET;
-		break;
-#endif
-	default:
-		release_addr = 0;
-		break;
-	}
-	if (release_addr != 0) {
-		out_be32((void *)release_addr,
-			CONFIG_SRIO_PCIE_BOOT_RELEASE_MASK);
-		debug("PCIEBOOT - MASTER: "
-			"Release slave successfully! Now the slave should start up!\n");
-	} else {
-		debug("PCIEBOOT - MASTER: "
-			"Release slave failed!\n");
-	}
-}
-#endif
-
-void fsl_pci_init(struct pci_controller *hose, struct fsl_pci_info *pci_info)
-{
-	u32 cfg_addr = (u32)&((ccsr_fsl_pci_t *)pci_info->regs)->cfg_addr;
-	u32 cfg_data = (u32)&((ccsr_fsl_pci_t *)pci_info->regs)->cfg_data;
-	u16 temp16;
-	u32 temp32;
-	u32 block_rev;
-	int enabled, r, inbound = 0;
-	u16 ltssm;
-	u8 temp8, pcie_cap;
-	int pcie_cap_pos;
-	int pci_dcr;
-	int pci_dsr;
-	int pci_lsr;
-
-#if defined(CONFIG_FSL_PCIE_DISABLE_ASPM)
-	int pci_lcr;
-#endif
-
-	volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *)cfg_addr;
-	struct pci_region *reg = hose->regions + hose->region_count;
-	pci_dev_t dev = PCI_BDF(hose->first_busno, 0, 0);
-
-	/* Initialize ATMU registers based on hose regions and flags */
-	volatile pot_t *po = &pci->pot[1];	/* skip 0 */
-	volatile pit_t *pi;
-
-	u64 out_hi = 0, out_lo = -1ULL;
-	u32 pcicsrbar, pcicsrbar_sz;
-
-	pci_setup_indirect(hose, cfg_addr, cfg_data);
-
-#ifdef PEX_CCB_DIV
-	/* Configure the PCIE controller core clock ratio */
-	pci_hose_write_config_dword(hose, dev, 0x440,
-				    ((gd->bus_clk / 1000000) *
-				     (16 / PEX_CCB_DIV)) / 333);
-#endif
-	block_rev = in_be32(&pci->block_rev1);
-	if (PEX_IP_BLK_REV_2_2 <= block_rev) {
-		pi = &pci->pit[2];	/* 0xDC0 */
-	} else {
-		pi = &pci->pit[3];	/* 0xDE0 */
-	}
-
-	/* Handle setup of outbound windows first */
-	for (r = 0; r < hose->region_count; r++) {
-		unsigned long flags = hose->regions[r].flags;
-		u32 sz = (__ilog2_u64((u64)hose->regions[r].size) - 1);
-
-		flags &= PCI_REGION_SYS_MEMORY|PCI_REGION_TYPE;
-		if (flags != PCI_REGION_SYS_MEMORY) {
-			u64 start = hose->regions[r].bus_start;
-			u64 end = start + hose->regions[r].size;
-
-			out_be32(&po->powbar, hose->regions[r].phys_start >> 12);
-			out_be32(&po->potar, start >> 12);
-#ifdef CONFIG_SYS_PCI_64BIT
-			out_be32(&po->potear, start >> 44);
-#else
-			out_be32(&po->potear, 0);
-#endif
-			if (hose->regions[r].flags & PCI_REGION_IO) {
-				out_be32(&po->powar, POWAR_EN | sz |
-					POWAR_IO_READ | POWAR_IO_WRITE);
-			} else {
-				out_be32(&po->powar, POWAR_EN | sz |
-					POWAR_MEM_READ | POWAR_MEM_WRITE);
-				out_lo = min(start, out_lo);
-				out_hi = max(end, out_hi);
-			}
-			po++;
-		}
-	}
-	debug("Outbound memory range: %llx:%llx\n", out_lo, out_hi);
-
-	/* setup PCSRBAR/PEXCSRBAR */
-	pci_hose_write_config_dword(hose, dev, PCI_BASE_ADDRESS_0, 0xffffffff);
-	pci_hose_read_config_dword (hose, dev, PCI_BASE_ADDRESS_0, &pcicsrbar_sz);
-	pcicsrbar_sz = ~pcicsrbar_sz + 1;
-
-	if (out_hi < (0x100000000ull - pcicsrbar_sz) ||
-		(out_lo > 0x100000000ull))
-		pcicsrbar = 0x100000000ull - pcicsrbar_sz;
-	else
-		pcicsrbar = (out_lo - pcicsrbar_sz) & -pcicsrbar_sz;
-	pci_hose_write_config_dword(hose, dev, PCI_BASE_ADDRESS_0, pcicsrbar);
-
-	out_lo = min(out_lo, (u64)pcicsrbar);
-
-	debug("PCICSRBAR @ 0x%x\n", pcicsrbar);
-
-	pci_set_region(reg++, pcicsrbar, CONFIG_SYS_CCSRBAR_PHYS,
-			pcicsrbar_sz, PCI_REGION_SYS_MEMORY);
-	hose->region_count++;
-
-	/* see if we are a PCIe or PCI controller */
-	pcie_cap_pos = pci_hose_find_capability(hose, dev, PCI_CAP_ID_EXP);
-	pci_dcr = pcie_cap_pos + 0x08;
-	pci_dsr = pcie_cap_pos + 0x0a;
-	pci_lsr = pcie_cap_pos + 0x12;
-
-	pci_hose_read_config_byte(hose, dev, pcie_cap_pos, &pcie_cap);
-
-#ifdef CONFIG_SRIO_PCIE_BOOT_MASTER
-	/* boot from PCIE --master */
-	char *s = env_get("bootmaster");
-	char pcie[6];
-	sprintf(pcie, "PCIE%d", pci_info->pci_num);
-
-	if (s && (strcmp(s, pcie) == 0)) {
-		debug("PCIEBOOT - MASTER: Master port [ %d ] for pcie boot.\n",
-				pci_info->pci_num);
-		fsl_pcie_boot_master((pit_t *)pi);
-	} else {
-		/* inbound */
-		inbound = fsl_pci_setup_inbound_windows(hose,
-					out_lo, pcie_cap, pi);
-	}
-#else
-	/* inbound */
-	inbound = fsl_pci_setup_inbound_windows(hose, out_lo, pcie_cap, pi);
-#endif
-
-	for (r = 0; r < hose->region_count; r++)
-		debug("PCI reg:%d %016llx:%016llx %016llx %08lx\n", r,
-			(u64)hose->regions[r].phys_start,
-			(u64)hose->regions[r].bus_start,
-			(u64)hose->regions[r].size,
-			hose->regions[r].flags);
-
-	pci_register_hose(hose);
-	pciauto_config_init(hose);	/* grab pci_{mem,prefetch,io} */
-	hose->current_busno = hose->first_busno;
-
-	out_be32(&pci->pedr, 0xffffffff);	/* Clear any errors */
-	out_be32(&pci->peer, ~0x20140);	/* Enable All Error Interrupts except
-					 * - Master abort (pci)
-					 * - Master PERR (pci)
-					 * - ICCA (PCIe)
-					 */
-	pci_hose_read_config_dword(hose, dev, pci_dcr, &temp32);
-	temp32 |= 0xf000e;		/* set URR, FER, NFER (but not CER) */
-	pci_hose_write_config_dword(hose, dev, pci_dcr, temp32);
-
-#if defined(CONFIG_FSL_PCIE_DISABLE_ASPM)
-	pci_lcr = pcie_cap_pos + 0x10;
-	temp32 = 0;
-	pci_hose_read_config_dword(hose, dev, pci_lcr, &temp32);
-	temp32 &= ~0x03;		/* Disable ASPM  */
-	pci_hose_write_config_dword(hose, dev, pci_lcr, temp32);
-	udelay(1);
-#endif
-	if (pcie_cap == PCI_CAP_ID_EXP) {
-		if (block_rev >= PEX_IP_BLK_REV_3_0) {
-#define PEX_CSR0_LTSSM_MASK	0xFC
-#define PEX_CSR0_LTSSM_SHIFT	2
-			ltssm = (in_be32(&pci->pex_csr0)
-				& PEX_CSR0_LTSSM_MASK) >> PEX_CSR0_LTSSM_SHIFT;
-			enabled = (ltssm == 0x11) ? 1 : 0;
-#ifdef CONFIG_FSL_PCIE_RESET
-			int i;
-			/* assert PCIe reset */
-			setbits_be32(&pci->pdb_stat, 0x08000000);
-			(void) in_be32(&pci->pdb_stat);
-			udelay(1000);
-			/* clear PCIe reset */
-			clrbits_be32(&pci->pdb_stat, 0x08000000);
-			asm("sync;isync");
-			for (i = 0; i < 100 && ltssm < PCI_LTSSM_L0; i++) {
-				pci_hose_read_config_word(hose, dev, PCI_LTSSM,
-							  &ltssm);
-				udelay(1000);
-			}
-#endif
-		} else {
-		/* pci_hose_read_config_word(hose, dev, PCI_LTSSM, &ltssm); */
-		/* enabled = ltssm >= PCI_LTSSM_L0; */
-		pci_hose_read_config_word(hose, dev, PCI_LTSSM, &ltssm);
-		enabled = ltssm >= PCI_LTSSM_L0;
-
-#ifdef CONFIG_FSL_PCIE_RESET
-		if (ltssm == 1) {
-			int i;
-			debug("....PCIe link error. " "LTSSM=0x%02x.", ltssm);
-			/* assert PCIe reset */
-			setbits_be32(&pci->pdb_stat, 0x08000000);
-			(void) in_be32(&pci->pdb_stat);
-			udelay(100);
-			debug("  Asserting PCIe reset @%p = %x\n",
-			      &pci->pdb_stat, in_be32(&pci->pdb_stat));
-			/* clear PCIe reset */
-			clrbits_be32(&pci->pdb_stat, 0x08000000);
-			asm("sync;isync");
-			for (i=0; i<100 && ltssm < PCI_LTSSM_L0; i++) {
-				pci_hose_read_config_word(hose, dev, PCI_LTSSM,
-							&ltssm);
-				udelay(1000);
-				debug("....PCIe link error. "
-				      "LTSSM=0x%02x.\n", ltssm);
-			}
-			enabled = ltssm >= PCI_LTSSM_L0;
-
-			/* we need to re-write the bar0 since a reset will
-			 * clear it
-			 */
-			pci_hose_write_config_dword(hose, dev,
-					PCI_BASE_ADDRESS_0, pcicsrbar);
-		}
-#endif
-	}
-
-#ifdef CONFIG_SYS_P4080_ERRATUM_PCIE_A003
-		if (enabled == 0) {
-			serdes_corenet_t *srds_regs = (void *)CONFIG_SYS_FSL_CORENET_SERDES_ADDR;
-			temp32 = in_be32(&srds_regs->srdspccr0);
-
-			if ((temp32 >> 28) == 3) {
-				int i;
-
-				out_be32(&srds_regs->srdspccr0, 2 << 28);
-				setbits_be32(&pci->pdb_stat, 0x08000000);
-				in_be32(&pci->pdb_stat);
-				udelay(100);
-				clrbits_be32(&pci->pdb_stat, 0x08000000);
-				asm("sync;isync");
-				for (i=0; i < 100 && ltssm < PCI_LTSSM_L0; i++) {
-					pci_hose_read_config_word(hose, dev, PCI_LTSSM, &ltssm);
-					udelay(1000);
-				}
-				enabled = ltssm >= PCI_LTSSM_L0;
-			}
-		}
-#endif
-		if (!enabled) {
-			/* Let the user know there's no PCIe link for root
-			 * complex. for endpoint, the link may not setup, so
-			 * print undetermined.
-			 */
-			if (fsl_is_pci_agent(hose))
-				printf("undetermined, regs @ 0x%lx\n", pci_info->regs);
-			else
-				printf("no link, regs @ 0x%lx\n", pci_info->regs);
-			hose->last_busno = hose->first_busno;
-			return;
-		}
-
-		out_be32(&pci->pme_msg_det, 0xffffffff);
-		out_be32(&pci->pme_msg_int_en, 0xffffffff);
-
-		/* Print the negotiated PCIe link width */
-		pci_hose_read_config_word(hose, dev, pci_lsr, &temp16);
-		printf("x%d gen%d, regs @ 0x%lx\n", (temp16 & 0x3f0) >> 4,
-		       (temp16 & 0xf), pci_info->regs);
-
-		hose->current_busno++; /* Start scan with secondary */
-		pciauto_prescan_setup_bridge(hose, dev, hose->current_busno);
-	}
-
-#ifdef CONFIG_SYS_FSL_ERRATUM_A007815
-	/* The Read-Only Write Enable bit defaults to 1 instead of 0.
-	 * Set to 0 to protect the read-only registers.
-	 */
-	clrbits_be32(&pci->dbi_ro_wr_en, 0x01);
-#endif
-
-	/* Use generic setup_device to initialize standard pci regs,
-	 * but do not allocate any windows since any BAR found (such
-	 * as PCSRBAR) is not in this cpu's memory space.
-	 */
-	pciauto_setup_device(hose, dev, 0, hose->pci_mem,
-			     hose->pci_prefetch, hose->pci_io);
-
-	if (inbound) {
-		pci_hose_read_config_word(hose, dev, PCI_COMMAND, &temp16);
-		pci_hose_write_config_word(hose, dev, PCI_COMMAND,
-					   temp16 | PCI_COMMAND_MEMORY);
-	}
-
-#ifndef CONFIG_PCI_NOSCAN
-	if (!fsl_is_pci_agent(hose)) {
-		debug("           Scanning PCI bus %02x\n",
-			hose->current_busno);
-		hose->last_busno = pci_hose_scan_bus(hose, hose->current_busno);
-	} else {
-		debug("           Not scanning PCI bus %02x. PI=%x\n",
-			hose->current_busno, temp8);
-		hose->last_busno = hose->current_busno;
-	}
-
-	/* if we are PCIe - update limit regs and subordinate busno
-	 * for the virtual P2P bridge
-	 */
-	if (pcie_cap == PCI_CAP_ID_EXP) {
-		pciauto_postscan_setup_bridge(hose, dev, hose->last_busno);
-	}
-#else
-	hose->last_busno = hose->current_busno;
-#endif
-
-	/* Clear all error indications */
-	if (pcie_cap == PCI_CAP_ID_EXP)
-		out_be32(&pci->pme_msg_det, 0xffffffff);
-	out_be32(&pci->pedr, 0xffffffff);
-
-	pci_hose_read_config_word(hose, dev, pci_dsr, &temp16);
-	if (temp16) {
-		pci_hose_write_config_word(hose, dev, pci_dsr, 0xffff);
-	}
-
-	pci_hose_read_config_word (hose, dev, PCI_SEC_STATUS, &temp16);
-	if (temp16) {
-		pci_hose_write_config_word(hose, dev, PCI_SEC_STATUS, 0xffff);
-	}
-}
-
-int fsl_is_pci_agent(struct pci_controller *hose)
-{
-	int pcie_cap_pos;
-	u8 pcie_cap;
-	pci_dev_t dev = PCI_BDF(hose->first_busno, 0, 0);
-
-	pcie_cap_pos = pci_hose_find_capability(hose, dev, PCI_CAP_ID_EXP);
-	pci_hose_read_config_byte(hose, dev, pcie_cap_pos, &pcie_cap);
-	if (pcie_cap == PCI_CAP_ID_EXP) {
-		u8 header_type;
-
-		pci_hose_read_config_byte(hose, dev, PCI_HEADER_TYPE,
-					  &header_type);
-		return (header_type & 0x7f) == PCI_HEADER_TYPE_NORMAL;
-	} else {
-		u8 prog_if;
-
-		pci_hose_read_config_byte(hose, dev, PCI_CLASS_PROG, &prog_if);
-		/* Programming Interface (PCI_CLASS_PROG)
-		 * 0 == pci host or pcie root-complex,
-		 * 1 == pci agent or pcie end-point
-		 */
-		return (prog_if == FSL_PROG_IF_AGENT);
-	}
-}
-
-int fsl_pci_init_port(struct fsl_pci_info *pci_info,
-			struct pci_controller *hose, int busno)
-{
-	volatile ccsr_fsl_pci_t *pci;
-	struct pci_region *r;
-	pci_dev_t dev = PCI_BDF(busno,0,0);
-	int pcie_cap_pos;
-	u8 pcie_cap;
-
-	pci = (ccsr_fsl_pci_t *) pci_info->regs;
-
-	/* on non-PCIe controllers we don't have pme_msg_det so this code
-	 * should do nothing since the read will return 0
-	 */
-	if (in_be32(&pci->pme_msg_det)) {
-		out_be32(&pci->pme_msg_det, 0xffffffff);
-		debug (" with errors.  Clearing.  Now 0x%08x",
-			pci->pme_msg_det);
-	}
-
-	r = hose->regions + hose->region_count;
-
-	/* outbound memory */
-	pci_set_region(r++,
-			pci_info->mem_bus,
-			pci_info->mem_phys,
-			pci_info->mem_size,
-			PCI_REGION_MEM);
-
-	/* outbound io */
-	pci_set_region(r++,
-			pci_info->io_bus,
-			pci_info->io_phys,
-			pci_info->io_size,
-			PCI_REGION_IO);
-
-	hose->region_count = r - hose->regions;
-	hose->first_busno = busno;
-
-	fsl_pci_init(hose, pci_info);
-
-	if (fsl_is_pci_agent(hose)) {
-		fsl_pci_config_unlock(hose);
-		hose->last_busno = hose->first_busno;
-#ifdef CONFIG_SRIO_PCIE_BOOT_MASTER
-	} else {
-		/* boot from PCIE --master releases slave's core 0 */
-		char *s = env_get("bootmaster");
-		char pcie[6];
-		sprintf(pcie, "PCIE%d", pci_info->pci_num);
-
-		if (s && (strcmp(s, pcie) == 0))
-			fsl_pcie_boot_master_release_slave(pci_info->pci_num);
-#endif
-	}
-
-	pcie_cap_pos = pci_hose_find_capability(hose, dev, PCI_CAP_ID_EXP);
-	pci_hose_read_config_byte(hose, dev, pcie_cap_pos, &pcie_cap);
-	printf("PCI%s%x: Bus %02x - %02x\n", pcie_cap == PCI_CAP_ID_EXP ?
-		"e" : "", pci_info->pci_num,
-		hose->first_busno, hose->last_busno);
-	return(hose->last_busno + 1);
-}
-
-/* Enable inbound PCI config cycles for agent/endpoint interface */
-void fsl_pci_config_unlock(struct pci_controller *hose)
-{
-	pci_dev_t dev = PCI_BDF(hose->first_busno,0,0);
-	int pcie_cap_pos;
-	u8 pcie_cap;
-	u16 pbfr;
-
-	if (!fsl_is_pci_agent(hose))
-		return;
-
-	pcie_cap_pos = pci_hose_find_capability(hose, dev, PCI_CAP_ID_EXP);
-	pci_hose_read_config_byte(hose, dev, pcie_cap_pos, &pcie_cap);
-	if (pcie_cap != 0x0) {
-		ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *)hose->cfg_addr;
-		u32 block_rev = in_be32(&pci->block_rev1);
-		/* PCIe - set CFG_READY bit of Configuration Ready Register */
-		if (block_rev >= PEX_IP_BLK_REV_3_0)
-			setbits_be32(&pci->config, FSL_PCIE_V3_CFG_RDY);
-		else
-			pci_hose_write_config_byte(hose, dev,
-						   FSL_PCIE_CFG_RDY, 0x1);
-	} else {
-		/* PCI - clear ACL bit of PBFR */
-		pci_hose_read_config_word(hose, dev, FSL_PCI_PBFR, &pbfr);
-		pbfr &= ~0x20;
-		pci_hose_write_config_word(hose, dev, FSL_PCI_PBFR, pbfr);
-	}
-}
-
-#if defined(CONFIG_PCIE1) || defined(CONFIG_PCIE2) || \
-    defined(CONFIG_PCIE3) || defined(CONFIG_PCIE4)
-int fsl_configure_pcie(struct fsl_pci_info *info,
-			struct pci_controller *hose,
-			const char *connected, int busno)
-{
-	int is_endpoint;
-
-	set_next_law(info->mem_phys, law_size_bits(info->mem_size), info->law);
-	set_next_law(info->io_phys, law_size_bits(info->io_size), info->law);
-
-	is_endpoint = fsl_setup_hose(hose, info->regs);
-	printf("PCIe%u: %s", info->pci_num,
-		is_endpoint ? "Endpoint" : "Root Complex");
-	if (connected)
-		printf(" of %s", connected);
-	puts(", ");
-
-	return fsl_pci_init_port(info, hose, busno);
-}
-
-#if defined(CONFIG_FSL_CORENET)
-#ifdef CONFIG_SYS_FSL_QORIQ_CHASSIS2
-	#define _DEVDISR_PCIE1 FSL_CORENET_DEVDISR3_PCIE1
-	#define _DEVDISR_PCIE2 FSL_CORENET_DEVDISR3_PCIE2
-	#define _DEVDISR_PCIE3 FSL_CORENET_DEVDISR3_PCIE3
-	#define _DEVDISR_PCIE4 FSL_CORENET_DEVDISR3_PCIE4
-#else
-	#define _DEVDISR_PCIE1 FSL_CORENET_DEVDISR_PCIE1
-	#define _DEVDISR_PCIE2 FSL_CORENET_DEVDISR_PCIE2
-	#define _DEVDISR_PCIE3 FSL_CORENET_DEVDISR_PCIE3
-	#define _DEVDISR_PCIE4 FSL_CORENET_DEVDISR_PCIE4
-#endif
-	#define CONFIG_SYS_MPC8xxx_GUTS_ADDR CONFIG_SYS_MPC85xx_GUTS_ADDR
-#elif defined(CONFIG_MPC85xx)
-	#define _DEVDISR_PCIE1 MPC85xx_DEVDISR_PCIE
-	#define _DEVDISR_PCIE2 MPC85xx_DEVDISR_PCIE2
-	#define _DEVDISR_PCIE3 MPC85xx_DEVDISR_PCIE3
-	#define _DEVDISR_PCIE4 0
-	#define CONFIG_SYS_MPC8xxx_GUTS_ADDR CONFIG_SYS_MPC85xx_GUTS_ADDR
-#elif defined(CONFIG_MPC86xx)
-	#define _DEVDISR_PCIE1 MPC86xx_DEVDISR_PCIE1
-	#define _DEVDISR_PCIE2 MPC86xx_DEVDISR_PCIE2
-	#define _DEVDISR_PCIE3 0
-	#define _DEVDISR_PCIE4 0
-	#define CONFIG_SYS_MPC8xxx_GUTS_ADDR \
-		(&((immap_t *)CONFIG_SYS_IMMR)->im_gur)
-#else
-#error "No defines for DEVDISR_PCIE"
-#endif
-
-/* Implement a dummy function for those platforms w/o SERDES */
-static const char *__board_serdes_name(enum srds_prtcl device)
-{
-	switch (device) {
-#ifdef CONFIG_SYS_PCIE1_NAME
-	case PCIE1:
-		return CONFIG_SYS_PCIE1_NAME;
-#endif
-#ifdef CONFIG_SYS_PCIE2_NAME
-	case PCIE2:
-		return CONFIG_SYS_PCIE2_NAME;
-#endif
-#ifdef CONFIG_SYS_PCIE3_NAME
-	case PCIE3:
-		return CONFIG_SYS_PCIE3_NAME;
-#endif
-#ifdef CONFIG_SYS_PCIE4_NAME
-	case PCIE4:
-		return CONFIG_SYS_PCIE4_NAME;
-#endif
-	default:
-		return NULL;
-	}
-
-	return NULL;
-}
-
-__attribute__((weak, alias("__board_serdes_name"))) const char *
-board_serdes_name(enum srds_prtcl device);
-
-static u32 devdisr_mask[] = {
-	_DEVDISR_PCIE1,
-	_DEVDISR_PCIE2,
-	_DEVDISR_PCIE3,
-	_DEVDISR_PCIE4,
-};
-
-int fsl_pcie_init_ctrl(int busno, u32 devdisr, enum srds_prtcl dev,
-			struct fsl_pci_info *pci_info)
-{
-	struct pci_controller *hose;
-	int num = dev - PCIE1;
-
-	hose = calloc(1, sizeof(struct pci_controller));
-	if (!hose)
-		return busno;
-
-	if (is_serdes_configured(dev) && !(devdisr & devdisr_mask[num])) {
-		busno = fsl_configure_pcie(pci_info, hose,
-				board_serdes_name(dev), busno);
-	} else {
-		printf("PCIe%d: disabled\n", num + 1);
-	}
-
-	return busno;
-}
-
-int fsl_pcie_init_board(int busno)
-{
-	struct fsl_pci_info pci_info;
-	ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC8xxx_GUTS_ADDR;
-	u32 devdisr;
-	u32 *addr;
-
-#ifdef CONFIG_SYS_FSL_QORIQ_CHASSIS2
-	addr = &gur->devdisr3;
-#else
-	addr = &gur->devdisr;
-#endif
-	devdisr = in_be32(addr);
-
-#ifdef CONFIG_PCIE1
-	SET_STD_PCIE_INFO(pci_info, 1);
-	busno = fsl_pcie_init_ctrl(busno, devdisr, PCIE1, &pci_info);
-#else
-	setbits_be32(addr, _DEVDISR_PCIE1); /* disable */
-#endif
-
-#ifdef CONFIG_PCIE2
-	SET_STD_PCIE_INFO(pci_info, 2);
-	busno = fsl_pcie_init_ctrl(busno, devdisr, PCIE2, &pci_info);
-#else
-	setbits_be32(addr, _DEVDISR_PCIE2); /* disable */
-#endif
-
-#ifdef CONFIG_PCIE3
-	SET_STD_PCIE_INFO(pci_info, 3);
-	busno = fsl_pcie_init_ctrl(busno, devdisr, PCIE3, &pci_info);
-#else
-	setbits_be32(addr, _DEVDISR_PCIE3); /* disable */
-#endif
-
-#ifdef CONFIG_PCIE4
-	SET_STD_PCIE_INFO(pci_info, 4);
-	busno = fsl_pcie_init_ctrl(busno, devdisr, PCIE4, &pci_info);
-#else
-	setbits_be32(addr, _DEVDISR_PCIE4); /* disable */
-#endif
-
-	return busno;
-}
-#else
-int fsl_pcie_init_ctrl(int busno, u32 devdisr, enum srds_prtcl dev,
-			struct fsl_pci_info *pci_info)
-{
-	return busno;
-}
-
-int fsl_pcie_init_board(int busno)
-{
-	return busno;
-}
-#endif
-
-#ifdef CONFIG_OF_BOARD_SETUP
-#include <linux/libfdt.h>
-#include <fdt_support.h>
-
-void ft_fsl_pci_setup(void *blob, const char *pci_compat,
-			unsigned long ctrl_addr)
-{
-	int off;
-	u32 bus_range[2];
-	phys_addr_t p_ctrl_addr = (phys_addr_t)ctrl_addr;
-	struct pci_controller *hose;
-
-	hose = find_hose_by_cfg_addr((void *)(ctrl_addr));
-
-	/* convert ctrl_addr to true physical address */
-	p_ctrl_addr = (phys_addr_t)ctrl_addr - CONFIG_SYS_CCSRBAR;
-	p_ctrl_addr += CONFIG_SYS_CCSRBAR_PHYS;
-
-	off = fdt_node_offset_by_compat_reg(blob, pci_compat, p_ctrl_addr);
-
-	if (off < 0)
-		return;
-
-	/* We assume a cfg_addr not being set means we didn't setup the controller */
-	if ((hose == NULL) || (hose->cfg_addr == NULL)) {
-		fdt_del_node(blob, off);
-	} else {
-		bus_range[0] = 0;
-		bus_range[1] = hose->last_busno - hose->first_busno;
-		fdt_setprop(blob, off, "bus-range", &bus_range[0], 2*4);
-		fdt_pci_dma_ranges(blob, off, hose);
-	}
-}
-#endif
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 02/11] Finish converting CONFIG_WATCHDOG, HW_WATCHDOG and WDT to Kconfig
  2021-12-13  3:12 [PATCH 01/11] pci: Remove unused FSL_PCI_INIT code Tom Rini
@ 2021-12-13  3:12 ` Tom Rini
  2021-12-28 12:56   ` Tom Rini
  2021-12-28 12:56   ` Tom Rini
  2021-12-13  3:12 ` [PATCH 03/11] Convert CONFIG_WATCHDOG_TIMEOUT_MSECS " Tom Rini
                   ` (9 subsequent siblings)
  10 siblings, 2 replies; 23+ messages in thread
From: Tom Rini @ 2021-12-13  3:12 UTC (permalink / raw)
  To: u-boot

Because of how these symbols work, and the remaining board config.h file
uses, we need to do these at the same time.  In some cases we just get
to move rather directly to the defconfigs.  A few cases require manual
intervention.

For the case of the eb_cpu5282 we need to select HW_WATCHDOG for the
target, given how it's implemented.

For the cases of m53menlo, dh_imx6, display5, and display5_factory we
disable SPL watchdog support as the particular combination of options
they want would require either more symbols or enabling SPL_DM.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 README                                 | 14 --------------
 arch/m68k/Kconfig                      |  1 +
 board/liebherr/display5/spl.c          |  2 ++
 configs/astro_mcf5373l_defconfig       |  1 +
 configs/dh_imx6_defconfig              |  1 -
 configs/display5_defconfig             |  1 -
 configs/display5_factory_defconfig     |  1 -
 configs/ids8313_defconfig              |  1 +
 configs/m53menlo_defconfig             |  1 -
 include/configs/M5208EVBE.h            |  1 -
 include/configs/M5235EVB.h             |  1 -
 include/configs/M5249EVB.h             |  2 --
 include/configs/M5253DEMO.h            |  2 --
 include/configs/M5272C3.h              |  1 -
 include/configs/M53017EVB.h            |  1 -
 include/configs/M5329EVB.h             |  1 -
 include/configs/M5373EVB.h             |  1 -
 include/configs/MPC837XERDB.h          |  2 --
 include/configs/MPC8540ADS.h           |  2 --
 include/configs/MPC8548CDS.h           |  2 --
 include/configs/MPC8560ADS.h           |  2 --
 include/configs/P1010RDB.h             |  2 --
 include/configs/astro_mcf5373l.h       |  1 -
 include/configs/cobra5272.h            |  1 -
 include/configs/dh_imx6.h              |  7 -------
 include/configs/display5.h             |  7 -------
 include/configs/eb_cpu5282.h           |  2 --
 include/configs/ids8313.h              |  1 -
 include/configs/m53menlo.h             |  5 -----
 include/configs/p1_p2_rdb_pc.h         |  2 --
 include/configs/socfpga_soc64_common.h |  1 -
 include/configs/socrates.h             |  2 --
 32 files changed, 5 insertions(+), 67 deletions(-)

diff --git a/README b/README
index dc377ca1afec..7d46c567a3f9 100644
--- a/README
+++ b/README
@@ -668,20 +668,6 @@ The following options need to be configured:
 		this option (see include/fdtdec.h file).
 
 - Watchdog:
-		CONFIG_WATCHDOG
-		If this variable is defined, it enables watchdog
-		support for the SoC. There must be support in the SoC
-		specific code for a watchdog. For the 8xx
-		CPUs, the SIU Watchdog feature is enabled in the SYPCR
-		register.  When supported for a specific SoC is
-		available, then no further board specific code should
-		be needed to use it.
-
-		CONFIG_HW_WATCHDOG
-		When using a watchdog circuitry external to the used
-		SoC, then define this variable and provide board
-		specific code for the "hw_watchdog_reset" function.
-
 		CONFIG_SYS_WATCHDOG_FREQ
 		Some platforms automatically call WATCHDOG_RESET()
 		from the timer interrupt handler every
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 1ab37cc9fc3d..97c0b7b834e7 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -128,6 +128,7 @@ config TARGET_COBRA5272
 config TARGET_EB_CPU5282
 	bool "Support eb_cpu5282"
 	select M5282
+	select HW_WATCHDOG
 
 config TARGET_M5208EVBE
 	bool "Support M5208EVBE"
diff --git a/board/liebherr/display5/spl.c b/board/liebherr/display5/spl.c
index d5fe336d22de..5c1af1a7720f 100644
--- a/board/liebherr/display5/spl.c
+++ b/board/liebherr/display5/spl.c
@@ -327,8 +327,10 @@ void board_init_f(ulong dummy)
 	displ5_set_iomux_misc_spl();
 
 	/* Initialize and reset WDT in SPL */
+#ifdef CONFIG_SPL_WATCHDOG
 	hw_watchdog_init();
 	WATCHDOG_RESET();
+#endif
 
 	/* load/boot image from boot device */
 	board_init_r(NULL, 0);
diff --git a/configs/astro_mcf5373l_defconfig b/configs/astro_mcf5373l_defconfig
index d26628aa2baf..a97c4ffd4881 100644
--- a/configs/astro_mcf5373l_defconfig
+++ b/configs/astro_mcf5373l_defconfig
@@ -40,3 +40,4 @@ CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_MCFUART=y
+CONFIG_WATCHDOG=y
diff --git a/configs/dh_imx6_defconfig b/configs/dh_imx6_defconfig
index 1f63bc8467df..d62bd961decc 100644
--- a/configs/dh_imx6_defconfig
+++ b/configs/dh_imx6_defconfig
@@ -37,7 +37,6 @@ CONFIG_BOOTDELAY=3
 CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
 CONFIG_SPL_SPI_LOAD=y
 CONFIG_SYS_SPI_U_BOOT_OFFS=0x11400
-CONFIG_SPL_WATCHDOG=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_UNZIP=y
 CONFIG_CMD_DFU=y
diff --git a/configs/display5_defconfig b/configs/display5_defconfig
index 145b28ee9813..26af4a6bfee3 100644
--- a/configs/display5_defconfig
+++ b/configs/display5_defconfig
@@ -45,7 +45,6 @@ CONFIG_SPL_I2C=y
 CONFIG_SPL_OS_BOOT=y
 CONFIG_SPL_SPI_LOAD=y
 CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000
-CONFIG_SPL_WATCHDOG=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="display5 > "
 CONFIG_CMD_BOOTZ=y
diff --git a/configs/display5_factory_defconfig b/configs/display5_factory_defconfig
index e0b36f4cdbfa..218a33d9a02b 100644
--- a/configs/display5_factory_defconfig
+++ b/configs/display5_factory_defconfig
@@ -43,7 +43,6 @@ CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000
 CONFIG_SPL_USB_HOST=y
 CONFIG_SPL_USB_GADGET=y
 CONFIG_SPL_USB_SDP_SUPPORT=y
-CONFIG_SPL_WATCHDOG=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="display5 factory > "
 CONFIG_CMD_BOOTZ=y
diff --git a/configs/ids8313_defconfig b/configs/ids8313_defconfig
index 4f77fd7fe3df..006c80cc7a0a 100644
--- a/configs/ids8313_defconfig
+++ b/configs/ids8313_defconfig
@@ -199,4 +199,5 @@ CONFIG_TSEC_ENET=y
 # CONFIG_PCI is not set
 CONFIG_RTC_PCF8563=y
 CONFIG_SYS_NS16550=y
+CONFIG_WATCHDOG=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/m53menlo_defconfig b/configs/m53menlo_defconfig
index 2e5105053a54..ac5afe6b1a85 100644
--- a/configs/m53menlo_defconfig
+++ b/configs/m53menlo_defconfig
@@ -36,7 +36,6 @@ CONFIG_PREBOOT="run try_bootscript"
 CONFIG_BOARD_LATE_INIT=y
 CONFIG_SPL_BOARD_INIT=y
 CONFIG_SPL_NAND_SUPPORT=y
-CONFIG_SPL_WATCHDOG=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_ASKENV=y
 CONFIG_CMD_GREPENV=y
diff --git a/include/configs/M5208EVBE.h b/include/configs/M5208EVBE.h
index 6a69ac45aee4..717e3e4415d5 100644
--- a/include/configs/M5208EVBE.h
+++ b/include/configs/M5208EVBE.h
@@ -15,7 +15,6 @@
  */
 #define CONFIG_SYS_UART_PORT		(0)
 
-#undef CONFIG_WATCHDOG
 #define CONFIG_WATCHDOG_TIMEOUT		5000
 
 #ifdef CONFIG_MCFFEC
diff --git a/include/configs/M5235EVB.h b/include/configs/M5235EVB.h
index 7421f3b7605d..2e5220f17a64 100644
--- a/include/configs/M5235EVB.h
+++ b/include/configs/M5235EVB.h
@@ -20,7 +20,6 @@
 
 #define CONFIG_SYS_UART_PORT		(0)
 
-#undef CONFIG_WATCHDOG
 #define CONFIG_WATCHDOG_TIMEOUT	5000	/* timeout in milliseconds, max timeout is 6.71sec */
 
 /*
diff --git a/include/configs/M5249EVB.h b/include/configs/M5249EVB.h
index 7ee0ec6a4a89..00892ec44dcd 100644
--- a/include/configs/M5249EVB.h
+++ b/include/configs/M5249EVB.h
@@ -21,8 +21,6 @@
 
 #define CONFIG_SYS_UART_PORT		(0)
 
-#undef  CONFIG_WATCHDOG
-
 #undef CONFIG_MONITOR_IS_IN_RAM		/* no pre-loader required!!! ;-) */
 
 /*
diff --git a/include/configs/M5253DEMO.h b/include/configs/M5253DEMO.h
index e9a792292193..ff290964252a 100644
--- a/include/configs/M5253DEMO.h
+++ b/include/configs/M5253DEMO.h
@@ -12,8 +12,6 @@
 
 #define CONFIG_SYS_UART_PORT		(0)
 
-#undef CONFIG_WATCHDOG		/* disable watchdog */
-
 
 /* Configuration for environment
  * Environment is embedded in u-boot in the second sector of the flash
diff --git a/include/configs/M5272C3.h b/include/configs/M5272C3.h
index 2121b294fb54..e814a2924c63 100644
--- a/include/configs/M5272C3.h
+++ b/include/configs/M5272C3.h
@@ -20,7 +20,6 @@
 
 #define CONFIG_SYS_UART_PORT		(0)
 
-#undef CONFIG_WATCHDOG
 #define CONFIG_WATCHDOG_TIMEOUT 10000	/* timeout in milliseconds */
 
 #undef CONFIG_MONITOR_IS_IN_RAM	/* define if monitor is started from a pre-loader */
diff --git a/include/configs/M53017EVB.h b/include/configs/M53017EVB.h
index 7b33677c551d..58b75b217e11 100644
--- a/include/configs/M53017EVB.h
+++ b/include/configs/M53017EVB.h
@@ -20,7 +20,6 @@
 
 #define CONFIG_SYS_UART_PORT		(0)
 
-#undef CONFIG_WATCHDOG
 #define CONFIG_WATCHDOG_TIMEOUT		5000
 
 #define CONFIG_SYS_UNIFY_CACHE
diff --git a/include/configs/M5329EVB.h b/include/configs/M5329EVB.h
index 19d8cfe32173..f172db091736 100644
--- a/include/configs/M5329EVB.h
+++ b/include/configs/M5329EVB.h
@@ -20,7 +20,6 @@
 
 #define CONFIG_SYS_UART_PORT		(0)
 
-#undef CONFIG_WATCHDOG
 #define CONFIG_WATCHDOG_TIMEOUT	5000	/* timeout in milliseconds, max timeout is 6.71sec */
 
 #define CONFIG_SYS_UNIFY_CACHE
diff --git a/include/configs/M5373EVB.h b/include/configs/M5373EVB.h
index e2ddc4893e77..ddcd7521cf7c 100644
--- a/include/configs/M5373EVB.h
+++ b/include/configs/M5373EVB.h
@@ -22,7 +22,6 @@
 
 #define CONFIG_SYS_UART_PORT		(0)
 
-#undef CONFIG_WATCHDOG
 #define CONFIG_WATCHDOG_TIMEOUT	3360	/* timeout in ms, max is 3.36 sec */
 
 #define CONFIG_SYS_UNIFY_CACHE
diff --git a/include/configs/MPC837XERDB.h b/include/configs/MPC837XERDB.h
index 9aeab7097aef..9a34e5444b1c 100644
--- a/include/configs/MPC837XERDB.h
+++ b/include/configs/MPC837XERDB.h
@@ -302,8 +302,6 @@
  */
 #define CONFIG_BOOTP_BOOTFILESIZE
 
-#undef CONFIG_WATCHDOG		/* watchdog disabled */
-
 #ifdef CONFIG_MMC
 #define CONFIG_FSL_ESDHC_PIN_MUX
 #define CONFIG_SYS_FSL_ESDHC_ADDR	CONFIG_SYS_MPC83xx_ESDHC_ADDR
diff --git a/include/configs/MPC8540ADS.h b/include/configs/MPC8540ADS.h
index ab029aab64fe..bedb12b56ec7 100644
--- a/include/configs/MPC8540ADS.h
+++ b/include/configs/MPC8540ADS.h
@@ -266,8 +266,6 @@
  */
 #define CONFIG_BOOTP_BOOTFILESIZE
 
-#undef CONFIG_WATCHDOG			/* watchdog disabled */
-
 /*
  * Miscellaneous configurable options
  */
diff --git a/include/configs/MPC8548CDS.h b/include/configs/MPC8548CDS.h
index 349b4860ef8c..abf3b513a830 100644
--- a/include/configs/MPC8548CDS.h
+++ b/include/configs/MPC8548CDS.h
@@ -384,8 +384,6 @@ extern unsigned long get_clock_freq(void);
  */
 #define CONFIG_BOOTP_BOOTFILESIZE
 
-#undef CONFIG_WATCHDOG			/* watchdog disabled */
-
 /*
  * Miscellaneous configurable options
  */
diff --git a/include/configs/MPC8560ADS.h b/include/configs/MPC8560ADS.h
index 2167dcd4444c..d66acd1efa83 100644
--- a/include/configs/MPC8560ADS.h
+++ b/include/configs/MPC8560ADS.h
@@ -253,8 +253,6 @@
  */
 #define CONFIG_BOOTP_BOOTFILESIZE
 
-#undef CONFIG_WATCHDOG			/* watchdog disabled */
-
 /*
  * Miscellaneous configurable options
  */
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index e09b9a4187f7..297246a0bc3d 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -595,8 +595,6 @@ extern unsigned long get_sdram_size(void);
 #define CONFIG_LOADS_ECHO		/* echo on for serial download */
 #define CONFIG_SYS_LOADS_BAUD_CHANGE	/* allow baudrate change */
 
-#undef CONFIG_WATCHDOG			/* watchdog disabled */
-
 #if defined(CONFIG_MMC) || defined(CONFIG_USB_EHCI_HCD) \
 		 || defined(CONFIG_FSL_SATA)
 #endif
diff --git a/include/configs/astro_mcf5373l.h b/include/configs/astro_mcf5373l.h
index 2e7927bc3714..1af343899c60 100644
--- a/include/configs/astro_mcf5373l.h
+++ b/include/configs/astro_mcf5373l.h
@@ -91,7 +91,6 @@
  */
 
 #ifndef CONFIG_MONITOR_IS_IN_RAM
-#define CONFIG_WATCHDOG
 #define CONFIG_WATCHDOG_TIMEOUT 3355	/* timeout in milliseconds */
 #endif
 
diff --git a/include/configs/cobra5272.h b/include/configs/cobra5272.h
index be62caabb5a6..3e19e99c2483 100644
--- a/include/configs/cobra5272.h
+++ b/include/configs/cobra5272.h
@@ -54,7 +54,6 @@
  */
 
 #if 0
-#define CONFIG_WATCHDOG
 #define CONFIG_WATCHDOG_TIMEOUT 10000	/* timeout in milliseconds */
 #endif
 
diff --git a/include/configs/dh_imx6.h b/include/configs/dh_imx6.h
index 3233bf16a5d2..8b8cd4c31b40 100644
--- a/include/configs/dh_imx6.h
+++ b/include/configs/dh_imx6.h
@@ -64,13 +64,6 @@
 #endif
 #endif
 
-/* Watchdog */
-#if defined(CONFIG_SPL_BUILD)
-#undef CONFIG_WDT
-#undef CONFIG_WATCHDOG
-#define CONFIG_HW_WATCHDOG
-#endif
-
 #ifndef CONFIG_SPL_BUILD
 #define CONFIG_EXTRA_ENV_SETTINGS	\
 	"console=ttymxc0,115200\0"	\
diff --git a/include/configs/display5.h b/include/configs/display5.h
index 8633efbd6c17..38ac86928929 100644
--- a/include/configs/display5.h
+++ b/include/configs/display5.h
@@ -314,13 +314,6 @@
 #define CONFIG_SYS_INIT_SP_ADDR \
 	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
 
-/* Watchdog */
-#if defined(CONFIG_SPL_BUILD)
-#undef CONFIG_WDT
-#undef CONFIG_WATCHDOG
-#define CONFIG_HW_WATCHDOG
-#endif
-
 /* ENV config */
 #ifdef CONFIG_ENV_IS_IN_SPI_FLASH
 /* The 0x120000 value corresponds to above SPI-NOR memory MAP */
diff --git a/include/configs/eb_cpu5282.h b/include/configs/eb_cpu5282.h
index 6a32bc649a5a..bf1cfc3addb8 100644
--- a/include/configs/eb_cpu5282.h
+++ b/include/configs/eb_cpu5282.h
@@ -25,8 +25,6 @@
 #define CONFIG_BOOT_RETRY_TIME	-1
 #define CONFIG_RESET_TO_RETRY
 
-#define CONFIG_HW_WATCHDOG
-
 #define STATUS_LED_ACTIVE		0
 
 /*----------------------------------------------------------------------*
diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h
index 49f5d68892ed..c88c72dfddab 100644
--- a/include/configs/ids8313.h
+++ b/include/configs/ids8313.h
@@ -153,7 +153,6 @@
 /*
  * HW-Watchdog
  */
-#define CONFIG_WATCHDOG		1
 #define CONFIG_SYS_WATCHDOG_VALUE	0xFFFF
 
 /*
diff --git a/include/configs/m53menlo.h b/include/configs/m53menlo.h
index 2844553067cf..124aab0eff08 100644
--- a/include/configs/m53menlo.h
+++ b/include/configs/m53menlo.h
@@ -204,9 +204,4 @@
 		"fi ; "							\
 		"fi\0"
 
-#if defined(CONFIG_SPL_BUILD)
-#undef CONFIG_WATCHDOG
-#define CONFIG_HW_WATCHDOG
-#endif
-
 #endif	/* __M53MENLO_CONFIG_H__ */
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index a2958e78e4c1..b31e11d08586 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -545,8 +545,6 @@
 #define CONFIG_SYS_FSL_ESDHC_ADDR	CONFIG_SYS_MPC85xx_ESDHC_ADDR
 #endif
 
-#undef CONFIG_WATCHDOG	/* watchdog disabled */
-
 /*
  * Miscellaneous configurable options
  */
diff --git a/include/configs/socfpga_soc64_common.h b/include/configs/socfpga_soc64_common.h
index aa2c03247672..928582ab8cfc 100644
--- a/include/configs/socfpga_soc64_common.h
+++ b/include/configs/socfpga_soc64_common.h
@@ -147,7 +147,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
  * L4 Watchdog
  */
 #ifndef CONFIG_SPL_BUILD
-#undef CONFIG_HW_WATCHDOG
 #undef CONFIG_DESIGNWARE_WATCHDOG
 #endif
 #define CONFIG_DW_WDT_BASE		SOCFPGA_L4WD0_ADDRESS
diff --git a/include/configs/socrates.h b/include/configs/socrates.h
index b7296daa3747..5052c72f54b6 100644
--- a/include/configs/socrates.h
+++ b/include/configs/socrates.h
@@ -181,8 +181,6 @@
  */
 #define CONFIG_BOOTP_BOOTFILESIZE
 
-#undef CONFIG_WATCHDOG			/* watchdog disabled		*/
-
 /*
  * Miscellaneous configurable options
  */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 03/11] Convert CONFIG_WATCHDOG_TIMEOUT_MSECS to Kconfig
  2021-12-13  3:12 [PATCH 01/11] pci: Remove unused FSL_PCI_INIT code Tom Rini
  2021-12-13  3:12 ` [PATCH 02/11] Finish converting CONFIG_WATCHDOG, HW_WATCHDOG and WDT to Kconfig Tom Rini
@ 2021-12-13  3:12 ` Tom Rini
  2021-12-28 12:56   ` Tom Rini
  2021-12-13  3:12 ` [PATCH 04/11] Convert CONFIG_SYS_MEMTEST_START et al " Tom Rini
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 23+ messages in thread
From: Tom Rini @ 2021-12-13  3:12 UTC (permalink / raw)
  To: u-boot

This converts the following to Kconfig:
   CONFIG_WATCHDOG_TIMEOUT_MSECS

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 configs/socfpga_secu1_defconfig        | 1 +
 include/configs/socfpga_arria5_secu1.h | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/configs/socfpga_secu1_defconfig b/configs/socfpga_secu1_defconfig
index 3c53d95c52c7..f7bdb906bca3 100644
--- a/configs/socfpga_secu1_defconfig
+++ b/configs/socfpga_secu1_defconfig
@@ -93,6 +93,7 @@ CONFIG_RTC_M41T62=y
 CONFIG_SPI=y
 CONFIG_SPI_MEM=y
 CONFIG_DESIGNWARE_SPI=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=60000
 CONFIG_DESIGNWARE_WATCHDOG=y
 CONFIG_WDT=y
 # CONFIG_GZIP is not set
diff --git a/include/configs/socfpga_arria5_secu1.h b/include/configs/socfpga_arria5_secu1.h
index 9ce5fa62d560..0935eaedacb6 100644
--- a/include/configs/socfpga_arria5_secu1.h
+++ b/include/configs/socfpga_arria5_secu1.h
@@ -95,7 +95,4 @@
 /* The rest of the configuration is shared */
 #include <configs/socfpga_common.h>
 
-#undef CONFIG_WATCHDOG_TIMEOUT_MSECS
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	60000
-
 #endif	/* __CONFIG_SOCFPGA_SECU1_H__ */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 04/11] Convert CONFIG_SYS_MEMTEST_START et al to Kconfig
  2021-12-13  3:12 [PATCH 01/11] pci: Remove unused FSL_PCI_INIT code Tom Rini
  2021-12-13  3:12 ` [PATCH 02/11] Finish converting CONFIG_WATCHDOG, HW_WATCHDOG and WDT to Kconfig Tom Rini
  2021-12-13  3:12 ` [PATCH 03/11] Convert CONFIG_WATCHDOG_TIMEOUT_MSECS " Tom Rini
@ 2021-12-13  3:12 ` Tom Rini
  2021-12-28 12:56   ` Tom Rini
  2021-12-13  3:12 ` [PATCH 05/11] Convert CONFIG_SYS_IMMR " Tom Rini
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 23+ messages in thread
From: Tom Rini @ 2021-12-13  3:12 UTC (permalink / raw)
  To: u-boot

This converts the following to Kconfig:
   CONFIG_SYS_MEMTEST_START
   CONFIG_SYS_MEMTEST_END

This is removing unused defines and correcting the default value to be
0x0 as we are a hex symbol.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 cmd/Kconfig                          | 2 +-
 include/configs/imx8mm_beacon.h      | 3 ---
 include/configs/imx8mm_icore_mx8mm.h | 7 -------
 include/configs/imx8mq_phanbell.h    | 4 ----
 include/configs/kontron_sl28.h       | 4 ----
 include/configs/pico-imx8mq.h        | 4 ----
 include/configs/synquacer.h          | 3 ---
 7 files changed, 1 insertion(+), 26 deletions(-)

diff --git a/cmd/Kconfig b/cmd/Kconfig
index fd8f0227c891..7747ab50a042 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -741,7 +741,7 @@ endif
 
 config SYS_MEMTEST_START
 	hex "default start address for mtest"
-	default 0
+	default 0x0
 	help
 	  This is the default start address for mtest for simple read/write
 	  test. If no arguments are given to mtest, default address is used
diff --git a/include/configs/imx8mm_beacon.h b/include/configs/imx8mm_beacon.h
index 1040a6897b79..77f062474dd6 100644
--- a/include/configs/imx8mm_beacon.h
+++ b/include/configs/imx8mm_beacon.h
@@ -91,9 +91,6 @@
 #define PHYS_SDRAM			0x40000000
 #define PHYS_SDRAM_SIZE		0x80000000 /* 2GB DDR */
 
-#define CONFIG_SYS_MEMTEST_START	PHYS_SDRAM
-#define CONFIG_SYS_MEMTEST_END	(CONFIG_SYS_MEMTEST_START + (PHYS_SDRAM_SIZE >> 1))
-
 #define CONFIG_MXC_UART_BASE		UART2_BASE_ADDR
 
 /* Monitor Command Prompt */
diff --git a/include/configs/imx8mm_icore_mx8mm.h b/include/configs/imx8mm_icore_mx8mm.h
index fe997f9d1851..d75fcf747e41 100644
--- a/include/configs/imx8mm_icore_mx8mm.h
+++ b/include/configs/imx8mm_icore_mx8mm.h
@@ -28,9 +28,6 @@
 # define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 #endif /* CONFIG_SPL_BUILD */
 
-#define CONFIG_SYS_MEMTEST_START	PHYS_SDRAM
-#define CONFIG_SYS_MEMTEST_END	(CONFIG_SYS_MEMTEST_START + (PHYS_SDRAM_SIZE >> 1))
-
 #ifndef CONFIG_SPL_BUILD
 #define BOOT_TARGET_DEVICES(func) \
 	func(MMC, mmc, 2) \
@@ -69,10 +66,6 @@
 #define PHYS_SDRAM_SIZE			SZ_2G /* 2GB DDR */
 #define CONFIG_SYS_BOOTM_LEN		SZ_256M
 
-#define CONFIG_SYS_MEMTEST_START	PHYS_SDRAM
-#define CONFIG_SYS_MEMTEST_END	\
-	(CONFIG_SYS_MEMTEST_START + (PHYS_SDRAM_SIZE >> 1))
-
 /* UART */
 #define CONFIG_MXC_UART_BASE		UART2_BASE_ADDR
 
diff --git a/include/configs/imx8mq_phanbell.h b/include/configs/imx8mq_phanbell.h
index 7afdfd6efe88..1668ca8acf3e 100644
--- a/include/configs/imx8mq_phanbell.h
+++ b/include/configs/imx8mq_phanbell.h
@@ -116,10 +116,6 @@
 #define PHYS_SDRAM                      0x40000000
 #define PHYS_SDRAM_SIZE			0x40000000 /* 1GB DDR */
 
-#define CONFIG_SYS_MEMTEST_START	PHYS_SDRAM
-#define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START + \
-					(PHYS_SDRAM_SIZE >> 1))
-
 #define CONFIG_MXC_UART_BASE		UART1_BASE_ADDR
 
 /* Monitor Command Prompt */
diff --git a/include/configs/kontron_sl28.h b/include/configs/kontron_sl28.h
index 4152851ba414..84dd818aa9c8 100644
--- a/include/configs/kontron_sl28.h
+++ b/include/configs/kontron_sl28.h
@@ -30,10 +30,6 @@
 /* early stack pointer */
 #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_FSL_OCRAM_BASE + 0xeff0)
 
-/* memtest command */
-#define CONFIG_SYS_MEMTEST_START        0x80000000
-#define CONFIG_SYS_MEMTEST_END          0x9fffffff
-
 /* SMP */
 #define CPU_RELEASE_ADDR		secondary_boot_addr
 
diff --git a/include/configs/pico-imx8mq.h b/include/configs/pico-imx8mq.h
index 716f1327c321..2293a2919e28 100644
--- a/include/configs/pico-imx8mq.h
+++ b/include/configs/pico-imx8mq.h
@@ -95,10 +95,6 @@
 #define PHYS_SDRAM			0x40000000
 #define PHYS_SDRAM_SIZE			0x80000000	/* 2 GiB DDR */
 
-#define CONFIG_SYS_MEMTEST_START	PHYS_SDRAM
-#define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START + \
-					(PHYS_SDRAM_SIZE >> 1))
-
 #define CONFIG_MXC_UART_BASE		UART1_BASE_ADDR
 
 /* Monitor Command Prompt */
diff --git a/include/configs/synquacer.h b/include/configs/synquacer.h
index 3d099b4f11f7..2347ec2fe0cf 100644
--- a/include/configs/synquacer.h
+++ b/include/configs/synquacer.h
@@ -41,9 +41,6 @@
 #define CONFIG_SYS_FLASH_BASE		(0x08000000)
 #define CONFIG_SYS_FLASH_BANKS_LIST	{CONFIG_SYS_FLASH_BASE}
 
-#define CONFIG_SYS_MEMTEST_START	(CONFIG_SYS_SDRAM_BASE + (512 * 1024))
-#define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_SDRAM_BASE + PHYS_SDRAM_SIZE)
-
 #define CONFIG_SYS_CBSIZE		1024
 #define CONFIG_SYS_MAXARGS		128
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 05/11] Convert CONFIG_SYS_IMMR to Kconfig
  2021-12-13  3:12 [PATCH 01/11] pci: Remove unused FSL_PCI_INIT code Tom Rini
                   ` (2 preceding siblings ...)
  2021-12-13  3:12 ` [PATCH 04/11] Convert CONFIG_SYS_MEMTEST_START et al " Tom Rini
@ 2021-12-13  3:12 ` Tom Rini
  2021-12-28 12:56   ` Tom Rini
  2021-12-13  3:12 ` [PATCH 06/11] Finish CONFIG_VID et al conversion " Tom Rini
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 23+ messages in thread
From: Tom Rini @ 2021-12-13  3:12 UTC (permalink / raw)
  To: u-boot

This converts the following to Kconfig:
   CONFIG_SYS_IMMR

We do this by consolidating the SYS_IMMR options we have and providing
defaults.

We also, in the few places where M68K was also sharing code with these
platforms, define it within the file to CONFIG_SYS_MBAR to match usage.
This should be cleaned up longer term.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 arch/Kconfig                                         | 12 ++++++++++++
 .../include/asm/arch-fsl-layerscape/immap_lsch2.h    |  1 -
 .../include/asm/arch-fsl-layerscape/immap_lsch3.h    |  1 -
 arch/arm/include/asm/arch-ls102xa/config.h           |  1 -
 arch/powerpc/cpu/mpc83xx/Kconfig                     |  7 -------
 arch/powerpc/cpu/mpc83xx/start.S                     |  3 ---
 arch/powerpc/cpu/mpc8xx/Kconfig                      |  3 ---
 configs/MCR3000_defconfig                            |  1 -
 configs/ids8313_defconfig                            |  1 -
 drivers/i2c/fsl_i2c.c                                |  4 ++++
 include/configs/M5208EVBE.h                          |  1 -
 include/configs/M5235EVB.h                           |  1 -
 include/configs/M5253DEMO.h                          |  1 -
 include/configs/M5275EVB.h                           |  1 -
 include/configs/M53017EVB.h                          |  1 -
 include/configs/M5329EVB.h                           |  1 -
 include/configs/M5373EVB.h                           |  1 -
 include/configs/astro_mcf5373l.h                     |  1 -
 include/configs/eb_cpu5282.h                         |  2 --
 include/mpc85xx.h                                    |  4 ----
 20 files changed, 16 insertions(+), 32 deletions(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index fffddac04c2c..4e384d1c94ac 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -351,6 +351,18 @@ config SYS_DISABLE_DCACHE_OPS
 	 Note that, its up to the individual architectures to implement
 	 this functionality.
 
+config SYS_IMMR
+	hex
+	depends on PPC || FSL_LSCH2 || FSL_LSCH3 || ARCH_LS1021A
+	default 0xFF000000 if MPC8xx
+	default 0xF0000000 if ARCH_MPC8313
+	default 0xE0000000 if MPC83xx && !ARCH_MPC8313
+	default 0x01000000 if ARCH_LS1021A || FSL_LSCH2 || FSL_LSCH3
+	default SYS_CCSRBAR_DEFAULT
+	help
+	  Address for the Internal Memory-Mapped Registers (IMMR) window used
+	  to configure the features of many Freescale / NXP SoCs.
+
 config SKIP_LOWLEVEL_INIT
 	bool "Skip the calls to certain low level initialization functions"
 	depends on ARM || NDS32 || MIPS || RISCV
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h
index c9be0768e34f..06adf669390f 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h
@@ -11,7 +11,6 @@
 #include <linux/bitops.h>
 #endif
 
-#define CONFIG_SYS_IMMR				0x01000000
 #define CONFIG_SYS_DCSRBAR			0x20000000
 #define CONFIG_SYS_DCSR_DCFG_ADDR	(CONFIG_SYS_DCSRBAR + 0x00140000)
 #define CONFIG_SYS_DCSR_COP_CCP_ADDR	(CONFIG_SYS_DCSRBAR + 0x02008040)
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h
index b64d7fbc1b38..863618a5f3d0 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h
@@ -9,7 +9,6 @@
 #ifndef __ARCH_FSL_LSCH3_IMMAP_H_
 #define __ARCH_FSL_LSCH3_IMMAP_H_
 
-#define CONFIG_SYS_IMMR				0x01000000
 #define CONFIG_SYS_FSL_DDR_ADDR			(CONFIG_SYS_IMMR + 0x00080000)
 #define CONFIG_SYS_FSL_DDR2_ADDR		(CONFIG_SYS_IMMR + 0x00090000)
 #define CONFIG_SYS_FSL_DDR3_ADDR		0x08210000
diff --git a/arch/arm/include/asm/arch-ls102xa/config.h b/arch/arm/include/asm/arch-ls102xa/config.h
index 3884948a2c55..0e1f9e0c0d8c 100644
--- a/arch/arm/include/asm/arch-ls102xa/config.h
+++ b/arch/arm/include/asm/arch-ls102xa/config.h
@@ -11,7 +11,6 @@
 #define OCRAM_BASE_S_ADDR			0x10010000
 #define OCRAM_S_SIZE				0x00010000
 
-#define CONFIG_SYS_IMMR				0x01000000
 #define CONFIG_SYS_DCSRBAR			0x20000000
 
 #define CONFIG_SYS_DCSR_DCFG_ADDR	(CONFIG_SYS_DCSRBAR + 0x00220000)
diff --git a/arch/powerpc/cpu/mpc83xx/Kconfig b/arch/powerpc/cpu/mpc83xx/Kconfig
index cff98f7599fa..d58d278c6da8 100644
--- a/arch/powerpc/cpu/mpc83xx/Kconfig
+++ b/arch/powerpc/cpu/mpc83xx/Kconfig
@@ -179,13 +179,6 @@ config ARCH_MPC837X
 	select SYS_CACHE_SHIFT_5
 	select FSL_ELBC
 
-config SYS_IMMR
-	hex "Value for IMMR"
-	default 0xE0000000
-	help
-	  Address for the Internal Memory-Mapped Registers (IMMR) window used
-	  to configure the features of the SoC.
-
 source "arch/powerpc/cpu/mpc83xx/hrcw/Kconfig"
 source "arch/powerpc/cpu/mpc83xx/bats/Kconfig"
 source "arch/powerpc/cpu/mpc83xx/lblaw/Kconfig"
diff --git a/arch/powerpc/cpu/mpc83xx/start.S b/arch/powerpc/cpu/mpc83xx/start.S
index c4953df4a271..91c8778e5033 100644
--- a/arch/powerpc/cpu/mpc83xx/start.S
+++ b/arch/powerpc/cpu/mpc83xx/start.S
@@ -115,9 +115,6 @@ disable_addr_trans:
 #ifndef CONFIG_DEFAULT_IMMR
 #error CONFIG_DEFAULT_IMMR must be defined
 #endif /* CONFIG_DEFAULT_IMMR */
-#ifndef CONFIG_SYS_IMMR
-#define CONFIG_SYS_IMMR CONFIG_DEFAULT_IMMR
-#endif /* CONFIG_SYS_IMMR */
 
 /*
  * After configuration, a system reset exception is executed using the
diff --git a/arch/powerpc/cpu/mpc8xx/Kconfig b/arch/powerpc/cpu/mpc8xx/Kconfig
index 091bbaffa0c3..d63071104c4d 100644
--- a/arch/powerpc/cpu/mpc8xx/Kconfig
+++ b/arch/powerpc/cpu/mpc8xx/Kconfig
@@ -84,9 +84,6 @@ config SYS_DER
 	help
 	  Debug Event Register (37-47)
 
-config SYS_IMMR
-	hex "Value for IMMR"
-
 source "board/cssi/MCR3000/Kconfig"
 
 endmenu
diff --git a/configs/MCR3000_defconfig b/configs/MCR3000_defconfig
index b9c5843c4e64..04fe75651337 100644
--- a/configs/MCR3000_defconfig
+++ b/configs/MCR3000_defconfig
@@ -4,7 +4,6 @@ CONFIG_ENV_SIZE=0x2000
 CONFIG_ENV_SECT_SIZE=0x2000
 CONFIG_DEFAULT_DEVICE_TREE="mcr3000"
 CONFIG_MPC8xx=y
-CONFIG_SYS_IMMR=0xFF000000
 CONFIG_TARGET_MCR3000=y
 CONFIG_8xx_GCLK_FREQ=132000000
 CONFIG_CMD_IMMAP=y
diff --git a/configs/ids8313_defconfig b/configs/ids8313_defconfig
index 006c80cc7a0a..4ee97ae55557 100644
--- a/configs/ids8313_defconfig
+++ b/configs/ids8313_defconfig
@@ -8,7 +8,6 @@ CONFIG_SYS_CLK_FREQ=66000000
 CONFIG_MPC83xx=y
 CONFIG_HIGH_BATS=y
 CONFIG_TARGET_IDS8313=y
-CONFIG_SYS_IMMR=0xF0000000
 CONFIG_CORE_PLL_RATIO_2_1=y
 CONFIG_PCI_HOST_MODE_ENABLE=y
 CONFIG_BOOT_ROM_INTERFACE_GPCM_8BIT=y
diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c
index eafd801cdc3a..9a3c8241bc64 100644
--- a/drivers/i2c/fsl_i2c.c
+++ b/drivers/i2c/fsl_i2c.c
@@ -40,6 +40,10 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#ifdef CONFIG_M68K
+#define CONFIG_SYS_IMMR		CONFIG_SYS_MBAR
+#endif
+
 #if !CONFIG_IS_ENABLED(DM_I2C)
 static const struct fsl_i2c_base *i2c_base[4] = {
 	(struct fsl_i2c_base *)(CONFIG_SYS_IMMR + CONFIG_SYS_FSL_I2C_OFFSET),
diff --git a/include/configs/M5208EVBE.h b/include/configs/M5208EVBE.h
index 717e3e4415d5..5ed624c7b761 100644
--- a/include/configs/M5208EVBE.h
+++ b/include/configs/M5208EVBE.h
@@ -38,7 +38,6 @@
 #define CONFIG_MCFTMR
 
 /* I2C */
-#define CONFIG_SYS_IMMR			CONFIG_SYS_MBAR
 
 #define CONFIG_UDP_CHECKSUM
 
diff --git a/include/configs/M5235EVB.h b/include/configs/M5235EVB.h
index 2e5220f17a64..90f1664a5ae1 100644
--- a/include/configs/M5235EVB.h
+++ b/include/configs/M5235EVB.h
@@ -47,7 +47,6 @@
 #define CONFIG_MCFTMR
 
 /* I2C */
-#define CONFIG_SYS_IMMR		CONFIG_SYS_MBAR
 #define CONFIG_SYS_I2C_PINMUX_REG	(gpio->par_qspi)
 #define CONFIG_SYS_I2C_PINMUX_CLR	~(GPIO_PAR_FECI2C_SCL_MASK | GPIO_PAR_FECI2C_SDA_MASK)
 #define CONFIG_SYS_I2C_PINMUX_SET	(GPIO_PAR_FECI2C_SCL_I2CSCL | GPIO_PAR_FECI2C_SDA_I2CSDA)
diff --git a/include/configs/M5253DEMO.h b/include/configs/M5253DEMO.h
index ff290964252a..c5d8aa3edab2 100644
--- a/include/configs/M5253DEMO.h
+++ b/include/configs/M5253DEMO.h
@@ -67,7 +67,6 @@
 #define CONFIG_HOSTNAME		"M5253DEMO"
 
 /* I2C */
-#define CONFIG_SYS_IMMR		CONFIG_SYS_MBAR
 #define CONFIG_SYS_I2C_PINMUX_REG	(*(u32 *) (CONFIG_SYS_MBAR+0x19C))
 #define CONFIG_SYS_I2C_PINMUX_CLR	(0xFFFFE7FF)
 #define CONFIG_SYS_I2C_PINMUX_SET	(0)
diff --git a/include/configs/M5275EVB.h b/include/configs/M5275EVB.h
index 7ca916485b1a..b18f0319b097 100644
--- a/include/configs/M5275EVB.h
+++ b/include/configs/M5275EVB.h
@@ -58,7 +58,6 @@
 #endif
 
 /* I2C */
-#define CONFIG_SYS_IMMR		CONFIG_SYS_MBAR
 #define CONFIG_SYS_I2C_PINMUX_REG	(gpio_reg->par_feci2c)
 #define CONFIG_SYS_I2C_PINMUX_CLR	(0xFFF0)
 #define CONFIG_SYS_I2C_PINMUX_SET	(0x000F)
diff --git a/include/configs/M53017EVB.h b/include/configs/M53017EVB.h
index 58b75b217e11..5db189ae2db4 100644
--- a/include/configs/M53017EVB.h
+++ b/include/configs/M53017EVB.h
@@ -53,7 +53,6 @@
 #define CONFIG_MCFTMR
 
 /* I2C */
-#define CONFIG_SYS_IMMR			CONFIG_SYS_MBAR
 
 #define CONFIG_UDP_CHECKSUM
 
diff --git a/include/configs/M5329EVB.h b/include/configs/M5329EVB.h
index f172db091736..16343b5d3864 100644
--- a/include/configs/M5329EVB.h
+++ b/include/configs/M5329EVB.h
@@ -47,7 +47,6 @@
 #define CONFIG_MCFTMR
 
 /* I2C */
-#define CONFIG_SYS_IMMR		CONFIG_SYS_MBAR
 
 #define CONFIG_UDP_CHECKSUM
 
diff --git a/include/configs/M5373EVB.h b/include/configs/M5373EVB.h
index ddcd7521cf7c..ccc59ebed253 100644
--- a/include/configs/M5373EVB.h
+++ b/include/configs/M5373EVB.h
@@ -49,7 +49,6 @@
 #define CONFIG_MCFTMR
 
 /* I2C */
-#define CONFIG_SYS_IMMR		CONFIG_SYS_MBAR
 
 #define CONFIG_UDP_CHECKSUM
 
diff --git a/include/configs/astro_mcf5373l.h b/include/configs/astro_mcf5373l.h
index 1af343899c60..d87ca304e26d 100644
--- a/include/configs/astro_mcf5373l.h
+++ b/include/configs/astro_mcf5373l.h
@@ -58,7 +58,6 @@
 #define CONFIG_MCFTMR
 
 /* I2C */
-#define CONFIG_SYS_IMMR			CONFIG_SYS_MBAR
 
 /*
  * Defines processor clock - important for correct timings concerning serial
diff --git a/include/configs/eb_cpu5282.h b/include/configs/eb_cpu5282.h
index bf1cfc3addb8..62b62e07c567 100644
--- a/include/configs/eb_cpu5282.h
+++ b/include/configs/eb_cpu5282.h
@@ -185,8 +185,6 @@
  * I2C
  */
 
-#define CONFIG_SYS_IMMR			CONFIG_SYS_MBAR
-
 #ifdef CONFIG_CMD_DATE
 #define CONFIG_RTC_DS1338
 #define CONFIG_I2C_RTC_ADDR		0x68
diff --git a/include/mpc85xx.h b/include/mpc85xx.h
index ce6d083effa0..2c69a60de63f 100644
--- a/include/mpc85xx.h
+++ b/include/mpc85xx.h
@@ -60,8 +60,4 @@ CONFIG_SYS_CCSRBAR_PHYS_LOW and/or CONFIG_SYS_CCSRBAR_PHYS_HIGH instead."
 #define CONFIG_SYS_CCSRBAR_PHYS ((CONFIG_SYS_CCSRBAR_PHYS_HIGH * 1ull) << 32 | \
 				 CONFIG_SYS_CCSRBAR_PHYS_LOW)
 
-#ifndef CONFIG_SYS_IMMR
-#define CONFIG_SYS_IMMR			CONFIG_SYS_CCSRBAR
-#endif
-
 #endif	/* __MPC85xx_H__ */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 06/11] Finish CONFIG_VID et al conversion to Kconfig
  2021-12-13  3:12 [PATCH 01/11] pci: Remove unused FSL_PCI_INIT code Tom Rini
                   ` (3 preceding siblings ...)
  2021-12-13  3:12 ` [PATCH 05/11] Convert CONFIG_SYS_IMMR " Tom Rini
@ 2021-12-13  3:12 ` Tom Rini
  2021-12-28 12:56   ` Tom Rini
  2021-12-13  3:12 ` [PATCH 07/11] Convert CONFIG_SYS_PCI_64BIT " Tom Rini
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 23+ messages in thread
From: Tom Rini @ 2021-12-13  3:12 UTC (permalink / raw)
  To: u-boot

This converts the following to Kconfig:
   CONFIG_VID
   CONFIG_VOL_MONITOR_INA220
   CONFIG_VOL_MONITOR_IR36021_READ
   CONFIG_VOL_MONITOR_IR36021_SET
   CONFIG_VOL_MONITOR_LTC3882_READ
   CONFIG_VOL_MONITOR_LTC3882_SET

To finish this migration, we first need to introduce CONFIG_SPL_VID as
some platforms only use this code in full U-Boot while others use it in
SPL as well.  To make the Kconfig logic clearer, guard all of the
sub-options with a if VID || SPL_VID check.  Finally, add Kconfig
options for the remaining related options that did not previously have
one.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 arch/arm/cpu/armv8/fsl-layerscape/spl.c       |  4 +-
 board/freescale/common/Kconfig                | 41 ++++++++++++++++---
 board/freescale/common/Makefile               |  2 +-
 configs/T2080QDS_NAND_defconfig               |  4 ++
 configs/T2080QDS_SDCARD_defconfig             |  4 ++
 configs/T2080QDS_SECURE_BOOT_defconfig        |  4 ++
 configs/T2080QDS_SPIFLASH_defconfig           |  4 ++
 configs/T2080QDS_SRIO_PCIE_BOOT_defconfig     |  4 ++
 configs/T2080QDS_defconfig                    |  4 ++
 configs/T2080RDB_NAND_defconfig               |  4 ++
 configs/T2080RDB_SDCARD_defconfig             |  4 ++
 configs/T2080RDB_SPIFLASH_defconfig           |  4 ++
 configs/T2080RDB_defconfig                    |  4 ++
 configs/T2080RDB_revD_NAND_defconfig          |  4 ++
 configs/T2080RDB_revD_SDCARD_defconfig        |  4 ++
 configs/T2080RDB_revD_SPIFLASH_defconfig      |  4 ++
 configs/T2080RDB_revD_defconfig               |  4 ++
 configs/T4240RDB_SDCARD_defconfig             |  4 ++
 configs/T4240RDB_defconfig                    |  4 ++
 configs/ls1043aqds_defconfig                  |  4 ++
 configs/ls1043aqds_lpuart_defconfig           |  4 ++
 configs/ls1043aqds_nand_defconfig             |  4 ++
 configs/ls1043aqds_nor_ddr3_defconfig         |  4 ++
 configs/ls1043aqds_qspi_defconfig             |  4 ++
 configs/ls1043aqds_sdcard_ifc_defconfig       |  4 ++
 configs/ls1043aqds_sdcard_qspi_defconfig      |  4 ++
 configs/ls1043aqds_tfa_SECURE_BOOT_defconfig  |  4 ++
 configs/ls1043aqds_tfa_defconfig              |  4 ++
 configs/ls1046aqds_SECURE_BOOT_defconfig      |  4 ++
 configs/ls1046aqds_defconfig                  |  4 ++
 configs/ls1046aqds_lpuart_defconfig           |  4 ++
 configs/ls1046aqds_nand_defconfig             |  4 ++
 configs/ls1046aqds_qspi_defconfig             |  4 ++
 configs/ls1046aqds_sdcard_ifc_defconfig       |  4 ++
 configs/ls1046aqds_sdcard_qspi_defconfig      |  4 ++
 configs/ls1046aqds_tfa_SECURE_BOOT_defconfig  |  4 ++
 configs/ls1046aqds_tfa_defconfig              |  4 ++
 configs/ls1088aqds_defconfig                  |  5 +++
 configs/ls1088aqds_qspi_SECURE_BOOT_defconfig |  5 +++
 configs/ls1088aqds_qspi_defconfig             |  5 +++
 configs/ls1088aqds_sdcard_ifc_defconfig       |  5 +++
 configs/ls1088aqds_sdcard_qspi_defconfig      |  5 +++
 configs/ls1088aqds_tfa_defconfig              |  5 +++
 configs/ls1088ardb_qspi_SECURE_BOOT_defconfig |  5 +++
 configs/ls1088ardb_qspi_defconfig             |  5 +++
 ...1088ardb_sdcard_qspi_SECURE_BOOT_defconfig |  5 +++
 configs/ls1088ardb_sdcard_qspi_defconfig      |  5 +++
 configs/ls1088ardb_tfa_SECURE_BOOT_defconfig  |  5 +++
 configs/ls1088ardb_tfa_defconfig              |  5 +++
 configs/ls2080ardb_SECURE_BOOT_defconfig      |  4 ++
 configs/ls2080ardb_defconfig                  |  4 ++
 configs/ls2080ardb_nand_defconfig             |  4 ++
 configs/ls2081ardb_defconfig                  |  4 ++
 configs/ls2088ardb_qspi_SECURE_BOOT_defconfig |  4 ++
 configs/ls2088ardb_qspi_defconfig             |  4 ++
 configs/ls2088ardb_tfa_SECURE_BOOT_defconfig  |  4 ++
 configs/ls2088ardb_tfa_defconfig              |  4 ++
 configs/lx2160aqds_tfa_SECURE_BOOT_defconfig  |  5 +++
 configs/lx2160aqds_tfa_defconfig              |  5 +++
 configs/lx2160ardb_tfa_SECURE_BOOT_defconfig  |  5 +++
 configs/lx2160ardb_tfa_defconfig              |  5 +++
 configs/lx2160ardb_tfa_stmm_defconfig         |  5 +++
 configs/lx2162aqds_tfa_SECURE_BOOT_defconfig  |  5 +++
 configs/lx2162aqds_tfa_defconfig              |  5 +++
 .../lx2162aqds_tfa_verified_boot_defconfig    |  5 +++
 include/configs/T208xQDS.h                    |  6 ---
 include/configs/T208xRDB.h                    |  6 ---
 include/configs/T4240RDB.h                    |  6 ---
 include/configs/ls1043aqds.h                  |  6 ---
 include/configs/ls1046aqds.h                  |  6 ---
 include/configs/ls1088aqds.h                  |  6 ---
 include/configs/ls1088ardb.h                  |  6 ---
 include/configs/ls2080ardb.h                  |  6 ---
 include/configs/lx2160aqds.h                  |  6 ---
 include/configs/lx2160ardb.h                  |  6 ---
 include/configs/lx2162aqds.h                  |  6 ---
 76 files changed, 308 insertions(+), 73 deletions(-)

diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
index 68111b6eff8c..564cc27c8b28 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
@@ -93,7 +93,9 @@ void board_init_f(ulong dummy)
 	i2c_init_all();
 #endif
 #endif
-#ifdef CONFIG_VID
+#if defined(CONFIG_VID) && (defined(CONFIG_ARCH_LS1088A) || \
+			    defined(CONFIG_ARCH_LX2160A) || \
+			    defined(CONFIG_ARCH_LX2162A))
 	init_func_vid();
 #endif
 	dram_init();
diff --git a/board/freescale/common/Kconfig b/board/freescale/common/Kconfig
index 69620dbb74e4..300b01e04006 100644
--- a/board/freescale/common/Kconfig
+++ b/board/freescale/common/Kconfig
@@ -28,36 +28,67 @@ config FSL_USE_PCA9547_MUX
 	 This option enables the PCA9547 I2C mux on Freescale boards.
 
 config VID
-	depends on DM_I2C
 	bool "Enable Freescale VID"
+	depends on I2C || DM_I2C
 	help
 	 This option enables setting core voltage based on individual
 	 values saved in SoC fuses.
 
+config SPL_VID
+	bool "Enable Freescale VID in SPL"
+	depends on I2C || DM_I2C
+	help
+	 This option enables setting core voltage based on individual
+	 values saved in SoC fuses, in SPL.
+
+if VID || SPL_VID
+
+config VID_FLS_ENV
+	string "Environment variable for overriding VDD"
+	help
+	  This option allows for specifying the environment variable
+	  to check to override VDD information.
+
+config VOL_MONITOR_INA220
+	bool "Enable the INA220 voltage monitor read"
+	help
+	  This option enables INA220 voltage monitor read
+	  functionality. It is used by the common VID driver.
+
+config VOL_MONITOR_IR36021_READ
+	bool "Enable the IR36021 voltage monitor read"
+	help
+	 This option enables IR36021 voltage monitor read
+	 functionality. It is used by the common VID driver.
+
+config VOL_MONITOR_IR36021_SET
+	bool "Enable the IR36021 voltage monitor set"
+	help
+	 This option enables IR36021 voltage monitor set
+	 functionality. It is used by the common VID driver.
+
 config VOL_MONITOR_LTC3882_READ
-	depends on VID
 	bool "Enable the LTC3882 voltage monitor read"
 	help
 	 This option enables LTC3882 voltage monitor read
 	 functionality. It is used by the common VID driver.
 
 config VOL_MONITOR_LTC3882_SET
-	depends on VID
 	bool "Enable the LTC3882 voltage monitor set"
 	help
 	 This option enables LTC3882 voltage monitor set
 	 functionality. It is used by the common VID driver.
 
 config VOL_MONITOR_ISL68233_READ
-	depends on VID
 	bool "Enable the ISL68233 voltage monitor read"
 	help
 	 This option enables ISL68233 voltage monitor read
 	 functionality. It is used by the common VID driver.
 
 config VOL_MONITOR_ISL68233_SET
-	depends on VID
 	bool "Enable the ISL68233 voltage monitor set"
 	help
 	 This option enables ISL68233 voltage monitor set
 	 functionality. It is used by the common VID driver.
+
+endif
diff --git a/board/freescale/common/Makefile b/board/freescale/common/Makefile
index 3a171688c3f7..0ddfb59d7de2 100644
--- a/board/freescale/common/Makefile
+++ b/board/freescale/common/Makefile
@@ -33,7 +33,7 @@ obj-$(CONFIG_FSL_NGPIXIS)	+= ngpixis.o
 endif
 obj-$(I2C_COMMON)		+= i2c_common.o
 obj-$(CONFIG_FSL_USE_PCA9547_MUX)		+= i2c_mux.o
-obj-$(CONFIG_VID)		+= vid.o
+obj-$(CONFIG_$(SPL_)VID)	+= vid.o
 obj-$(CONFIG_FSL_QIXIS)	+= qixis.o
 obj-$(CONFIG_PQ_MDS_PIB)	+= pq-mds-pib.o
 ifndef CONFIG_SPL_BUILD
diff --git a/configs/T2080QDS_NAND_defconfig b/configs/T2080QDS_NAND_defconfig
index bc0838066200..56c74b260d37 100644
--- a/configs/T2080QDS_NAND_defconfig
+++ b/configs/T2080QDS_NAND_defconfig
@@ -7,6 +7,10 @@ CONFIG_ENV_OFFSET=0x140000
 CONFIG_DEFAULT_DEVICE_TREE="t2080qds"
 CONFIG_SPL_TEXT_BASE=0xFFFD8000
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="t208xqds_vdd_mv"
+CONFIG_VOL_MONITOR_IR36021_READ=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_SPL_SERIAL=y
 CONFIG_SPL_DRIVERS_MISC=y
 CONFIG_SPL=y
diff --git a/configs/T2080QDS_SDCARD_defconfig b/configs/T2080QDS_SDCARD_defconfig
index 3c5924471515..bd843f744bdc 100644
--- a/configs/T2080QDS_SDCARD_defconfig
+++ b/configs/T2080QDS_SDCARD_defconfig
@@ -7,6 +7,10 @@ CONFIG_ENV_OFFSET=0x100000
 CONFIG_DEFAULT_DEVICE_TREE="t2080qds"
 CONFIG_SPL_TEXT_BASE=0xFFFD8000
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="t208xqds_vdd_mv"
+CONFIG_VOL_MONITOR_IR36021_READ=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_SPL_MMC=y
 CONFIG_SPL_SERIAL=y
 CONFIG_SPL_DRIVERS_MISC=y
diff --git a/configs/T2080QDS_SECURE_BOOT_defconfig b/configs/T2080QDS_SECURE_BOOT_defconfig
index 993deb8ab358..b04708d917fc 100644
--- a/configs/T2080QDS_SECURE_BOOT_defconfig
+++ b/configs/T2080QDS_SECURE_BOOT_defconfig
@@ -4,6 +4,10 @@ CONFIG_ENV_SIZE=0x2000
 CONFIG_NXP_ESBC=y
 CONFIG_DEFAULT_DEVICE_TREE="t2080qds"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="t208xqds_vdd_mv"
+CONFIG_VOL_MONITOR_IR36021_READ=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_T2080QDS=y
 CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
diff --git a/configs/T2080QDS_SPIFLASH_defconfig b/configs/T2080QDS_SPIFLASH_defconfig
index bccb728874ed..93664cf56f9a 100644
--- a/configs/T2080QDS_SPIFLASH_defconfig
+++ b/configs/T2080QDS_SPIFLASH_defconfig
@@ -8,6 +8,10 @@ CONFIG_ENV_SECT_SIZE=0x10000
 CONFIG_DEFAULT_DEVICE_TREE="t2080qds"
 CONFIG_SPL_TEXT_BASE=0xFFFD8000
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="t208xqds_vdd_mv"
+CONFIG_VOL_MONITOR_IR36021_READ=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_SPL_SERIAL=y
 CONFIG_SPL_DRIVERS_MISC=y
 CONFIG_SPL=y
diff --git a/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig b/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig
index 8669d7c966ad..445e0e057b63 100644
--- a/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig
+++ b/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig
@@ -3,6 +3,10 @@ CONFIG_SYS_TEXT_BASE=0xFFF40000
 CONFIG_ENV_SIZE=0x2000
 CONFIG_DEFAULT_DEVICE_TREE="t2080qds"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="t208xqds_vdd_mv"
+CONFIG_VOL_MONITOR_IR36021_READ=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_T2080QDS=y
 CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
diff --git a/configs/T2080QDS_defconfig b/configs/T2080QDS_defconfig
index 224dc22d626a..bd9c2142344d 100644
--- a/configs/T2080QDS_defconfig
+++ b/configs/T2080QDS_defconfig
@@ -4,6 +4,10 @@ CONFIG_ENV_SIZE=0x2000
 CONFIG_ENV_SECT_SIZE=0x20000
 CONFIG_DEFAULT_DEVICE_TREE="t2080qds"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="t208xqds_vdd_mv"
+CONFIG_VOL_MONITOR_IR36021_READ=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_T2080QDS=y
 CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
diff --git a/configs/T2080RDB_NAND_defconfig b/configs/T2080RDB_NAND_defconfig
index 65e4756bba84..3949d2333a82 100644
--- a/configs/T2080RDB_NAND_defconfig
+++ b/configs/T2080RDB_NAND_defconfig
@@ -8,6 +8,10 @@ CONFIG_ENV_SIZE=0x2000
 CONFIG_ENV_OFFSET=0x100000
 CONFIG_DEFAULT_DEVICE_TREE="t2080rdb"
 CONFIG_SPL_TEXT_BASE=0xFFFD8000
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="t208xrdb_vdd_mv"
+CONFIG_VOL_MONITOR_IR36021_READ=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_SPL_SERIAL=y
 CONFIG_SPL_DRIVERS_MISC=y
 CONFIG_SPL=y
diff --git a/configs/T2080RDB_SDCARD_defconfig b/configs/T2080RDB_SDCARD_defconfig
index 2647cd017b70..f62c85c80517 100644
--- a/configs/T2080RDB_SDCARD_defconfig
+++ b/configs/T2080RDB_SDCARD_defconfig
@@ -8,6 +8,10 @@ CONFIG_ENV_SIZE=0x2000
 CONFIG_ENV_OFFSET=0x100000
 CONFIG_DEFAULT_DEVICE_TREE="t2080rdb"
 CONFIG_SPL_TEXT_BASE=0xFFFD8000
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="t208xrdb_vdd_mv"
+CONFIG_VOL_MONITOR_IR36021_READ=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_SPL_MMC=y
 CONFIG_SPL_SERIAL=y
 CONFIG_SPL_DRIVERS_MISC=y
diff --git a/configs/T2080RDB_SPIFLASH_defconfig b/configs/T2080RDB_SPIFLASH_defconfig
index b202ab9be1d3..2a7529d1ccb5 100644
--- a/configs/T2080RDB_SPIFLASH_defconfig
+++ b/configs/T2080RDB_SPIFLASH_defconfig
@@ -9,6 +9,10 @@ CONFIG_ENV_OFFSET=0x100000
 CONFIG_ENV_SECT_SIZE=0x10000
 CONFIG_DEFAULT_DEVICE_TREE="t2080rdb"
 CONFIG_SPL_TEXT_BASE=0xFFFD8000
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="t208xrdb_vdd_mv"
+CONFIG_VOL_MONITOR_IR36021_READ=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_SPL_SERIAL=y
 CONFIG_SPL_DRIVERS_MISC=y
 CONFIG_SPL=y
diff --git a/configs/T2080RDB_defconfig b/configs/T2080RDB_defconfig
index 7ad8e0f0b25c..6b076405d61f 100644
--- a/configs/T2080RDB_defconfig
+++ b/configs/T2080RDB_defconfig
@@ -5,6 +5,10 @@ CONFIG_SYS_MEMTEST_END=0x00400000
 CONFIG_ENV_SIZE=0x2000
 CONFIG_ENV_SECT_SIZE=0x20000
 CONFIG_DEFAULT_DEVICE_TREE="t2080rdb"
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="t208xrdb_vdd_mv"
+CONFIG_VOL_MONITOR_IR36021_READ=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_T2080RDB=y
 CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
diff --git a/configs/T2080RDB_revD_NAND_defconfig b/configs/T2080RDB_revD_NAND_defconfig
index 80dd5c6438eb..e03d3888110e 100644
--- a/configs/T2080RDB_revD_NAND_defconfig
+++ b/configs/T2080RDB_revD_NAND_defconfig
@@ -8,6 +8,10 @@ CONFIG_ENV_SIZE=0x2000
 CONFIG_ENV_OFFSET=0x100000
 CONFIG_DEFAULT_DEVICE_TREE="t2080rdb"
 CONFIG_SPL_TEXT_BASE=0xFFFD8000
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="t208xrdb_vdd_mv"
+CONFIG_VOL_MONITOR_IR36021_READ=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_SPL_SERIAL=y
 CONFIG_SPL_DRIVERS_MISC=y
 CONFIG_SPL=y
diff --git a/configs/T2080RDB_revD_SDCARD_defconfig b/configs/T2080RDB_revD_SDCARD_defconfig
index d991302723e2..1771c240036e 100644
--- a/configs/T2080RDB_revD_SDCARD_defconfig
+++ b/configs/T2080RDB_revD_SDCARD_defconfig
@@ -8,6 +8,10 @@ CONFIG_ENV_SIZE=0x2000
 CONFIG_ENV_OFFSET=0x100000
 CONFIG_DEFAULT_DEVICE_TREE="t2080rdb"
 CONFIG_SPL_TEXT_BASE=0xFFFD8000
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="t208xrdb_vdd_mv"
+CONFIG_VOL_MONITOR_IR36021_READ=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_SPL_MMC=y
 CONFIG_SPL_SERIAL=y
 CONFIG_SPL_DRIVERS_MISC=y
diff --git a/configs/T2080RDB_revD_SPIFLASH_defconfig b/configs/T2080RDB_revD_SPIFLASH_defconfig
index f5b9d2375469..bb9d5c809e61 100644
--- a/configs/T2080RDB_revD_SPIFLASH_defconfig
+++ b/configs/T2080RDB_revD_SPIFLASH_defconfig
@@ -9,6 +9,10 @@ CONFIG_ENV_OFFSET=0x100000
 CONFIG_ENV_SECT_SIZE=0x10000
 CONFIG_DEFAULT_DEVICE_TREE="t2080rdb"
 CONFIG_SPL_TEXT_BASE=0xFFFD8000
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="t208xrdb_vdd_mv"
+CONFIG_VOL_MONITOR_IR36021_READ=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_SPL_SERIAL=y
 CONFIG_SPL_DRIVERS_MISC=y
 CONFIG_SPL=y
diff --git a/configs/T2080RDB_revD_defconfig b/configs/T2080RDB_revD_defconfig
index 49cfa900dd25..472463fabb09 100644
--- a/configs/T2080RDB_revD_defconfig
+++ b/configs/T2080RDB_revD_defconfig
@@ -5,6 +5,10 @@ CONFIG_SYS_MEMTEST_END=0x00400000
 CONFIG_ENV_SIZE=0x2000
 CONFIG_ENV_SECT_SIZE=0x20000
 CONFIG_DEFAULT_DEVICE_TREE="t2080rdb"
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="t208xrdb_vdd_mv"
+CONFIG_VOL_MONITOR_IR36021_READ=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_T2080RDB=y
 CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
diff --git a/configs/T4240RDB_SDCARD_defconfig b/configs/T4240RDB_SDCARD_defconfig
index c5b5d8813a2b..526c4749557c 100644
--- a/configs/T4240RDB_SDCARD_defconfig
+++ b/configs/T4240RDB_SDCARD_defconfig
@@ -6,6 +6,10 @@ CONFIG_ENV_SIZE=0x2000
 CONFIG_ENV_OFFSET=0x100000
 CONFIG_DEFAULT_DEVICE_TREE="t4240rdb"
 CONFIG_SPL_TEXT_BASE=0xFFFD8000
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="t4240rdb_vdd_mv"
+CONFIG_VOL_MONITOR_IR36021_READ=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_SPL_MMC=y
 CONFIG_SPL_SERIAL=y
 CONFIG_SPL_DRIVERS_MISC=y
diff --git a/configs/T4240RDB_defconfig b/configs/T4240RDB_defconfig
index 52cb41fb7bb1..bbaab35fd81a 100644
--- a/configs/T4240RDB_defconfig
+++ b/configs/T4240RDB_defconfig
@@ -3,6 +3,10 @@ CONFIG_SYS_TEXT_BASE=0xEFF40000
 CONFIG_ENV_SIZE=0x2000
 CONFIG_ENV_SECT_SIZE=0x20000
 CONFIG_DEFAULT_DEVICE_TREE="t4240rdb"
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="t4240rdb_vdd_mv"
+CONFIG_VOL_MONITOR_IR36021_READ=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_T4240RDB=y
 CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
diff --git a/configs/ls1043aqds_defconfig b/configs/ls1043aqds_defconfig
index e12a622bfac5..f92ac847213e 100644
--- a/configs/ls1043aqds_defconfig
+++ b/configs/ls1043aqds_defconfig
@@ -14,6 +14,10 @@ CONFIG_SYS_I2C_MXC_I2C4=y
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1043a-qds-duart"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="ls1043aqds_vdd_mv"
+CONFIG_VOL_MONITOR_INA220=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_AHCI=y
 CONFIG_DISTRO_DEFAULTS=y
diff --git a/configs/ls1043aqds_lpuart_defconfig b/configs/ls1043aqds_lpuart_defconfig
index 1a6079acefff..a25288bc52ec 100644
--- a/configs/ls1043aqds_lpuart_defconfig
+++ b/configs/ls1043aqds_lpuart_defconfig
@@ -14,6 +14,10 @@ CONFIG_SYS_I2C_MXC_I2C4=y
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1043a-qds-lpuart"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="ls1043aqds_vdd_mv"
+CONFIG_VOL_MONITOR_INA220=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_AHCI=y
 CONFIG_DISTRO_DEFAULTS=y
diff --git a/configs/ls1043aqds_nand_defconfig b/configs/ls1043aqds_nand_defconfig
index 9e60af28279a..e4984bc6084a 100644
--- a/configs/ls1043aqds_nand_defconfig
+++ b/configs/ls1043aqds_nand_defconfig
@@ -17,6 +17,10 @@ CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1043a-qds-duart"
 CONFIG_SPL_TEXT_BASE=0x10000000
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="ls1043aqds_vdd_mv"
+CONFIG_VOL_MONITOR_INA220=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_SPL_SERIAL=y
 CONFIG_SPL_DRIVERS_MISC=y
diff --git a/configs/ls1043aqds_nor_ddr3_defconfig b/configs/ls1043aqds_nor_ddr3_defconfig
index ff8967ee57ee..e4222ad6973c 100644
--- a/configs/ls1043aqds_nor_ddr3_defconfig
+++ b/configs/ls1043aqds_nor_ddr3_defconfig
@@ -14,6 +14,10 @@ CONFIG_SYS_I2C_MXC_I2C4=y
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1043a-qds-duart"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="ls1043aqds_vdd_mv"
+CONFIG_VOL_MONITOR_INA220=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_AHCI=y
 CONFIG_DISTRO_DEFAULTS=y
diff --git a/configs/ls1043aqds_qspi_defconfig b/configs/ls1043aqds_qspi_defconfig
index 5f28e90bb2b6..5c92102c66e4 100644
--- a/configs/ls1043aqds_qspi_defconfig
+++ b/configs/ls1043aqds_qspi_defconfig
@@ -15,6 +15,10 @@ CONFIG_SYS_I2C_MXC_I2C4=y
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1043a-qds-duart"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="ls1043aqds_vdd_mv"
+CONFIG_VOL_MONITOR_INA220=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_AHCI=y
 CONFIG_DISTRO_DEFAULTS=y
diff --git a/configs/ls1043aqds_sdcard_ifc_defconfig b/configs/ls1043aqds_sdcard_ifc_defconfig
index 2873522c9d9c..0ed26543208f 100644
--- a/configs/ls1043aqds_sdcard_ifc_defconfig
+++ b/configs/ls1043aqds_sdcard_ifc_defconfig
@@ -17,6 +17,10 @@ CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1043a-qds-duart"
 CONFIG_SPL_TEXT_BASE=0x10000000
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="ls1043aqds_vdd_mv"
+CONFIG_VOL_MONITOR_INA220=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_SPL_MMC=y
 CONFIG_SPL_SERIAL=y
diff --git a/configs/ls1043aqds_sdcard_qspi_defconfig b/configs/ls1043aqds_sdcard_qspi_defconfig
index 1816ee1c89aa..565d371e7876 100644
--- a/configs/ls1043aqds_sdcard_qspi_defconfig
+++ b/configs/ls1043aqds_sdcard_qspi_defconfig
@@ -17,6 +17,10 @@ CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1043a-qds-duart"
 CONFIG_SPL_TEXT_BASE=0x10000000
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="ls1043aqds_vdd_mv"
+CONFIG_VOL_MONITOR_INA220=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_SPL_MMC=y
 CONFIG_SPL_SERIAL=y
diff --git a/configs/ls1043aqds_tfa_SECURE_BOOT_defconfig b/configs/ls1043aqds_tfa_SECURE_BOOT_defconfig
index befc722350f4..8f07442c4cb3 100644
--- a/configs/ls1043aqds_tfa_SECURE_BOOT_defconfig
+++ b/configs/ls1043aqds_tfa_SECURE_BOOT_defconfig
@@ -15,6 +15,10 @@ CONFIG_SYS_I2C_MXC_I2C4=y
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1043a-qds-duart"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="ls1043aqds_vdd_mv"
+CONFIG_VOL_MONITOR_INA220=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
 CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y
 CONFIG_AHCI=y
diff --git a/configs/ls1043aqds_tfa_defconfig b/configs/ls1043aqds_tfa_defconfig
index 2817274cc0cb..3f157335d409 100644
--- a/configs/ls1043aqds_tfa_defconfig
+++ b/configs/ls1043aqds_tfa_defconfig
@@ -16,6 +16,10 @@ CONFIG_SYS_I2C_MXC_I2C4=y
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1043a-qds-duart"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="ls1043aqds_vdd_mv"
+CONFIG_VOL_MONITOR_INA220=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
 CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y
 CONFIG_AHCI=y
diff --git a/configs/ls1046aqds_SECURE_BOOT_defconfig b/configs/ls1046aqds_SECURE_BOOT_defconfig
index 0147f5b81b40..367272a35234 100644
--- a/configs/ls1046aqds_SECURE_BOOT_defconfig
+++ b/configs/ls1046aqds_SECURE_BOOT_defconfig
@@ -14,6 +14,10 @@ CONFIG_SYS_I2C_MXC_I2C4=y
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-qds-duart"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="ls1046aqds_vdd_mv"
+CONFIG_VOL_MONITOR_INA220=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_AHCI=y
 CONFIG_DISTRO_DEFAULTS=y
diff --git a/configs/ls1046aqds_defconfig b/configs/ls1046aqds_defconfig
index 1a29451e060e..63da306fe0fe 100644
--- a/configs/ls1046aqds_defconfig
+++ b/configs/ls1046aqds_defconfig
@@ -14,6 +14,10 @@ CONFIG_SYS_I2C_MXC_I2C4=y
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-qds-duart"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="ls1046aqds_vdd_mv"
+CONFIG_VOL_MONITOR_INA220=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_AHCI=y
 CONFIG_DISTRO_DEFAULTS=y
diff --git a/configs/ls1046aqds_lpuart_defconfig b/configs/ls1046aqds_lpuart_defconfig
index ebafd9538e5f..0687e411c9aa 100644
--- a/configs/ls1046aqds_lpuart_defconfig
+++ b/configs/ls1046aqds_lpuart_defconfig
@@ -14,6 +14,10 @@ CONFIG_SYS_I2C_MXC_I2C4=y
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-qds-lpuart"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="ls1046aqds_vdd_mv"
+CONFIG_VOL_MONITOR_INA220=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_AHCI=y
 CONFIG_DISTRO_DEFAULTS=y
diff --git a/configs/ls1046aqds_nand_defconfig b/configs/ls1046aqds_nand_defconfig
index 1a9b743e0896..d87f45e5fe94 100644
--- a/configs/ls1046aqds_nand_defconfig
+++ b/configs/ls1046aqds_nand_defconfig
@@ -17,6 +17,10 @@ CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-qds-duart"
 CONFIG_SPL_TEXT_BASE=0x10000000
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="ls1046aqds_vdd_mv"
+CONFIG_VOL_MONITOR_INA220=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_SPL_SERIAL=y
 CONFIG_SPL_DRIVERS_MISC=y
diff --git a/configs/ls1046aqds_qspi_defconfig b/configs/ls1046aqds_qspi_defconfig
index 3e52a9e55013..90dc41f75fa2 100644
--- a/configs/ls1046aqds_qspi_defconfig
+++ b/configs/ls1046aqds_qspi_defconfig
@@ -15,6 +15,10 @@ CONFIG_SYS_I2C_MXC_I2C4=y
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-qds-duart"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="ls1046aqds_vdd_mv"
+CONFIG_VOL_MONITOR_INA220=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_AHCI=y
 CONFIG_DISTRO_DEFAULTS=y
diff --git a/configs/ls1046aqds_sdcard_ifc_defconfig b/configs/ls1046aqds_sdcard_ifc_defconfig
index e204c2b5de94..db9b28381e69 100644
--- a/configs/ls1046aqds_sdcard_ifc_defconfig
+++ b/configs/ls1046aqds_sdcard_ifc_defconfig
@@ -17,6 +17,10 @@ CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-qds-duart"
 CONFIG_SPL_TEXT_BASE=0x10000000
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="ls1046aqds_vdd_mv"
+CONFIG_VOL_MONITOR_INA220=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_SPL_MMC=y
 CONFIG_SPL_SERIAL=y
diff --git a/configs/ls1046aqds_sdcard_qspi_defconfig b/configs/ls1046aqds_sdcard_qspi_defconfig
index 17f1d486bf8d..2e1f8954ab6a 100644
--- a/configs/ls1046aqds_sdcard_qspi_defconfig
+++ b/configs/ls1046aqds_sdcard_qspi_defconfig
@@ -17,6 +17,10 @@ CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-qds-duart"
 CONFIG_SPL_TEXT_BASE=0x10000000
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="ls1046aqds_vdd_mv"
+CONFIG_VOL_MONITOR_INA220=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_SPL_MMC=y
 CONFIG_SPL_SERIAL=y
diff --git a/configs/ls1046aqds_tfa_SECURE_BOOT_defconfig b/configs/ls1046aqds_tfa_SECURE_BOOT_defconfig
index 19d66317d647..0db84af4c508 100644
--- a/configs/ls1046aqds_tfa_SECURE_BOOT_defconfig
+++ b/configs/ls1046aqds_tfa_SECURE_BOOT_defconfig
@@ -15,6 +15,10 @@ CONFIG_SYS_I2C_MXC_I2C4=y
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-qds-duart"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="ls1046aqds_vdd_mv"
+CONFIG_VOL_MONITOR_INA220=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
 CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y
 CONFIG_AHCI=y
diff --git a/configs/ls1046aqds_tfa_defconfig b/configs/ls1046aqds_tfa_defconfig
index 6f2bf0ff5165..d52d0ffd34ce 100644
--- a/configs/ls1046aqds_tfa_defconfig
+++ b/configs/ls1046aqds_tfa_defconfig
@@ -16,6 +16,10 @@ CONFIG_SYS_I2C_MXC_I2C4=y
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-qds-duart"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="ls1046aqds_vdd_mv"
+CONFIG_VOL_MONITOR_INA220=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
 CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y
 CONFIG_AHCI=y
diff --git a/configs/ls1088aqds_defconfig b/configs/ls1088aqds_defconfig
index 8d258178038f..2e88adc7ac1d 100644
--- a/configs/ls1088aqds_defconfig
+++ b/configs/ls1088aqds_defconfig
@@ -11,6 +11,11 @@ CONFIG_ENV_SECT_SIZE=0x20000
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1088a-qds"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_SPL_VID=y
+CONFIG_VID_FLS_ENV="ls1088aqds_vdd_mv"
+CONFIG_VOL_MONITOR_LTC3882_READ=y
+CONFIG_VOL_MONITOR_LTC3882_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_F is not set
diff --git a/configs/ls1088aqds_qspi_SECURE_BOOT_defconfig b/configs/ls1088aqds_qspi_SECURE_BOOT_defconfig
index 250d2500c6e7..dbcd6e2ea2e9 100644
--- a/configs/ls1088aqds_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1088aqds_qspi_SECURE_BOOT_defconfig
@@ -11,6 +11,11 @@ CONFIG_NXP_ESBC=y
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1088a-qds"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_SPL_VID=y
+CONFIG_VID_FLS_ENV="ls1088aqds_vdd_mv"
+CONFIG_VOL_MONITOR_LTC3882_READ=y
+CONFIG_VOL_MONITOR_LTC3882_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_QSPI_AHB_INIT=y
 CONFIG_AHCI=y
diff --git a/configs/ls1088aqds_qspi_defconfig b/configs/ls1088aqds_qspi_defconfig
index 71fdea4b58b7..7033c92897b7 100644
--- a/configs/ls1088aqds_qspi_defconfig
+++ b/configs/ls1088aqds_qspi_defconfig
@@ -12,6 +12,11 @@ CONFIG_ENV_SECT_SIZE=0x40000
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1088a-qds"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_SPL_VID=y
+CONFIG_VID_FLS_ENV="ls1088aqds_vdd_mv"
+CONFIG_VOL_MONITOR_LTC3882_READ=y
+CONFIG_VOL_MONITOR_LTC3882_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_QSPI_AHB_INIT=y
 CONFIG_AHCI=y
diff --git a/configs/ls1088aqds_sdcard_ifc_defconfig b/configs/ls1088aqds_sdcard_ifc_defconfig
index a9fe774ccc9f..bd6c9822c026 100644
--- a/configs/ls1088aqds_sdcard_ifc_defconfig
+++ b/configs/ls1088aqds_sdcard_ifc_defconfig
@@ -14,6 +14,11 @@ CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1088a-qds"
 CONFIG_SPL_TEXT_BASE=0x1800a000
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_SPL_VID=y
+CONFIG_VID_FLS_ENV="ls1088aqds_vdd_mv"
+CONFIG_VOL_MONITOR_LTC3882_READ=y
+CONFIG_VOL_MONITOR_LTC3882_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_SPL_MMC=y
 CONFIG_SPL_SERIAL=y
diff --git a/configs/ls1088aqds_sdcard_qspi_defconfig b/configs/ls1088aqds_sdcard_qspi_defconfig
index 4731fe7839c2..9df98452967f 100644
--- a/configs/ls1088aqds_sdcard_qspi_defconfig
+++ b/configs/ls1088aqds_sdcard_qspi_defconfig
@@ -14,6 +14,11 @@ CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1088a-qds"
 CONFIG_SPL_TEXT_BASE=0x1800a000
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_SPL_VID=y
+CONFIG_VID_FLS_ENV="ls1088aqds_vdd_mv"
+CONFIG_VOL_MONITOR_LTC3882_READ=y
+CONFIG_VOL_MONITOR_LTC3882_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_SPL_MMC=y
 CONFIG_SPL_SERIAL=y
diff --git a/configs/ls1088aqds_tfa_defconfig b/configs/ls1088aqds_tfa_defconfig
index d367f7449fb1..d78ea5c091b1 100644
--- a/configs/ls1088aqds_tfa_defconfig
+++ b/configs/ls1088aqds_tfa_defconfig
@@ -14,6 +14,11 @@ CONFIG_ENV_SECT_SIZE=0x40000
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1088a-qds"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_SPL_VID=y
+CONFIG_VID_FLS_ENV="ls1088aqds_vdd_mv"
+CONFIG_VOL_MONITOR_LTC3882_READ=y
+CONFIG_VOL_MONITOR_LTC3882_SET=y
 CONFIG_QSPI_AHB_INIT=y
 CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
 CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y
diff --git a/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig b/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig
index 690e70264f2d..ed0943b6ec75 100644
--- a/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig
@@ -11,6 +11,11 @@ CONFIG_NXP_ESBC=y
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1088a-rdb"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_SPL_VID=y
+CONFIG_VID_FLS_ENV="ls1088ardb_vdd_mv"
+CONFIG_VOL_MONITOR_LTC3882_READ=y
+CONFIG_VOL_MONITOR_LTC3882_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_QSPI_AHB_INIT=y
 CONFIG_AHCI=y
diff --git a/configs/ls1088ardb_qspi_defconfig b/configs/ls1088ardb_qspi_defconfig
index 135f03bd13d8..486a20dbc559 100644
--- a/configs/ls1088ardb_qspi_defconfig
+++ b/configs/ls1088ardb_qspi_defconfig
@@ -12,6 +12,11 @@ CONFIG_ENV_SECT_SIZE=0x40000
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1088a-rdb"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_SPL_VID=y
+CONFIG_VID_FLS_ENV="ls1088ardb_vdd_mv"
+CONFIG_VOL_MONITOR_LTC3882_READ=y
+CONFIG_VOL_MONITOR_LTC3882_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_QSPI_AHB_INIT=y
 CONFIG_AHCI=y
diff --git a/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig b/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig
index d2b90ebd0684..f0beb9fdfc71 100644
--- a/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig
@@ -14,6 +14,11 @@ CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1088a-rdb"
 CONFIG_SPL_TEXT_BASE=0x1800a000
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_SPL_VID=y
+CONFIG_VID_FLS_ENV="ls1088ardb_vdd_mv"
+CONFIG_VOL_MONITOR_LTC3882_READ=y
+CONFIG_VOL_MONITOR_LTC3882_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_SPL_MMC=y
 CONFIG_SPL_SERIAL=y
diff --git a/configs/ls1088ardb_sdcard_qspi_defconfig b/configs/ls1088ardb_sdcard_qspi_defconfig
index 0fc780971094..d54ff504a847 100644
--- a/configs/ls1088ardb_sdcard_qspi_defconfig
+++ b/configs/ls1088ardb_sdcard_qspi_defconfig
@@ -14,6 +14,11 @@ CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1088a-rdb"
 CONFIG_SPL_TEXT_BASE=0x1800a000
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_SPL_VID=y
+CONFIG_VID_FLS_ENV="ls1088ardb_vdd_mv"
+CONFIG_VOL_MONITOR_LTC3882_READ=y
+CONFIG_VOL_MONITOR_LTC3882_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_SPL_MMC=y
 CONFIG_SPL_SERIAL=y
diff --git a/configs/ls1088ardb_tfa_SECURE_BOOT_defconfig b/configs/ls1088ardb_tfa_SECURE_BOOT_defconfig
index a237487d9f60..dd547f797b3a 100644
--- a/configs/ls1088ardb_tfa_SECURE_BOOT_defconfig
+++ b/configs/ls1088ardb_tfa_SECURE_BOOT_defconfig
@@ -13,6 +13,11 @@ CONFIG_NXP_ESBC=y
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1088a-rdb"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_SPL_VID=y
+CONFIG_VID_FLS_ENV="ls1088ardb_vdd_mv"
+CONFIG_VOL_MONITOR_LTC3882_READ=y
+CONFIG_VOL_MONITOR_LTC3882_SET=y
 CONFIG_QSPI_AHB_INIT=y
 CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
 CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y
diff --git a/configs/ls1088ardb_tfa_defconfig b/configs/ls1088ardb_tfa_defconfig
index 013db8ce49b9..fc2d1b475c6a 100644
--- a/configs/ls1088ardb_tfa_defconfig
+++ b/configs/ls1088ardb_tfa_defconfig
@@ -14,6 +14,11 @@ CONFIG_ENV_SECT_SIZE=0x40000
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1088a-rdb"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_SPL_VID=y
+CONFIG_VID_FLS_ENV="ls1088ardb_vdd_mv"
+CONFIG_VOL_MONITOR_LTC3882_READ=y
+CONFIG_VOL_MONITOR_LTC3882_SET=y
 CONFIG_QSPI_AHB_INIT=y
 CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
 CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y
diff --git a/configs/ls2080ardb_SECURE_BOOT_defconfig b/configs/ls2080ardb_SECURE_BOOT_defconfig
index 0c9ba7a46e1a..686dbff5a64e 100644
--- a/configs/ls2080ardb_SECURE_BOOT_defconfig
+++ b/configs/ls2080ardb_SECURE_BOOT_defconfig
@@ -8,6 +8,10 @@ CONFIG_ENV_SIZE=0x2000
 CONFIG_NXP_ESBC=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2080a-rdb"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="ls2080ardb_vdd_mv"
+CONFIG_VOL_MONITOR_IR36021_READ=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_F is not set
diff --git a/configs/ls2080ardb_defconfig b/configs/ls2080ardb_defconfig
index 896262772e5d..be979f6bf21a 100644
--- a/configs/ls2080ardb_defconfig
+++ b/configs/ls2080ardb_defconfig
@@ -8,6 +8,10 @@ CONFIG_ENV_SIZE=0x2000
 CONFIG_ENV_SECT_SIZE=0x20000
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2080a-rdb"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="ls2080ardb_vdd_mv"
+CONFIG_VOL_MONITOR_IR36021_READ=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_F is not set
diff --git a/configs/ls2080ardb_nand_defconfig b/configs/ls2080ardb_nand_defconfig
index 7e28f8a429a1..33f1bfa243cd 100644
--- a/configs/ls2080ardb_nand_defconfig
+++ b/configs/ls2080ardb_nand_defconfig
@@ -11,6 +11,10 @@ CONFIG_ENV_OFFSET=0x200000
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2080a-rdb"
 CONFIG_SPL_TEXT_BASE=0x1800a000
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="ls2080ardb_vdd_mv"
+CONFIG_VOL_MONITOR_IR36021_READ=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_SPL_SERIAL=y
 CONFIG_SPL_DRIVERS_MISC=y
 CONFIG_SPL=y
diff --git a/configs/ls2081ardb_defconfig b/configs/ls2081ardb_defconfig
index e08457e99a29..3fe8b5bce793 100644
--- a/configs/ls2081ardb_defconfig
+++ b/configs/ls2081ardb_defconfig
@@ -9,6 +9,10 @@ CONFIG_ENV_OFFSET=0x300000
 CONFIG_ENV_SECT_SIZE=0x40000
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2081a-rdb"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="ls2080ardb_vdd_mv"
+CONFIG_VOL_MONITOR_IR36021_READ=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_QSPI_AHB_INIT=y
 CONFIG_AHCI=y
diff --git a/configs/ls2088ardb_qspi_SECURE_BOOT_defconfig b/configs/ls2088ardb_qspi_SECURE_BOOT_defconfig
index a54ee3b502a7..a299db95c899 100644
--- a/configs/ls2088ardb_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls2088ardb_qspi_SECURE_BOOT_defconfig
@@ -9,6 +9,10 @@ CONFIG_NXP_ESBC=y
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2088a-rdb-qspi"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="ls2080ardb_vdd_mv"
+CONFIG_VOL_MONITOR_IR36021_READ=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_QSPI_AHB_INIT=y
 CONFIG_AHCI=y
diff --git a/configs/ls2088ardb_qspi_defconfig b/configs/ls2088ardb_qspi_defconfig
index 7479c188cd60..01c7d3230597 100644
--- a/configs/ls2088ardb_qspi_defconfig
+++ b/configs/ls2088ardb_qspi_defconfig
@@ -10,6 +10,10 @@ CONFIG_ENV_SECT_SIZE=0x40000
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2088a-rdb-qspi"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="ls2080ardb_vdd_mv"
+CONFIG_VOL_MONITOR_IR36021_READ=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_QSPI_AHB_INIT=y
 CONFIG_AHCI=y
diff --git a/configs/ls2088ardb_tfa_SECURE_BOOT_defconfig b/configs/ls2088ardb_tfa_SECURE_BOOT_defconfig
index 77f72c822a44..22fb73f70148 100644
--- a/configs/ls2088ardb_tfa_SECURE_BOOT_defconfig
+++ b/configs/ls2088ardb_tfa_SECURE_BOOT_defconfig
@@ -11,6 +11,10 @@ CONFIG_NXP_ESBC=y
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2088a-rdb-qspi"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="ls2080ardb_vdd_mv"
+CONFIG_VOL_MONITOR_IR36021_READ=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_QSPI_AHB_INIT=y
 CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
 CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y
diff --git a/configs/ls2088ardb_tfa_defconfig b/configs/ls2088ardb_tfa_defconfig
index 637cbf206903..5564c10e8780 100644
--- a/configs/ls2088ardb_tfa_defconfig
+++ b/configs/ls2088ardb_tfa_defconfig
@@ -12,6 +12,10 @@ CONFIG_ENV_SECT_SIZE=0x40000
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2088a-rdb-qspi"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_VID_FLS_ENV="ls2080ardb_vdd_mv"
+CONFIG_VOL_MONITOR_IR36021_READ=y
+CONFIG_VOL_MONITOR_IR36021_SET=y
 CONFIG_QSPI_AHB_INIT=y
 CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
 CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y
diff --git a/configs/lx2160aqds_tfa_SECURE_BOOT_defconfig b/configs/lx2160aqds_tfa_SECURE_BOOT_defconfig
index 190f00c41ac9..de76bf538a45 100644
--- a/configs/lx2160aqds_tfa_SECURE_BOOT_defconfig
+++ b/configs/lx2160aqds_tfa_SECURE_BOOT_defconfig
@@ -12,6 +12,11 @@ CONFIG_NXP_ESBC=y
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-lx2160a-qds"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_SPL_VID=y
+CONFIG_VID_FLS_ENV="lx2160aqds_vdd_mv"
+CONFIG_VOL_MONITOR_LTC3882_READ=y
+CONFIG_VOL_MONITOR_LTC3882_SET=y
 CONFIG_FSPI_AHB_EN_4BYTE=y
 CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
 CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y
diff --git a/configs/lx2160aqds_tfa_defconfig b/configs/lx2160aqds_tfa_defconfig
index 0a067ba51b72..a4a51e5aed89 100644
--- a/configs/lx2160aqds_tfa_defconfig
+++ b/configs/lx2160aqds_tfa_defconfig
@@ -13,6 +13,11 @@ CONFIG_ENV_SECT_SIZE=0x20000
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-lx2160a-qds"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_SPL_VID=y
+CONFIG_VID_FLS_ENV="lx2160aqds_vdd_mv"
+CONFIG_VOL_MONITOR_LTC3882_READ=y
+CONFIG_VOL_MONITOR_LTC3882_SET=y
 CONFIG_FSPI_AHB_EN_4BYTE=y
 CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
 CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y
diff --git a/configs/lx2160ardb_tfa_SECURE_BOOT_defconfig b/configs/lx2160ardb_tfa_SECURE_BOOT_defconfig
index d13474419af6..84ff1256cde2 100644
--- a/configs/lx2160ardb_tfa_SECURE_BOOT_defconfig
+++ b/configs/lx2160ardb_tfa_SECURE_BOOT_defconfig
@@ -12,6 +12,11 @@ CONFIG_NXP_ESBC=y
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-lx2160a-rdb"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_SPL_VID=y
+CONFIG_VID_FLS_ENV="lx2160ardb_vdd_mv"
+CONFIG_VOL_MONITOR_LTC3882_READ=y
+CONFIG_VOL_MONITOR_LTC3882_SET=y
 CONFIG_EMC2305=y
 CONFIG_FSPI_AHB_EN_4BYTE=y
 CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
diff --git a/configs/lx2160ardb_tfa_defconfig b/configs/lx2160ardb_tfa_defconfig
index a21256c51b35..75a395c2b2e5 100644
--- a/configs/lx2160ardb_tfa_defconfig
+++ b/configs/lx2160ardb_tfa_defconfig
@@ -13,6 +13,11 @@ CONFIG_ENV_SECT_SIZE=0x20000
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-lx2160a-rdb"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_SPL_VID=y
+CONFIG_VID_FLS_ENV="lx2160ardb_vdd_mv"
+CONFIG_VOL_MONITOR_LTC3882_READ=y
+CONFIG_VOL_MONITOR_LTC3882_SET=y
 CONFIG_EMC2305=y
 CONFIG_FSPI_AHB_EN_4BYTE=y
 CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
diff --git a/configs/lx2160ardb_tfa_stmm_defconfig b/configs/lx2160ardb_tfa_stmm_defconfig
index 10fd27d83de3..7cb503a8ddc3 100644
--- a/configs/lx2160ardb_tfa_stmm_defconfig
+++ b/configs/lx2160ardb_tfa_stmm_defconfig
@@ -13,6 +13,11 @@ CONFIG_ENV_SECT_SIZE=0x20000
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-lx2160a-rdb"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_SPL_VID=y
+CONFIG_VID_FLS_ENV="lx2160ardb_vdd_mv"
+CONFIG_VOL_MONITOR_LTC3882_READ=y
+CONFIG_VOL_MONITOR_LTC3882_SET=y
 CONFIG_EMC2305=y
 CONFIG_FSPI_AHB_EN_4BYTE=y
 CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
diff --git a/configs/lx2162aqds_tfa_SECURE_BOOT_defconfig b/configs/lx2162aqds_tfa_SECURE_BOOT_defconfig
index 0df098de9a65..61cbd265c104 100644
--- a/configs/lx2162aqds_tfa_SECURE_BOOT_defconfig
+++ b/configs/lx2162aqds_tfa_SECURE_BOOT_defconfig
@@ -12,6 +12,11 @@ CONFIG_NXP_ESBC=y
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-lx2162a-qds"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_SPL_VID=y
+CONFIG_VID_FLS_ENV="lx2162aqds_vdd_mv"
+CONFIG_VOL_MONITOR_LTC3882_READ=y
+CONFIG_VOL_MONITOR_LTC3882_SET=y
 CONFIG_FSPI_AHB_EN_4BYTE=y
 CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
 CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y
diff --git a/configs/lx2162aqds_tfa_defconfig b/configs/lx2162aqds_tfa_defconfig
index d2102241cc12..aa118d972d9e 100644
--- a/configs/lx2162aqds_tfa_defconfig
+++ b/configs/lx2162aqds_tfa_defconfig
@@ -13,6 +13,11 @@ CONFIG_ENV_SECT_SIZE=0x20000
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-lx2162a-qds"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_SPL_VID=y
+CONFIG_VID_FLS_ENV="lx2162aqds_vdd_mv"
+CONFIG_VOL_MONITOR_LTC3882_READ=y
+CONFIG_VOL_MONITOR_LTC3882_SET=y
 CONFIG_FSPI_AHB_EN_4BYTE=y
 CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
 CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y
diff --git a/configs/lx2162aqds_tfa_verified_boot_defconfig b/configs/lx2162aqds_tfa_verified_boot_defconfig
index 58de9c17a05d..15fe67af9819 100644
--- a/configs/lx2162aqds_tfa_verified_boot_defconfig
+++ b/configs/lx2162aqds_tfa_verified_boot_defconfig
@@ -13,6 +13,11 @@ CONFIG_ENV_SECT_SIZE=0x20000
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-lx2162a-qds"
 CONFIG_FSL_USE_PCA9547_MUX=y
+CONFIG_VID=y
+CONFIG_SPL_VID=y
+CONFIG_VID_FLS_ENV="lx2162aqds_vdd_mv"
+CONFIG_VOL_MONITOR_LTC3882_READ=y
+CONFIG_VOL_MONITOR_LTC3882_SET=y
 CONFIG_FSPI_AHB_EN_4BYTE=y
 CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
 CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y
diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h
index bfd06a51cf3e..0542db562af9 100644
--- a/include/configs/T208xQDS.h
+++ b/include/configs/T208xQDS.h
@@ -360,12 +360,6 @@ unsigned long get_board_sys_clk(void);
 #define I2C_VOL_MONITOR_BUS_V_OVF      0x1
 #define I2C_VOL_MONITOR_BUS_V_SHIFT    3
 
-#define CONFIG_VID_FLS_ENV		"t208xqds_vdd_mv"
-#ifndef CONFIG_SPL_BUILD
-#define CONFIG_VID
-#endif
-#define CONFIG_VOL_MONITOR_IR36021_SET
-#define CONFIG_VOL_MONITOR_IR36021_READ
 /* The lowest and highest voltage allowed for T208xQDS */
 #define VDD_MV_MIN			819
 #define VDD_MV_MAX			1212
diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h
index afd9367b578e..1a8d51c0b9c8 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -312,12 +312,6 @@ unsigned long get_board_sys_clk(void);
 
 #define I2C_MUX_CH_VOL_MONITOR	0xa
 
-#define CONFIG_VID_FLS_ENV		"t208xrdb_vdd_mv"
-#ifndef CONFIG_SPL_BUILD
-#define CONFIG_VID
-#endif
-#define CONFIG_VOL_MONITOR_IR36021_SET
-#define CONFIG_VOL_MONITOR_IR36021_READ
 /* The lowest and highest voltage allowed for T208xRDB */
 #define VDD_MV_MIN			819
 #define VDD_MV_MAX			1212
diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h
index 9c412ec64c9c..6a6721248364 100644
--- a/include/configs/T4240RDB.h
+++ b/include/configs/T4240RDB.h
@@ -408,12 +408,6 @@ unsigned long get_board_sys_clk(void);
 #define I2C_VOL_MONITOR_BUS_V_OVF	0x1
 #define I2C_VOL_MONITOR_BUS_V_SHIFT	3
 
-#define CONFIG_VID_FLS_ENV		"t4240rdb_vdd_mv"
-#ifndef CONFIG_SPL_BUILD
-#define CONFIG_VID
-#endif
-#define CONFIG_VOL_MONITOR_IR36021_SET
-#define CONFIG_VOL_MONITOR_IR36021_READ
 /* The lowest and highest voltage allowed for T4240RDB */
 #define VDD_MV_MIN			819
 #define VDD_MV_MAX			1212
diff --git a/include/configs/ls1043aqds.h b/include/configs/ls1043aqds.h
index ee5660571e54..929830e693a9 100644
--- a/include/configs/ls1043aqds.h
+++ b/include/configs/ls1043aqds.h
@@ -330,12 +330,6 @@ unsigned long get_board_sys_clk(void);
 #define I2C_VOL_MONITOR_BUS_V_OVF      0x1
 #define I2C_VOL_MONITOR_BUS_V_SHIFT    3
 
-#define CONFIG_VID_FLS_ENV		"ls1043aqds_vdd_mv"
-#ifndef CONFIG_SPL_BUILD
-#define CONFIG_VID
-#endif
-#define CONFIG_VOL_MONITOR_IR36021_SET
-#define CONFIG_VOL_MONITOR_INA220
 /* The lowest and highest voltage allowed for LS1043AQDS */
 #define VDD_MV_MIN			819
 #define VDD_MV_MAX			1212
diff --git a/include/configs/ls1046aqds.h b/include/configs/ls1046aqds.h
index c032ebe490e1..d1803d2623aa 100644
--- a/include/configs/ls1046aqds.h
+++ b/include/configs/ls1046aqds.h
@@ -338,12 +338,6 @@ unsigned long get_board_sys_clk(void);
 #define I2C_VOL_MONITOR_BUS_V_OVF      0x1
 #define I2C_VOL_MONITOR_BUS_V_SHIFT    3
 
-#define CONFIG_VID_FLS_ENV		"ls1046aqds_vdd_mv"
-#ifndef CONFIG_SPL_BUILD
-#define CONFIG_VID
-#endif
-#define CONFIG_VOL_MONITOR_IR36021_SET
-#define CONFIG_VOL_MONITOR_INA220
 /* The lowest and highest voltage allowed for LS1046AQDS */
 #define VDD_MV_MIN			819
 #define VDD_MV_MAX			1212
diff --git a/include/configs/ls1088aqds.h b/include/configs/ls1088aqds.h
index 0c22fa98b9ee..dcf73a914bf1 100644
--- a/include/configs/ls1088aqds.h
+++ b/include/configs/ls1088aqds.h
@@ -298,16 +298,10 @@ unsigned long get_board_sys_clk(void);
 #define I2C_VOL_MONITOR_BUS_V_SHIFT    3
 #define I2C_SVDD_MONITOR_ADDR           0x4F
 
-#define CONFIG_VID_FLS_ENV              "ls1088aqds_vdd_mv"
-#define CONFIG_VID
-
 /* The lowest and highest voltage allowed for LS1088AQDS */
 #define VDD_MV_MIN			819
 #define VDD_MV_MAX			1212
 
-#define CONFIG_VOL_MONITOR_LTC3882_SET
-#define CONFIG_VOL_MONITOR_LTC3882_READ
-
 #define PWM_CHANNEL0                    0x0
 
 /*
diff --git a/include/configs/ls1088ardb.h b/include/configs/ls1088ardb.h
index 935104290853..0f7778c58ee3 100644
--- a/include/configs/ls1088ardb.h
+++ b/include/configs/ls1088ardb.h
@@ -197,16 +197,10 @@
 #define I2C_VOL_MONITOR_BUS_V_SHIFT    3
 #define I2C_SVDD_MONITOR_ADDR		0x4F
 
-#define CONFIG_VID_FLS_ENV              "ls1088ardb_vdd_mv"
-#define CONFIG_VID
-
 /* The lowest and highest voltage allowed for LS1088ARDB */
 #define VDD_MV_MIN			819
 #define VDD_MV_MAX			1212
 
-#define CONFIG_VOL_MONITOR_LTC3882_SET
-#define CONFIG_VOL_MONITOR_LTC3882_READ
-
 #define PWM_CHANNEL0                    0x0
 
 /*
diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h
index 50d6b03b3cc8..96b804b57f42 100644
--- a/include/configs/ls2080ardb.h
+++ b/include/configs/ls2080ardb.h
@@ -17,13 +17,7 @@
 
 #define I2C_MUX_CH_VOL_MONITOR		0xa
 #define I2C_VOL_MONITOR_ADDR		0x38
-#define CONFIG_VOL_MONITOR_IR36021_READ
-#define CONFIG_VOL_MONITOR_IR36021_SET
 
-#define CONFIG_VID_FLS_ENV		"ls2080ardb_vdd_mv"
-#ifndef CONFIG_SPL_BUILD
-#define CONFIG_VID
-#endif
 /* step the IR regulator in 5mV increments */
 #define IR_VDD_STEP_DOWN		5
 #define IR_VDD_STEP_UP			5
diff --git a/include/configs/lx2160aqds.h b/include/configs/lx2160aqds.h
index a04bbb6e6eb0..a07ebeb7233c 100644
--- a/include/configs/lx2160aqds.h
+++ b/include/configs/lx2160aqds.h
@@ -8,12 +8,6 @@
 
 #include "lx2160a_common.h"
 
-/* VID */
-#define CONFIG_VID_FLS_ENV		"lx2160aqds_vdd_mv"
-#define CONFIG_VID
-#define CONFIG_VOL_MONITOR_LTC3882_SET
-#define CONFIG_VOL_MONITOR_LTC3882_READ
-
 /* RTC */
 #define CONFIG_SYS_RTC_BUS_NUM		0
 
diff --git a/include/configs/lx2160ardb.h b/include/configs/lx2160ardb.h
index 4fd3e5483093..a8a9f8259ebe 100644
--- a/include/configs/lx2160ardb.h
+++ b/include/configs/lx2160ardb.h
@@ -8,12 +8,6 @@
 
 #include "lx2160a_common.h"
 
-/* VID */
-#define CONFIG_VID_FLS_ENV		"lx2160ardb_vdd_mv"
-#define CONFIG_VID
-#define CONFIG_VOL_MONITOR_LTC3882_SET
-#define CONFIG_VOL_MONITOR_LTC3882_READ
-
 /* RTC */
 #define CONFIG_SYS_RTC_BUS_NUM		4
 
diff --git a/include/configs/lx2162aqds.h b/include/configs/lx2162aqds.h
index 67c469c0090d..c2fa5794c8a1 100644
--- a/include/configs/lx2162aqds.h
+++ b/include/configs/lx2162aqds.h
@@ -12,12 +12,6 @@
 #undef CONFIG_USB_MAX_CONTROLLER_COUNT
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1
 
-/* Voltage monitor on channel 2*/
-#define CONFIG_VID_FLS_ENV		"lx2162aqds_vdd_mv"
-#define CONFIG_VID
-#define CONFIG_VOL_MONITOR_LTC3882_SET
-#define CONFIG_VOL_MONITOR_LTC3882_READ
-
 /* RTC */
 #define CONFIG_SYS_RTC_BUS_NUM		0
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 07/11] Convert CONFIG_SYS_PCI_64BIT to Kconfig
  2021-12-13  3:12 [PATCH 01/11] pci: Remove unused FSL_PCI_INIT code Tom Rini
                   ` (4 preceding siblings ...)
  2021-12-13  3:12 ` [PATCH 06/11] Finish CONFIG_VID et al conversion " Tom Rini
@ 2021-12-13  3:12 ` Tom Rini
  2021-12-28 12:56   ` Tom Rini
  2021-12-13  3:12 ` [PATCH 08/11] warp7, pic32mzdask: Remove SYS_FDT_ADDR/SYS_ENV_ADDR from CONFIG namespace Tom Rini
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 23+ messages in thread
From: Tom Rini @ 2021-12-13  3:12 UTC (permalink / raw)
  To: u-boot

This converts the following to Kconfig:
   CONFIG_SYS_PCI_64BIT

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 arch/arm/Kconfig                          | 2 ++
 arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 2 ++
 arch/arm/mach-octeontx/Kconfig            | 4 ----
 arch/arm/mach-octeontx2/Kconfig           | 4 ----
 configs/MPC837XERDB_defconfig             | 1 +
 configs/durian_defconfig                  | 1 +
 configs/sifive_unmatched_defconfig        | 1 +
 configs/socrates_defconfig                | 1 +
 drivers/pci/Kconfig                       | 6 ++++++
 include/configs/MPC8540ADS.h              | 2 --
 include/configs/MPC8548CDS.h              | 1 -
 include/configs/MPC8560ADS.h              | 1 -
 include/configs/P1010RDB.h                | 1 -
 include/configs/P2041RDB.h                | 1 -
 include/configs/T102xRDB.h                | 1 -
 include/configs/T104xRDB.h                | 2 --
 include/configs/T208xQDS.h                | 1 -
 include/configs/T208xRDB.h                | 1 -
 include/configs/T4240RDB.h                | 1 -
 include/configs/bcm_ns3.h                 | 1 -
 include/configs/corenet_ds.h              | 1 -
 include/configs/durian.h                  | 1 -
 include/configs/kmcent2.h                 | 1 -
 include/configs/lx2160a_common.h          | 1 -
 include/configs/p1_p2_rdb_pc.h            | 1 -
 include/configs/qemu-ppce500.h            | 2 --
 include/configs/sifive-unmatched.h        | 2 --
 include/configs/synquacer.h               | 1 -
 include/configs/uniphier.h                | 2 --
 29 files changed, 14 insertions(+), 33 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index eed27af74e8f..594aec2b92d7 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1907,6 +1907,7 @@ config ARCH_OCTEONTX
 	select OF_LIVE
 	select BOARD_LATE_INIT
 	select SYS_CACHE_SHIFT_7
+	select SYS_PCI_64BIT
 
 config ARCH_OCTEONTX2
 	bool "Support OcteonTX2 SoCs"
@@ -1918,6 +1919,7 @@ config ARCH_OCTEONTX2
 	select OF_LIVE
 	select BOARD_LATE_INIT
 	select SYS_CACHE_SHIFT_7
+	select SYS_PCI_64BIT
 
 config TARGET_THUNDERX_88XX
 	bool "Support ThunderX 88xx"
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
index a499a9f56b47..3b69614fd718 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
+++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
@@ -262,6 +262,7 @@ config ARCH_LX2162A
 	select SYS_FSL_HAS_DDR4
 	select SYS_FSL_SEC_COMPAT_5
 	select SYS_FSL_SEC_LE
+	select SYS_PCI_64BIT
 	select ARCH_EARLY_INIT_R
 	select BOARD_EARLY_INIT_F
 	select SYS_I2C_MXC
@@ -301,6 +302,7 @@ config ARCH_LX2160A
 	select SYS_FSL_HAS_DDR4
 	select SYS_FSL_SEC_COMPAT_5
 	select SYS_FSL_SEC_LE
+	select SYS_PCI_64BIT
 	select ARCH_EARLY_INIT_R
 	select BOARD_EARLY_INIT_F
 	select SYS_I2C_MXC
diff --git a/arch/arm/mach-octeontx/Kconfig b/arch/arm/mach-octeontx/Kconfig
index 28ecf9821f9d..542f48047607 100644
--- a/arch/arm/mach-octeontx/Kconfig
+++ b/arch/arm/mach-octeontx/Kconfig
@@ -16,8 +16,4 @@ config SYS_SOC
 	string
 	default "octeontx"
 
-config SYS_PCI_64BIT
-	bool
-	default y
-
 endif
diff --git a/arch/arm/mach-octeontx2/Kconfig b/arch/arm/mach-octeontx2/Kconfig
index 8e5cb0f6380e..f6158df90865 100644
--- a/arch/arm/mach-octeontx2/Kconfig
+++ b/arch/arm/mach-octeontx2/Kconfig
@@ -16,8 +16,4 @@ config SYS_SOC
 	string
 	default "octeontx2"
 
-config SYS_PCI_64BIT
-	bool
-	default y
-
 endif
diff --git a/configs/MPC837XERDB_defconfig b/configs/MPC837XERDB_defconfig
index 16d425124a87..192bcae704e0 100644
--- a/configs/MPC837XERDB_defconfig
+++ b/configs/MPC837XERDB_defconfig
@@ -5,6 +5,7 @@ CONFIG_ENV_SIZE=0x4000
 CONFIG_ENV_SECT_SIZE=0x10000
 CONFIG_DEFAULT_DEVICE_TREE="mpc8379erdb"
 CONFIG_SYS_CLK_FREQ=66666667
+# CONFIG_SYS_PCI_64BIT is not set
 CONFIG_MPC83xx=y
 CONFIG_HIGH_BATS=y
 CONFIG_TARGET_MPC837XERDB=y
diff --git a/configs/durian_defconfig b/configs/durian_defconfig
index 158fec2dc432..b44fd90df53c 100644
--- a/configs/durian_defconfig
+++ b/configs/durian_defconfig
@@ -7,6 +7,7 @@ CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_SIZE=0x1000
 CONFIG_DEFAULT_DEVICE_TREE="phytium-durian"
 # CONFIG_PSCI_RESET is not set
+CONFIG_SYS_PCI_64BIT=y
 CONFIG_AHCI=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_SYS_LOAD_ADDR=0x90000000
diff --git a/configs/sifive_unmatched_defconfig b/configs/sifive_unmatched_defconfig
index 37f3aad94eab..c733d8f31e96 100644
--- a/configs/sifive_unmatched_defconfig
+++ b/configs/sifive_unmatched_defconfig
@@ -9,6 +9,7 @@ CONFIG_DEFAULT_DEVICE_TREE="hifive-unmatched-a00"
 CONFIG_SPL_MMC=y
 CONFIG_SPL=y
 CONFIG_SPL_SPI=y
+CONFIG_SYS_PCI_64BIT=y
 CONFIG_AHCI=y
 CONFIG_TARGET_SIFIVE_UNMATCHED=y
 CONFIG_ARCH_RV64I=y
diff --git a/configs/socrates_defconfig b/configs/socrates_defconfig
index f2e927107c42..ea0224d65035 100644
--- a/configs/socrates_defconfig
+++ b/configs/socrates_defconfig
@@ -3,6 +3,7 @@ CONFIG_SYS_TEXT_BASE=0xfff80000
 CONFIG_ENV_SIZE=0x4000
 CONFIG_ENV_SECT_SIZE=0x20000
 CONFIG_DEFAULT_DEVICE_TREE="socrates"
+# CONFIG_SYS_PCI_64BIT is not set
 CONFIG_MPC85xx=y
 # CONFIG_CMD_ERRATA is not set
 CONFIG_TARGET_SOCRATES=y
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index cc139af6cb57..42f8cb6be0dc 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -19,6 +19,12 @@ config DM_PCI_COMPAT
 	  measure when porting a board to use driver model for PCI. Once the
 	  board is fully supported, this option should be disabled.
 
+config SYS_PCI_64BIT
+	bool "Enable 64-bit PCI resources"
+	default y if PPC
+	help
+	  Enable 64-bit PCI resource access.
+
 config PCI_AARDVARK
 	bool "Enable Aardvark PCIe driver"
 	depends on DM_GPIO
diff --git a/include/configs/MPC8540ADS.h b/include/configs/MPC8540ADS.h
index bedb12b56ec7..94ac0526b1df 100644
--- a/include/configs/MPC8540ADS.h
+++ b/include/configs/MPC8540ADS.h
@@ -26,8 +26,6 @@
 #define CONFIG_HAS_FEC		1	/* 8540 has FEC */
 #endif
 
-#define CONFIG_SYS_PCI_64BIT	1	/* enable 64-bit PCI resources */
-
 /*
  * sysclk for MPC85xx
  *
diff --git a/include/configs/MPC8548CDS.h b/include/configs/MPC8548CDS.h
index abf3b513a830..c5cefd47410f 100644
--- a/include/configs/MPC8548CDS.h
+++ b/include/configs/MPC8548CDS.h
@@ -19,7 +19,6 @@
 #define CONFIG_PCI1		/* PCI controller 1 */
 #define CONFIG_PCIE1		/* PCIE controller 1 (slot 1) */
 #undef CONFIG_PCI2
-#define CONFIG_SYS_PCI_64BIT	1	/* enable 64-bit PCI resources */
 
 #define CONFIG_INTERRUPTS		/* enable pci, srio, ddr interrupts */
 
diff --git a/include/configs/MPC8560ADS.h b/include/configs/MPC8560ADS.h
index d66acd1efa83..32b0f40ceca8 100644
--- a/include/configs/MPC8560ADS.h
+++ b/include/configs/MPC8560ADS.h
@@ -27,7 +27,6 @@
  * assume U-Boot is less than 0.5MB
  */
 
-#define CONFIG_SYS_PCI_64BIT	1	/* enable 64-bit PCI resources */
 #define CONFIG_RESET_PHY_R	1	/* Call reset_phy() */
 
 /*
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index 297246a0bc3d..3a9672bf53e7 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -114,7 +114,6 @@
 #if defined(CONFIG_PCI)
 #define CONFIG_PCIE1			/* PCIE controller 1 (slot 1) */
 #define CONFIG_PCIE2			/* PCIE controller 2 (slot 2) */
-#define CONFIG_SYS_PCI_64BIT		/* enable 64-bit PCI resources */
 
 /*
  * PCI Windows
diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h
index d217a9545a8e..d5f1ffe371b6 100644
--- a/include/configs/P2041RDB.h
+++ b/include/configs/P2041RDB.h
@@ -36,7 +36,6 @@
 #define CONFIG_PCIE1			/* PCIE controller 1 */
 #define CONFIG_PCIE2			/* PCIE controller 2 */
 #define CONFIG_PCIE3			/* PCIE controller 3 */
-#define CONFIG_SYS_PCI_64BIT		/* enable 64-bit PCI resources */
 
 #define CONFIG_SYS_SRIO
 #define CONFIG_SRIO1			/* SRIO port 1 */
diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h
index b543b8647a8a..99a357e0a297 100644
--- a/include/configs/T102xRDB.h
+++ b/include/configs/T102xRDB.h
@@ -416,7 +416,6 @@ unsigned long get_board_sys_clk(void);
 #define CONFIG_PCIE1		/* PCIE controller 1 */
 #define CONFIG_PCIE2		/* PCIE controller 2 */
 #define CONFIG_PCIE3		/* PCIE controller 3 */
-#define CONFIG_SYS_PCI_64BIT	/* enable 64-bit PCI resources */
 
 #ifdef CONFIG_PCI
 /* controller 1, direct to uli, tgtid 3, Base address 20000 */
diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h
index a0db427f87e5..e3f6d6219870 100644
--- a/include/configs/T104xRDB.h
+++ b/include/configs/T104xRDB.h
@@ -85,8 +85,6 @@
 #define CONFIG_PCIE3			/* PCIE controller 3 */
 #define CONFIG_PCIE4			/* PCIE controller 4 */
 
-#define CONFIG_SYS_PCI_64BIT		/* enable 64-bit PCI resources */
-
 #if defined(CONFIG_SPIFLASH)
 #elif defined(CONFIG_MTD_RAW_NAND)
 #ifdef CONFIG_NXP_ESBC
diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h
index 0542db562af9..5cc08bcf2f1a 100644
--- a/include/configs/T208xQDS.h
+++ b/include/configs/T208xQDS.h
@@ -414,7 +414,6 @@ unsigned long get_board_sys_clk(void);
 #define CONFIG_PCIE2		/* PCIE controller 2 */
 #define CONFIG_PCIE3		/* PCIE controller 3 */
 #define CONFIG_PCIE4		/* PCIE controller 4 */
-#define CONFIG_SYS_PCI_64BIT	/* enable 64-bit PCI resources */
 /* controller 1, direct to uli, tgtid 3, Base address 20000 */
 #define CONFIG_SYS_PCIE1_MEM_VIRT	0x80000000
 #define CONFIG_SYS_PCIE1_MEM_PHYS	0xc00000000ull
diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h
index 1a8d51c0b9c8..54833c425107 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -366,7 +366,6 @@ unsigned long get_board_sys_clk(void);
 #define CONFIG_PCIE2		/* PCIE controller 2 */
 #define CONFIG_PCIE3		/* PCIE controller 3 */
 #define CONFIG_PCIE4		/* PCIE controller 4 */
-#define CONFIG_SYS_PCI_64BIT	/* enable 64-bit PCI resources */
 /* controller 1, direct to uli, tgtid 3, Base address 20000 */
 #define CONFIG_SYS_PCIE1_MEM_VIRT	0x80000000
 #define CONFIG_SYS_PCIE1_MEM_PHYS	0xc00000000ull
diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h
index 6a6721248364..fc8c33ac5713 100644
--- a/include/configs/T4240RDB.h
+++ b/include/configs/T4240RDB.h
@@ -60,7 +60,6 @@
 #define CONFIG_PCIE1			/* PCIE controller 1 */
 #define CONFIG_PCIE2			/* PCIE controller 2 */
 #define CONFIG_PCIE3			/* PCIE controller 3 */
-#define CONFIG_SYS_PCI_64BIT		/* enable 64-bit PCI resources */
 
 /*
  * These can be toggled for performance analysis, otherwise use default.
diff --git a/include/configs/bcm_ns3.h b/include/configs/bcm_ns3.h
index 7d6edbd65df6..81b4218c8882 100644
--- a/include/configs/bcm_ns3.h
+++ b/include/configs/bcm_ns3.h
@@ -44,7 +44,6 @@
 /* Access eMMC Boot_1 and Boot_2 partitions */
 
 /* enable 64-bit PCI resources */
-#define CONFIG_SYS_PCI_64BIT		1
 
 #define CONSOLE_ARGS "console_args=console=ttyS0,115200n8\0"
 #define MAX_CPUS "max_cpus=maxcpus=8\0"
diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h
index 95383420d5b6..c8f46ebdb2d5 100644
--- a/include/configs/corenet_ds.h
+++ b/include/configs/corenet_ds.h
@@ -47,7 +47,6 @@
 #define CONFIG_SYS_NUM_CPC		CONFIG_SYS_NUM_DDR_CTLRS
 #define CONFIG_PCIE1			/* PCIE controller 1 */
 #define CONFIG_PCIE2			/* PCIE controller 2 */
-#define CONFIG_SYS_PCI_64BIT		/* enable 64-bit PCI resources */
 
 #if defined(CONFIG_SPIFLASH)
 #elif defined(CONFIG_SDCARD)
diff --git a/include/configs/durian.h b/include/configs/durian.h
index 1dec09b4cea8..c0ea42e180a3 100644
--- a/include/configs/durian.h
+++ b/include/configs/durian.h
@@ -16,7 +16,6 @@
 #define CONFIG_SYS_INIT_SP_ADDR		(0x88000000 - 0x100000)
 
 /* PCI CONFIG */
-#define CONFIG_SYS_PCI_64BIT    1
 #define CONFIG_PCI_SCAN_SHOW
 
 /* SCSI */
diff --git a/include/configs/kmcent2.h b/include/configs/kmcent2.h
index 24dc4c912282..45371ee72361 100644
--- a/include/configs/kmcent2.h
+++ b/include/configs/kmcent2.h
@@ -141,7 +141,6 @@
 #define CONFIG_SYS_FSL_CPC		/* Corenet Platform Cache */
 #define CONFIG_SYS_NUM_CPC		CONFIG_SYS_NUM_DDR_CTLRS
 #define CONFIG_PCIE1			/* PCIE controller 1 */
-#define CONFIG_SYS_PCI_64BIT		/* enable 64-bit PCI resources */
 
 /* Environment in parallel NOR-Flash */
 #define CONFIG_ENV_TOTAL_SIZE		0x040000
diff --git a/include/configs/lx2160a_common.h b/include/configs/lx2160a_common.h
index 7247736a0d28..767980fa94e5 100644
--- a/include/configs/lx2160a_common.h
+++ b/include/configs/lx2160a_common.h
@@ -104,7 +104,6 @@
 
 /* PCI */
 #ifdef CONFIG_PCI
-#define CONFIG_SYS_PCI_64BIT
 #define CONFIG_PCI_SCAN_SHOW
 #endif
 
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index b31e11d08586..33f052d7dde0 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -140,7 +140,6 @@
 
 #define CONFIG_PCIE1	/* PCIE controller 1 (slot 1) */
 #define CONFIG_PCIE2	/* PCIE controller 2 (slot 2) */
-#define CONFIG_SYS_PCI_64BIT	/* enable 64-bit PCI resources */
 
 #define CONFIG_SYS_SATA_MAX_DEVICE	2
 #define CONFIG_LBA48
diff --git a/include/configs/qemu-ppce500.h b/include/configs/qemu-ppce500.h
index 169d79c1faf0..7d8db6f60ddf 100644
--- a/include/configs/qemu-ppce500.h
+++ b/include/configs/qemu-ppce500.h
@@ -13,8 +13,6 @@
 
 #define CONFIG_SYS_RAMBOOT
 
-#define CONFIG_SYS_PCI_64BIT		/* enable 64-bit PCI resources */
-
 #define CONFIG_ENABLE_36BIT_PHYS
 
 /* Needed to fill the ccsrbar pointer */
diff --git a/include/configs/sifive-unmatched.h b/include/configs/sifive-unmatched.h
index 574821cdeac2..30adfe948f14 100644
--- a/include/configs/sifive-unmatched.h
+++ b/include/configs/sifive-unmatched.h
@@ -32,8 +32,6 @@
 
 #define CONFIG_STANDALONE_LOAD_ADDR	0x80200000
 
-#define CONFIG_SYS_PCI_64BIT		1	/* enable 64-bit resources */
-
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID	4
 
 /* Environment options */
diff --git a/include/configs/synquacer.h b/include/configs/synquacer.h
index 2347ec2fe0cf..04095891525f 100644
--- a/include/configs/synquacer.h
+++ b/include/configs/synquacer.h
@@ -46,7 +46,6 @@
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
 
 /* Since U-Boot 64bit PCIe support is limited, disable 64bit MMIO support */
-/* #define CONFIG_SYS_PCI_64BIT		1 */
 
 #define DEFAULT_DFU_ALT_INFO "dfu_alt_info="				\
 			"mtd nor1=u-boot.bin raw 200000 100000;"	\
diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h
index b91b0db2c474..fb7b83d285d3 100644
--- a/include/configs/uniphier.h
+++ b/include/configs/uniphier.h
@@ -198,6 +198,4 @@
 
 #define CONFIG_SPL_PAD_TO			0x20000
 
-#define CONFIG_SYS_PCI_64BIT
-
 #endif /* __CONFIG_UNIPHIER_H__ */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 08/11] warp7, pic32mzdask: Remove SYS_FDT_ADDR/SYS_ENV_ADDR from CONFIG namespace
  2021-12-13  3:12 [PATCH 01/11] pci: Remove unused FSL_PCI_INIT code Tom Rini
                   ` (5 preceding siblings ...)
  2021-12-13  3:12 ` [PATCH 07/11] Convert CONFIG_SYS_PCI_64BIT " Tom Rini
@ 2021-12-13  3:12 ` Tom Rini
  2021-12-28 12:56   ` Tom Rini
  2021-12-13  3:12 ` [PATCH 09/11] Finish converting CONFIG_SYS_FSL_CLK to Kconfig Tom Rini
                   ` (3 subsequent siblings)
  10 siblings, 1 reply; 23+ messages in thread
From: Tom Rini @ 2021-12-13  3:12 UTC (permalink / raw)
  To: u-boot

In the case of CONFIG_SYS_FDT_ADDR this was being used to modify the
default value of fdt_addr / fdt_addr_r, which is not something to expose
in this manner and is not otherwise done.  The case of SYS_ENV_ADDR is
similar but only done on the pic32mzdask platform, for scriptaddr.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 board/warp7/Kconfig           | 6 ------
 include/configs/pic32mzdask.h | 7 ++-----
 include/configs/warp7.h       | 2 +-
 3 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/board/warp7/Kconfig b/board/warp7/Kconfig
index e5051cdda66a..05b4420afc82 100644
--- a/board/warp7/Kconfig
+++ b/board/warp7/Kconfig
@@ -14,12 +14,6 @@ config WARP7_ROOT_PART
 	  partition that is typically specified with root=/dev/sdaX or
 	  which gets converted into a root=PARTUUID=some_uuid.
 
-config SYS_FDT_ADDR
-	hex "FDT load address"
-	default 0x83000000
-	help
-	  The address the FDT file should be loaded to.
-
 config IMX_CONFIG
 	default "board/warp7/imximage.cfg"
 
diff --git a/include/configs/pic32mzdask.h b/include/configs/pic32mzdask.h
index cc2e6a7ae89c..3624c122fcdb 100644
--- a/include/configs/pic32mzdask.h
+++ b/include/configs/pic32mzdask.h
@@ -33,9 +33,6 @@
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_MONITOR_LEN		(192 << 10)
 
-#define CONFIG_SYS_ENV_ADDR		0x88300000
-#define CONFIG_SYS_FDT_ADDR		0x89d00000
-
 /* Memory Test */
 
 /*----------------------------------------------------------------------
@@ -74,8 +71,8 @@
 
 #define MEM_LAYOUT_ENV_SETTINGS					\
 	"kernel_addr_r="__stringify(CONFIG_SYS_LOAD_ADDR)"\0"	\
-	"fdt_addr_r="__stringify(CONFIG_SYS_FDT_ADDR)"\0"	\
-	"scriptaddr="__stringify(CONFIG_SYS_ENV_ADDR)"\0"
+	"fdt_addr_r=0x89d00000\0"				\
+	"scriptaddr=0x88300000\0"				\
 
 #define CONFIG_LEGACY_BOOTCMD_ENV					\
 	"legacy_bootcmd= "						\
diff --git a/include/configs/warp7.h b/include/configs/warp7.h
index da7c753ddd73..83ee1784ce91 100644
--- a/include/configs/warp7.h
+++ b/include/configs/warp7.h
@@ -39,7 +39,7 @@
 	"fdt_high=0xffffffff\0" \
 	"initrd_high=0xffffffff\0" \
 	"fdt_file=imx7s-warp.dtb\0" \
-	"fdt_addr=" __stringify(CONFIG_SYS_FDT_ADDR)"\0" \
+	"fdt_addr=0x83000000\0" \
 	"fdtovaddr=0x83100000\0" \
 	"boot_fdt=try\0" \
 	"ip_dyn=yes\0" \
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 09/11] Finish converting CONFIG_SYS_FSL_CLK to Kconfig
  2021-12-13  3:12 [PATCH 01/11] pci: Remove unused FSL_PCI_INIT code Tom Rini
                   ` (6 preceding siblings ...)
  2021-12-13  3:12 ` [PATCH 08/11] warp7, pic32mzdask: Remove SYS_FDT_ADDR/SYS_ENV_ADDR from CONFIG namespace Tom Rini
@ 2021-12-13  3:12 ` Tom Rini
  2021-12-28 12:56   ` Tom Rini
  2021-12-13  3:12 ` [PATCH 10/11] Convert CONFIG_TEGRA_NAND " Tom Rini
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 23+ messages in thread
From: Tom Rini @ 2021-12-13  3:12 UTC (permalink / raw)
  To: u-boot

This converts the following to Kconfig:
   CONFIG_SYS_FSL_CLK

We move the exiting option to common/Kconfig near the other options to
control the contents of board_init_f() and note that this is a legacy
option.  We further restrict this to where the call is going to be
non-empty, for the SoCs that had only been using this for some
MMC-related clocks.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 4 ----
 common/Kconfig                            | 9 +++++++++
 doc/README.fsl-clk                        | 5 -----
 include/configs/colibri_vf.h              | 2 --
 include/configs/km/pg-wcom-ls102xa.h      | 2 --
 include/configs/kp_imx53.h                | 2 --
 include/configs/ls1021aiot.h              | 2 --
 include/configs/ls1021aqds.h              | 2 --
 include/configs/ls1021atsn.h              | 2 --
 include/configs/ls1021atwr.h              | 2 --
 include/configs/m53menlo.h                | 2 --
 include/configs/mx51evk.h                 | 2 --
 include/configs/mx53cx9020.h              | 2 --
 include/configs/mx53loco.h                | 2 --
 include/configs/mx53ppd.h                 | 2 --
 include/configs/mx6_common.h              | 2 --
 include/configs/mx7_common.h              | 1 -
 include/configs/usbarmory.h               | 2 --
 include/configs/vf610twr.h                | 2 --
 19 files changed, 9 insertions(+), 40 deletions(-)
 delete mode 100644 doc/README.fsl-clk

diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
index 3b69614fd718..1a3d60ac9c1d 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
+++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
@@ -530,10 +530,6 @@ endmenu
 menu "Layerscape clock tree configuration"
 	depends on FSL_LSCH2 || FSL_LSCH3
 
-config SYS_FSL_CLK
-	bool "Enable clock tree initialization"
-	default y
-
 config CLUSTER_CLK_FREQ
 	int "Reference clock of core cluster"
 	depends on ARCH_LS1012A
diff --git a/common/Kconfig b/common/Kconfig
index 50ac4331f5ca..0892d9be362c 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -534,6 +534,15 @@ config BOARD_LATE_INIT
 	  So this config enable the late init code with the help of board_late_init
 	  function which should defined on respective boards.
 
+config SYS_FSL_CLK
+	bool
+	depends on ARCH_LS1021A || FSL_LSCH2 || FSL_LSCH3 || \
+		(FSL_ESDHC_IMX && (ARCH_MX5 || ARCH_MX6 || ARCH_MX7))
+	default y
+	help
+	  Enable to call get_clocks() in board_init_f() for platforms other
+	  than PowerPC or M68k.  This is a legacy option.  If not TARGET_BRPPT2
+
 config LAST_STAGE_INIT
 	bool "Call board-specific as last setup step"
 	help
diff --git a/doc/README.fsl-clk b/doc/README.fsl-clk
deleted file mode 100644
index 3a9927f07932..000000000000
--- a/doc/README.fsl-clk
+++ /dev/null
@@ -1,5 +0,0 @@
-Freescale system clock options
-
-	- CONFIG_SYS_FSL_CLK
-		Enable to call get_clocks() in board_init_f() for
-		non-PPC platforms.
diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h
index a7c91b9f1da4..40984d661c80 100644
--- a/include/configs/colibri_vf.h
+++ b/include/configs/colibri_vf.h
@@ -14,8 +14,6 @@
 #include <asm/arch/imx-regs.h>
 #include <linux/sizes.h>
 
-#define CONFIG_SYS_FSL_CLK
-
 #ifdef CONFIG_VIDEO_FSL_DCU_FB
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
diff --git a/include/configs/km/pg-wcom-ls102xa.h b/include/configs/km/pg-wcom-ls102xa.h
index 32659dba1c43..d94572d3abf6 100644
--- a/include/configs/km/pg-wcom-ls102xa.h
+++ b/include/configs/km/pg-wcom-ls102xa.h
@@ -6,8 +6,6 @@
 #ifndef __CONFIG_PG_WCOM_LS102XA_H
 #define __CONFIG_PG_WCOM_LS102XA_H
 
-#define CONFIG_SYS_FSL_CLK
-
 /* include common defines/options for all Keymile boards */
 #include "keymile-common.h"
 
diff --git a/include/configs/kp_imx53.h b/include/configs/kp_imx53.h
index 8ac381c5d78d..0983d40ec411 100644
--- a/include/configs/kp_imx53.h
+++ b/include/configs/kp_imx53.h
@@ -10,8 +10,6 @@
 #include <asm/arch/imx-regs.h>
 #include <linux/sizes.h>
 
-#define CONFIG_SYS_FSL_CLK
-
 /* USB Configs */
 #define CONFIG_MXC_USB_PORTSC	(PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CONFIG_MXC_USB_FLAGS	0
diff --git a/include/configs/ls1021aiot.h b/include/configs/ls1021aiot.h
index 499dbe1c70dd..3d504599f317 100644
--- a/include/configs/ls1021aiot.h
+++ b/include/configs/ls1021aiot.h
@@ -9,8 +9,6 @@
 
 #define CONFIG_ARMV7_SECURE_BASE OCRAM_BASE_S_ADDR
 
-#define CONFIG_SYS_FSL_CLK
-
 #define CONFIG_SYS_INIT_RAM_ADDR	OCRAM_BASE_ADDR
 #define CONFIG_SYS_INIT_RAM_SIZE	OCRAM_SIZE
 
diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h
index 1dfad1253ea9..d8ce83b33fa1 100644
--- a/include/configs/ls1021aqds.h
+++ b/include/configs/ls1021aqds.h
@@ -9,8 +9,6 @@
 
 #define CONFIG_ARMV7_SECURE_BASE	OCRAM_BASE_S_ADDR
 
-#define CONFIG_SYS_FSL_CLK
-
 #define CONFIG_DEEP_SLEEP
 
 #define CONFIG_SYS_INIT_RAM_ADDR	OCRAM_BASE_ADDR
diff --git a/include/configs/ls1021atsn.h b/include/configs/ls1021atsn.h
index 3773a0a186b5..08fbd72008b4 100644
--- a/include/configs/ls1021atsn.h
+++ b/include/configs/ls1021atsn.h
@@ -8,8 +8,6 @@
 
 #define CONFIG_ARMV7_SECURE_BASE	OCRAM_BASE_S_ADDR
 
-#define CONFIG_SYS_FSL_CLK
-
 #define CONFIG_DEEP_SLEEP
 
 #define CONFIG_SYS_INIT_RAM_ADDR	OCRAM_BASE_ADDR
diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
index 6fae28e73cf7..c5ccaa84e52e 100644
--- a/include/configs/ls1021atwr.h
+++ b/include/configs/ls1021atwr.h
@@ -9,8 +9,6 @@
 
 #define CONFIG_ARMV7_SECURE_BASE	OCRAM_BASE_S_ADDR
 
-#define CONFIG_SYS_FSL_CLK
-
 #define CONFIG_DEEP_SLEEP
 
 #define CONFIG_SYS_INIT_RAM_ADDR	OCRAM_BASE_ADDR
diff --git a/include/configs/m53menlo.h b/include/configs/m53menlo.h
index 124aab0eff08..c2345e8224ef 100644
--- a/include/configs/m53menlo.h
+++ b/include/configs/m53menlo.h
@@ -11,8 +11,6 @@
 
 #include <asm/arch/imx-regs.h>
 
-#define CONFIG_SYS_FSL_CLK
-
 #define CONFIG_TIMESTAMP		/* Print image info with timestamp */
 
 /*
diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h
index f1a87faaeceb..fd42d2b0f506 100644
--- a/include/configs/mx51evk.h
+++ b/include/configs/mx51evk.h
@@ -12,8 +12,6 @@
 
  /* High Level Configuration Options */
 
-#define CONFIG_SYS_FSL_CLK
-
 #include <asm/arch/imx-regs.h>
 
 /*
diff --git a/include/configs/mx53cx9020.h b/include/configs/mx53cx9020.h
index f03e42529761..16c2241fd57e 100644
--- a/include/configs/mx53cx9020.h
+++ b/include/configs/mx53cx9020.h
@@ -14,8 +14,6 @@
 
 #include <asm/arch/imx-regs.h>
 
-#define CONFIG_SYS_FSL_CLK
-
 #define CONFIG_MXC_UART_BASE UART2_BASE
 
 #define CONFIG_FPGA_COUNT 1
diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h
index 92c75f5ee8ed..a972410db74a 100644
--- a/include/configs/mx53loco.h
+++ b/include/configs/mx53loco.h
@@ -11,8 +11,6 @@
 
 #include <asm/arch/imx-regs.h>
 
-#define CONFIG_SYS_FSL_CLK
-
 #define CONFIG_MXC_UART_BASE	UART1_BASE
 
 /* MMC Configs */
diff --git a/include/configs/mx53ppd.h b/include/configs/mx53ppd.h
index 80487e099bc3..8f8dfe94ca9c 100644
--- a/include/configs/mx53ppd.h
+++ b/include/configs/mx53ppd.h
@@ -11,8 +11,6 @@
 
 #include <asm/arch/imx-regs.h>
 
-#define CONFIG_SYS_FSL_CLK
-
 /* USB Configs */
 #define CONFIG_MXC_USB_PORT	1
 #define CONFIG_MXC_USB_PORTSC	(PORT_PTS_UTMI | PORT_PTS_PTW)
diff --git a/include/configs/mx6_common.h b/include/configs/mx6_common.h
index 0ae8305c592e..5ff931ee3bc9 100644
--- a/include/configs/mx6_common.h
+++ b/include/configs/mx6_common.h
@@ -27,8 +27,6 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/mach-imx/gpio.h>
 
-#define CONFIG_SYS_FSL_CLK
-
 /* Miscellaneous configurable options */
 #define CONFIG_SYS_CBSIZE	512
 #define CONFIG_SYS_MAXARGS	32
diff --git a/include/configs/mx7_common.h b/include/configs/mx7_common.h
index ffe8c758dd26..2e976df6985f 100644
--- a/include/configs/mx7_common.h
+++ b/include/configs/mx7_common.h
@@ -17,7 +17,6 @@
 #define CONFIG_MXC_GPT_HCLK
 #define CONFIG_SC_TIMER_CLK 8000000 /* 8Mhz */
 #define COUNTER_FREQUENCY CONFIG_SC_TIMER_CLK
-#define CONFIG_SYS_FSL_CLK
 
 #define CONFIG_SYS_BOOTM_LEN	0x1000000
 
diff --git a/include/configs/usbarmory.h b/include/configs/usbarmory.h
index 77da2bfdd791..0faa656bc63a 100644
--- a/include/configs/usbarmory.h
+++ b/include/configs/usbarmory.h
@@ -10,8 +10,6 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#define CONFIG_SYS_FSL_CLK
-
 #include <asm/arch/imx-regs.h>
 
 /* U-Boot environment */
diff --git a/include/configs/vf610twr.h b/include/configs/vf610twr.h
index c42db3686f61..d90c2fa05345 100644
--- a/include/configs/vf610twr.h
+++ b/include/configs/vf610twr.h
@@ -11,8 +11,6 @@
 #include <asm/arch/imx-regs.h>
 #include <linux/stringify.h>
 
-#define CONFIG_SYS_FSL_CLK
-
 /* NAND support */
 
 #ifdef CONFIG_CMD_NAND
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 10/11] Convert CONFIG_TEGRA_NAND to Kconfig
  2021-12-13  3:12 [PATCH 01/11] pci: Remove unused FSL_PCI_INIT code Tom Rini
                   ` (7 preceding siblings ...)
  2021-12-13  3:12 ` [PATCH 09/11] Finish converting CONFIG_SYS_FSL_CLK to Kconfig Tom Rini
@ 2021-12-13  3:12 ` Tom Rini
  2021-12-28 12:57   ` Tom Rini
  2021-12-13  3:12 ` [PATCH 11/11] Finish conversion CONFIG_SYS_NAND_SELF_INIT " Tom Rini
  2021-12-28 12:56 ` [PATCH 01/11] pci: Remove unused FSL_PCI_INIT code Tom Rini
  10 siblings, 1 reply; 23+ messages in thread
From: Tom Rini @ 2021-12-13  3:12 UTC (permalink / raw)
  To: u-boot

This converts the following to Kconfig:
   CONFIG_TEGRA_NAND

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 configs/colibri_t20_defconfig | 2 +-
 configs/harmony_defconfig     | 2 +-
 configs/medcom-wide_defconfig | 2 +-
 configs/plutux_defconfig      | 2 +-
 configs/seaboard_defconfig    | 2 +-
 configs/tec_defconfig         | 2 +-
 drivers/mtd/nand/raw/Kconfig  | 8 ++++++++
 include/configs/colibri_t20.h | 1 -
 include/configs/harmony.h     | 1 -
 include/configs/medcom-wide.h | 1 -
 include/configs/plutux.h      | 1 -
 include/configs/seaboard.h    | 1 -
 include/configs/tec.h         | 1 -
 scripts/config_whitelist.txt  | 1 -
 14 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/configs/colibri_t20_defconfig b/configs/colibri_t20_defconfig
index b56b00d5089a..b883fc105f54 100644
--- a/configs/colibri_t20_defconfig
+++ b/configs/colibri_t20_defconfig
@@ -22,7 +22,6 @@ CONFIG_SYS_PROMPT="Colibri T20 # "
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
-CONFIG_CMD_NAND=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_USB_MASS_STORAGE=y
 # CONFIG_CMD_NFS is not set
@@ -49,6 +48,7 @@ CONFIG_SYS_I2C_TEGRA=y
 CONFIG_MTD=y
 CONFIG_DM_MTD=y
 CONFIG_MTD_RAW_NAND=y
+CONFIG_TEGRA_NAND=y
 CONFIG_SYS_NAND_ONFI_DETECTION=y
 CONFIG_MTD_UBI_FASTMAP=y
 CONFIG_DM_PMIC=y
diff --git a/configs/harmony_defconfig b/configs/harmony_defconfig
index b86b30622d8c..9763b21a34b4 100644
--- a/configs/harmony_defconfig
+++ b/configs/harmony_defconfig
@@ -17,7 +17,6 @@ CONFIG_SYS_PROMPT="Tegra20 (Harmony) # "
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
-CONFIG_CMD_NAND=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NFS is not set
@@ -38,6 +37,7 @@ CONFIG_SPL_DM=y
 CONFIG_MTD=y
 CONFIG_DM_MTD=y
 CONFIG_MTD_RAW_NAND=y
+CONFIG_TEGRA_NAND=y
 CONFIG_SYS_NAND_ONFI_DETECTION=y
 CONFIG_MTD_UBI_FASTMAP=y
 CONFIG_PCI=y
diff --git a/configs/medcom-wide_defconfig b/configs/medcom-wide_defconfig
index 564979e1a948..d1eedc6aa88c 100644
--- a/configs/medcom-wide_defconfig
+++ b/configs/medcom-wide_defconfig
@@ -18,7 +18,6 @@ CONFIG_SYS_PROMPT="Tegra20 (Medcom-Wide) # "
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
-CONFIG_CMD_NAND=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NFS is not set
@@ -33,6 +32,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SPL_DM=y
 CONFIG_MTD=y
 CONFIG_MTD_RAW_NAND=y
+CONFIG_TEGRA_NAND=y
 CONFIG_SYS_NAND_ONFI_DETECTION=y
 CONFIG_DM_PMIC=y
 CONFIG_DM_REGULATOR=y
diff --git a/configs/plutux_defconfig b/configs/plutux_defconfig
index 15bc7a38b3a4..3a179fa5ae5e 100644
--- a/configs/plutux_defconfig
+++ b/configs/plutux_defconfig
@@ -19,7 +19,6 @@ CONFIG_SYS_PROMPT="Tegra20 (Plutux) # "
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
-CONFIG_CMD_NAND=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NFS is not set
@@ -32,6 +31,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SPL_DM=y
 CONFIG_MTD=y
 CONFIG_MTD_RAW_NAND=y
+CONFIG_TEGRA_NAND=y
 CONFIG_SYS_NAND_ONFI_DETECTION=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
diff --git a/configs/seaboard_defconfig b/configs/seaboard_defconfig
index bff7a04beeb5..f3d3b0a49802 100644
--- a/configs/seaboard_defconfig
+++ b/configs/seaboard_defconfig
@@ -18,7 +18,6 @@ CONFIG_SYS_PROMPT="Tegra20 (SeaBoard) # "
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
-CONFIG_CMD_NAND=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NFS is not set
@@ -36,6 +35,7 @@ CONFIG_SYS_I2C_TEGRA=y
 CONFIG_TEGRA_KEYBOARD=y
 CONFIG_MTD=y
 CONFIG_MTD_RAW_NAND=y
+CONFIG_TEGRA_NAND=y
 CONFIG_SYS_NAND_ONFI_DETECTION=y
 CONFIG_DM_PMIC=y
 CONFIG_DM_REGULATOR=y
diff --git a/configs/tec_defconfig b/configs/tec_defconfig
index 40197d1ecbf3..ec6ecbce6fb1 100644
--- a/configs/tec_defconfig
+++ b/configs/tec_defconfig
@@ -18,7 +18,6 @@ CONFIG_SYS_PROMPT="Tegra20 (TEC) # "
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
-CONFIG_CMD_NAND=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NFS is not set
@@ -33,6 +32,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SPL_DM=y
 CONFIG_MTD=y
 CONFIG_MTD_RAW_NAND=y
+CONFIG_TEGRA_NAND=y
 CONFIG_SYS_NAND_ONFI_DETECTION=y
 CONFIG_DM_PMIC=y
 CONFIG_DM_REGULATOR=y
diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
index e8528cbc30cd..da618acd873b 100644
--- a/drivers/mtd/nand/raw/Kconfig
+++ b/drivers/mtd/nand/raw/Kconfig
@@ -476,6 +476,14 @@ config ROCKCHIP_NAND
 	    NFC v800: RK3308, RV1108
 	    NFC v900: PX30, RK3326
 
+config TEGRA_NAND
+	bool "Support for NAND controller on Tegra SoCs"
+	depends on ARCH_TEGRA
+	select SYS_NAND_SELF_INIT
+	imply CMD_NAND
+	help
+	  Enables support for NAND Flash chips on Tegra SoCs platforms.
+
 comment "Generic NAND options"
 
 config SYS_NAND_BLOCK_SIZE
diff --git a/include/configs/colibri_t20.h b/include/configs/colibri_t20.h
index e947b58d96ce..c377187b803c 100644
--- a/include/configs/colibri_t20.h
+++ b/include/configs/colibri_t20.h
@@ -19,7 +19,6 @@
 #define CONFIG_LCD_LOGO
 
 /* NAND support */
-#define CONFIG_TEGRA_NAND
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
 
 #define UBOOT_UPDATE \
diff --git a/include/configs/harmony.h b/include/configs/harmony.h
index 5a1e72c5373f..879bd5c9539a 100644
--- a/include/configs/harmony.h
+++ b/include/configs/harmony.h
@@ -24,7 +24,6 @@
 #endif
 
 /* NAND support */
-#define CONFIG_TEGRA_NAND
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
 
 /* Environment in NAND (which is 512M), aligned to start of last sector */
diff --git a/include/configs/medcom-wide.h b/include/configs/medcom-wide.h
index 84b998e23af8..b35ba59aba99 100644
--- a/include/configs/medcom-wide.h
+++ b/include/configs/medcom-wide.h
@@ -19,7 +19,6 @@
 #define CONFIG_SYS_NS16550_COM1		NV_PA_APB_UARTD_BASE
 
 /* NAND support */
-#define CONFIG_TEGRA_NAND
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
 
 /* Environment in NAND, aligned to start of last sector */
diff --git a/include/configs/plutux.h b/include/configs/plutux.h
index 7fc06e8326bb..9a4a632a521d 100644
--- a/include/configs/plutux.h
+++ b/include/configs/plutux.h
@@ -19,7 +19,6 @@
 #define CONFIG_SYS_NS16550_COM1		NV_PA_APB_UARTD_BASE
 
 /* NAND support */
-#define CONFIG_TEGRA_NAND
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
 
 /* Environment in NAND, aligned to start of last sector */
diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h
index c51517a76bfc..e6c200f76122 100644
--- a/include/configs/seaboard.h
+++ b/include/configs/seaboard.h
@@ -27,7 +27,6 @@
 /* Environment in eMMC, at the end of 2nd "boot sector" */
 
 /* NAND support */
-#define CONFIG_TEGRA_NAND
 
 /* Max number of NAND devices */
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
diff --git a/include/configs/tec.h b/include/configs/tec.h
index aa9665eab59a..432ccbdc32b9 100644
--- a/include/configs/tec.h
+++ b/include/configs/tec.h
@@ -19,7 +19,6 @@
 #define CONFIG_SYS_NS16550_COM1		NV_PA_APB_UARTD_BASE
 
 /* NAND support */
-#define CONFIG_TEGRA_NAND
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
 
 /* Environment in NAND, aligned to start of last sector */
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index ab805c3ce9af..7c0489595509 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -2904,7 +2904,6 @@ CONFIG_TEGRA_ENABLE_UARTD
 CONFIG_TEGRA_ENABLE_UARTE
 CONFIG_TEGRA_GPU
 CONFIG_TEGRA_LP0
-CONFIG_TEGRA_NAND
 CONFIG_TEGRA_PMU
 CONFIG_TEGRA_SLINK_CTRLS
 CONFIG_TEGRA_SPI
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 11/11] Finish conversion CONFIG_SYS_NAND_SELF_INIT to Kconfig
  2021-12-13  3:12 [PATCH 01/11] pci: Remove unused FSL_PCI_INIT code Tom Rini
                   ` (8 preceding siblings ...)
  2021-12-13  3:12 ` [PATCH 10/11] Convert CONFIG_TEGRA_NAND " Tom Rini
@ 2021-12-13  3:12 ` Tom Rini
  2021-12-28 12:57   ` Tom Rini
  2021-12-28 12:56 ` [PATCH 01/11] pci: Remove unused FSL_PCI_INIT code Tom Rini
  10 siblings, 1 reply; 23+ messages in thread
From: Tom Rini @ 2021-12-13  3:12 UTC (permalink / raw)
  To: u-boot

In order to finish this conversion we need to add a symbols for
SPL_SYS_NAND_SELF_INIT and TPL_SYS_NAND_SELF_INIT as there are cases
there where we need to, or need to not, use that framework as things
stand.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 drivers/mtd/nand/raw/Kconfig             | 27 ++++++++++++++++++++++++
 drivers/mtd/nand/raw/davinci_nand.c      |  2 +-
 drivers/mtd/nand/raw/nand.c              |  4 ++--
 include/configs/broadcom_bcm963158.h     |  1 -
 include/configs/broadcom_bcm968360bg.h   |  1 -
 include/configs/broadcom_bcm968380gerg.h |  1 -
 include/configs/broadcom_bcm968580xref.h |  1 -
 include/configs/comtrend_vr3032u.h       |  1 -
 include/configs/da850evm.h               |  4 ----
 include/configs/tegra20-common.h         |  2 --
 include/configs/work_92105.h             |  1 -
 include/nand.h                           | 18 +---------------
 12 files changed, 31 insertions(+), 32 deletions(-)

diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
index da618acd873b..0e826c192986 100644
--- a/drivers/mtd/nand/raw/Kconfig
+++ b/drivers/mtd/nand/raw/Kconfig
@@ -9,6 +9,20 @@ config SYS_NAND_SELF_INIT
 	  This option, if enabled, provides more flexible and linux-like
 	  NAND initialization process.
 
+config SPL_SYS_NAND_SELF_INIT
+	bool
+	depends on !SPL_NAND_SIMPLE
+	help
+	  This option, if enabled, provides more flexible and linux-like
+	  NAND initialization process, in SPL.
+
+config TPL_SYS_NAND_SELF_INIT
+	bool
+	depends on TPL_NAND_SUPPORT
+	help
+	  This option, if enabled, provides more flexible and linux-like
+	  NAND initialization process, in SPL.
+
 config SYS_NAND_DRIVER_ECC_LAYOUT
 	bool "Omit standard ECC layouts to save space"
 	help
@@ -22,6 +36,7 @@ config SYS_NAND_USE_FLASH_BBT
 
 config NAND_ATMEL
 	bool "Support Atmel NAND controller"
+	select SYS_NAND_SELF_INIT
 	imply SYS_NAND_USE_FLASH_BBT
 	help
 	  Enable this driver for NAND flash platforms using an Atmel NAND
@@ -65,6 +80,7 @@ endif
 config NAND_BRCMNAND
 	bool "Support Broadcom NAND controller"
 	depends on OF_CONTROL && DM && DM_MTD
+	select SYS_NAND_SELF_INIT
 	help
 	  Enable the driver for NAND flash on platforms using a Broadcom NAND
 	  controller.
@@ -101,6 +117,7 @@ config NAND_BRCMNAND_63158
 
 config NAND_DAVINCI
 	bool "Support TI Davinci NAND controller"
+	select SYS_NAND_SELF_INIT if TARGET_DA850EVM
 	help
 	  Enable this driver for NAND flash controllers available in TI Davinci
 	  and Keystone2 platforms
@@ -128,18 +145,25 @@ config NAND_DENALI_DT
 
 config NAND_FSL_ELBC
 	bool "Support Freescale Enhanced Local Bus Controller FCM NAND driver"
+	select TPL_SYS_NAND_SELF_INIT if TPL_NAND_SUPPORT
+	select SPL_SYS_NAND_SELF_INIT
+	select SYS_NAND_SELF_INIT
 	depends on FSL_ELBC
 	help
 	  Enable the Freescale Enhanced Local Bus Controller FCM NAND driver.
 
 config NAND_FSL_IFC
 	bool "Support Freescale Integrated Flash Controller NAND driver"
+	select TPL_SYS_NAND_SELF_INIT if TPL_NAND_SUPPORT
+	select SPL_SYS_NAND_SELF_INIT
+	select SYS_NAND_SELF_INIT
 	select FSL_IFC
 	help
 	  Enable the Freescale Integrated Flash Controller NAND driver.
 
 config NAND_LPC32XX_MLC
 	bool "Support LPC32XX_MLC controller"
+	select SYS_NAND_SELF_INIT
 	help
 	  Enable the LPC32XX MLC NAND controller.
 
@@ -331,6 +355,7 @@ config NAND_SUNXI
 	select SYS_NAND_SELF_INIT
 	select SYS_NAND_U_BOOT_LOCATIONS
 	select SPL_NAND_SUPPORT
+	select SPL_SYS_NAND_SELF_INIT
 	imply CMD_NAND
 	---help---
 	Enable support for NAND. This option enables the standard and
@@ -375,6 +400,7 @@ config NAND_MXC
 config NAND_MXS
 	bool "MXS NAND support"
 	depends on MX23 || MX28 || MX6 || MX7 || IMX8 || IMX8M
+	select SPL_SYS_NAND_SELF_INIT
 	select SYS_NAND_SELF_INIT
 	imply CMD_NAND
 	select APBH_DMA
@@ -407,6 +433,7 @@ config NAND_MXIC
 
 config NAND_ZYNQ
 	bool "Support for Zynq Nand controller"
+	select SPL_SYS_NAND_SELF_INIT
 	select SYS_NAND_SELF_INIT
 	select DM_MTD
 	imply CMD_NAND
diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c
index ef7ee395c0ca..9158d94de25a 100644
--- a/drivers/mtd/nand/raw/davinci_nand.c
+++ b/drivers/mtd/nand/raw/davinci_nand.c
@@ -788,7 +788,7 @@ static void davinci_nand_init(struct nand_chip *nand)
 	nand->dev_ready = nand_davinci_dev_ready;
 }
 
-#ifdef CONFIG_SYS_NAND_SELF_INIT
+#if CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT)
 static int davinci_nand_probe(struct udevice *dev)
 {
 	struct nand_chip *nand = dev_get_priv(dev);
diff --git a/drivers/mtd/nand/raw/nand.c b/drivers/mtd/nand/raw/nand.c
index 59ad1392b0e6..4b5560dd24cd 100644
--- a/drivers/mtd/nand/raw/nand.c
+++ b/drivers/mtd/nand/raw/nand.c
@@ -76,7 +76,7 @@ int nand_register(int devnum, struct mtd_info *mtd)
 	return 0;
 }
 
-#ifndef CONFIG_SYS_NAND_SELF_INIT
+#if !CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT)
 static void nand_init_chip(int i)
 {
 	struct nand_chip *nand = &nand_chip[i];
@@ -155,7 +155,7 @@ void nand_init(void)
 		return;
 	initialized = 1;
 
-#ifdef CONFIG_SYS_NAND_SELF_INIT
+#if CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT)
 	board_nand_init();
 #else
 	int i;
diff --git a/include/configs/broadcom_bcm963158.h b/include/configs/broadcom_bcm963158.h
index de45f74923a2..5aa784d88cac 100644
--- a/include/configs/broadcom_bcm963158.h
+++ b/include/configs/broadcom_bcm963158.h
@@ -28,7 +28,6 @@
 
 #ifdef CONFIG_MTD_RAW_NAND
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
-#define CONFIG_SYS_NAND_SELF_INIT
 #endif /* CONFIG_MTD_RAW_NAND */
 
 /*
diff --git a/include/configs/broadcom_bcm968360bg.h b/include/configs/broadcom_bcm968360bg.h
index 0391f0621819..01bab046ddb0 100644
--- a/include/configs/broadcom_bcm968360bg.h
+++ b/include/configs/broadcom_bcm968360bg.h
@@ -27,7 +27,6 @@
 
 #ifdef CONFIG_MTD_RAW_NAND
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
-#define CONFIG_SYS_NAND_SELF_INIT
 #endif /* CONFIG_MTD_RAW_NAND */
 
 /*
diff --git a/include/configs/broadcom_bcm968380gerg.h b/include/configs/broadcom_bcm968380gerg.h
index 866de2527d0b..c1c1b37fabd9 100644
--- a/include/configs/broadcom_bcm968380gerg.h
+++ b/include/configs/broadcom_bcm968380gerg.h
@@ -8,5 +8,4 @@
 
 #ifdef CONFIG_MTD_RAW_NAND
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
-#define CONFIG_SYS_NAND_SELF_INIT
 #endif /* CONFIG_MTD_RAW_NAND */
diff --git a/include/configs/broadcom_bcm968580xref.h b/include/configs/broadcom_bcm968580xref.h
index 179aa9d608c8..ebfc2ecc0be1 100644
--- a/include/configs/broadcom_bcm968580xref.h
+++ b/include/configs/broadcom_bcm968580xref.h
@@ -27,7 +27,6 @@
 
 #ifdef CONFIG_MTD_RAW_NAND
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
-#define CONFIG_SYS_NAND_SELF_INIT
 #endif /* CONFIG_MTD_RAW_NAND */
 
 /*
diff --git a/include/configs/comtrend_vr3032u.h b/include/configs/comtrend_vr3032u.h
index fc890af915a7..ee29f702f8f3 100644
--- a/include/configs/comtrend_vr3032u.h
+++ b/include/configs/comtrend_vr3032u.h
@@ -10,5 +10,4 @@
 
 #ifdef CONFIG_MTD_RAW_NAND
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
-#define CONFIG_SYS_NAND_SELF_INIT
 #endif /* CONFIG_MTD_RAW_NAND */
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index bd788662947a..9d27e502298e 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -136,10 +136,6 @@
 				59, 60, 61, 62, 63 }
 #define CONFIG_SYS_NAND_ECCSIZE		512
 #define CONFIG_SYS_NAND_ECCBYTES	10
-
-#ifndef CONFIG_SPL_BUILD
-#define CONFIG_SYS_NAND_SELF_INIT
-#endif
 #endif
 
 /*
diff --git a/include/configs/tegra20-common.h b/include/configs/tegra20-common.h
index 063213cbfeb7..fac869272857 100644
--- a/include/configs/tegra20-common.h
+++ b/include/configs/tegra20-common.h
@@ -79,6 +79,4 @@
  */
 #define CONFIG_USB_EHCI_TXFIFO_THRESH	0x10
 
-#define CONFIG_SYS_NAND_SELF_INIT
-
 #endif /* _TEGRA20_COMMON_H_ */
diff --git a/include/configs/work_92105.h b/include/configs/work_92105.h
index 9223aee5c16b..a43fd81e45db 100644
--- a/include/configs/work_92105.h
+++ b/include/configs/work_92105.h
@@ -55,7 +55,6 @@
  */
 
 /* driver configuration */
-#define CONFIG_SYS_NAND_SELF_INIT
 #define CONFIG_SYS_MAX_NAND_DEVICE 1
 #define CONFIG_SYS_MAX_NAND_CHIPS 1
 #define CONFIG_SYS_NAND_BASE MLC_NAND_BASE
diff --git a/include/nand.h b/include/nand.h
index 09dbda4e81b2..70c1286ccb40 100644
--- a/include/nand.h
+++ b/include/nand.h
@@ -10,22 +10,6 @@
 
 #include <config.h>
 
-/*
- * All boards using a given driver must convert to self-init
- * at the same time, so do it here.  When all drivers are
- * converted, this will go away.
- */
-#ifdef CONFIG_SPL_BUILD
-#if defined(CONFIG_NAND_FSL_ELBC) || defined(CONFIG_NAND_FSL_IFC)
-#define CONFIG_SYS_NAND_SELF_INIT
-#endif
-#else
-#if defined(CONFIG_NAND_FSL_ELBC) || defined(CONFIG_NAND_ATMEL)\
-	|| defined(CONFIG_NAND_FSL_IFC)
-#define CONFIG_SYS_NAND_SELF_INIT
-#endif
-#endif
-
 extern void nand_init(void);
 unsigned long nand_size(void);
 
@@ -34,7 +18,7 @@ unsigned long nand_size(void);
 
 int nand_mtd_to_devnum(struct mtd_info *mtd);
 
-#ifdef CONFIG_SYS_NAND_SELF_INIT
+#if CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT)
 void board_nand_init(void);
 int nand_register(int devnum, struct mtd_info *mtd);
 #else
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH 01/11] pci: Remove unused FSL_PCI_INIT code
  2021-12-13  3:12 [PATCH 01/11] pci: Remove unused FSL_PCI_INIT code Tom Rini
                   ` (9 preceding siblings ...)
  2021-12-13  3:12 ` [PATCH 11/11] Finish conversion CONFIG_SYS_NAND_SELF_INIT " Tom Rini
@ 2021-12-28 12:56 ` Tom Rini
  10 siblings, 0 replies; 23+ messages in thread
From: Tom Rini @ 2021-12-28 12:56 UTC (permalink / raw)
  To: u-boot

[-- Attachment #1: Type: text/plain, Size: 253 bytes --]

On Sun, Dec 12, 2021 at 10:12:26PM -0500, Tom Rini wrote:

> The symbol CONFIG_FSL_PCI_INIT is no longer enabled anywhere, removed
> now unused code.
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/next, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 02/11] Finish converting CONFIG_WATCHDOG, HW_WATCHDOG and WDT to Kconfig
  2021-12-13  3:12 ` [PATCH 02/11] Finish converting CONFIG_WATCHDOG, HW_WATCHDOG and WDT to Kconfig Tom Rini
@ 2021-12-28 12:56   ` Tom Rini
  2021-12-28 12:56   ` Tom Rini
  1 sibling, 0 replies; 23+ messages in thread
From: Tom Rini @ 2021-12-28 12:56 UTC (permalink / raw)
  To: u-boot

[-- Attachment #1: Type: text/plain, Size: 733 bytes --]

On Sun, Dec 12, 2021 at 10:12:27PM -0500, Tom Rini wrote:

> Because of how these symbols work, and the remaining board config.h file
> uses, we need to do these at the same time.  In some cases we just get
> to move rather directly to the defconfigs.  A few cases require manual
> intervention.
> 
> For the case of the eb_cpu5282 we need to select HW_WATCHDOG for the
> target, given how it's implemented.
> 
> For the cases of m53menlo, dh_imx6, display5, and display5_factory we
> disable SPL watchdog support as the particular combination of options
> they want would require either more symbols or enabling SPL_DM.
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/next, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 02/11] Finish converting CONFIG_WATCHDOG, HW_WATCHDOG and WDT to Kconfig
  2021-12-13  3:12 ` [PATCH 02/11] Finish converting CONFIG_WATCHDOG, HW_WATCHDOG and WDT to Kconfig Tom Rini
  2021-12-28 12:56   ` Tom Rini
@ 2021-12-28 12:56   ` Tom Rini
  1 sibling, 0 replies; 23+ messages in thread
From: Tom Rini @ 2021-12-28 12:56 UTC (permalink / raw)
  To: u-boot

[-- Attachment #1: Type: text/plain, Size: 733 bytes --]

On Sun, Dec 12, 2021 at 10:12:27PM -0500, Tom Rini wrote:

> Because of how these symbols work, and the remaining board config.h file
> uses, we need to do these at the same time.  In some cases we just get
> to move rather directly to the defconfigs.  A few cases require manual
> intervention.
> 
> For the case of the eb_cpu5282 we need to select HW_WATCHDOG for the
> target, given how it's implemented.
> 
> For the cases of m53menlo, dh_imx6, display5, and display5_factory we
> disable SPL watchdog support as the particular combination of options
> they want would require either more symbols or enabling SPL_DM.
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/next, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 03/11] Convert CONFIG_WATCHDOG_TIMEOUT_MSECS to Kconfig
  2021-12-13  3:12 ` [PATCH 03/11] Convert CONFIG_WATCHDOG_TIMEOUT_MSECS " Tom Rini
@ 2021-12-28 12:56   ` Tom Rini
  0 siblings, 0 replies; 23+ messages in thread
From: Tom Rini @ 2021-12-28 12:56 UTC (permalink / raw)
  To: u-boot

[-- Attachment #1: Type: text/plain, Size: 239 bytes --]

On Sun, Dec 12, 2021 at 10:12:28PM -0500, Tom Rini wrote:

> This converts the following to Kconfig:
>    CONFIG_WATCHDOG_TIMEOUT_MSECS
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/next, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 04/11] Convert CONFIG_SYS_MEMTEST_START et al to Kconfig
  2021-12-13  3:12 ` [PATCH 04/11] Convert CONFIG_SYS_MEMTEST_START et al " Tom Rini
@ 2021-12-28 12:56   ` Tom Rini
  0 siblings, 0 replies; 23+ messages in thread
From: Tom Rini @ 2021-12-28 12:56 UTC (permalink / raw)
  To: u-boot

[-- Attachment #1: Type: text/plain, Size: 372 bytes --]

On Sun, Dec 12, 2021 at 10:12:29PM -0500, Tom Rini wrote:

> This converts the following to Kconfig:
>    CONFIG_SYS_MEMTEST_START
>    CONFIG_SYS_MEMTEST_END
> 
> This is removing unused defines and correcting the default value to be
> 0x0 as we are a hex symbol.
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/next, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 05/11] Convert CONFIG_SYS_IMMR to Kconfig
  2021-12-13  3:12 ` [PATCH 05/11] Convert CONFIG_SYS_IMMR " Tom Rini
@ 2021-12-28 12:56   ` Tom Rini
  0 siblings, 0 replies; 23+ messages in thread
From: Tom Rini @ 2021-12-28 12:56 UTC (permalink / raw)
  To: u-boot

[-- Attachment #1: Type: text/plain, Size: 511 bytes --]

On Sun, Dec 12, 2021 at 10:12:30PM -0500, Tom Rini wrote:

> This converts the following to Kconfig:
>    CONFIG_SYS_IMMR
> 
> We do this by consolidating the SYS_IMMR options we have and providing
> defaults.
> 
> We also, in the few places where M68K was also sharing code with these
> platforms, define it within the file to CONFIG_SYS_MBAR to match usage.
> This should be cleaned up longer term.
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/next, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 06/11] Finish CONFIG_VID et al conversion to Kconfig
  2021-12-13  3:12 ` [PATCH 06/11] Finish CONFIG_VID et al conversion " Tom Rini
@ 2021-12-28 12:56   ` Tom Rini
  0 siblings, 0 replies; 23+ messages in thread
From: Tom Rini @ 2021-12-28 12:56 UTC (permalink / raw)
  To: u-boot

[-- Attachment #1: Type: text/plain, Size: 775 bytes --]

On Sun, Dec 12, 2021 at 10:12:31PM -0500, Tom Rini wrote:

> This converts the following to Kconfig:
>    CONFIG_VID
>    CONFIG_VOL_MONITOR_INA220
>    CONFIG_VOL_MONITOR_IR36021_READ
>    CONFIG_VOL_MONITOR_IR36021_SET
>    CONFIG_VOL_MONITOR_LTC3882_READ
>    CONFIG_VOL_MONITOR_LTC3882_SET
> 
> To finish this migration, we first need to introduce CONFIG_SPL_VID as
> some platforms only use this code in full U-Boot while others use it in
> SPL as well.  To make the Kconfig logic clearer, guard all of the
> sub-options with a if VID || SPL_VID check.  Finally, add Kconfig
> options for the remaining related options that did not previously have
> one.
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/next, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 07/11] Convert CONFIG_SYS_PCI_64BIT to Kconfig
  2021-12-13  3:12 ` [PATCH 07/11] Convert CONFIG_SYS_PCI_64BIT " Tom Rini
@ 2021-12-28 12:56   ` Tom Rini
  0 siblings, 0 replies; 23+ messages in thread
From: Tom Rini @ 2021-12-28 12:56 UTC (permalink / raw)
  To: u-boot

[-- Attachment #1: Type: text/plain, Size: 230 bytes --]

On Sun, Dec 12, 2021 at 10:12:32PM -0500, Tom Rini wrote:

> This converts the following to Kconfig:
>    CONFIG_SYS_PCI_64BIT
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/next, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 08/11] warp7, pic32mzdask: Remove SYS_FDT_ADDR/SYS_ENV_ADDR from CONFIG namespace
  2021-12-13  3:12 ` [PATCH 08/11] warp7, pic32mzdask: Remove SYS_FDT_ADDR/SYS_ENV_ADDR from CONFIG namespace Tom Rini
@ 2021-12-28 12:56   ` Tom Rini
  0 siblings, 0 replies; 23+ messages in thread
From: Tom Rini @ 2021-12-28 12:56 UTC (permalink / raw)
  To: u-boot

[-- Attachment #1: Type: text/plain, Size: 452 bytes --]

On Sun, Dec 12, 2021 at 10:12:33PM -0500, Tom Rini wrote:

> In the case of CONFIG_SYS_FDT_ADDR this was being used to modify the
> default value of fdt_addr / fdt_addr_r, which is not something to expose
> in this manner and is not otherwise done.  The case of SYS_ENV_ADDR is
> similar but only done on the pic32mzdask platform, for scriptaddr.
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/next, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 09/11] Finish converting CONFIG_SYS_FSL_CLK to Kconfig
  2021-12-13  3:12 ` [PATCH 09/11] Finish converting CONFIG_SYS_FSL_CLK to Kconfig Tom Rini
@ 2021-12-28 12:56   ` Tom Rini
  0 siblings, 0 replies; 23+ messages in thread
From: Tom Rini @ 2021-12-28 12:56 UTC (permalink / raw)
  To: u-boot

[-- Attachment #1: Type: text/plain, Size: 538 bytes --]

On Sun, Dec 12, 2021 at 10:12:34PM -0500, Tom Rini wrote:

> This converts the following to Kconfig:
>    CONFIG_SYS_FSL_CLK
> 
> We move the exiting option to common/Kconfig near the other options to
> control the contents of board_init_f() and note that this is a legacy
> option.  We further restrict this to where the call is going to be
> non-empty, for the SoCs that had only been using this for some
> MMC-related clocks.
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/next, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 10/11] Convert CONFIG_TEGRA_NAND to Kconfig
  2021-12-13  3:12 ` [PATCH 10/11] Convert CONFIG_TEGRA_NAND " Tom Rini
@ 2021-12-28 12:57   ` Tom Rini
  0 siblings, 0 replies; 23+ messages in thread
From: Tom Rini @ 2021-12-28 12:57 UTC (permalink / raw)
  To: u-boot

[-- Attachment #1: Type: text/plain, Size: 227 bytes --]

On Sun, Dec 12, 2021 at 10:12:35PM -0500, Tom Rini wrote:

> This converts the following to Kconfig:
>    CONFIG_TEGRA_NAND
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/next, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 11/11] Finish conversion CONFIG_SYS_NAND_SELF_INIT to Kconfig
  2021-12-13  3:12 ` [PATCH 11/11] Finish conversion CONFIG_SYS_NAND_SELF_INIT " Tom Rini
@ 2021-12-28 12:57   ` Tom Rini
  0 siblings, 0 replies; 23+ messages in thread
From: Tom Rini @ 2021-12-28 12:57 UTC (permalink / raw)
  To: u-boot

[-- Attachment #1: Type: text/plain, Size: 381 bytes --]

On Sun, Dec 12, 2021 at 10:12:36PM -0500, Tom Rini wrote:

> In order to finish this conversion we need to add a symbols for
> SPL_SYS_NAND_SELF_INIT and TPL_SYS_NAND_SELF_INIT as there are cases
> there where we need to, or need to not, use that framework as things
> stand.
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/next, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2021-12-28 12:59 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-13  3:12 [PATCH 01/11] pci: Remove unused FSL_PCI_INIT code Tom Rini
2021-12-13  3:12 ` [PATCH 02/11] Finish converting CONFIG_WATCHDOG, HW_WATCHDOG and WDT to Kconfig Tom Rini
2021-12-28 12:56   ` Tom Rini
2021-12-28 12:56   ` Tom Rini
2021-12-13  3:12 ` [PATCH 03/11] Convert CONFIG_WATCHDOG_TIMEOUT_MSECS " Tom Rini
2021-12-28 12:56   ` Tom Rini
2021-12-13  3:12 ` [PATCH 04/11] Convert CONFIG_SYS_MEMTEST_START et al " Tom Rini
2021-12-28 12:56   ` Tom Rini
2021-12-13  3:12 ` [PATCH 05/11] Convert CONFIG_SYS_IMMR " Tom Rini
2021-12-28 12:56   ` Tom Rini
2021-12-13  3:12 ` [PATCH 06/11] Finish CONFIG_VID et al conversion " Tom Rini
2021-12-28 12:56   ` Tom Rini
2021-12-13  3:12 ` [PATCH 07/11] Convert CONFIG_SYS_PCI_64BIT " Tom Rini
2021-12-28 12:56   ` Tom Rini
2021-12-13  3:12 ` [PATCH 08/11] warp7, pic32mzdask: Remove SYS_FDT_ADDR/SYS_ENV_ADDR from CONFIG namespace Tom Rini
2021-12-28 12:56   ` Tom Rini
2021-12-13  3:12 ` [PATCH 09/11] Finish converting CONFIG_SYS_FSL_CLK to Kconfig Tom Rini
2021-12-28 12:56   ` Tom Rini
2021-12-13  3:12 ` [PATCH 10/11] Convert CONFIG_TEGRA_NAND " Tom Rini
2021-12-28 12:57   ` Tom Rini
2021-12-13  3:12 ` [PATCH 11/11] Finish conversion CONFIG_SYS_NAND_SELF_INIT " Tom Rini
2021-12-28 12:57   ` Tom Rini
2021-12-28 12:56 ` [PATCH 01/11] pci: Remove unused FSL_PCI_INIT code Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.