More tidy-ups of Kconfig options
Subsystems (16)
v5 cover More tidy-ups of Kconfig options
This series was split out of the old 'split config' splc series. It contains clean-up patches which do not depend on split config.
This is available at u-boot-dm/spld-working
The size changes look pretty good: https://paste.debian.net/1271742/
The remaining patches will move into a new 'splg' series (G for Good).
[1] https://patchwork.ozlabs.org/project/uboot/list/?series=341504&state=*
Changes in v5:
- Fix reply typo
- Change approach and expand notes after more investigation
- Drop FSL_ISBC_KEY_EXT patch as it changes the size
- Drop PHY_CADENCE_SIERRA patch as it changes the size
Changes in v4:
- Avoid use of def_bool
- Modify to get rid of def_bool
- Adjust Kconfig ordering
- Just fix the typo
- Reduce and rename commit
- Reduce and rename commit
- Fix 'wanderboard' typo
- Reduce and rename commit
Changes in v3:
- Add new patch to disable QFW bootmeth in SPL
- Move the option down to the non-SPL part of drivers/Makefile
- Correct 'VPL' typo
- Use a consistent format for the comment
- Fix a transitory build error with sandbox_spl
- Add a new patch to disallow commands in SPL
Changes in v2:
- Rebase to previous series
Simon Glass (44):
mtd: Drop unused kb9202_nand driver
mtd: Drop unused CONFIG_ONENAND_U_BOOT
sh4: Drop unused twl6030 driver
moveconfig: Update to detect / correct missing SPL Kconfigs
bootstd: Disable QFW bootmeth in SPL
Correct SPL uses of ARCH_MVEBU
Correct SPL uses of DISPLAY_AER_FULL
Correct SPL uses of MULTIPLEXER
Correct SPL use of PG_WCOM_UBOOT_UPDATE_SUPPORTED Correct SPL uses of PHY_FIXED
boot: Add Kconfigs for BOOTMETH_VBE_REQUEST Correct SPL use of DM_RNG
lib: Add a Kconfig for SPL_BZIP2
moveconfig: Various minor improvements
sandbox: Expand size for VPL image
event: Add Kconfig options for SPL
bootstd: Correct 'VPL' typo
env: Avoid checking ENV_IS_IN when env disabled
env: Allow VPL environment to be nowhere
lib: Add VPL options for SHA1 and SHA256
x86: Use string functions for all 32-bit builds
lib: Fix build condition for tiny-printf
sandbox: Tidy up RTC options
sandbox: Use the generic VPL option to enable VPL
sandbox: Tidy up I2C options
fixdep: Add support for VPL
fixdep: Refactor to make testing easier
fixdep: Add some tests for parse_config_line()
test: Add SPL versions of the TEST_KCONFIG options
lib: Add an SPL config for LIB_UUID
test: Tidy up sandbox handling in test-main
x86: Fix up use of X86_32BIT_INIT and X86_64 options Add VPL options for BLOBLIST
rockchip: Avoid checking environment without ENV_SUPPORT
freescale: Drop old pre-DM_ETH code
imx: Use SATA instead of CMD_SATA
net: Add an SPL config for atheros
freescale: Fix odd use of ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE
serial: Support ns16550 driver in TPL
dm: Add a TPL symbol for simple-bus
x86: coral: Add missing TPL options
power: wandboard: Add a missing CONFIG
venice: Simplify conditions for network init
command: Don't allow commands in SPL
Makefile | 1 - arch/arm/cpu/armv7/ls102xa/fdt.c | 12 - arch/powerpc/include/asm/config_mpc85xx.h | 6 +- arch/sandbox/dts/sandbox.dts | 4 +- arch/sandbox/dts/sandbox.dtsi | 6 +- arch/sandbox/dts/sandbox_vpl.dtsi | 4 +- arch/sandbox/include/asm/rtc.h | 2 +- arch/x86/cpu/qemu/qemu.c | 2 +- arch/x86/include/asm/msr.h | 2 +- arch/x86/include/asm/string.h | 2 +- arch/x86/lib/Makefile | 2 +- board/gateworks/venice/venice.c | 6 +- board/keymile/common/common.c | 2 +- board/solidrun/mx6cuboxi/mx6cuboxi.c | 2 +- .../puma_rk3399/puma-rk3399.c | 2 +- .../ringneck_px30/ringneck-px30.c | 2 +- boot/Kconfig | 22 +- boot/Makefile | 5 +- boot/vbe_request.c | 2 +- cmd/nvedit.c | 2 + common/Kconfig | 51 +- configs/chromebook_coral_defconfig | 3 + configs/wandboard_defconfig | 1 + disk/Kconfig | 8 + drivers/Makefile | 2 +- drivers/core/Kconfig | 7 + drivers/i2c/Kconfig | 20 + drivers/input/Makefile | 1 - drivers/input/twl6030.c | 47 -- drivers/mmc/fsl_esdhc.c | 6 +- drivers/mmc/fsl_esdhc_imx.c | 4 +- drivers/mmc/mv_sdhci.c | 4 +- drivers/mtd/nand/raw/Makefile | 1 - drivers/mtd/nand/raw/kb9202_nand.c | 134 ---- drivers/mux/Makefile | 2 +- drivers/net/mvneta.c | 4 +- drivers/net/phy/Kconfig | 3 + drivers/rtc/Kconfig | 18 + drivers/rtc/Makefile | 4 +- drivers/serial/Kconfig | 6 + drivers/sysreset/sysreset_mpc83xx.c | 4 +- env/Kconfig | 10 + include/command.h | 2 +- include/mux.h | 2 +- lib/Kconfig | 30 + lib/Makefile | 2 +- net/mdio-uclass.c | 2 +- scripts/basic/fixdep.c | 162 ++++- test/lib/Kconfig | 20 +- test/test-main.c | 10 +- tools/moveconfig.py | 594 +++++++++++++----- 51 files changed, 831 insertions(+), 421 deletions(-) delete mode 100644 drivers/input/twl6030.c delete mode 100644 drivers/mtd/nand/raw/kb9202_nand.c
Signature · 1 line
2.39.2.637.g21b0678d19-goog
PATCH v5 1/44 mtd: Drop unused kb9202_nand driver
This is not used since time out of mind.
Drop the driver and Kconfig option.
---
(no changes since v1)
drivers/mtd/nand/raw/Makefile | 1 - drivers/mtd/nand/raw/kb9202_nand.c | 134 ----------------------------- 2 files changed, 135 deletions(-) delete mode 100644 drivers/mtd/nand/raw/kb9202_nand.c
drivers/mtd/nand/raw/Makefile +0 -1
@@ -56,7 +56,6 @@ obj-$(CONFIG_NAND_DENALI) += denali.o obj-$(CONFIG_NAND_DENALI_DT) += denali_dt.o obj-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_nand.o obj-$(CONFIG_NAND_FSL_IFC) += fsl_ifc_nand.o -obj-$(CONFIG_NAND_KB9202) += kb9202_nand.o obj-$(CONFIG_NAND_KIRKWOOD) += kirkwood_nand.o obj-$(CONFIG_NAND_KMETER1) += kmeter1_nand.o obj-$(CONFIG_NAND_LPC32XX_MLC) += lpc32xx_nand_mlc.o
drivers/mtd/nand/raw/kb9202_nand.c deleted +0 -134
134 lines not on this page · raw message
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 01/44] mtd: Drop unused kb9202_nand driver
Quoted 6 lines · Simon Glass
This is not used since time out of mind.
Drop the driver and
Kconfigoption.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 2/44 mtd: Drop unused CONFIG_ONENAND_U_BOOT
In reply to Simon GlassThis option does not exist, so the Makefile rule does nothing. Drop it.
---
(no changes since v1)
Makefile | 1 - 1 file changed, 1 deletion(-)
Makefile +0 -1
@@ -956,7 +956,6 @@ endif # Always append INPUTS so that arch config.mk's can add custom ones INPUTS-y += u-boot.srec u-boot.bin u-boot.sym System.map binary_size_check -INPUTS-$(CONFIG_ONENAND_U_BOOT) += u-boot-onenand.bin ifeq ($(CONFIG_SPL_FSL_PBL),y) INPUTS-$(CONFIG_RAMBOOT_PBL) += u-boot-with-spl-pbl.bin else
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 02/44] mtd: Drop unused CONFIG_ONENAND_U_BOOT
Quoted 3 lines · Simon Glass
This option does not exist, so the
Makefilerule does nothing. Drop it.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 3/44 sh4: Drop unused twl6030 driver
In reply to Simon GlassThis is not used. Drop the driver and Kconfig option.
---
(no changes since v1)
drivers/input/Makefile | 1 - drivers/input/twl6030.c | 47 ----------------------------------------- 2 files changed, 48 deletions(-) delete mode 100644 drivers/input/twl6030.c
drivers/input/Makefile +0 -1
@@ -14,5 +14,4 @@ obj-$(CONFIG_APPLE_SPI_KEYB) += apple_spi_kbd.o obj-$(CONFIG_I8042_KEYB) += i8042.o obj-$(CONFIG_TEGRA_KEYBOARD) += input.o tegra-kbc.o obj-$(CONFIG_TWL4030_INPUT) += twl4030.o -obj-$(CONFIG_TWL6030_INPUT) += twl6030.o endif
drivers/input/twl6030.c deleted +0 -47
47 lines not on this page · raw message
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 03/44] sh4: Drop unused twl6030 driver
Quoted 3 lines · Simon Glass
This is not used. Drop the driver and
Kconfigoption.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 4/44 moveconfig: Update to detect / correct missing SPL Kconfigs
In reply to Simon GlassThis adds quite a few more features, all designed to detect problems with Kconfig options and their use. It can find options mentioned in the source code which are not in the Kconfig and vice versa. It can convert SPL usages of non-SPL Kconfig options (i.e. changing CONFIG_IS_ENABLED() to IS_ENABLED() and CONFIG_$(SPL)_FOO to CONFIG_FOO, creating commits automatically if requested.
These features are only useful for code clean-up, not for normal development.
---
(no changes since v2)
Changes in v2:
- Rebase to previous series
tools/moveconfig.py | 599 +++++++++++++++++++++++++++++++++----------- 1 file changed, 456 insertions(+), 143 deletions(-)
tools/moveconfig.py +456 -143
@@ -20,6 +20,7 @@ import doctest import filecmp import fnmatch import glob +import io import multiprocessing import os import queue
@@ -118,6 +119,16 @@ def check_clean_directory(): if os.path.exists(fname): sys.exit("source tree is not clean, please run 'make mrproper'") +def write_commit(msg): + """Create a new commit with all modified files + + Args: + msg (str): Commit message + """ + subprocess.call(['git', 'add', '-u']) + rc = subprocess.call(['git', 'commit', '-s', '-m', msg]) + return rc == 0 + def get_make_cmd(): """Get the command name of GNU Make.
@@ -1606,30 +1617,59 @@ def prefix_config(cfg): return op + cfg -RE_MK_CONFIGS = re.compile('CONFIG_(\$\(SPL_(?:TPL_)?\))?([A-Za-z0-9_]*)') -RE_IFDEF = re.compile('(ifdef|ifndef)') -RE_C_CONFIGS = re.compile('CONFIG_([A-Za-z0-9_]*)') -RE_CONFIG_IS = re.compile('CONFIG_IS_ENABLED\(([A-Za-z0-9_]*)\)') +RE_MK_CONFIGS = re.compile(r'CONFIG_(\$\(SPL_(?:TPL_)?\))?([A-Za-z0-9_]*)') + +# Makefile ifdefs: this only handles 'else' on its own line, so not +# 'else ifeq ...', for example +RE_IF = re.compile(r'^(ifdef|ifndef|endif|ifeq|ifneq|else)([^,]*,([^,]*)\))?.*$') + +# Normal CONFIG options in C +RE_C_CONFIGS = re.compile(r'CONFIG_([A-Za-z0-9_]*)') + +# CONFIG_IS_ENABLED() construct +RE_CONFIG_IS = re.compile(r'CONFIG_IS_ENABLED\(([A-Za-z0-9_]*)\)') + +# Preprocessor #if/#ifdef directives, etc. +RE_IFDEF = re.compile(r'^\s*#\s*(ifdef|ifndef|endif|if|elif|else)\s*(?:#.*)?(.*)$') class ConfigUse: - def __init__(self, cfg, is_spl, fname, rest): + """Holds information about a use of a CONFIG option""" + def __init__(self, cfg, is_spl, conds, fname, rest, is_mk): + """Set up a new use of a CONFIG option + + Args: + cfg (str): Config option, without the CONFIG_ + is_spl (bool): True if it indicates an SPL option, i.e. has a + $(SPL_) or similar, False if not + conds (list of str): List of conditions for this use, e.g. + ['SPL_BUILD'] + fname (str): Filename contining the use + rest (str): Entire line from the file + is_mk (bool): True if this is in a Makefile, False if not + """ self.cfg = cfg self.is_spl = is_spl + self.conds = list(c for c in conds if '(NONE)' not in c) self.fname = fname self.rest = rest + self.is_mk = is_mk def __hash__(self): return hash((self.cfg, self.is_spl)) -def scan_makefiles(fnames): + def __str__(self): + return (f'ConfigUse({self.cfg}, is_spl={self.is_spl}, ' + f'is_mk={self.is_mk}, fname={self.fname}, rest={self.rest}') + +def scan_makefiles(fname_dict): """Scan Makefiles looking for Kconfig options Looks for uses of CONFIG options in Makefiles Args: - fnames (list of tuple): - str: Makefile filename where the option was found - str: Line of the Makefile + fname_dict (dict lines): + key: Makefile filename where the option was found + value: List of str lines of the Makefile Returns: tuple:
@@ -1646,46 +1686,81 @@ def scan_makefiles(fnames): ('$(SPL_)', 'MARY') >>> RE_MK_CONFIGS.search('CONFIG_$(SPL_TPL_)MARY').groups() ('$(SPL_TPL_)', 'MARY') + >>> RE_IF.match('ifdef CONFIG_SPL_BUILD').groups() + ('ifdef', None, None) + >>> RE_IF.match('endif # CONFIG_SPL_BUILD').groups() + ('endif', None, None) + >>> RE_IF.match('endif').groups() + ('endif', None, None) + >>> RE_IF.match('else').groups() + ('else', None, None) """ all_uses = collections.defaultdict(list) fname_uses = {} - for fname, rest in fnames: - m_iter = RE_MK_CONFIGS.finditer(rest) - found = False - for m in m_iter: - found = True - real_opt = m.group(2) - if real_opt == '': - continue - is_spl = False - if m.group(1): - is_spl = True - use = ConfigUse(real_opt, is_spl, fname, rest) - if fname not in fname_uses: - fname_uses[fname] = set() - fname_uses[fname].add(use) - all_uses[use].append(rest) + for fname, rest_list in fname_dict.items(): + conds = [] + for rest in rest_list: + m_iter = RE_MK_CONFIGS.finditer(rest) + m_cond = RE_IF.match(rest) + #print('line', conds, m_cond and m_cond.group(1) or '.', rest) + last_use = None + use = None + for m in m_iter: + real_opt = m.group(2) + if real_opt == '': + continue + is_spl = False + if m.group(1): + is_spl = True + use = ConfigUse(real_opt, is_spl, conds, fname, rest, True) + if fname not in fname_uses: + fname_uses[fname] = set() + fname_uses[fname].add(use) + all_uses[use].append(rest) + last_use = use + if m_cond: + cfg = last_use.cfg if last_use else '(NONE)' + cond = m_cond.group(1) + if cond == 'ifdef': + conds.append(cfg) + elif cond == 'ifndef': + conds.append(f'~{cfg}') + elif cond == 'ifeq': + #print('todo', fname, m_cond.group(3), fname, rest) + conds.append(f'{m_cond.group(3)}={cfg}') + elif cond == 'ifneq': + conds.append(f'{m_cond.group(3)}={cfg}') + #print('todo', m_cond.group(3)) + elif cond == 'endif': + conds.pop() + elif cond == 'else': + cond = conds.pop() + if cond.startswith('~'): + cond = cond[1:] + else: + cond = f'~{cond}' + conds.append(cond) + else: + print(f'unknown condition: {rest}') + if conds: + print(f'leftover {conds}') return all_uses, fname_uses - -def scan_src_files(fnames): +def scan_src_files(fname_dict, all_uses, fname_uses): """Scan source files (other than Makefiles) looking for Kconfig options Looks for uses of CONFIG options Args: - fnames (list of tuple): - str: Makefile filename where the option was found - str: Line of the Makefile - - Returns: - tuple: - dict: all_uses - key (ConfigUse): object - value (list of str): matching lines - dict: Uses by filename - key (str): filename - value (set of ConfigUse): uses in that filename + fname_dict (dict): + key (str): Filename + value (list of ConfigUse): List of uses in that filename + all_uses (dict): to add more uses to: + key (ConfigUse): object + value (list of str): matching lines + fname (dict): to add more uses-by-filename to + key (str): filename + value (set of ConfigUse): uses in that filename >>> RE_C_CONFIGS.search('CONFIG_FRED').groups() ('FRED',)
@@ -1693,39 +1768,78 @@ def scan_src_files(fnames): ('MARY',) >>> RE_CONFIG_IS.search('#if CONFIG_IS_ENABLED(OF_PLATDATA)').groups() ('OF_PLATDATA',) + >>> RE_IFDEF.match('#ifdef CONFIG_SPL_BUILD').groups() + ('ifdef', 'CONFIG_SPL_BUILD') + >>> RE_IFDEF.match('#endif # CONFIG_SPL_BUILD').groups() + ('endif', '') + >>> RE_IFDEF.match('#endif').groups() + ('endif', '') + >>> RE_IFDEF.match('#else').groups() + ('else', '') + >>> RE_IFDEF.match(' # if defined(CONFIG_CMD_NET) && !defined(CONFIG_DM_ETH)').groups() + ('if', 'defined(CONFIG_CMD_NET) && !defined(CONFIG_DM_ETH)') """ def add_uses(m_iter, is_spl): + last_use = None for m in m_iter: found = True real_opt = m.group(1) if real_opt == '': continue - use = ConfigUse(real_opt, is_spl, fname, rest) + use = ConfigUse(real_opt, is_spl, conds, fname, rest, False) if fname not in fname_uses: fname_uses[fname] = set() fname_uses[fname].add(use) all_uses[use].append(rest) - - all_uses = collections.defaultdict(list) - fname_uses = {} - for fname, rest in fnames: - m_iter = RE_C_CONFIGS.finditer(rest) - add_uses(m_iter, False) - - m_iter2 = RE_CONFIG_IS.finditer(rest) - add_uses(m_iter2, True) - - return all_uses, fname_uses + last_use = use + return last_use + + for fname, rest_list in fname_dict.items(): + conds = [] + for rest in rest_list: + m_iter = RE_C_CONFIGS.finditer(rest) + m_cond = RE_IFDEF.match(rest) + last_use1 = add_uses(m_iter, False) + + m_iter2 = RE_CONFIG_IS.finditer(rest) + last_use2 = add_uses(m_iter2, True) + last_use = last_use1 or last_use2 + if m_cond: + cfg = last_use.cfg if last_use else '(NONE)' + cond = m_cond.group(1) + #print(fname, rest, cond, conds) + if cond == 'ifdef': + conds.append(cfg) + elif cond == 'ifndef': + conds.append(f'~{cfg}') + elif cond == 'if': + #print('todo', fname, m_cond.group(3), fname, rest) + conds.append(f'{m_cond.group(2)}={cfg}') + elif cond == 'endif': + conds.pop() + elif cond == 'else': + cond = conds.pop() + if cond.startswith('~'): + cond = cond[1:] + else: + cond = f'~{cond}' + conds.append(cond) + elif cond == 'elif': + cond = conds.pop() + conds.append(cfg) + else: + print(f'{fname}: unknown condition: {rest}') MODE_NORMAL, MODE_SPL, MODE_PROPER = range(3) -def do_scan_source(path, do_update): +def do_scan_source(path, do_update, show_conflicts, do_commit): """Scan the source tree for Kconfig inconsistencies Args: path (str): Path to source tree - do_update (bool) : True to write to scripts/kconf_... files + do_update (bool): True to write to scripts/kconf_... files + show_conflicts (bool): True to show conflicts """ def is_not_proper(name): for prefix in SPL_PREFIXES:
@@ -1754,7 +1868,7 @@ def do_scan_source(path, do_update): """ # Make sure we know about all the options not_found = collections.defaultdict(list) - for use, rest in all_uses.items(): + for use, _ in all_uses.items(): name = use.cfg if name in IGNORE_SYMS: continue
@@ -1766,7 +1880,6 @@ def do_scan_source(path, do_update): # If it is an SPL symbol, try prepending all SPL_ prefixes to # find at least one SPL symbol if use.is_spl: - add_to_dict = False for prefix in SPL_PREFIXES: try_name = prefix + name sym = kconf.syms.get(try_name)
@@ -1784,7 +1897,6 @@ def do_scan_source(path, do_update): elif not use.is_spl: check = False else: # MODE_NORMAL - debug = False sym = kconf.syms.get(name) if not sym: proper_name = is_not_proper(name)
@@ -1819,105 +1931,304 @@ def do_scan_source(path, do_update): for i, use in enumerate(uses[name]): print(f'{" " if i else ""}{use.fname}: {use.rest.strip()}') + def do_scan(): + """Scan the source tree - print('Scanning Kconfig') - kconf = KconfigScanner().conf - print(f'Scanning source in {path}') - args = ['git', 'grep', '-E', r'IS_ENABLED|\bCONFIG'] - with subprocess.Popen(args, stdout=subprocess.PIPE) as proc: - out, err = proc.communicate() - lines = out.splitlines() - re_fname = re.compile('^([^:]*):(.*)') - src_list = [] - mk_list = [] - for line in lines: - linestr = line.decode('utf-8') - m_fname = re_fname.search(linestr) - if not m_fname: - continue - fname, rest = m_fname.groups() - dirname, leaf = os.path.split(fname) - root, ext = os.path.splitext(leaf) - if ext == '.autoconf': - pass - elif ext in ['.c', '.h', '.S', '.lds', '.dts', '.dtsi', '.asl', '.cfg', - '.env', '.tmpl']: - src_list.append([fname, rest]) - elif 'Makefile' in root or ext == '.mk': - mk_list.append([fname, rest]) - elif ext in ['.yml', '.sh', '.py', '.awk', '.pl', '.rst', '', '.sed']: - pass - elif 'Kconfig' in root or 'Kbuild' in root: - pass - elif 'README' in root: - pass - elif dirname in ['configs']: - pass - elif dirname.startswith('doc') or dirname.startswith('scripts/kconfig'): - pass + This runs a 'git grep' and then picks out uses of CONFIG options from + the resulting output + + Returns: tuple + dict of uses of CONFIG in Makefiles: + key (str): Filename + value (list of ConfigUse): List of uses in that filename + dict of uses of CONFIG in source files: + key (str): Filename + value (list of ConfigUse): List of uses in that filename + """ + def finish_file(last_fname, rest_list): + if is_mkfile: + mk_dict[last_fname] = rest_list + else: + src_dict[last_fname] = rest_list + rest_list = [] + + print(f'Scanning source in {path}') + args = ['git', 'grep', '-E', + r'IS_ENABLED|\bCONFIG|CONFIG_SPL_BUILD|if|else|endif'] + with subprocess.Popen(args, stdout=subprocess.PIPE) as proc: + out, _ = proc.communicate() + lines = out.splitlines() + re_fname = re.compile('^([^:]*):(.*)') + src_dict = collections.OrderedDict() + mk_dict = collections.OrderedDict() + last_fname = None + rest_list = [] + is_mkfile = None + for line in lines: + linestr = line.decode('utf-8') + m_fname = re_fname.search(linestr) + if not m_fname: + continue + fname, rest = m_fname.groups() + if fname != last_fname: + finish_file(last_fname, rest_list) + rest_list = [] + last_fname = fname + + dirname, leaf = os.path.split(fname) + root, ext = os.path.splitext(leaf) + #if dirname != '' or root != 'Makefile': + #continue + if (dirname.startswith('test') or + dirname.startswith('lib/efi_selftest')): + # Ignore test code since it is mostly only for sandbox + pass + elif ext == '.autoconf': + pass + elif ext in ['.c', '.h', '.S', '.lds', '.dts', '.dtsi', '.asl', + '.cfg', '.env', '.tmpl']: + rest_list.append(rest) + is_mkfile = False + elif 'Makefile' in root or ext == '.mk': + rest_list.append(rest) + is_mkfile = True + elif ext in ['.yml', '.sh', '.py', '.awk', '.pl', '.rst', '', '.sed', + '.src', '.inc', '.l', '.i_shipped', '.txt', '.cmd', + '.cfg', '.y', '.cocci', '.ini', '.asn1', '.base', + '.cnf', '.patch', '.mak', '.its', '.svg', '.tcl', + '.css', '.config', '.conf']: + pass + elif 'Kconfig' in root or 'Kbuild' in root: + pass + elif 'README' in root: + pass + elif dirname in ['configs']: + pass + elif dirname.startswith('doc') or dirname.startswith('scripts/kconfig'): + pass + else: + print(f'Not sure how to handle file {fname}') + finish_file(last_fname, rest_list) + return mk_dict, src_dict + + def check_mk_missing(all_uses, spl_not_found, proper_not_found): + # Make sure we know about all the options in Makefiles + print('\nCONFIG options present in Makefiles but not Kconfig:') + not_found = check_not_found(all_uses, MODE_NORMAL) + show_uses(not_found) + + print('\nCONFIG options present in Makefiles but not Kconfig (SPL):') + not_found = check_not_found(all_uses, MODE_SPL) + show_uses(not_found) + spl_not_found |= set(is_not_proper(key) or key for key in not_found.keys()) + + print('\nCONFIG options used as Proper in Makefiles but without a non-SPL_ variant:') + not_found = check_not_found(all_uses, MODE_PROPER) + show_uses(not_found) + proper_not_found |= set(key for key in not_found.keys()) + + def check_src_missing(all_uses, spl_not_found, proper_not_found): + # Make sure we know about all the options in source files + print('\nCONFIG options present in source but not Kconfig:') + not_found = check_not_found(all_uses, MODE_NORMAL) + show_uses(not_found) + + print('\nCONFIG options present in source but not Kconfig (SPL):') + not_found = check_not_found(all_uses, MODE_SPL) + show_uses(not_found) + spl_not_found |= set(is_not_proper(key) or key + for key in not_found.keys()) + + print('\nCONFIG options used as Proper in source but without a non-SPL_ variant:') + not_found = check_not_found(all_uses, MODE_PROPER) + show_uses(not_found) + proper_not_found |= set(key for key in not_found.keys()) + + def show_summary(spl_not_found, proper_not_found): + print('\nCONFIG options used as SPL but without an SPL_ variant:') + for item in sorted(spl_not_found): + print(f' {item}') + + print('\nCONFIG options used as Proper but without a non-SPL_ variant:') + for item in sorted(proper_not_found): + print(f' {item}') + + def write_update(spl_not_found, proper_not_found): + with open(os.path.join(path, 'scripts', 'conf_nospl'), + encoding='utf-8') as out: + print('# These options should not be enabled in SPL builds\n', + file=out) + for item in sorted(spl_not_found): + print(item, file=out) + with open(os.path.join(path, 'scripts', 'conf_noproper'), 'w', + encoding='utf-8') as out: + print('# These options should not be enabled in Proper builds\n', + file=out) + for item in sorted(proper_not_found): + print(item, file=out) + + def check_conflict(kconf, all_uses, show): + """Check conflicts between uses of CONFIG options in source + + Sometimes an option is used in an SPL context in once place and not in + another. For example if we see CONFIG_SPL_FOO and CONFIG_FOO then we + don't know whether FOO should be enabled in SPL if CONFIG_FOO is + enabled, or only if CONFIG_SPL_FOO is enabled., + + This function detects such situations + + Args: + kconf (Kconfiglib.Kconfig): Kconfig tree read from source + all_uses (dict): dict to add more uses to: + key (ConfigUse): object + value (list of str): matching lines + show (bool): True to show the problems + + Returns: + dict of conflicts: + key: filename + value: list of ConfigUse objects + """ + conflict_dict = collections.defaultdict(list) + cfg_dict = collections.defaultdict(list) + + uses = collections.defaultdict(list) + for use in all_uses: + uses[use.cfg].append(use) + + bad = 0 + for cfg in sorted(uses): + use_list = uses[cfg] + + # Check if + # - there is no SPL_ version of the symbol, and + # - some uses are SPL and some are not + is_spl = list(set(u.is_spl for u in use_list)) + if len(is_spl) > 1 and f'SPL_{cfg}' not in kconf.syms: + if show: + print(f'{cfg}: {is_spl}') + for use in use_list: + if show: + print(f' spl={use.is_spl}: {use.conds} {use.fname} {use.rest}') + if use.is_spl: + conflict_dict[use.fname].append(use) + cfg_dict[use.cfg].append(use) + bad += 1 + print(f'total bad: {bad}') + return conflict_dict, cfg_dict + + def replace_in_file(fname, use_or_uses): + """Replace a CONFIG pattern in a file + + Args: + fname (str): Filename to replace in + use_or_uses (ConfigUse or list of ConfigUse): Uses to replace + """ + with open(fname, encoding='utf-8') as inf: + data = inf.read() + out = io.StringIO() + + if isinstance(use_or_uses, list): + uses = use_or_uses else: - print(f'Not sure how to handle file {fname}') + uses = [use_or_uses] - # Scan the Makefiles - all_uses, fname_uses = scan_makefiles(mk_list) + re_cfgs = [] + for use in uses: + if use.is_mk: + expr = r'CONFIG_(?:\$\(SPL_(?:TPL_)?\))%s\b' % use.cfg + else: + expr = r'CONFIG_IS_ENABLED\(%s\)' % use.cfg + re_cfgs.append(re.compile(expr)) + + for line in data.splitlines(): + new_line = line + if 'CONFIG_' in line: + todo = [] + for i, re_cfg in enumerate(re_cfgs): + if not re_cfg.search(line): + todo.append(re_cfg) + use = uses[i] + if use.is_mk: + new_line = re_cfg.sub(f'CONFIG_{use.cfg}', new_line) + else: + new = f'IS_ENABLED(CONFIG_{use.cfg})' + new_line = re_cfg.sub(new, new_line) + re_cfgs = todo + out.write(new_line) + out.write('\n') + out_data = out.getvalue() + if out_data == data: + print(f'\n\nfailed with {fname}\n\n') + with open(fname, 'w', encoding='utf-8') as outf: + outf.write(out_data) + + def update_source(conflicts): + """Replace any SPL constructs with plain non-SPL ones + + CONFIG_IS_ENABLED(FOO) becomes IS_ENABLED(CONFIG_FOO) + CONFIG$_(SPL_TPL_)FOO becomes CONFIG_FOO - spl_not_found = set() - proper_not_found = set() + Args: + conflicts (dict): dict of conflicts: + key (str): filename + value (list of ConfigUse): uses within that file + """ + print(f'Updating {len(conflicts)} files') + for fname, uses in conflicts.items(): + replace_in_file(fname, uses) - # Make sure we know about all the options - print('\nCONFIG options present in Makefiles but not Kconfig:') - not_found = check_not_found(all_uses, MODE_NORMAL) - show_uses(not_found) + def create_commits(cfg_dict): + """Create a set of commits to fix SPL conflicts - print('\nCONFIG options present in Makefiles but not Kconfig (SPL):') - not_found = check_not_found(all_uses, MODE_SPL) - show_uses(not_found) - spl_not_found |= set([is_not_proper(key) or key for key in not_found.keys()]) + """ + print(f'Creating {len(cfg_dict)} commits') + for cfg, uses in cfg_dict.items(): + print(f'Processing {cfg}') + for use in uses: + #print(f' {use.fname}: {use}') + replace_in_file(use.fname, use) + plural = 's' if len(uses) > 1 else '' + msg = f'Correct SPL use{plural} of {cfg}' + msg += f'\n\nThis converts {len(uses)} usage{plural} ' + msg += 'of this option to the non-SPL form, since there is\n' + msg += f'no SPL_{cfg} defined in Kconfig' + if not write_commit(msg): + print('failed\n', uses) + break - print('\nCONFIG options used as Proper in Makefiles but without a non-SPL_ variant:') - not_found = check_not_found(all_uses, MODE_PROPER) - show_uses(not_found) - proper_not_found |= set([key for key in not_found.keys()]) + print('Scanning Kconfig') + kconf = KconfigScanner().conf - # Scan the source code - all_uses, fname_uses = scan_src_files(src_list) + all_uses = collections.defaultdict(list) + fname_uses = {} + mk_dict, src_dict = do_scan() + + # Scan the Makefiles + all_uses, fname_uses = scan_makefiles(mk_dict) + scan_src_files(src_dict, all_uses, fname_uses) - # Make sure we know about all the options - print('\nCONFIG options present in source but not Kconfig:') - not_found = check_not_found(all_uses, MODE_NORMAL) - show_uses(not_found) + conflicts, cfg_dict = check_conflict(kconf, all_uses, show_conflicts) - print('\nCONFIG options present in source but not Kconfig (SPL):') - not_found = check_not_found(all_uses, MODE_SPL) - show_uses(not_found) - spl_not_found |= set([is_not_proper(key) or key for key in not_found.keys()]) + if do_update: + update_source(conflicts) + if do_commit: + create_commits(cfg_dict) - print('\nCONFIG options used as Proper in source but without a non-SPL_ variant:') - not_found = check_not_found(all_uses, MODE_PROPER) - show_uses(not_found) - proper_not_found |= set([key for key in not_found.keys()]) + # Look for CONFIG options that are not found + spl_not_found = set() + proper_not_found = set() + check_mk_missing(all_uses, spl_not_found, proper_not_found) - print('\nCONFIG options used as SPL but without an SPL_ variant:') - for item in sorted(spl_not_found): - print(f' {item}') + # Scan the source code + scan_src_files(src_dict, all_uses, fname_uses) + check_src_missing(all_uses, spl_not_found, proper_not_found) - print('\nCONFIG options used as Proper but without a non-SPL_ variant:') - for item in sorted(proper_not_found): - print(f' {item}') + show_summary(spl_not_found, proper_not_found) # Write out the updated information if do_update: - with open(os.path.join(path, 'scripts', 'conf_nospl'), 'w') as out: - print('# These options should not be enabled in SPL builds\n', - file=out) - for item in sorted(spl_not_found): - print(item, file=out) - with open(os.path.join(path, 'scripts', 'conf_noproper'), 'w') as out: - print('# These options should not be enabled in Proper builds\n', - file=out) - for item in sorted(proper_not_found): - print(item, file=out) - + write_update(spl_not_found, proper_not_found) def main(): try:
@@ -1957,9 +2268,11 @@ doc/develop/moveconfig.rst for documentation.''' parser.add_argument('-i', '--imply', action='store_true', default=False, help='find options which imply others') parser.add_argument('-I', '--imply-flags', type=str, default='', - help="control the -i option ('help' for help") + help="control the -i option ('help' for help)") parser.add_argument('-j', '--jobs', type=int, default=cpu_count, help='the number of jobs to run simultaneously') + parser.add_argument('-l', '--list-problems', action='store_true', + help='list problems found with --scan-source') parser.add_argument('-n', '--dry-run', action='store_true', default=False, help='perform a trial run (show log with no changes)') parser.add_argument('-r', '--git-ref', type=str,
@@ -1991,7 +2304,8 @@ doc/develop/moveconfig.rst for documentation.''' unittest.main() if args.scan_source: - do_scan_source(os.getcwd(), args.update) + do_scan_source(os.getcwd(), args.update, args.list_problems, + args.commit) return if not any((len(configs), args.force_sync, args.build_db, args.imply,
@@ -2049,7 +2363,6 @@ doc/develop/moveconfig.rst for documentation.''' cleanup_readme(configs, args) if args.commit: - subprocess.call(['git', 'add', '-u']) if configs: msg = 'Convert %s %sto Kconfig' % (configs[0], 'et al ' if len(configs) > 1 else '')
@@ -2058,7 +2371,7 @@ doc/develop/moveconfig.rst for documentation.''' else: msg = 'configs: Resync with savedefconfig' msg += '\n\nRsync all defconfig files using moveconfig.py' - subprocess.call(['git', 'commit', '-s', '-m', msg]) + write_commit(msg) if args.build_db: with open(CONFIG_DATABASE, 'w', encoding='utf-8') as fd:
Signature · 1 line
2.39.2.637.g21b0678d19-goog
PATCH v5 5/44 bootstd: Disable QFW bootmeth in SPL
In reply to Simon GlassMove this Makefile line into the non-SPL area so we don't have to repy on the SPL_TPL_ macro.
---
Changes in v5:
- Fix reply typo
Changes in v3:
- Add new patch to disable QFW bootmeth in SPL
boot/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
boot/Makefile +1 -1
@@ -11,6 +11,7 @@ obj-$(CONFIG_CMD_BOOTZ) += bootm.o bootm_os.o obj-$(CONFIG_CMD_BOOTI) += bootm.o bootm_os.o obj-$(CONFIG_PXE_UTILS) += pxe_utils.o +obj-$(CONFIG_QFW) += bootmeth_qfw.o endif
@@ -26,7 +27,6 @@ obj-$(CONFIG_$(SPL_TPL_)BOOTSTD) += bootstd-uclass.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_DISTRO) += bootmeth_distro.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_DISTRO_PXE) += bootmeth_pxe.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_EFILOADER) += bootmeth_efi.o -obj-$(CONFIG_$(SPL_TPL_)QFW) += bootmeth_qfw.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SANDBOX) += bootmeth_sandbox.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SCRIPT) += bootmeth_script.o ifdef CONFIG_$(SPL_TPL_)BOOTSTD_FULL
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 05/44] bootstd: Disable QFW bootmeth in SPL
Quoted 4 lines · Simon Glass
Move this
Makefileline into the non-SPL area so we don't have to repy on theSPL_TPL_macro.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 6/44 Correct SPL uses of ARCH_MVEBU
In reply to Simon GlassThis converts 2 usages of this option to the non-SPL form, since there is no SPL_ARCH_MVEBU defined in Kconfig
---
(no changes since v1)
drivers/mmc/mv_sdhci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/mv_sdhci.c +2 -2
@@ -64,7 +64,7 @@ int mv_sdh_init(unsigned long regbase, u32 max_clk, u32 min_clk, u32 quirks) host->ops = &mv_ops;#endif -if (CONFIG_IS_ENABLED (ARCH_MVEBU )) { +if (IS_ENABLED (CONFIG_ARCH_MVEBU )) {/* Configure SDHCI MBUS mbus bridge windows */ sdhci_mvebu_mbus_config ((void __iomem *)regbase); }
@@ -103,7 +103,7 @@ static int mv_sdhci_probe(struct udevice *dev)if (ret)return ret; -if (CONFIG_IS_ENABLED (ARCH_MVEBU )) { +if (IS_ENABLED (CONFIG_ARCH_MVEBU )) {/* Configure SDHCI MBUS mbus bridge windows */ sdhci_mvebu_mbus_config (host->ioaddr); }
Signature · 1 line
2.39.2.637.g21b0678d19-goog
PATCH v5 7/44 Correct SPL uses of DISPLAY_AER_FULL
In reply to Simon GlassThis converts 2 usages of this option to the non-SPL form, since there is no SPL_DISPLAY_AER_FULL defined in Kconfig
---
(no changes since v1)
drivers/sysreset/sysreset_mpc83xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/sysreset/sysreset_mpc83xx.c +2 -2
@@ -107,7 +107,7 @@ static int print_83xx_arb_event(bool force, char *buf, int size)if (!force && !gd->arch.arbiter_event_address)return 0 ; -if (CONFIG_IS_ENABLED (DISPLAY_AER_FULL )) { +if (IS_ENABLED (CONFIG_DISPLAY_AER_FULL )) { res =snprintf (buf, size,"Arbiter Event Status:\n" " %s: 0x%08lX\n"
@@ -184,7 +184,7 @@ static int mpc83xx_sysreset_get_status(struct udevice *dev, char *buf, int size)* TODO([email protected]): Move this into a dedicated * arbiter driver */ -if (CONFIG_IS_ENABLED (DISPLAY_AER_FULL ) || +if (IS_ENABLED (CONFIG_DISPLAY_AER_FULL ) ||IS_ENABLED (CONFIG_DISPLAY_AER_BRIEF )) {/* * If there was a bus monitor reset event, we force the arbiter
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 07/44] Correct SPL uses of DISPLAY_AER_FULL
Quoted 4 lines · Simon Glass
This converts 2 usages of this option to the non-SPL form, since there is no
SPL_DISPLAY_AER_FULLdefined inKconfigSigned-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 8/44 Correct SPL uses of MULTIPLEXER
In reply to Simon GlassThis converts 3 usages of this option to the non-SPL form, since there is no SPL_MULTIPLEXER defined in Kconfig
---
(no changes since v3)
Changes in v3:
- Move the option down to the non-SPL part of drivers/Makefile
drivers/Makefile | 2 +- drivers/mux/Makefile | 2 +- include/mux.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/Makefile +1 -1
@@ -18,7 +18,6 @@ obj-$(CONFIG_$(SPL_TPL_)INPUT) += input/ obj-$(CONFIG_$(SPL_TPL_)LED) += led/ obj-$(CONFIG_$(SPL_TPL_)MMC) += mmc/ obj-y += mtd/ -obj-$(CONFIG_$(SPL_)MULTIPLEXER) += mux/ obj-$(CONFIG_$(SPL_TPL_)ETH) += net/ obj-$(CONFIG_$(SPL_TPL_)PCH) += pch/ obj-$(CONFIG_$(SPL_TPL_)PCI) += pci/
@@ -87,6 +86,7 @@ obj-$(CONFIG_FASTBOOT) += fastboot/ obj-$(CONFIG_FWU_MDATA) += fwu-mdata/ obj-y += misc/ obj-$(CONFIG_MMC) += mmc/ +obj-$(CONFIG_MULTIPLEXER) += mux/ obj-$(CONFIG_NVME) += nvme/ obj-$(CONFIG_PCI_ENDPOINT) += pci_endpoint/ obj-y += dfu/
drivers/mux/Makefile +1 -1
@@ -3,5 +3,5 @@ # (C) Copyright 2019 # Jean-Jacques Hiblot <[email protected]> -obj-$(CONFIG_$(SPL_)MULTIPLEXER) += mux-uclass.o +obj-$(CONFIG_MULTIPLEXER) += mux-uclass.o obj-$(CONFIG_$(SPL_)MUX_MMIO) += mmio.o
include/mux.h +1 -1
@@ -23,7 +23,7 @@struct udevice ;struct mux_control ; -#if CONFIG_IS_ENABLED (MULTIPLEXER ) +#if IS_ENABLED (CONFIG_MULTIPLEXER )/** * mux_control_states() - Query the number of multiplexer states. * @mux: The mux-control to query.
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 08/44] Correct SPL uses of MULTIPLEXER
Quoted 5 lines · Simon Glass
This converts 3 usages of this option to the non-SPL form, since there is no
SPL_MULTIPLEXERdefined inKconfigSigned-off-by Simon Glass <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 9/44 Correct SPL use of PG_WCOM_UBOOT_UPDATE_SUPPORTED
In reply to Simon GlassThis converts 1 usage of this option to the non-SPL form, since there is no SPL_PG_WCOM_UBOOT_UPDATE_SUPPORTED defined in Kconfig
Aleksandar Gerasimovski <[email protected]>
---
(no changes since v1)
board/keymile/common/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/keymile/common/common.c +1 -1
@@ -78,7 +78,7 @@ int set_km_env(void)return 0 ; } -#if CONFIG_IS_ENABLED (PG_WCOM_UBOOT_UPDATE_SUPPORTED ) +#if IS_ENABLED (CONFIG_PG_WCOM_UBOOT_UPDATE_SUPPORTED ) #if ((!IS_ENABLED(CONFIG_PG_WCOM_UBOOT_BOOTPACKAGE) && \ !IS_ENABLED(CONFIG_PG_WCOM_UBOOT_UPDATE)) || \ (IS_ENABLED(CONFIG_PG_WCOM_UBOOT_BOOTPACKAGE) && \
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 09/44] Correct SPL use of PG_WCOM_UBOOT_UPDATE_SUPPORTED
Quoted 5 lines · Simon Glass
This converts 1 usage of this option to the non-SPL form, since there is no
SPL_PG_WCOM_UBOOT_UPDATE_SUPPORTEDdefined inKconfigSigned-off-by Simon Glass <[email protected]>Aleksandar Gerasimovski <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 10/44 Correct SPL uses of PHY_FIXED
In reply to Simon GlassThis converts 3 usages of this option to the non-SPL form, since there is no SPL_PHY_FIXED defined in Kconfig
---
(no changes since v1)
drivers/net/mvneta.c | 4 ++-- net/mdio-uclass.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/mvneta.c +2 -2
@@ -815,7 +815,7 @@ static void mvneta_defaults_set(struct mvneta_port *pp)mvreg_write (pp,MVNETA_SDMA_CONFIG , val);/* Enable PHY polling in hardware if not in fixed-link mode */ -if (!CONFIG_IS_ENABLED (PHY_FIXED ) || +if (!IS_ENABLED (CONFIG_PHY_FIXED ) || pp->phydev->phy_id !=PHY_FIXED_ID ) {mvreg_write (pp,MVNETA_PHY_ADDR , pp->phydev->addr);
@@ -1176,7 +1176,7 @@ static void mvneta_adjust_link(struct udevice *dev)* be added). Also, why is ADVERT_FC enabled if we don't enable * inband AN at all? */ -if (CONFIG_IS_ENABLED (PHY_FIXED ) && +if (IS_ENABLED (CONFIG_PHY_FIXED ) && pp->phydev->phy_id ==PHY_FIXED_ID ) val =MVNETA_GMAC_IB_BYPASS_AN_EN | MVNETA_GMAC_SET_FC_EN |
net/mdio-uclass.c +1 -1
@@ -175,7 +175,7 @@ static struct phy_device *dm_eth_connect_phy_handle(struct udevice *ethdev,struct phy_device *phy;ofnode phynode; -if (CONFIG_IS_ENABLED (PHY_FIXED ) && +if (IS_ENABLED (CONFIG_PHY_FIXED ) &&ofnode_phy_is_fixed_link (dev_ofnode (ethdev), &phynode)) { phy =phy_connect (NULL ,0 , ethdev, interface); goto out;
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 10/44] Correct SPL uses of PHY_FIXED
Quoted 4 lines · Simon Glass
This converts 3 usages of this option to the non-SPL form, since there is no
SPL_PHY_FIXEDdefined inKconfigSigned-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 11/44 boot: Add Kconfigs for BOOTMETH_VBE_REQUEST
In reply to Simon GlassAllow this to be enabled separately in U-Boot proper and in SPL, since it is not needed in SPL.
---
(no changes since v4)
Changes in v4:
- Avoid use of def_bool
boot/Kconfig | 20 ++++++++++++++++++++ boot/Makefile | 3 ++- 2 files changed, 22 insertions(+), 1 deletion(-)
boot/Kconfig +20 -0
@@ -528,6 +528,26 @@ config VPL_BOOTMETH_VBE if BOOTMETH_VBE +config BOOTMETH_VBE_REQUEST + bool "Support for serving VBE OS requests" + default y + help + Enables support for looking that the requests made by the + Operating System being booted. These requests result in additions to + the device tree /chosen node, added during the device tree fixup + phase. + +config SPL_BOOTMETH_VBE_REQUEST + bool "Support for serving VBE OS requests (SPL)" + depends on SPL + help + Enables support for looking that the requests made by the + Operating System being booted. These requests result in additions to + the device tree /chosen node, added during the device tree fixup + phase. + + This is only useful if you are booting an OS direct from SPL. + config BOOTMETH_VBE_SIMPLE bool "Bootdev support for VBE 'simple' method" default y
boot/Makefile +2 -1
@@ -52,7 +52,8 @@ endif obj-$(CONFIG_$(SPL_TPL_)EXPO) += expo.o scene.o scene_menu.o -obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_VBE) += vbe.o vbe_request.o +obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_VBE) += vbe.o +obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_VBE_REQUEST) += vbe_request.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_VBE_SIMPLE) += vbe_simple.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_VBE_SIMPLE_FW) += vbe_simple_fw.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_VBE_SIMPLE_OS) += vbe_simple_os.o
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 11/44] boot: Add Kconfigs for BOOTMETH_VBE_REQUEST
Quoted 4 lines · Simon Glass
Allow this to be enabled separately in U-Boot proper and in SPL, since it is not needed in SPL.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 12/44 Correct SPL use of DM_RNG
In reply to Simon GlassThis converts 1 usage of this option to the non-SPL form, since there is no SPL_DM_RNG defined in Kconfig
---
(no changes since v1)
boot/vbe_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
boot/vbe_request.c +1 -1
@@ -36,7 +36,7 @@ static int handle_random_req(ofnode node, int default_size,u32 size;int ret; -if (!CONFIG_IS_ENABLED (DM_RNG )) +if (!IS_ENABLED (CONFIG_DM_RNG ))return -ENOTSUPP ;if (ofnode_read_u32 (node,"vbe,size" , &size)) {
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 12/44] Correct SPL use of DM_RNG
Quoted 4 lines · Simon Glass
This converts 1 usage of this option to the non-SPL form, since there is no
SPL_DM_RNGdefined inKconfigSigned-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 13/44 lib: Add a Kconfig for SPL_BZIP2
In reply to Simon GlassThis is implicitly used in the source and seems useful, so add it.
---
(no changes since v1)
lib/Kconfig | 6 ++++++ 1 file changed, 6 insertions(+)
lib/Kconfig +6 -0
@@ -727,6 +727,12 @@ config ZSTD_LIB_MINIFY endif +config SPL_BZIP2 + bool "Enable bzip2 decompression support for SPL build" + depends on SPL + help + This enables support for bzip2 compression algorithm for SPL boot. + config SPL_LZ4 bool "Enable LZ4 decompression support in SPL" depends on SPL
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 13/44] lib: Add a Kconfig for SPL_BZIP2
Quoted 3 lines · Simon Glass
This is implicitly used in the source and seems useful, so add it.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 14/44 moveconfig: Various minor improvements
In reply to Simon GlassIt turns out that the conf_noproper file is not neeed, since if an option does not appear in U-Boot proper we can just omit it from the autoconf for that build. Drop it.
Also add more control over what is output from the tool.
Add this in here. It should be added to the previous series (splb).
---
(no changes since v1)
tools/moveconfig.py | 91 +++++++++++++++++++++------------------------ 1 file changed, 43 insertions(+), 48 deletions(-)
tools/moveconfig.py +43 -48
@@ -1833,13 +1833,20 @@ def scan_src_files(fname_dict, all_uses, fname_uses): MODE_NORMAL, MODE_SPL, MODE_PROPER = range(3) -def do_scan_source(path, do_update, show_conflicts, do_commit): +def do_scan_source(path, do_update, do_update_source, show_conflicts, + do_commit): """Scan the source tree for Kconfig inconsistencies Args: path (str): Path to source tree - do_update (bool): True to write to scripts/kconf_... files - show_conflicts (bool): True to show conflicts + do_update (bool): True to write to scripts/conf_nospl file + do_update_source (bool): True to update source to remove invalid use of + CONFIG_IS_ENABLED() + show_conflicts (bool): True to show conflicts between the source code + and the Kconfig (such as missing options, or options which imply an + SPL option that does not exist) + do_commit (bool): Create commits to remove use of SPL_TPL_ and + CONFIG_IS_ENABLED macros when there is no SPL symbol. """ def is_not_proper(name): for prefix in SPL_PREFIXES:
@@ -1977,9 +1984,7 @@ def do_scan_source(path, do_update, show_conflicts, do_commit): dirname, leaf = os.path.split(fname) root, ext = os.path.splitext(leaf) - #if dirname != '' or root != 'Makefile': - #continue - if (dirname.startswith('test') or + if (dirname.startswith('test/') or dirname.startswith('lib/efi_selftest')): # Ignore test code since it is mostly only for sandbox pass
@@ -2011,38 +2016,25 @@ def do_scan_source(path, do_update, show_conflicts, do_commit): finish_file(last_fname, rest_list) return mk_dict, src_dict - def check_mk_missing(all_uses, spl_not_found, proper_not_found): + def check_missing(all_uses, spl_not_found, proper_not_found, + show_conflicts): # Make sure we know about all the options in Makefiles - print('\nCONFIG options present in Makefiles but not Kconfig:') not_found = check_not_found(all_uses, MODE_NORMAL) - show_uses(not_found) + if show_conflicts: + print('\nCONFIG options present in source but not Kconfig:') + show_uses(not_found) - print('\nCONFIG options present in Makefiles but not Kconfig (SPL):') not_found = check_not_found(all_uses, MODE_SPL) - show_uses(not_found) spl_not_found |= set(is_not_proper(key) or key for key in not_found.keys()) + if show_conflicts: + print('\nCONFIG options present in source but not Kconfig (SPL):') + show_uses(not_found) - print('\nCONFIG options used as Proper in Makefiles but without a non-SPL_ variant:') not_found = check_not_found(all_uses, MODE_PROPER) - show_uses(not_found) - proper_not_found |= set(key for key in not_found.keys()) - - def check_src_missing(all_uses, spl_not_found, proper_not_found): - # Make sure we know about all the options in source files - print('\nCONFIG options present in source but not Kconfig:') - not_found = check_not_found(all_uses, MODE_NORMAL) - show_uses(not_found) - - print('\nCONFIG options present in source but not Kconfig (SPL):') - not_found = check_not_found(all_uses, MODE_SPL) - show_uses(not_found) - spl_not_found |= set(is_not_proper(key) or key - for key in not_found.keys()) - - print('\nCONFIG options used as Proper in source but without a non-SPL_ variant:') - not_found = check_not_found(all_uses, MODE_PROPER) - show_uses(not_found) proper_not_found |= set(key for key in not_found.keys()) + if show_conflicts: + print('\nCONFIG options used as Proper in source but without a non-SPL_ variant:') + show_uses(not_found) def show_summary(spl_not_found, proper_not_found): print('\nCONFIG options used as SPL but without an SPL_ variant:')
@@ -2053,19 +2045,24 @@ def do_scan_source(path, do_update, show_conflicts, do_commit): for item in sorted(proper_not_found): print(f' {item}') - def write_update(spl_not_found, proper_not_found): - with open(os.path.join(path, 'scripts', 'conf_nospl'), + def write_update(spl_not_found): + with open(os.path.join(path, 'scripts', 'conf_nospl'), 'w', encoding='utf-8') as out: - print('# These options should not be enabled in SPL builds\n', + print('''# Options which are never enabled in SPL. + +Generally, options which have no SPL_ prefix (e.g. CONFIG_FOO) apply to all +SPL build phases. This allows things like ARCH_ARM to propagate to all builds +without the hassle of generating a separate SPL version fo each phase. But in +some cases this is not wanted. + +This file lists options which don't have an SPL equivalent, but still should not +be enabled in SPL builds. It is necessary since kconfig cannot tell (just by +looking at the Kconfig description) whether it applies to Proper builds only, +or to all builds. +''', file=out) for item in sorted(spl_not_found): print(item, file=out) - with open(os.path.join(path, 'scripts', 'conf_noproper'), 'w', - encoding='utf-8') as out: - print('# These options should not be enabled in Proper builds\n', - file=out) - for item in sorted(proper_not_found): - print(item, file=out) def check_conflict(kconf, all_uses, show): """Check conflicts between uses of CONFIG options in source
@@ -2210,7 +2207,7 @@ def do_scan_source(path, do_update, show_conflicts, do_commit): conflicts, cfg_dict = check_conflict(kconf, all_uses, show_conflicts) - if do_update: + if do_update_source: update_source(conflicts) if do_commit: create_commits(cfg_dict)
@@ -2218,17 +2215,13 @@ def do_scan_source(path, do_update, show_conflicts, do_commit): # Look for CONFIG options that are not found spl_not_found = set() proper_not_found = set() - check_mk_missing(all_uses, spl_not_found, proper_not_found) - - # Scan the source code - scan_src_files(src_dict, all_uses, fname_uses) - check_src_missing(all_uses, spl_not_found, proper_not_found) + check_missing(all_uses, spl_not_found, proper_not_found, show_conflicts) show_summary(spl_not_found, proper_not_found) # Write out the updated information if do_update: - write_update(spl_not_found, proper_not_found) + write_update(spl_not_found) def main(): try:
@@ -2289,6 +2282,8 @@ doc/develop/moveconfig.rst for documentation.''' help="respond 'yes' to any prompts") parser.add_argument('-u', '--update', action='store_true', default=False, help="update scripts/ files (use with --scan-source)") + parser.add_argument('-U', '--update-source', action='store_true', + help="update source code (use with --scan-source)") parser.add_argument('-v', '--verbose', action='store_true', default=False, help='show any build errors as boards are built') parser.add_argument('configs', nargs='*')
@@ -2304,8 +2299,8 @@ doc/develop/moveconfig.rst for documentation.''' unittest.main() if args.scan_source: - do_scan_source(os.getcwd(), args.update, args.list_problems, - args.commit) + do_scan_source(os.getcwd(), args.update, args.update_source, + args.list_problems, args.commit) return if not any((len(configs), args.force_sync, args.build_db, args.imply,
Signature · 1 line
2.39.2.637.g21b0678d19-goog
PATCH v5 15/44 sandbox: Expand size for VPL image
In reply to Simon GlassAllow this to get larger to accommodate more test code with LTO disabled.
---
(no changes since v1)
arch/sandbox/dts/sandbox_vpl.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/sandbox/dts/sandbox_vpl.dtsi +2 -2
@@ -17,8 +17,8 @@ * provide plenty of space for ELF files with debug info so that * gdb can be used */ - offset = <0x400000>; - size = <0xdffc00>; + offset = <0x800000>; + size = <0x2000000>; fit { fit,external-offset = <0>;
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 15/44] sandbox: Expand size for VPL image
Quoted 3 lines · Simon Glass
Allow this to get larger to accommodate more test code with LTO disabled.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 16/44 event: Add Kconfig options for SPL
In reply to Simon GlassAdd options to enable events in SPL. This is mostly so the code can be excluded from SPL builds.
---
(no changes since v4)
Changes in v4:
- Modify to get rid of def_bool
- Adjust Kconfig ordering
common/Kconfig | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
common/Kconfig +20 -0
@@ -631,6 +631,26 @@ config EVENT_DEBUG events, such as event-type names. This adds to the code size of U-Boot so can be turned off for production builds. +config SPL_EVENT + bool # General-purpose event-handling mechanism in SPL + depends on SPL + help + This adds a framework for general purpose sending and processing of + events, to allow interested parties to be alerted when something + happens. This is an attempt to stem the flow of weak functions, + hooks, functions in board_f.c and board_r.c and the Kconfig options + below. + + See doc/develop/event.rst for more information. + +config SPL_EVENT_DYNAMIC + bool + depends on SPL_EVENT && EVENT_DYNAMIC + help + Enable this to support adding an event spy at runtime, without adding + it to the EVENT_SPY() linker list. This increases code size slightly + but provides more flexibility for boards and subsystems that need it. + endif # EVENT config ARCH_EARLY_INIT_R
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 16/44] event: Add Kconfig options for SPL
Quoted 4 lines · Simon Glass
Add options to enable events in SPL. This is mostly so the code can be excluded from SPL builds.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 17/44 bootstd: Correct 'VPL' typo
In reply to Simon GlassCorrect a 'VPL' typo in the Kconfig.
---
(no changes since v4)
Changes in v4:
- Just fix the typo
Changes in v3:
- Correct 'VPL' typo
- Use a consistent format for the comment
boot/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
boot/Kconfig +1 -1
@@ -385,7 +385,7 @@ config BOOTSTD_FULL as well as the "boot_targets" environment variable config SPL_BOOTSTD - bool "Standard boot support in VPL" + bool "Standard boot support in SPL" depends on SPL && SPL_DM && SPL_OF_CONTROL && SPL_BLK default y if VPL help
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 17/44] bootstd: Correct 'VPL' typo
Quoted 3 lines · Simon Glass
Correct a 'VPL' typo in the
Kconfig.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 18/44 env: Avoid checking ENV_IS_IN when env disabled
In reply to Simon GlassThis check is not needed when the environment is not enabled, e.g. in SPL. Add a condition to handle this.
---
(no changes since v1)
cmd/nvedit.c | 2 ++ 1 file changed, 2 insertions(+)
cmd/nvedit.c +2 -0
@@ -59,11 +59,13 @@ DECLARE_GLOBAL_DATA_PTR;#endif +#if CONFIG_IS_ENABLED (ENV_SUPPORT )#if !defined(ENV_IS_IN_DEVICE ) && \ !defined(CONFIG_ENV_IS_NOWHERE )# error Define one of CONFIG_ENV_IS_IN_{EEPROM|FLASH|MMC|FAT|EXT4|\ NAND|NVRAM|ONENAND|SATA|SPI_FLASH|REMOTE|UBI} or CONFIG_ENV_IS_NOWHERE#endif +#endif /* ENV_SUPPORT */ /* * Maximum expected input data size for import command
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 18/44] env: Avoid checking ENV_IS_IN when env disabled
Quoted 16 lines · Simon Glass
This check is not needed when the environment is not enabled, e.g. in SPL. Add a condition to handle this.
Signed-off-by Simon Glass <[email protected]>---
(no changes since v1)
cmd/nvedit.c | 2 ++ 1 file changed, 2 insertions(+)cmd/nvedit.c +0
-0
cmd/nvedit.c DECLARE_GLOBAL_DATA_PTR; · line 68
Quoted 10 lines
cmd/nvedit.c +2
-0@@ -59,11 +59,13 @@ DECLARE_GLOBAL_DATA_PTR;#endif +#if CONFIG_IS_ENABLED (ENV_SUPPORT )#if !defined(ENV_IS_IN_DEVICE ) && \ !defined(CONFIG_ENV_IS_NOWHERE )# error Define one of CONFIG_ENV_IS_IN_{EEPROM|FLASH|MMC|FAT|EXT4|\ NAND|NVRAM|ONENAND|SATA|SPI_FLASH|REMOTE|UBI} or CONFIG_ENV_IS_NOWHERE#endif +#endif /* ENV_SUPPORT */
We need to move this kind of sanity enforcement to Kconfig, and drop the #error.
Signature · 1 line
Tom
PATCH v5 19/44 env: Allow VPL environment to be nowhere
In reply to Simon GlassAdd an option to put the VPL environment nowhere (not in storage).
---
(no changes since v1)
env/Kconfig | 10 ++++++++++ 1 file changed, 10 insertions(+)
env/Kconfig +10 -0
@@ -860,6 +860,16 @@ config TPL_ENV_IS_IN_FLASH endif +if VPL_ENV_SUPPORT + +config VPL_ENV_IS_NOWHERE + bool "VPL Environment is not stored" + default y if ENV_IS_NOWHERE + help + Similar to ENV_IS_NOWHERE, used for VPL environment. + +endif # VPL_ENV_SUPPORT + config USE_BOOTFILE bool "Add a 'bootfile' environment variable" help
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 19/44] env: Allow VPL environment to be nowhere
Quoted 3 lines · Simon Glass
Add an option to put the VPL environment nowhere (not in storage).
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 20/44 lib: Add VPL options for SHA1 and SHA256
In reply to Simon GlassAdd these options so these algorithms can be used in VPL.
---
(no changes since v1)
lib/Kconfig | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
lib/Kconfig +20 -0
@@ -579,6 +579,26 @@ config SPL_SHA_PROG_HW_ACCEL endif +config VPL_SHA1 + bool "Enable SHA1 support in VPL" + depends on VPL + default y if SHA1 + help + This option enables support of hashing using SHA1 algorithm. + The hash is calculated in software. + The SHA1 algorithm produces a 160-bit (20-byte) hash value + (digest). + +config VPL_SHA256 + bool "Enable SHA256 support in VPL" + depends on VPL + default y if SHA256 + help + This option enables support of hashing using SHA256 algorithm. + The hash is calculated in software. + The SHA256 algorithm produces a 256-bit (32-byte) hash value + (digest). + if SHA_HW_ACCEL config SHA512_HW_ACCEL
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 20/44] lib: Add VPL options for SHA1 and SHA256
Quoted 3 lines · Simon Glass
Add these options so these algorithms can be used in VPL.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 21/44 x86: Use string functions for all 32-bit builds
In reply to Simon GlassAt present these are not included in SPL. They do add to code size but are a bit faster, so adjust the setting to add them.
---
(no changes since v1)
arch/x86/include/asm/string.h | 2 +- arch/x86/lib/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/include/asm/string.h +1 -1
@@ -14,7 +14,7 @@ extern char *strrchr(const char *s, int c);#undef __HAVE_ARCH_STRCHRextern char *strchr (const char *s,int c); -#ifdef CONFIG_X86_64 +#if CONFIG_IS_ENABLED (X86_64 )#undef __HAVE_ARCH_MEMCPYextern void *memcpy (void *,const void *,__kernel_size_t );
arch/x86/lib/Makefile +1 -1
@@ -4,7 +4,7 @@ # Wolfgang Denk, DENX Software Engineering, [email protected]. obj-y += bdinfo.o -ifndef CONFIG_X86_64 +ifndef CONFIG_$(SPL_TPL_)X86_64 ifndef CONFIG_TPL_BUILD obj-y += bios.o obj-y += bios_asm.o
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 21/44] x86: Use string functions for all 32-bit builds
Quoted 30 lines · Simon Glass
At present these are not included in SPL. They do add to code size but are a bit faster, so adjust the setting to add them.
Signed-off-by Simon Glass <[email protected]>---
(no changes since v1)
arch/x86/include/asm/string.h | 2 +- arch/x86/lib/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)arch/x86/include/asm/string.h +1
-1@@ -14,7 +14,7 @@ extern char *strrchr(const char *s, int c);#undef __HAVE_ARCH_STRCHRextern char *strchr (const char *s,int c); -#ifdef CONFIG_X86_64 +#if CONFIG_IS_ENABLED (X86_64 )#undef __HAVE_ARCH_MEMCPYextern void *memcpy (void *,const void *,__kernel_size_t );arch/x86/lib/Makefile +0
-0
arch/x86/lib/Makefile line 10
Quoted 8 lines
arch/x86/lib/Makefile +1
-1@@ -4,7 +4,7 @@ # Wolfgang Denk, DENX Software Engineering, [email protected]. obj-y += bdinfo.o -ifndef CONFIG_X86_64 +ifndef CONFIG_$(SPL_TPL_)X86_64 ifndef CONFIG_TPL_BUILD obj-y += bios.o obj-y += bios_asm.o
This is just.. confusing. Please re-work the string selection code to be more direct, with a new symbol if needed. And please re-examine if SPL_X86_64 is needed as a symbol at all.
Signature · 1 line
Tom
Re: [PATCH v5 21/44] x86: Use string functions for all 32-bit builds
Hi Tom.
Quoted 6 lines · Tom Rini
Quoted 3 lines · Simon Glass
At present these are not included in SPL. They do add to code size but are a bit faster, so adjust the setting to add them.
Quoted 8 lines
Quoted 8 lines
Signed-off-by Simon Glass <[email protected]>---
(no changes since v1)
arch/x86/include/asm/string.h | 2 +- arch/x86/lib/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
I've moved this to another series, x86-specific.
Regards,
Simon
PATCH v5 22/44 lib: Fix build condition for tiny-printf
In reply to Simon GlassThis should be checking for any SPL build. Drop the use of SPL_TPL_ since it is not necessary and will not work with split config.
---
(no changes since v1)
lib/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/Makefile +1 -1
@@ -127,7 +127,7 @@ obj-$(CONFIG_LIB_UUID) += uuid.o obj-$(CONFIG_LIB_RAND) += rand.o obj-y += panic.o -ifeq ($(CONFIG_$(SPL_TPL_)BUILD),y) +ifeq ($(CONFIG_SPL_BUILD),y) # SPL U-Boot may use full-printf, tiny-printf or none at all ifdef CONFIG_$(SPL_TPL_)USE_TINY_PRINTF obj-$(CONFIG_$(SPL_TPL_)SPRINTF) += tiny-printf.o
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 22/44] lib: Fix build condition for tiny-printf
Quoted 4 lines · Simon Glass
This should be checking for any SPL build. Drop the use of
SPL_TPL_since it is not necessary and will not work with split config.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 23/44 sandbox: Tidy up RTC options
In reply to Simon GlassAt present we enable the sandbox RTC driver for all builds. Add a separate Kconfig option to control this, so that it can be disabled in TPL, where it is not needed.
---
(no changes since v3)
Changes in v3:
- Fix a transitory build error with sandbox_spl
arch/sandbox/dts/sandbox.dts | 2 +- arch/sandbox/dts/sandbox.dtsi | 6 +++--- arch/sandbox/include/asm/rtc.h | 2 +- drivers/rtc/Kconfig | 18 ++++++++++++++++++ drivers/rtc/Makefile | 4 ++-- 5 files changed, 25 insertions(+), 7 deletions(-)
arch/sandbox/dts/sandbox.dts +1 -1
@@ -76,7 +76,7 @@ clock-frequency = <400000>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c0>; - bootph-all; + bootph-pre-ram; }; pcic: pci@0 {
arch/sandbox/dts/sandbox.dtsi +3 -3
@@ -115,7 +115,7 @@ reg = <0x43>; compatible = "sandbox-rtc"; sandbox,emul = <&emul0>; - bootph-all; + bootph-pre-ram; }; sandbox_pmic: sandbox_pmic { reg = <0x40>;
@@ -126,7 +126,7 @@ }; i2c_emul: emul { - bootph-all; + bootph-pre-ram; reg = <0xff>; compatible = "sandbox,i2c-emul-parent"; emul_eeprom: emul-eeprom {
@@ -136,7 +136,7 @@ #emul-cells = <0>; }; emul0: emul0 { - bootph-all; + bootph-pre-ram; compatible = "sandbox,i2c-rtc-emul"; #emul-cells = <0>; };
arch/sandbox/include/asm/rtc.h +1 -1
@@ -40,7 +40,7 @@ enum {* @reg: Register values */ struct sandbox_i2c_rtc_plat_data { -#if CONFIG_IS_ENABLED (OF_PLATDATA ) +#if CONFIG_IS_ENABLED (OF_PLATDATA ) &&IS_ENABLED (CONFIG_RTC_SANDBOX )struct dtd_sandbox_i2c_rtc_emul dtplat;#endif long base_time;
drivers/rtc/Kconfig +18 -0
@@ -231,6 +231,24 @@ config RTC_M41T62 Enable driver for ST's M41T62 compatible RTC devices (like RV-4162). It is a serial (I2C) real-time clock (RTC) with alarm. +config RTC_SANDBOX + bool "Enable sandbox RTC driver" + depends on SANDBOX && DM_RTC + default y + help + Enable the sandbox RTC driver. This driver connects to the RTC + emulator and is used to test the RTC uclasses and associated code, + as well as the I2C subsystem. + +config SPL_RTC_SANDBOX + bool "Enable sandbox RTC driver (SPL)" + depends on SANDBOX && SPL_DM_RTC + default y + help + Enable the sandbox RTC driver. This driver connects to the RTC + emulator and is used to test the RTC uclasses and associated code, + as well as the I2C subsystem. + config RTC_STM32 bool "Enable STM32 RTC driver" depends on DM_RTC
drivers/rtc/Makefile +2 -2
@@ -16,7 +16,7 @@ obj-$(CONFIG_RTC_DS3231) += ds3231.o obj-$(CONFIG_RTC_DS3232) += ds3232.o obj-$(CONFIG_RTC_EMULATION) += emul_rtc.o obj-$(CONFIG_RTC_HT1380) += ht1380.o -obj-$(CONFIG_SANDBOX) += i2c_rtc_emul.o +obj-$(CONFIG_$(SPL_TPL_)RTC_SANDBOX) += i2c_rtc_emul.o obj-$(CONFIG_RTC_ISL1208) += isl1208.o obj-$(CONFIG_RTC_M41T62) += m41t62.o obj-$(CONFIG_RTC_MC13XXX) += mc13xxx-rtc.o
@@ -35,6 +35,6 @@ obj-$(CONFIG_RTC_RX8025) += rx8025.o obj-$(CONFIG_RTC_RX8010SJ) += rx8010sj.o obj-$(CONFIG_RTC_S35392A) += s35392a.o obj-$(CONFIG_RTC_STM32) += stm32_rtc.o -obj-$(CONFIG_SANDBOX) += sandbox_rtc.o +obj-$(CONFIG_$(SPL_TPL_)RTC_SANDBOX) += sandbox_rtc.o obj-$(CONFIG_RTC_ABX80X) += abx80x.o obj-$(CONFIG_RTC_ZYNQMP) += zynqmp_rtc.o
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 23/44] sandbox: Tidy up RTC options
Quoted 5 lines · Simon Glass
At present we enable the sandbox RTC driver for all builds. Add a separate
Kconfigoption to control this, so that it can be disabled in TPL, where it is not needed.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 24/44 sandbox: Use the generic VPL option to enable VPL
In reply to Simon GlassAvoid using CONFIG_SANDBOX_VPL since we have a generic option which works just as well.
---
(no changes since v1)
arch/sandbox/dts/sandbox.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sandbox/dts/sandbox.dts +1 -1
@@ -103,6 +103,6 @@ #include "cros-ec-keyboard.dtsi" #include "sandbox_pmic.dtsi" -#ifdef CONFIG_SANDBOX_VPL +#if IS_ENABLED(CONFIG_SUPPORT_VPL) #include "sandbox_vpl.dtsi" #endif
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 24/44] sandbox: Use the generic VPL option to enable VPL
Quoted 4 lines · Simon Glass
Avoid using
CONFIG_SANDBOX_VPLsince we have a generic option which works just as well.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 25/44 sandbox: Tidy up I2C options
In reply to Simon GlassAt present we enable the sandbox I2C driver for all builds. Add a separate Kconfig option to control this, so that it can be disabled in TPL, where it is not needed.
---
(no changes since v1)
drivers/i2c/Kconfig | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
drivers/i2c/Kconfig +20 -0
@@ -47,6 +47,16 @@ config SPL_DM_I2C device (bus child) info is kept as parent platdata. The interface is defined in include/i2c.h. +config TPL_DM_I2C + bool "Enable Driver Model for I2C drivers in TPL" + depends on TPL_DM && DM_I2C + help + Enable driver model for I2C. The I2C uclass interface: probe, read, + write and speed, is implemented with the bus drivers operations, + which provide methods for bus setting and data transfer. Each chip + device (bus child) info is kept as parent platdata. The interface + is defined in include/i2c.h. + config VPL_DM_I2C bool "Enable Driver Model for I2C drivers in VPL" depends on VPL_DM && DM_I2C
@@ -508,6 +518,16 @@ config SYS_I2C_ROCKCHIP config SYS_I2C_SANDBOX bool "Sandbox I2C driver" depends on SANDBOX && DM_I2C + default y + help + Enable I2C support for sandbox. This is an emulation of a real I2C + bus. Devices can be attached to the bus using the device tree + which specifies the driver to use. See sandbox.dts as an example. + +config SPL_SYS_I2C_SANDBOX + bool "Sandbox I2C driver (SPL)" + depends on SPL && SANDBOX && DM_I2C + default y help Enable I2C support for sandbox. This is an emulation of a real I2C bus. Devices can be attached to the bus using the device tree
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 25/44] sandbox: Tidy up I2C options
Hello Simon,
Quoted 11 lines · Simon Glass
At present we enable the sandbox I2C driver for all builds. Add a separate
Kconfigoption to control this, so that it can be disabled in TPL, where it is not needed.Signed-off-by Simon Glass <[email protected]>---
(no changes since v1)
drivers/i2c/Kconfig | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
Re: [PATCH v5 25/44] sandbox: Tidy up I2C options
In reply to Simon GlassQuoted 6 lines · Simon Glass
At present we enable the sandbox I2C driver for all builds. Add a separate
Kconfigoption to control this, so that it can be disabled in TPL, where it is not needed.Signed-off-by Simon Glass <[email protected]>Reviewed-by Heiko Schocher <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 26/44 fixdep: Add support for VPL
In reply to Simon GlassAdd VPL files into the mix so that we can fix up the dependencies there.
---
(no changes since v1)
scripts/basic/fixdep.c | 2 ++ 1 file changed, 2 insertions(+)
scripts/basic/fixdep.c +2 -0
@@ -421,6 +421,8 @@ int main(int argc, char *argv[])strcpy (tmp_buf,"SPL_" ); else if (!strncmp(target, "tpl/", 4))strcpy (tmp_buf,"TPL_" ); + else if (!strncmp(target, "vpl/", 4)) +strcpy (tmp_buf,"VPL_" );/* end U-Boot hack */ xprintf ("cmd_%s := %s\n\n" , target, cmdline);
Signature · 1 line
2.39.2.637.g21b0678d19-goog
PATCH v5 27/44 fixdep: Refactor to make testing easier
In reply to Simon GlassMove the config parsing into a separate function so that it is possible to write tests for the function.
---
(no changes since v1)
scripts/basic/fixdep.c | 87 ++++++++++++++++++++++++++---------------- 1 file changed, 54 insertions(+), 33 deletions(-)
scripts/basic/fixdep.c +54 -33
@@ -236,47 +236,68 @@ static int str_ends_with(const char *s, int slen, const char *sub)return !memcmp (s + slen - sublen, sub, sublen); } -static void parse_config_file (const char *p) +static const char *parse_config_line (const char *p,const char **endp) {const char *q, *r; -const char *start = p; -while ((p =strstr (p,"CONFIG_" ))) { -if (p > start && (isalnum (p[-1 ]) || p[-1 ] =='_' )) { - p +=7 ; -continue ; - } - p +=7 ; + p =strstr (p,"CONFIG_" ); +if (!p) { + *endp =NULL ; +return NULL ; + } +if ((isalnum (p[-1 ]) || p[-1 ] =='_' )) { + *endp = p +7 ; +return NULL ; + } + p +=7 ; + q = p; +while (isalnum (*q) || *q =='_' ) + q++; +if (str_ends_with (p, q - p,"_MODULE" )) + r = q -7 ; +else + r = q; +/* +* U-Boot also handles +* CONFIG_IS_ENABLED(...) +* CONFIG_VAL(...) +*/ +if ((q - p ==10 && !memcmp (p,"IS_ENABLED(" ,11 )) || + (q - p ==3 && !memcmp (p,"VAL(" ,4 ))) { + p = q +1 ; q = p;while (isalnum (*q) || *q =='_' ) q++; -if (str_ends_with (p, q - p,"_MODULE" )) - r = q -7 ; -else - r = q; -/* -* U-Boot also handles -* CONFIG_IS_ENABLED(...) -* CONFIG_VAL(...) -*/ -if ((q - p ==10 && !memcmp (p,"IS_ENABLED(" ,11 )) || - (q - p ==3 && !memcmp (p,"VAL(" ,4 ))) { - p = q +1 ; - q = p; -while (isalnum (*q) || *q =='_' ) - q++; - r = q; -if (r > p && tmp_buf[0 ]) { -memcpy (tmp_buf +4 , p, r - p); - r = tmp_buf +4 + (r - p); - p = tmp_buf; - } + r = q; +if (r > p && tmp_buf[0 ]) { +memcpy (tmp_buf +4 , p, r - p); + r = tmp_buf +4 + (r - p); + p = tmp_buf; } -/* end U-Boot hack */ + } +/* end U-Boot hack */ + *endp = r; + +if (r > p) +return p; -if (r > p) -use_config (p, r - p); - p = q; +return NULL ; +} + +static void parse_config_file (const char *base) +{ +const char *p; + +if (!*base) +return ; + p = base +1 ; +while (p) { +const char *out, *end; + + out =parse_config_line (p, &end); +if (out) +use_config (out, end - out); + p = end; } }
Signature · 1 line
2.39.2.637.g21b0678d19-goog
PATCH v5 28/44 fixdep: Add some tests for parse_config_line()
In reply to Simon GlassAdd tests for this code to cover the basic cases.
---
(no changes since v1)
scripts/basic/fixdep.c | 73 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+)
scripts/basic/fixdep.c +73 -0
@@ -425,11 +425,84 @@ static void parse_dep_file(char *m, const char *target)xprintf ("$(deps_%s):\n" , target); } +#define CHECKP (expect, got) \ + if (expect != got) { \ + fprintf(stderr, "Test failed at line %d: expect %ld, got %ld\n", \ + __LINE__, expect - buf, got - buf); \ + return 1; \ + } + +#define CHECK (expect, got) \ + if (expect != got) { \ + fprintf(stderr, "Test failed at line %d: expect %p, got %p\n", \ + __LINE__, expect, got); \ + return 1; \ + } + +static int run_tests (void ) +{ +const char *out, *end; +char buf_s[40 ], *buf = buf_s +1 ; + +/* make sure the previous char doesn't look like part of the CONFIG */ + buf_s[0 ] =' ' ; + +strcpy (buf,"" ); + out =parse_config_line (buf, &end); +CHECK (NULL , out); +CHECK (NULL , end); + +strcpy (buf,"nothing" ); + out =parse_config_line (buf, &end); +CHECK (NULL , out); +CHECK (NULL , end); + +strcpy (buf,"CONFIG_OPTION_MORE" ); + out =parse_config_line (buf, &end); +CHECKP (buf +7 , out); +CHECKP (buf +18 , end); + +strcpy (buf,"some CONFIG_OPTION_MORE" ); + out =parse_config_line (buf, &end); +CHECKP (buf +12 , out); +CHECKP (buf +23 , end); + +strcpy (buf,"some CONFIG_OPTION_MORE here" ); + out =parse_config_line (buf, &end); +CHECKP (buf +12 , out); +CHECKP (buf +23 , end); + +strcpy (buf,"CONFIG_OPTION_MODULE" ); + out =parse_config_line (buf, &end); +CHECKP (buf +7 , out); +CHECKP (buf +13 , end); + +strcpy (buf,"CONFIG_IS_ENABLED(FRED)" ); + out =parse_config_line (buf, &end); +CHECKP (buf +18 , out); +CHECKP (buf +22 , end); + +strcpy (buf,"CONFIG_VAL(MARY)" ); + out =parse_config_line (buf, &end); +CHECKP (buf +11 , out); +CHECKP (buf +15 , end); + +return 0 ; +} +int main (int argc,char *argv[]) {const char *depfile, *target, *cmdline;void *buf; +if (argc ==2 && !strcmp ("-t" , argv[1 ])) { +if (run_tests ()) { +fprintf (stderr,"Tests failed\n" ); +return 1 ; + } +printf ("Tests passed\n" ); +return 0 ; + }if (argc !=4 )usage ();
Signature · 1 line
2.39.2.637.g21b0678d19-goog
PATCH v5 29/44 test: Add SPL versions of the TEST_KCONFIG options
In reply to Simon GlassThese are needed since we need a separate value in SPL and Proper.
---
(no changes since v1)
test/lib/Kconfig | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)
test/lib/Kconfig +19 -1
@@ -18,6 +18,24 @@ config TEST_KCONFIG_VALUE int "Value associated with the option" depends on TEST_KCONFIG_ENABLE help - This is the value whgch is present if TEST_KCONFIG_ENABLE is enabled. + This is the value which is present if TEST_KCONFIG_ENABLE is enabled. + +config SPL_TEST_KCONFIG + bool "Enable detection of Kconfig macro errors (SPL)" + help + This is used to test that the IF_ENABLED_INT() macro causes a build error + if the value is used when the CONFIG Is not enabled. + +config SPL_TEST_KCONFIG_ENABLE + bool "Option to enable (SPL)" + help + This is the option that controls whether the value is present. + +config SPL_TEST_KCONFIG_VALUE + int "Value associated with the option (SPL" + depends on SPL_TEST_KCONFIG_ENABLE + help + This is the value which is present if SPL_TEST_KCONFIG_ENABLE is + enabled. endif # SANDBOX
Signature · 1 line
2.39.2.637.g21b0678d19-goog
PATCH v5 30/44 lib: Add an SPL config for LIB_UUID
In reply to Simon GlassThis is selected by PARTITION_UUIDS which has a separate option for SPL. Add an SPL option for LIB_UUID also, so that we can keep them consistent.
Also add one for PARTITION_TYPE_GUID to avoid a build error in part_efi.c which wants to call a uuid function in SPL.
---
(no changes since v1)
disk/Kconfig | 8 ++++++++ lib/Kconfig | 4 ++++ 2 files changed, 12 insertions(+)
disk/Kconfig +8 -0
@@ -149,6 +149,7 @@ config SPL_PARTITION_UUIDS bool "Enable support of UUID for partition in SPL" depends on SPL_PARTITIONS default y if SPL_EFI_PARTITION + select SPL_LIB_UUID config PARTITION_TYPE_GUID bool "Enable support of GUID for partition type"
@@ -157,4 +158,11 @@ config PARTITION_TYPE_GUID Activate the configuration of GUID type for EFI partition +config SPL_PARTITION_TYPE_GUID + bool "Enable support of GUID for partition type (SPL)" + depends on SPL_EFI_PARTITION + help + Activate the configuration of GUID type + for EFI partition + endmenu
lib/Kconfig +4 -0
@@ -74,6 +74,10 @@ config HAVE_PRIVATE_LIBGCC config LIB_UUID bool +config SPL_LIB_UUID + depends on SPL + bool + config SEMIHOSTING bool "Support semihosting" depends on ARM || RISCV
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 30/44] lib: Add an SPL config for LIB_UUID
Am 22. Februar 2023 17:34:11 MEZ schrieb Simon Glass <[email protected]>:
Quoted 28 lines
This is selected by
PARTITION_UUIDSwhich has a separate option for SPL. Add an SPL option forLIB_UUIDalso, so that we can keep them consistent.Also add one for
PARTITION_TYPE_GUIDto avoid a build error inpart_efi.cwhich wants to call a uuid function in SPL.Signed-off-by Simon Glass <[email protected]>---
(no changes since v1)
disk/Kconfig | 8 ++++++++
lib/Kconfig | 4 ++++2 files changed, 12 insertions(+)disk/Kconfig +1
-0@@ -149,6 +149,7 @@ config SPL_PARTITION_UUIDS bool "Enable support of UUID for partition in SPL" depends on SPL_PARTITIONS default y if SPL_EFI_PARTITION + select SPL_LIB_UUIDconfig
PARTITION_TYPE_GUID
bool "Enable support of GUID for partition type"
disk/Kconfig config PARTITION_TYPE_GUID · line 161
Quoted 4 lines
disk/Kconfig +1
-0@@ -157,4 +158,11 @@ config PARTITION_TYPE_GUID Activate the configuration of GUID type for EFI partition +config SPL_PARTITION_TYPE_GUID
Hello Simon,
you have seen my series for using the partition type guid to load main U-Boot. I would like to put that change into v2023.04.
If my series goes in first, we will have to add a patch to this series to adjust dependencies.
Can we use the mmc driver in sandbox_spl for testing loading main U-Boot from mmc based on different criteria like partition number, partion_type_guid, file name?
Best regards
Heinrich
Quoted 22 lines
disk/Kconfig +6
-0+ bool "Enable support of GUID for partition type (SPL)" + depends on SPL_EFI_PARTITION + help + Activate the configuration of GUID type + for EFI partition +endmenu
lib/Kconfig +0
-0@@ -74,6 +74,10 @@ config HAVE_PRIVATE_LIBGCCconfig
LIB_UUID
boollib/Kconfig +4
-0+config SPL_LIB_UUID + depends on SPL + bool +config SEMIHOSTING
bool "Support semihosting" depends on ARM || RISCV
Re: [PATCH v5 30/44] lib: Add an SPL config for LIB_UUID
Hi Heinrich,
Quoted 35 lines · Heinrich Schuchardt
Am 22. Februar 2023 17:34:11 MEZ schrieb Simon Glass <[email protected]>:
Quoted 31 lines
This is selected by
PARTITION_UUIDSwhich has a separate option for SPL. Add an SPL option forLIB_UUIDalso, so that we can keep them consistent.Also add one for
PARTITION_TYPE_GUIDto avoid a build error inpart_efi.cwhich wants to call a uuid function in SPL.Signed-off-by Simon Glass <[email protected]>---
(no changes since v1)
disk/Kconfig | 8 ++++++++
lib/Kconfig | 4 ++++2 files changed, 12 insertions(+)disk/Kconfig +1
-0@@ -149,6 +149,7 @@ config SPL_PARTITION_UUIDS bool "Enable support of UUID for partition in SPL" depends on SPL_PARTITIONS default y if SPL_EFI_PARTITION + select SPL_LIB_UUIDconfig
PARTITION_TYPE_GUID
bool "Enable support of GUID for partition type"disk/Kconfig +0
-0@@ -157,4 +158,11 @@ config PARTITION_TYPE_GUID Activate the configuration of GUID type for EFI partition
Quoted 7 lines
disk/Kconfig config PARTITION_TYPE_GUID · line 161
Quoted 1 line
disk/Kconfig +1
-0+config SPL_PARTITION_TYPE_GUIDHello Simon,
you have seen my series for using the partition type guid to load main U-Boot. I would like to put that change into v2023.04.
If my series goes in first, we will have to add a patch to this series to adjust dependencies.
OK
Quoted 3 lines
Can we use the mmc driver in
sandbox_splfor testing loading main U-Boot from mmc based on different criteria like partition number,partion_type_guid, file name?
Yes you can.
But I suggest using sandbox_vpl, since in that build we are using OF_REAL in SPL, i.e. it has an actual device tree. That means you won't have to adjust the sandbox mmc driver to use of-platdata (not that it would be particularly tricky).
You'll need to update 'TEST_PY_TEST_SPEC: "test_vpl_help or test_spl"' in CI though, so it runs.
Regards,
Simon
Re: [PATCH v5 30/44] lib: Add an SPL config for LIB_UUID
In reply to Simon GlassQuoted 7 lines · Simon Glass
This is selected by
PARTITION_UUIDSwhich has a separate option for SPL. Add an SPL option forLIB_UUIDalso, so that we can keep them consistent.Also add one for
PARTITION_TYPE_GUIDto avoid a build error inpart_efi.cwhich wants to call a uuid function in SPL.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 31/44 test: Tidy up sandbox handling in test-main
In reply to Simon GlassThis is pretty messy at present since it relies on a SPL_SANDBOX option that does not exist. Use the normal options instead, so that it will work with split config.
---
(no changes since v1)
test/test-main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
test/test-main.c +5 -5
@@ -46,14 +46,14 @@ enum fdtchk_t {*/ static enum fdtchk_t fdt_action (void ) { -/* Do a copy for sandbox (but only the U-Boot build, not SPL) */ -if (CONFIG_IS_ENABLED (SANDBOX )) -return FDTCHK_COPY ; -/* For sandbox SPL builds, do nothing */ -if (IS_ENABLED (CONFIG_SANDBOX )) +if (IS_ENABLED (CONFIG_SANDBOX ) &&IS_ENABLED (CONFIG_SPL_BUILD ))return FDTCHK_NONE ; +/* Do a copy for sandbox (but only the U-Boot build, not SPL) */ +if (IS_ENABLED (CONFIG_SANDBOX )) +return FDTCHK_COPY ; +/* For all other boards, do a checksum */ return FDTCHK_CHECKSUM ; }
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 31/44] test: Tidy up sandbox handling in test-main
Quoted 5 lines · Simon Glass
This is pretty messy at present since it relies on a
SPL_SANDBOXoption that does not exist. Use the normal options instead, so that it will work with split config.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 32/44 x86: Fix up use of X86_32BIT_INIT and X86_64 options
In reply to Simon GlassDrop the invalid SPL_ in a CONFIG_IS_ENABLED() usage. Use the correct X86_64 option in msr.h since SPL may be 32-bit when U-Bout proper is not.
---
(no changes since v4)
Changes in v4:
- Reduce and rename commit
arch/x86/cpu/qemu/qemu.c | 2 +- arch/x86/include/asm/msr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/cpu/qemu/qemu.c +1 -1
@@ -97,7 +97,7 @@ static void qemu_chipset_init(void) } } -#if !CONFIG_IS_ENABLED (SPL_X86_32BIT_INIT ) +#if CONFIG_IS_ENABLED (X86_32BIT_INIT )int arch_cpu_init (void ) {post_code (POST_CPU_INIT );
arch/x86/include/asm/msr.h +1 -1
@@ -59,7 +59,7 @@ static inline unsigned long long native_read_tscp(unsigned int *aux)* edx:eax, while for x86_64 it doesn't mean rdx:rax or edx:eax. Instead, * it means rax *or* rdx. */ -#ifdef CONFIG_X86_64 +#if CONFIG_IS_ENABLED (X86_64 )#define DECLARE_ARGS (val, low, high) unsigned low, high#define EAX_EDX_VAL (val, low, high) ((low) | ((u64)(high) << 32))#define EAX_EDX_ARGS (val, low, high) "a" (low), "d" (high)
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 32/44] x86: Fix up use of X86_32BIT_INIT and X86_64 options
Quoted 7 lines · Simon Glass
Drop the invalid
SPL_in aCONFIG_IS_ENABLED()usage. Use the correctX86_64option inmsr.hsince SPL may be 32-bit when U-Bout proper is not.Signed-off-by Simon Glass <[email protected]>---
Quoted 8 lines
(no changes since v4)
Changes in v4:
- Reduce and rename commitarch/x86/cpu/qemu/qemu.c | 2 +- arch/x86/include/asm/msr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
This changes spl on chromebook_link64 a lot, have you confirmed it there?
Signature · 1 line
Tom
Re: [PATCH v5 32/44] x86: Fix up use of X86_32BIT_INIT and X86_64 options
Hi Tom,
Quoted 15 lines · Tom Rini
Quoted 12 lines · Simon Glass
Drop the invalid
SPL_in aCONFIG_IS_ENABLED()usage. Use the correctX86_64option inmsr.hsince SPL may be 32-bit when U-Bout proper is not.Signed-off-by Simon Glass <[email protected]>---
(no changes since v4)
Changes in v4:
- Reduce and rename commit
Quoted 6 lines
Quoted 3 lines
arch/x86/cpu/qemu/qemu.c | 2 +- arch/x86/include/asm/msr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)This changes spl on
chromebook_link64a lot, have you confirmed it there?
No, the lab is broken...will do at some point.
Regards,
Simon
PATCH v5 33/44 Add VPL options for BLOBLIST
In reply to Simon GlassWe can use this feature in VPL, so add some options for it. Also fix a typo in the SPL help while we are here.
---
(no changes since v1)
common/Kconfig | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-)
common/Kconfig +30 -1
@@ -1063,7 +1063,7 @@ choice prompt "Bloblist location in TPL" help Select the location of the bloblist, via various means. Typically - you should use the same value for SPL as for U-Boot, since they need + you should use the same value for TPL as for U-Boot, since they need to look in the same place. But if BLOBLIST_ALLOC is used, then a fresh bloblist will be created each time, since there is no shared address (between phases) for the bloblist.
@@ -1086,6 +1086,35 @@ endchoice endif # TPL_BLOBLIST +if VPL_BLOBLIST + +choice + prompt "Bloblist location in VPL" + help + Select the location of the bloblist, via various means. Typically + you should use the same value for VPL as for U-Boot, since they need + to look in the same place. But if BLOBLIST_ALLOC is used, then a + fresh bloblist will be created each time, since there is no shared + address (between phases) for the bloblist. + +config VPL_BLOBLIST_FIXED + bool "Place bloblist at a fixed address in memory" + help + Select this to used a fixed memory address for the bloblist. If the + bloblist exists at this address from a previous phase, it used as is. + If not it is created at this address in VPL. + +config VPL_BLOBLIST_ALLOC + bool "Allocate bloblist" + help + Allocate the bloblist using malloc(). This avoids the need to + specify a fixed address on systems where this is unknown or can + change at runtime. + +endchoice + +endif # VPL_BLOBLIST + endmenu source "common/spl/Kconfig"
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 33/44] Add VPL options for BLOBLIST
Quoted 4 lines · Simon Glass
We can use this feature in VPL, so add some options for it. Also fix a typo in the SPL help while we are here.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 34/44 rockchip: Avoid checking environment without ENV_SUPPORT
In reply to Simon GlassWith split config, this causes a build error in SPL where the environment may not be enabled. It affects two rk3399 boards. Add a condition.
---
(no changes since v1)
board/theobroma-systems/puma_rk3399/puma-rk3399.c | 2 +- board/theobroma-systems/ringneck_px30/ringneck-px30.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
board/theobroma-systems/puma_rk3399/puma-rk3399.c +1 -1
@@ -136,7 +136,7 @@ int mmc_get_env_dev(void)return CONFIG_SYS_MMC_ENV_DEV ; } -#if !IS_ENABLED (CONFIG_ENV_IS_NOWHERE ) +#if IS_ENABLED (CONFIG_ENV_SUPPORT ) && !IS_ENABLED (CONFIG_ENV_IS_NOWHERE )#error Please enable CONFIG_ENV_IS_NOWHERE#endif
board/theobroma-systems/ringneck_px30/ringneck-px30.c +1 -1
@@ -118,7 +118,7 @@ int mmc_get_env_dev(void)return CONFIG_SYS_MMC_ENV_DEV ; } -#if !IS_ENABLED (CONFIG_ENV_IS_NOWHERE ) +#if IS_ENABLED (CONFIG_ENV_SUPPORT ) && !IS_ENABLED (CONFIG_ENV_IS_NOWHERE )#error Please enable CONFIG_ENV_IS_NOWHERE#endif
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 34/44] rockchip: Avoid checking environment without ENV_SUPPORT
Hi Simon,
Quoted 4 lines · Simon Glass
With split config, this causes a build error in SPL where the environment may not be enabled. It affects two rk3399 boards. Add a condition.
Signed-off-by Simon Glass <[email protected]>
Cheers,
Quentin
PATCH v5 35/44 freescale: Drop old pre-DM_ETH code
In reply to Simon GlassThis is used by ls1021atwr_sdcard_ifc_SECURE_BOOT with split config, but is not needed anymore, since Ethernet migration is complete. Drop it.
---
(no changes since v1)
arch/arm/cpu/armv7/ls102xa/fdt.c | 12 ------------ 1 file changed, 12 deletions(-)
arch/arm/cpu/armv7/ls102xa/fdt.c +0 -12
@@ -25,11 +25,7 @@ DECLARE_GLOBAL_DATA_PTR;void ft_fixup_enet_phy_connect_type (void *fdt) { -#ifdef CONFIG_DM_ETH struct udevice *dev; -#else -struct eth_device *dev; -#endif struct tsec_private *priv;const char *enet_path, *phy_path;char enet[16 ];
@@ -37,12 +33,8 @@ void ft_fixup_enet_phy_connect_type(void *fdt)int phy_node;int i =0 ;uint32_t ph; -#ifdef CONFIG_DM_ETH char *name[3 ] = {"ethernet@2d10000" ,"ethernet@2d50000" ,"ethernet@2d90000" }; -#else -char *name[3 ] = {"eTSEC1" ,"eTSEC2" ,"eTSEC3" }; -#endif for (; i <ARRAY_SIZE (name); i++) { dev =eth_get_dev_by_name (name[i]);
@@ -53,11 +45,7 @@ void ft_fixup_enet_phy_connect_type(void *fdt)continue ; } -#ifdef CONFIG_DM_ETH priv =dev_get_priv (dev); -#else - priv = dev->priv; -#endif if (priv->flags &TSEC_SGMII )continue ;
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 35/44] freescale: Drop old pre-DM_ETH code
Quoted 4 lines · Simon Glass
This is used by
ls1021atwr_sdcard_ifc_SECURE_BOOTwith split config, but is not needed anymore, since Ethernet migration is complete. Drop it.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 36/44 imx: Use SATA instead of CMD_SATA
In reply to Simon GlassThis causes a build failure on mx6cuboxi with split config, since CMD_SATA shows up as enabled in SPl (because there is no SPL_CMD_SATA).
The condition is wrong anyway, so change it to use SATA instead.
---
(no changes since v1)
board/solidrun/mx6cuboxi/mx6cuboxi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/solidrun/mx6cuboxi/mx6cuboxi.c +1 -1
@@ -275,7 +275,7 @@ int board_early_init_f(void) {setup_iomux_uart (); -#ifdef CONFIG_CMD_SATA +#ifdef CONFIG_SATA setup_sata ();#endif setup_fec ();
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 36/44] imx: Use SATA instead of CMD_SATA
Hi Simon,
Quoted 6 lines · Simon Glass
This causes a build failure on mx6cuboxi with split config, since
CMD_SATAshows up as enabled in SPl (because there is noSPL_CMD_SATA).The condition is wrong anyway, so change it to use SATA instead.
Signed-off-by Simon Glass <[email protected]>
This conflicts with
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
baruch
Quoted 20 lines
---
(no changes since v1)
board/solidrun/mx6cuboxi/mx6cuboxi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)board/solidrun/mx6cuboxi/mx6cuboxi.c +1
-1@@ -275,7 +275,7 @@ int board_early_init_f(void) {setup_iomux_uart (); -#ifdef CONFIG_CMD_SATA +#ifdef CONFIG_SATA setup_sata ();#endif setup_fec ();
Signature · 3 lines
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- [email protected] - tel: +972.52.368.4656, http://www.tkos.co.il -Re: [PATCH v5 36/44] imx: Use SATA instead of CMD_SATA
Hi,
Quoted 7 lines · Baruch Siach
Hi Simon,
Quoted 3 lines · Simon Glass
This causes a build failure on mx6cuboxi with split config, since
CMD_SATAshows up as enabled in SPl (because there is noSPL_CMD_SATA).
Quoted 7 lines
Quoted 3 lines
The condition is wrong anyway, so change it to use SATA instead.
Signed-off-by Simon Glass <[email protected]>This conflicts with
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Thanks...they are similar, just that my one is getting rid of the CONFIG_IS_ENABLED() too.
I think it might be best to bring in Troy's series to -next ASAP and then I can adjust the one I just sent accordingly. I have not looked in detail, but it seems like a good step along the way.
Regards,
Simon
Quoted 29 lines
baruch
Quoted 12 lines
---
(no changes since v1)
board/solidrun/mx6cuboxi/mx6cuboxi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)board/solidrun/mx6cuboxi/mx6cuboxi.c +0
-0board/solidrun/mx6cuboxi/mx6cuboxi.c int board_early_init_f(void) · line 281
Quoted 8 lines
board/solidrun/mx6cuboxi/mx6cuboxi.c +1
-1@@ -275,7 +275,7 @@ int board_early_init_f(void) {setup_iomux_uart (); -#ifdef CONFIG_CMD_SATA +#ifdef CONFIG_SATA setup_sata ();#endif setup_fec ();--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- [email protected] - tel: +972.52.368.4656, http://www.tkos.co.il -
Re: [PATCH v5 36/44] imx: Use SATA instead of CMD_SATA
In reply to Simon GlassQuoted 6 lines · Simon Glass
This causes a build failure on mx6cuboxi with split config, since
CMD_SATAshows up as enabled in SPl (because there is noSPL_CMD_SATA).The condition is wrong anyway, so change it to use SATA instead.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 37/44 net: Add an SPL config for atheros
In reply to Simon GlassAdd a new SPL_PHY_ATHEROS to avoid a build error on am335x_evm with split config.
---
(no changes since v1)
drivers/net/phy/Kconfig | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/phy/Kconfig +3 -0
@@ -106,6 +106,9 @@ config PHY_AQUANTIA_FW_NAME config PHY_ATHEROS bool "Atheros Ethernet PHYs support" +config SPL_PHY_ATHEROS + bool "Atheros Ethernet PHYs support (SPL)" + config PHY_BROADCOM bool "Broadcom Ethernet PHYs support"
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 37/44] net: Add an SPL config for atheros
Quoted 5 lines · Simon Glass
Add a new
SPL_PHY_ATHEROSto avoid a build error onam335x_evmwith split config.Signed-off-by Simon Glass <[email protected]>Reviewed-by Ramon Fried <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 38/44 freescale: Fix odd use of ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE
In reply to Simon GlassThis is not a CONFIG option so we should not be using IS_ENABLED() on it, particularly not when it is not defined to anything, so shows up as calling IS_ENABLED() with no arguments.
Just check it normally.
For fsl_esdhc.c set it to 0 at the top of the file if it is not defined. This sort-of matches the behaviour in fsl_esdhc_mmc.c which seem to have a similar problem.
This fixes a build error with split config on T2080QDS.
Note: This should be handled in the devicetree.
---
No size changes on affected boards:
aarch64: w+ ls1088aqds ls1088aqds_qspi ls1088aqds_qspi_SECURE_BOOT ls1088aqds_sdcard_ifc ls1088aqds_sdcard_qspi ls1088aqds_tfa ls1088ardb_qspi ls1088ardb_qspi_SECURE_BOOT ls1088ardb_sdcard_qspi ls1088ardb_sdcard_qspi_SECURE_BOOT ls1088ardb_tfa ls1088ardb_tfa_SECURE_BOOT ls2080aqds ls2080aqds_nand ls2080aqds_qspi ls2080aqds_sdcard ls2080aqds_SECURE_BOOT ls2088aqds_tfa
arm: w+ am57xx_hs_evm_usb
powerpc: w+ P2041RDB P2041RDB_NAND P2041RDB_SDCARD P2041RDB_SPIFLASH T1024RDB T1024RDB_NAND T1024RDB_SDCARD T1024RDB_SPIFLASH T1042D4RDB T1042D4RDB_NAND T1042D4RDB_SDCARD T1042D4RDB_SPIFLASH T2080QDS T2080QDS_NAND T2080QDS_SDCARD T2080QDS_SECURE_BOOT T2080QDS_SPIFLASH T2080QDS_SRIO_PCIE_BOOT T2080RDB T2080RDB_NAND T2080RDB_revD T2080RDB_revD_NAND T2080RDB_revD_SDCARD T2080RDB_revD_SPIFLASH T2080RDB_SDCARD T2080RDB_SPIFLASH kmcent2Changes in v5:
- Change approach and expand notes after more investigation
arch/powerpc/include/asm/config_mpc85xx.h | 6 +++--- drivers/mmc/fsl_esdhc.c | 6 +++++- drivers/mmc/fsl_esdhc_imx.c | 4 +++- 3 files changed, 11 insertions(+), 5 deletions(-)
arch/powerpc/include/asm/config_mpc85xx.h +3 -3
@@ -134,7 +134,7 @@#define CFG_FM_PLAT_CLK_DIV 1#define CFG_SYS_FM1_CLK CFG_FM_PLAT_CLK_DIV#define CFG_SYS_FM_MURAM_SIZE 0x30000 -#define ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE +#define ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE 0#define QE_MURAM_SIZE 0x6000UL#define MAX_QE_RISC 1#define QE_NUM_OF_SNUM 28
@@ -147,7 +147,7 @@#define CFG_SYS_FM1_CLK 0#define CFG_QBMAN_CLK_DIV 1#define CFG_SYS_FM_MURAM_SIZE 0x30000 -#define ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE +#define ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE 0#define QE_MURAM_SIZE 0x6000UL#define MAX_QE_RISC 1#define QE_NUM_OF_SNUM 28
@@ -166,7 +166,7 @@#define CFG_SYS_PME_CLK CFG_PME_PLAT_CLK_DIV#define CFG_SYS_FM1_CLK 0#define CFG_SYS_FM_MURAM_SIZE 0x28000 -#define ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE +#define ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE 0#elif defined(CONFIG_ARCH_C29X )
drivers/mmc/fsl_esdhc.c +5 -1
@@ -34,6 +34,10 @@DECLARE_GLOBAL_DATA_PTR ; +#ifndef ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE +#define ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE 0 +#endif +struct fsl_esdhc {uint dsaddr;/* SDMA system address register */ uint blkattr;/* Block attributes register */
@@ -325,7 +329,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc *mmc, (timeout == 4 || timeout == 8 || timeout == 12)) timeout++; -if (IS_ENABLED (ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE )) +if (ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE ) timeout =0xE ;esdhc_clrsetbits32 (®s->sysctl,SYSCTL_TIMEOUT_MASK , timeout <<16 );
drivers/mmc/fsl_esdhc_imx.c +3 -1
@@ -43,6 +43,8 @@#ifndef ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE #ifdef CONFIG_FSL_USDHC #define ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE 1 +#else +#define ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE 0#endif #endif
@@ -375,7 +377,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc *mmc, (timeout == 4 || timeout == 8 || timeout == 12)) timeout++; -if (IS_ENABLED (ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE )) +if (ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE ) timeout =0xE ;esdhc_clrsetbits32 (®s->sysctl,SYSCTL_TIMEOUT_MASK , timeout <<16 );
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 38/44] freescale: Fix odd use of ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE
Quoted 99 lines · Simon Glass
This is not a CONFIG option so we should not be using
IS_ENABLED()on it, particularly not when it is not defined to anything, so shows up as callingIS_ENABLED()with no arguments.Just check it normally.
For
fsl_esdhc.cset it to 0 at the top of the file if it is not defined. This sort-of matches the behaviour infsl_esdhc_mmc.cwhich seem to have a similar problem.This fixes a build error with split config on T2080QDS.
Note: This should be handled in the devicetree.
Signed-off-by Simon Glass <[email protected]>---
No size changes on affected boards:aarch64: w+ ls1088aqds ls1088aqds_qspi ls1088aqds_qspi_SECURE_BOOT ls1088aqds_sdcard_ifc ls1088aqds_sdcard_qspi ls1088aqds_tfa ls1088ardb_qspi ls1088ardb_qspi_SECURE_BOOT ls1088ardb_sdcard_qspi ls1088ardb_sdcard_qspi_SECURE_BOOT ls1088ardb_tfa ls1088ardb_tfa_SECURE_BOOT ls2080aqds ls2080aqds_nand ls2080aqds_qspi ls2080aqds_sdcard ls2080aqds_SECURE_BOOT ls2088aqds_tfa arm: w+ am57xx_hs_evm_usb powerpc: w+ P2041RDB P2041RDB_NAND P2041RDB_SDCARD P2041RDB_SPIFLASH T1024RDB T1024RDB_NAND T1024RDB_SDCARD T1024RDB_SPIFLASH T1042D4RDB T1042D4RDB_NAND T1042D4RDB_SDCARD T1042D4RDB_SPIFLASH T2080QDS T2080QDS_NAND T2080QDS_SDCARD T2080QDS_SECURE_BOOT T2080QDS_SPIFLASH T2080QDS_SRIO_PCIE_BOOT T2080RDB T2080RDB_NAND T2080RDB_revD T2080RDB_revD_NAND T2080RDB_revD_SDCARD T2080RDB_revD_SPIFLASH T2080RDB_SDCARD T2080RDB_SPIFLASH kmcent2Changes in v5:
- Change approach and expand notes after more investigationarch/powerpc/include/asm/config_mpc85xx.h | 6 +++--- drivers/mmc/fsl_esdhc.c | 6 +++++- drivers/mmc/fsl_esdhc_imx.c | 4 +++- 3 files changed, 11 insertions(+), 5 deletions(-)arch/powerpc/include/asm/config_mpc85xx.h +3
-3@@ -134,7 +134,7 @@#define CFG_FM_PLAT_CLK_DIV 1#define CFG_SYS_FM1_CLK CFG_FM_PLAT_CLK_DIV#define CFG_SYS_FM_MURAM_SIZE 0x30000 -#define ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE +#define ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE 0#define QE_MURAM_SIZE 0x6000UL#define MAX_QE_RISC 1#define QE_NUM_OF_SNUM 28@@ -147,7 +147,7 @@#define CFG_SYS_FM1_CLK 0#define CFG_QBMAN_CLK_DIV 1#define CFG_SYS_FM_MURAM_SIZE 0x30000 -#define ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE +#define ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE 0#define QE_MURAM_SIZE 0x6000UL#define MAX_QE_RISC 1#define QE_NUM_OF_SNUM 28@@ -166,7 +166,7 @@#define CFG_SYS_PME_CLK CFG_PME_PLAT_CLK_DIV#define CFG_SYS_FM1_CLK 0#define CFG_SYS_FM_MURAM_SIZE 0x28000 -#define ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE +#define ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE 0#elif defined(CONFIG_ARCH_C29X )drivers/mmc/fsl_esdhc.c +5
-1@@ -34,6 +34,10 @@DECLARE_GLOBAL_DATA_PTR ; +#ifndef ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE +#define ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE 0 +#endif +struct fsl_esdhc {uint dsaddr;/* SDMA system address register */ uint blkattr;/* Block attributes register */ @@ -325,7 +329,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc *mmc, (timeout == 4 || timeout == 8 || timeout == 12)) timeout++; -if (IS_ENABLED (ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE )) +if (ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE ) timeout =0xE ;esdhc_clrsetbits32 (®s->sysctl,SYSCTL_TIMEOUT_MASK , timeout <<16 );drivers/mmc/fsl_esdhc_imx.c +2
-0@@ -43,6 +43,8 @@#ifndef ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE #ifdef CONFIG_FSL_USDHC #define ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE 1 +#else +#define ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE 0#endif #endif
drivers/mmc/fsl_esdhc_imx.c static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc *mmc, · line 383
Quoted 8 lines
drivers/mmc/fsl_esdhc_imx.c +1
-1@@ -375,7 +377,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc *mmc, (timeout == 4 || timeout == 8 || timeout == 12)) timeout++; -if (IS_ENABLED (ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE )) +if (ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE ) timeout =0xE ;esdhc_clrsetbits32 (®s->sysctl,SYSCTL_TIMEOUT_MASK , timeout <<16 );
Looking at commit 52faec31827e ("mmc: fsl_esdhc: replace most #ifdefs by IS_ENABLED()") this is going backwards. The original logic was to define ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE to set timeout to 0xE as "ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE" is a boolean, not a value-holder.
Signature · 1 line
Tom
PATCH v5 39/44 serial: Support ns16550 driver in TPL
In reply to Simon GlassAdd options for this since they are needed by P1020RDB-PC_NAND.
---
(no changes since v1)
drivers/serial/Kconfig | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/serial/Kconfig +6 -0
@@ -731,6 +731,12 @@ config SPL_SYS_NS16550_SERIAL default y if SYS_NS16550_SERIAL || ARCH_SUNXI || ARCH_OMAP2PLUS select SYS_NS16550 +config TPL_SYS_NS16550_SERIAL + bool "NS16550 UART or compatible legacy driver in TPL" + depends on TPL && !TPL_DM_SERIAL + default y if SYS_NS16550_SERIAL || ARCH_SUNXI || ARCH_OMAP2PLUS + select SYS_NS16550 + config SYS_NS16550 bool "NS16550 UART or compatible" help
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 39/44] serial: Support ns16550 driver in TPL
Quoted 3 lines · Simon Glass
Add options for this since they are needed by P1020RDB-PC_NAND.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 40/44 dm: Add a TPL symbol for simple-bus
In reply to Simon GlassThis is used in some x86 code, so add a symbol for it.
---
(no changes since v1)
drivers/core/Kconfig | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/core/Kconfig +7 -0
@@ -301,6 +301,13 @@ config SPL_SIMPLE_BUS Supports the 'simple-bus' driver, which is used on some systems in SPL. +config TPL_SIMPLE_BUS + bool "Support simple-bus driver in TPL" + depends on TPL_DM && TPL_OF_CONTROL + help + Supports the 'simple-bus' driver, which is used on some systems + in TPL. + config SIMPLE_BUS_CORRECT_RANGE bool "Decode the 'simple-bus' <range> by honoring the #address-cells and #size-cells" depends on SIMPLE_BUS
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 40/44] dm: Add a TPL symbol for simple-bus
Quoted 3 lines · Simon Glass
This is used in some x86 code, so add a symbol for it.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 41/44 x86: coral: Add missing TPL options
In reply to Simon GlassSome options should be enabled which are missing. Fix this.
---
(no changes since v4)
Changes in v4:
- Reduce and rename commit
configs/chromebook_coral_defconfig | 3 +++ 1 file changed, 3 insertions(+)
configs/chromebook_coral_defconfig +3 -0
@@ -87,6 +87,7 @@ CONFIG_TFTP_TSIZE=y CONFIG_USE_ROOTPATH=y CONFIG_REGMAP=y CONFIG_SYSCON=y +CONFIG_TPL_SIMPLE_BUS=y CONFIG_SPL_OF_TRANSLATE=y CONFIG_LBA48=y CONFIG_SYS_64BIT_LBA=y
@@ -96,6 +97,8 @@ CONFIG_SYS_I2C_DW=y CONFIG_MISC=y CONFIG_CROS_EC=y CONFIG_CROS_EC_LPC=y +CONFIG_SPL_P2SB=y +CONFIG_TPL_P2SB=y CONFIG_SPI_FLASH_WINBOND=y # CONFIG_X86_PCH7 is not set # CONFIG_X86_PCH9 is not set
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 41/44] x86: coral: Add missing TPL options
Quoted 3 lines · Simon Glass
Some options should be enabled which are missing. Fix this.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 42/44 power: wandboard: Add a missing CONFIG
In reply to Simon GlassWe should enable pmic in SPL since it is used.
---
(no changes since v4)
Changes in v4:
- Fix 'wanderboard' typo
- Reduce and rename commit
configs/wandboard_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/wandboard_defconfig +1 -0
@@ -71,6 +71,7 @@ CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y CONFIG_DM_PMIC=y +CONFIG_SPL_DM_PMIC=y CONFIG_DM_PMIC_PFUZE100=y CONFIG_DM_SCSI=y CONFIG_DM_SERIAL=y
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 42/44] power: wandboard: Add a missing CONFIG
Quoted 3 lines · Simon Glass
We should enable pmic in SPL since it is used.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 43/44 venice: Simplify conditions for network init
In reply to Simon GlassThe conditions in this code do not align when doing an SPL build with split config. Use __maybe_unused to avoid needing to be so explicit.
Of course a better solution would be to refactor all of this to avoid using #ifdef.
---
(no changes since v1)
board/gateworks/venice/venice.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
board/gateworks/venice/venice.c +3 -3
@@ -41,8 +41,7 @@ int board_fit_config_name_match(const char *name)return -1 ; } -#if (IS_ENABLED (CONFIG_NET )) -static int setup_fec (void ) +static int __maybe_unused setup_fec (void ) {struct iomuxc_gpr_base_regs *gpr = (struct iomuxc_gpr_base_regs *)IOMUXC_GPR_BASE_ADDR ;
@@ -58,7 +57,7 @@ static int setup_fec(void)return 0 ; } -static int setup_eqos (void ) +static int __maybe_unused setup_eqos (void ) {struct iomuxc_gpr_base_regs *gpr = (struct iomuxc_gpr_base_regs *)IOMUXC_GPR_BASE_ADDR ;
@@ -71,6 +70,7 @@ static int setup_eqos(void)return set_clk_eqos (ENET_125MHZ ); } +#if (IS_ENABLED (CONFIG_NET ))int board_phy_config (struct phy_device *phydev) {unsigned short val;
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 43/44] venice: Simplify conditions for network init
Quoted 7 lines · Simon Glass
The conditions in this code do not align when doing an SPL build with split config. Use
__maybe_unusedto avoid needing to be so explicit.Of course a better solution would be to refactor all of this to avoid using #ifdef.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH v5 44/44 command: Don't allow commands in SPL
In reply to Simon GlassAt present we compile commands into U-Boot SPL even though they cannot be used. This wastes space. Adjust the condition to avoid this.
---
Changes in v5:
- Drop FSL_ISBC_KEY_EXT patch as it changes the size
- Drop PHY_CADENCE_SIERRA patch as it changes the size
Changes in v3:
- Add a new patch to disallow commands in SPL
include/command.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/command.h +1 -1
@@ -376,7 +376,7 @@ int cmd_source_script(ulong addr, const char *fit_uname, const char *confname); U_BOOT_SUBCMDS_DO_CMD(_cmdname) \ U_BOOT_SUBCMDS_COMPLETE(_cmdname) -#ifdef CONFIG_CMDLINE +#if CONFIG_IS_ENABLED (CMDLINE )#define U_BOOT_CMDREP_MKENT_COMPLETE (_name, _maxargs, _cmd_rep, \ _usage, _help, _comp) \ { #_name, _maxargs, _cmd_rep, cmd_discard_repeatable, \
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v5 44/44] command: Don't allow commands in SPL
Quoted 10 lines · Simon Glass
At present we compile commands into U-Boot SPL even though they cannot be used. This wastes space. Adjust the condition to avoid this.
Signed-off-by Simon Glass <[email protected]>---
Changes in v5:
- DropFSL_ISBC_KEY_EXTpatch as it changes the size
- DropPHY_CADENCE_SIERRApatch as it changes the size
Quoted 5 lines
Changes in v3:
- Add a new patch to disallow commands in SPLinclude/command.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
As a follow-up, "git grep -l u_boot_list_2_cmd" shows some lds scripts that I believe can be updated, after this change.
And in reviewing this change, yes, a few boards now discard some functionality, but, it looks like it's reasonable and not that we're removing some intentional but odd configurations.
Signature · 1 line
Tom
Re: [PATCH v5 44/44] command: Don't allow commands in SPL
In reply to Simon GlassQuoted 4 lines · Simon Glass
At present we compile commands into U-Boot SPL even though they cannot be used. This wastes space. Adjust the condition to avoid this.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
Quoted 75 lines · Simon Glass
This series was split out of the old 'split config' splc series. It contains clean-up patches which do not depend on split config.
This is available at u-boot-dm/spld-working
The size changes look pretty good: https://paste.debian.net/1271742/
The remaining patches will move into a new 'splg' series (G for Good).
[1] https://patchwork.ozlabs.org/project/uboot/list/?series=341504&state=*
Changes in v5:
- Fix reply typo
- Change approach and expand notes after more investigation
- DropFSL_ISBC_KEY_EXTpatch as it changes the size
- DropPHY_CADENCE_SIERRApatch as it changes the sizeChanges in v4:
- Avoid use ofdef_bool
- Modify to get rid ofdef_bool
- AdjustKconfigordering
- Just fix the typo
- Reduce and rename commit
- Reduce and rename commit
- Fix 'wanderboard' typo
- Reduce and rename commitChanges in v3:
- Add new patch to disable QFW bootmeth in SPL
- Move the option down to the non-SPL part ofdrivers/Makefile
- Correct 'VPL' typo
- Use a consistent format for the comment
- Fix a transitory build error withsandbox_spl
- Add a new patch to disallow commands in SPLChanges in v2:
- Rebase to previous seriesSimon Glass (44):
mtd: Drop unusedkb9202_nanddriver
mtd: Drop unusedCONFIG_ONENAND_U_BOOT
sh4: Drop unused twl6030 driver
moveconfig: Update to detect / correct missing SPL Kconfigs
bootstd: Disable QFW bootmeth in SPL
Correct SPL uses ofARCH_MVEBU
Correct SPL uses ofDISPLAY_AER_FULL
Correct SPL uses of MULTIPLEXER
Correct SPL use ofPG_WCOM_UBOOT_UPDATE_SUPPORTEDCorrect SPL uses ofPHY_FIXED
boot: Add Kconfigs forBOOTMETH_VBE_REQUESTCorrect SPL use ofDM_RNG
lib: Add aKconfigforSPL_BZIP2
moveconfig: Various minor improvements
sandbox: Expand size for VPL image
event: AddKconfigoptions for SPL
bootstd: Correct 'VPL' typo
env: Avoid checkingENV_IS_INwhen env disabled
env: Allow VPL environment to be nowhere
lib: Add VPL options for SHA1 and SHA256
x86: Use string functions for all 32-bit builds
lib: Fix build condition for tiny-printf
sandbox: Tidy up RTC options
sandbox: Use the generic VPL option to enable VPL
sandbox: Tidy up I2C options
fixdep: Add support for VPL
fixdep: Refactor to make testing easier
fixdep: Add some tests forparse_config_line()
test: Add SPL versions of theTEST_KCONFIGoptions
lib: Add an SPL config forLIB_UUID
test: Tidy up sandbox handling in test-main
x86: Fix up use ofX86_32BIT_INITandX86_64options Add VPL options for BLOBLIST
rockchip: Avoid checking environment withoutENV_SUPPORT
freescale: Drop old pre-DM_ETH code
imx: Use SATA instead ofCMD_SATA
Quoted 8 lines
net: Add an SPL config for atheros
freescale: Fix odd use ofESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE
serial: Support ns16550 driver in TPL
dm: Add a TPL symbol for simple-bus
x86: coral: Add missing TPL options
power: wandboard: Add a missing CONFIG
venice: Simplify conditions for network init
command: Don't allow commands in SPL
I've applied almost all of this series. I've left the moveconfig.py stuff for now as I'm not sure it's useful until split config. I've followed up about the X86_32BIT_INIT patch as I do want to see that boot-tested, and I've left the ns16650 TPL patch as both that feel like "split config makes this an issue" rather than an issue we have today and fwiw, the dependencies are wrong in that there's no TPL for omap2 which I didn't reply directly to, I only noticed as reviewing the series locally before merging.
Signature · 1 line
Tom
Hi Tom,
Quoted 87 lines · Tom Rini
Quoted 75 lines · Simon Glass
This series was split out of the old 'split config' splc series. It contains clean-up patches which do not depend on split config.
This is available at u-boot-dm/spld-working
The size changes look pretty good: https://paste.debian.net/1271742/
The remaining patches will move into a new 'splg' series (G for Good).
[1] https://patchwork.ozlabs.org/project/uboot/list/?series=341504&state=*
Changes in v5:
- Fix reply typo
- Change approach and expand notes after more investigation
- DropFSL_ISBC_KEY_EXTpatch as it changes the size
- DropPHY_CADENCE_SIERRApatch as it changes the sizeChanges in v4:
- Avoid use ofdef_bool
- Modify to get rid ofdef_bool
- AdjustKconfigordering
- Just fix the typo
- Reduce and rename commit
- Reduce and rename commit
- Fix 'wanderboard' typo
- Reduce and rename commitChanges in v3:
- Add new patch to disable QFW bootmeth in SPL
- Move the option down to the non-SPL part ofdrivers/Makefile
- Correct 'VPL' typo
- Use a consistent format for the comment
- Fix a transitory build error withsandbox_spl
- Add a new patch to disallow commands in SPLChanges in v2:
- Rebase to previous seriesSimon Glass (44):
mtd: Drop unusedkb9202_nanddriver
mtd: Drop unusedCONFIG_ONENAND_U_BOOT
sh4: Drop unused twl6030 driver
moveconfig: Update to detect / correct missing SPL Kconfigs
bootstd: Disable QFW bootmeth in SPL
Correct SPL uses ofARCH_MVEBU
Correct SPL uses ofDISPLAY_AER_FULL
Correct SPL uses of MULTIPLEXER
Correct SPL use ofPG_WCOM_UBOOT_UPDATE_SUPPORTEDCorrect SPL uses ofPHY_FIXED
boot: Add Kconfigs forBOOTMETH_VBE_REQUESTCorrect SPL use ofDM_RNG
lib: Add aKconfigforSPL_BZIP2
moveconfig: Various minor improvements
sandbox: Expand size for VPL image
event: AddKconfigoptions for SPL
bootstd: Correct 'VPL' typo
env: Avoid checkingENV_IS_INwhen env disabled
env: Allow VPL environment to be nowhere
lib: Add VPL options for SHA1 and SHA256
x86: Use string functions for all 32-bit builds
lib: Fix build condition for tiny-printf
sandbox: Tidy up RTC options
sandbox: Use the generic VPL option to enable VPL
sandbox: Tidy up I2C options
fixdep: Add support for VPL
fixdep: Refactor to make testing easier
fixdep: Add some tests forparse_config_line()
test: Add SPL versions of theTEST_KCONFIGoptions
lib: Add an SPL config forLIB_UUID
test: Tidy up sandbox handling in test-main
x86: Fix up use ofX86_32BIT_INITandX86_64options Add VPL options for BLOBLIST
rockchip: Avoid checking environment withoutENV_SUPPORT
freescale: Drop old pre-DM_ETH code
imx: Use SATA instead ofCMD_SATAQuoted 8 lines
net: Add an SPL config for atheros
freescale: Fix odd use ofESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE
serial: Support ns16550 driver in TPL
dm: Add a TPL symbol for simple-bus
x86: coral: Add missing TPL options
power: wandboard: Add a missing CONFIG
venice: Simplify conditions for network init
command: Don't allow commands in SPL
Quoted 8 lines
I've applied almost all of this series. I've left the
moveconfig.pystuff for now as I'm not sure it's useful until split config. I've followed up about theX86_32BIT_INITpatch as I do want to see that boot-tested, and I've left the ns16650 TPL patch as both that feel like "split config makes this an issue" rather than an issue we have today and fwiw, the dependencies are wrong in that there's no TPL for omap2 which I didn't reply directly to, I only noticed as reviewing the series locally before merging.
OK, thanks for that. Do you think it is worth picking up the fixdep ones also? The VPL thing is a bug and the others are for tests.
I will see if I can get some time by next week to do another spin. How can we get more eyes on the Kconfig-language proposal?
Regards,
Simon
Quoted 99 lines · Simon Glass
Hi Tom,
Quoted 87 lines · Tom Rini
Quoted 75 lines · Simon Glass
This series was split out of the old 'split config' splc series. It contains clean-up patches which do not depend on split config.
This is available at u-boot-dm/spld-working
The size changes look pretty good: https://paste.debian.net/1271742/
The remaining patches will move into a new 'splg' series (G for Good).
[1] https://patchwork.ozlabs.org/project/uboot/list/?series=341504&state=*
Changes in v5:
- Fix reply typo
- Change approach and expand notes after more investigation
- DropFSL_ISBC_KEY_EXTpatch as it changes the size
- DropPHY_CADENCE_SIERRApatch as it changes the sizeChanges in v4:
- Avoid use ofdef_bool
- Modify to get rid ofdef_bool
- AdjustKconfigordering
- Just fix the typo
- Reduce and rename commit
- Reduce and rename commit
- Fix 'wanderboard' typo
- Reduce and rename commitChanges in v3:
- Add new patch to disable QFW bootmeth in SPL
- Move the option down to the non-SPL part ofdrivers/Makefile
- Correct 'VPL' typo
- Use a consistent format for the comment
- Fix a transitory build error withsandbox_spl
- Add a new patch to disallow commands in SPLChanges in v2:
- Rebase to previous seriesSimon Glass (44):
mtd: Drop unusedkb9202_nanddriver
mtd: Drop unusedCONFIG_ONENAND_U_BOOT
sh4: Drop unused twl6030 driver
moveconfig: Update to detect / correct missing SPL Kconfigs
bootstd: Disable QFW bootmeth in SPL
Correct SPL uses ofARCH_MVEBU
Correct SPL uses ofDISPLAY_AER_FULL
Correct SPL uses of MULTIPLEXER
Correct SPL use ofPG_WCOM_UBOOT_UPDATE_SUPPORTEDCorrect SPL uses ofPHY_FIXED
boot: Add Kconfigs forBOOTMETH_VBE_REQUESTCorrect SPL use ofDM_RNG
lib: Add aKconfigforSPL_BZIP2
moveconfig: Various minor improvements
sandbox: Expand size for VPL image
event: AddKconfigoptions for SPL
bootstd: Correct 'VPL' typo
env: Avoid checkingENV_IS_INwhen env disabled
env: Allow VPL environment to be nowhere
lib: Add VPL options for SHA1 and SHA256
x86: Use string functions for all 32-bit builds
lib: Fix build condition for tiny-printf
sandbox: Tidy up RTC options
sandbox: Use the generic VPL option to enable VPL
sandbox: Tidy up I2C options
fixdep: Add support for VPL
fixdep: Refactor to make testing easier
fixdep: Add some tests forparse_config_line()
test: Add SPL versions of theTEST_KCONFIGoptions
lib: Add an SPL config forLIB_UUID
test: Tidy up sandbox handling in test-main
x86: Fix up use ofX86_32BIT_INITandX86_64options Add VPL options for BLOBLIST
rockchip: Avoid checking environment withoutENV_SUPPORT
freescale: Drop old pre-DM_ETH code
imx: Use SATA instead ofCMD_SATAQuoted 8 lines
net: Add an SPL config for atheros
freescale: Fix odd use ofESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE
serial: Support ns16550 driver in TPL
dm: Add a TPL symbol for simple-bus
x86: coral: Add missing TPL options
power: wandboard: Add a missing CONFIG
venice: Simplify conditions for network init
command: Don't allow commands in SPLQuoted 8 lines
I've applied almost all of this series. I've left the
moveconfig.pystuff for now as I'm not sure it's useful until split config. I've followed up about theX86_32BIT_INITpatch as I do want to see that boot-tested, and I've left the ns16650 TPL patch as both that feel like "split config makes this an issue" rather than an issue we have today and fwiw, the dependencies are wrong in that there's no TPL for omap2 which I didn't reply directly to, I only noticed as reviewing the series locally before merging.
Quoted 5 lines
OK, thanks for that. Do you think it is worth picking up the fixdep ones also? The VPL thing is a bug and the others are for tests.
I will see if I can get some time by next week to do another spin. How can we get more eyes on the Kconfig-language proposal?
Sorry, I should have chimed in sooner. I was thinking perhaps the next step would be to re-sync our Kconfig support with 6.2 or whatever, and see what the reaction is to the refactoring patches.
Signature · 1 line
Tom
(trimming cc list)
Hi Tom,
Quoted 104 lines · Tom Rini
Quoted 102 lines · Simon Glass
Hi Tom,
Quoted 87 lines · Tom Rini
Quoted 75 lines · Simon Glass
This series was split out of the old 'split config' splc series. It contains clean-up patches which do not depend on split config.
This is available at u-boot-dm/spld-working
The size changes look pretty good: https://paste.debian.net/1271742/
The remaining patches will move into a new 'splg' series (G for Good).
[1] https://patchwork.ozlabs.org/project/uboot/list/?series=341504&state=*
Changes in v5:
- Fix reply typo
- Change approach and expand notes after more investigation
- DropFSL_ISBC_KEY_EXTpatch as it changes the size
- DropPHY_CADENCE_SIERRApatch as it changes the sizeChanges in v4:
- Avoid use ofdef_bool
- Modify to get rid ofdef_bool
- AdjustKconfigordering
- Just fix the typo
- Reduce and rename commit
- Reduce and rename commit
- Fix 'wanderboard' typo
- Reduce and rename commitChanges in v3:
- Add new patch to disable QFW bootmeth in SPL
- Move the option down to the non-SPL part ofdrivers/Makefile
- Correct 'VPL' typo
- Use a consistent format for the comment
- Fix a transitory build error withsandbox_spl
- Add a new patch to disallow commands in SPLChanges in v2:
- Rebase to previous seriesSimon Glass (44):
mtd: Drop unusedkb9202_nanddriver
mtd: Drop unusedCONFIG_ONENAND_U_BOOT
sh4: Drop unused twl6030 driver
moveconfig: Update to detect / correct missing SPL Kconfigs
bootstd: Disable QFW bootmeth in SPL
Correct SPL uses ofARCH_MVEBU
Correct SPL uses ofDISPLAY_AER_FULL
Correct SPL uses of MULTIPLEXER
Correct SPL use ofPG_WCOM_UBOOT_UPDATE_SUPPORTEDCorrect SPL uses ofPHY_FIXED
boot: Add Kconfigs forBOOTMETH_VBE_REQUESTCorrect SPL use ofDM_RNG
lib: Add aKconfigforSPL_BZIP2
moveconfig: Various minor improvements
sandbox: Expand size for VPL image
event: AddKconfigoptions for SPL
bootstd: Correct 'VPL' typo
env: Avoid checkingENV_IS_INwhen env disabled
env: Allow VPL environment to be nowhere
lib: Add VPL options for SHA1 and SHA256
x86: Use string functions for all 32-bit builds
lib: Fix build condition for tiny-printf
sandbox: Tidy up RTC options
sandbox: Use the generic VPL option to enable VPL
sandbox: Tidy up I2C options
fixdep: Add support for VPL
fixdep: Refactor to make testing easier
fixdep: Add some tests forparse_config_line()
test: Add SPL versions of theTEST_KCONFIGoptions
lib: Add an SPL config forLIB_UUID
test: Tidy up sandbox handling in test-main
x86: Fix up use ofX86_32BIT_INITandX86_64options Add VPL options for BLOBLIST
rockchip: Avoid checking environment withoutENV_SUPPORT
freescale: Drop old pre-DM_ETH code
imx: Use SATA instead ofCMD_SATAQuoted 8 lines
net: Add an SPL config for atheros
freescale: Fix odd use ofESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE
serial: Support ns16550 driver in TPL
dm: Add a TPL symbol for simple-bus
x86: coral: Add missing TPL options
power: wandboard: Add a missing CONFIG
venice: Simplify conditions for network init
command: Don't allow commands in SPLQuoted 8 lines
I've applied almost all of this series. I've left the
moveconfig.pystuff for now as I'm not sure it's useful until split config. I've followed up about theX86_32BIT_INITpatch as I do want to see that boot-tested, and I've left the ns16650 TPL patch as both that feel like "split config makes this an issue" rather than an issue we have today and fwiw, the dependencies are wrong in that there's no TPL for omap2 which I didn't reply directly to, I only noticed as reviewing the series locally before merging.OK, thanks for that. Do you think it is worth picking up the fixdep ones also? The VPL thing is a bug and the others are for tests.
Quoted 6 lines
Quoted 2 lines
I will see if I can get some time by next week to do another spin. How can we get more eyes on the Kconfig-language proposal?
Sorry, I should have chimed in sooner. I was thinking perhaps the next step would be to re-sync our
Kconfigsupport with 6.2 or whatever, and see what the reaction is to the refactoring patches.
OK. I don't have much of a clue about this. I thought perhaps you might have more idea.
I'll send a patch which syncs it. It sort-of builds a few boards but is not right.
Regards,
Simon