misc: Various misc patches
v2 cover misc: Various misc patches
This series includes some minor tools updates and conversion of CONFIG_MISC_INIT_F to Kconfig.
Changes in v2:
- Add new patch to adjust detection of 64-bit properties
- Drop the reg_val temporary var
- Add two new tests
Simon Glass (6):
dtoc: Show driver warnings once at the end
dtoc: Adjust detection of 64-bit properties
dtoc: Improve handling of reg properties
log: Fix up debug_cond() when LOG is enabled
moveconfig: Handle binary files cleanly
Convert CONFIG_MISC_INIT_F to Kconfig
common/Kconfig | 6 ++++ configs/MPC8349ITXGP_defconfig | 1 + configs/MPC8349ITX_LOWBOOT_defconfig | 1 + configs/MPC8349ITX_defconfig | 1 + configs/kmcoge4_defconfig | 1 + configs/sandbox64_defconfig | 2 +- configs/sandbox_defconfig | 1 + configs/sandbox_flattree_defconfig | 2 +- configs/sandbox_spl_defconfig | 2 ++ configs/tools-only_defconfig | 1 + include/configs/MPC8349ITX.h | 2 -- include/configs/kmp204x.h | 2 -- include/configs/sandbox.h | 2 -- include/log.h | 11 ++++--- scripts/config_whitelist.txt | 1 - tools/dtoc/dtb_platdata.py | 20 ++++++++----- tools/dtoc/src_scan.py | 15 ++++++---- tools/dtoc/test/dtoc_test_noprops.dts | 21 +++++++++++++ tools/dtoc/test/dtoc_test_single_reg.dts | 30 +++++++++++++++++++ tools/dtoc/test_dtoc.py | 25 ++++++++++++---- tools/dtoc/test_src_scan.py | 38 ++++++++++++------------ tools/moveconfig.py | 16 ++++++++-- 22 files changed, 149 insertions(+), 52 deletions(-) create mode 100644 tools/dtoc/test/dtoc_test_noprops.dts create mode 100644 tools/dtoc/test/dtoc_test_single_reg.dts
Signature · 1 line
2.31.0.291.g576ba9dcdaf-goog
PATCH v2 1/6 dtoc: Show driver warnings once at the end
At present warnings are shown as soon as they are discovered in the source scannner. But the function that detects them may be called multiple times.
Collect all the warnings and show them at the end.
---
(no changes since v1)
tools/dtoc/dtb_platdata.py | 6 ++++-- tools/dtoc/src_scan.py | 15 +++++++++------ tools/dtoc/test_dtoc.py | 2 +- tools/dtoc/test_src_scan.py | 38 ++++++++++++++++++------------------- 4 files changed, 33 insertions(+), 28 deletions(-)
tools/dtoc/dtb_platdata.py +4 -2
@@ -1186,8 +1186,7 @@ def run_steps(args, dtb_file, include_disabled, output, output_dirs, phase, raise ValueError('Must specify either output or output_dirs, not both') if not scan: - scan = src_scan.Scanner(basedir, warning_disabled, drivers_additional, - phase) + scan = src_scan.Scanner(basedir, drivers_additional, phase) scan.scan_drivers() do_process = True else:
@@ -1217,4 +1216,7 @@ def run_steps(args, dtb_file, include_disabled, output, output_dirs, phase, plat.out_header(outfile) outfile.method(plat) plat.finish_output() + + if not warning_disabled: + scan.show_warnings() return plat
tools/dtoc/src_scan.py +9 -6
@@ -188,7 +188,6 @@ class Scanner: key: Driver alias declared with DM_DRIVER_ALIAS(driver_alias, driver_name) value: Driver name declared with U_BOOT_DRIVER(driver_name) - _warning_disabled: true to disable warnings about driver names not found _drivers_additional (list or str): List of additional drivers to use during scanning _of_match: Dict holding information about compatible strings
@@ -206,7 +205,7 @@ class Scanner: _phase: The phase of U-Boot that we are generating data for, e.g. 'spl' or 'tpl'. None if not known """ - def __init__(self, basedir, warning_disabled, drivers_additional, phase=''): + def __init__(self, basedir, drivers_additional, phase=''): """Set up a new Scanner """ if not basedir:
@@ -217,7 +216,7 @@ class Scanner: self._drivers = {} self._driver_aliases = {} self._drivers_additional = drivers_additional or [] - self._warning_disabled = warning_disabled + self._missing_drivers = set() self._of_match = {} self._compat_to_driver = {} self._uclass = {}
@@ -268,9 +267,7 @@ class Scanner: aliases_c.remove(compat_c) return compat_c, aliases_c - if not self._warning_disabled: - print('WARNING: the driver %s was not found in the driver list' - % (compat_list_c[0])) + self._missing_drivers.add(compat_list_c[0]) return compat_list_c[0], compat_list_c[1:]
@@ -578,6 +575,12 @@ class Scanner: self._drivers[driver.name] = driver self._of_match.update(of_match) + def show_warnings(self): + """Show any warnings that have been collected""" + for name in sorted(list(self._missing_drivers)): + print('WARNING: the driver %s was not found in the driver list' + % name) + def scan_driver(self, fname): """Scan a driver file to build a list of driver names and aliases
tools/dtoc/test_dtoc.py +1 -1
@@ -104,7 +104,7 @@ def setup(): # Disable warnings so that calls to get_normalized_compat_name() will not # output things. - saved_scan = src_scan.Scanner(None, True, False) + saved_scan = src_scan.Scanner(None, False) saved_scan.scan_drivers() def copy_scan():
tools/dtoc/test_src_scan.py +19 -19
@@ -48,7 +48,7 @@ class TestSrcScan(unittest.TestCase): def test_simple(self): """Simple test of scanning drivers""" - scan = src_scan.Scanner(None, True, None) + scan = src_scan.Scanner(None, None) scan.scan_drivers() self.assertIn('sandbox_gpio', scan._drivers) self.assertIn('sandbox_gpio_alias', scan._driver_aliases)
@@ -59,8 +59,7 @@ class TestSrcScan(unittest.TestCase): def test_additional(self): """Test with additional drivers to scan""" scan = src_scan.Scanner( - None, True, - [None, '', 'tools/dtoc/test/dtoc_test_scan_drivers.cxx']) + None, [None, '', 'tools/dtoc/test/dtoc_test_scan_drivers.cxx']) scan.scan_drivers() self.assertIn('sandbox_gpio_alias2', scan._driver_aliases) self.assertEqual('sandbox_gpio',
@@ -77,7 +76,7 @@ class TestSrcScan(unittest.TestCase): with open(driver_fn, 'wb+') as fout: fout.write(b'\x81') - scan = src_scan.Scanner(None, True, [driver_fn]) + scan = src_scan.Scanner(None, [driver_fn]) with test_util.capture_sys_output() as (stdout, _): scan.scan_drivers() self.assertRegex(stdout.getvalue(),
@@ -126,7 +125,7 @@ class TestSrcScan(unittest.TestCase): # Mock out scan_driver and check that it is called with the # expected files with mock.patch.object(src_scan.Scanner, "scan_driver") as mocked: - scan = src_scan.Scanner(indir, True, None) + scan = src_scan.Scanner(indir, None) scan.scan_drivers() self.assertEqual(2, len(mocked.mock_calls)) self.assertEqual(mock.call(fname_list[0]),
@@ -141,7 +140,7 @@ class TestSrcScan(unittest.TestCase): """Test scanning of a driver""" fname = os.path.join(OUR_PATH, '..', '..', 'drivers/i2c/tegra_i2c.c') buff = tools.ReadFile(fname, False) - scan = src_scan.Scanner(None, False, None) + scan = src_scan.Scanner(None, None) scan._parse_driver(fname, buff) self.assertIn('i2c_tegra', scan._drivers) drv = scan._drivers['i2c_tegra']
@@ -165,14 +164,15 @@ class TestSrcScan(unittest.TestCase): # get_normalized_compat_name() uses this to check for root node node.parent = FakeNode() - scan = src_scan.Scanner(None, False, None) + scan = src_scan.Scanner(None, None) with test_util.capture_sys_output() as (stdout, _): name, aliases = scan.get_normalized_compat_name(node) self.assertEqual('rockchip_rk3288_grf', name) self.assertEqual([], aliases) - self.assertEqual( - 'WARNING: the driver rockchip_rk3288_grf was not found in the driver list', - stdout.getvalue().strip()) + self.assertEqual(1, len(scan._missing_drivers)) + self.assertEqual({'rockchip_rk3288_grf'}, scan._missing_drivers) + #'WARNING: the driver rockchip_rk3288_grf was not found in the driver list', + #stdout.getvalue().strip()) i2c = 'I2C_UCLASS' compat = {'rockchip,rk3288-grf': 'ROCKCHIP_SYSCON_GRF',
@@ -211,7 +211,7 @@ U_BOOT_DRIVER(i2c_tegra) = { .of_match = tegra_i2c_ids, }; ''' - scan = src_scan.Scanner(None, False, None) + scan = src_scan.Scanner(None, None) with self.assertRaises(ValueError) as exc: scan._parse_driver('file.c', buff) self.assertIn(
@@ -232,7 +232,7 @@ U_BOOT_DRIVER(i2c_tegra) = { .of_match = of_match_ptr(tegra_i2c_ids), }; ''' - scan = src_scan.Scanner(None, False, None) + scan = src_scan.Scanner(None, None) scan._parse_driver('file.c', buff) self.assertIn('i2c_tegra', scan._drivers) drv = scan._drivers['i2c_tegra']
@@ -261,7 +261,7 @@ U_BOOT_DRIVER(testing) = { DM_HEADER(<asm/clk.h>) }; ''' - scan = src_scan.Scanner(None, False, None) + scan = src_scan.Scanner(None, None) scan._parse_driver('file.c', buff) self.assertIn('testing', scan._drivers) drv = scan._drivers['testing']
@@ -293,7 +293,7 @@ UCLASS_DRIVER(i2c) = { }; ''' - scan = src_scan.Scanner(None, False, None) + scan = src_scan.Scanner(None, None) scan._parse_uclass_driver('file.c', buff) self.assertIn('UCLASS_I2C', scan._uclass) drv = scan._uclass['UCLASS_I2C']
@@ -325,7 +325,7 @@ UCLASS_DRIVER(i2c) = { }; ''' - scan = src_scan.Scanner(None, False, None) + scan = src_scan.Scanner(None, None) with self.assertRaises(ValueError) as exc: scan._parse_uclass_driver('file.c', buff) self.assertIn("file.c: Cannot parse uclass ID in driver 'i2c'",
@@ -340,7 +340,7 @@ struct some_struct1 { uint nmsgs; }; ''' - scan = src_scan.Scanner(None, False, None) + scan = src_scan.Scanner(None, None) scan._basedir = os.path.join(OUR_PATH, '..', '..') scan._parse_structs('arch/arm/include/asm/file.h', buff) self.assertIn('some_struct1', scan._structs)
@@ -371,7 +371,7 @@ struct another_struct { output = tools.GetOutputFilename('output.h') tools.WriteFile(output, b'struct this is a test \x81 of bad unicode') - scan = src_scan.Scanner(None, False, None) + scan = src_scan.Scanner(None, None) with test_util.capture_sys_output() as (stdout, _): scan.scan_header(output) self.assertIn('due to unicode error', stdout.getvalue())
@@ -411,7 +411,7 @@ U_BOOT_DRIVER(%s) = { .of_match = test_ids, }; ''' % name - scan = src_scan.Scanner(None, False, None, phase) + scan = src_scan.Scanner(None, None, phase) scan._parse_driver('file1.c', driver1) self.assertIn(name, scan._drivers) drv1 = scan._drivers[name]
@@ -476,7 +476,7 @@ U_BOOT_DRIVER(%s) = { def test_sequence(self): """Test assignment of sequence numnbers""" - scan = src_scan.Scanner(None, False, None, '') + scan = src_scan.Scanner(None, None, '') node = FakeNode() uc = src_scan.UclassDriver('UCLASS_I2C') node.uclass = uc
Signature · 1 line
2.31.0.291.g576ba9dcdaf-goog
PATCH v2 1/6 dtoc: Show driver warnings once at the end
At present warnings are shown as soon as they are discovered in the source scannner. But the function that detects them may be called multiple times.
Collect all the warnings and show them at the end.
---
(no changes since v1)
tools/dtoc/dtb_platdata.py | 6 ++++-- tools/dtoc/src_scan.py | 15 +++++++++------ tools/dtoc/test_dtoc.py | 2 +- tools/dtoc/test_src_scan.py | 38 ++++++++++++++++++------------------- 4 files changed, 33 insertions(+), 28 deletions(-)
Applied to u-boot-dm, thanks!
PATCH v2 2/6 dtoc: Adjust detection of 64-bit properties
In reply to Simon GlassAt present an empty size is considered to be a 64-bit value. This does not seem useful and wastes space. Limit the 64-bit detection to where one or both of the addr/size is two cells or more.
---
Changes in v2:
- Add new patch to adjust detection of 64-bit properties
tools/dtoc/dtb_platdata.py | 6 +++--- tools/dtoc/test_dtoc.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)
tools/dtoc/dtb_platdata.py +3 -3
@@ -467,6 +467,8 @@ class DtbPlatdata(): if reg.type != fdt.Type.INT: raise ValueError("Node '%s' reg property is not an int" % node.name) + if not isinstance(reg.value, list): + reg.value = [reg.value] if len(reg.value) % total: raise ValueError( "Node '%s' reg property has %d cells "
@@ -474,13 +476,11 @@ class DtbPlatdata(): (node.name, len(reg.value), num_addr, num_size)) reg.num_addr = num_addr reg.num_size = num_size - if num_addr != 1 or num_size != 1: + if num_addr > 1 or num_size > 1: reg.type = fdt.Type.INT64 i = 0 new_value = [] val = reg.value - if not isinstance(val, list): - val = [val] while i < len(val): addr = fdt_util.fdt_cells_to_cpu(val[i:], reg.num_addr) i += num_addr
tools/dtoc/test_dtoc.py +3 -3
@@ -293,7 +293,7 @@ struct dtd_sandbox_i2c { }; struct dtd_sandbox_pmic { \tbool\t\tlow_power; -\tfdt64_t\t\treg[2]; +\tfdt32_t\t\treg[1]; }; struct dtd_sandbox_spl_test { \tconst char * acpi_name;
@@ -341,7 +341,7 @@ U_BOOT_DRVINFO(i2c_at_0) = { */ static struct dtd_sandbox_pmic dtv_pmic_at_9 = { \t.low_power\t\t= true, -\t.reg\t\t\t= {0x9, 0x0}, +\t.reg\t\t\t= {0x9}, }; U_BOOT_DRVINFO(pmic_at_9) = { \t.name\t\t= "sandbox_pmic",
@@ -721,7 +721,7 @@ struct dm_test_pdata __attribute__ ((section (".priv_data"))) \t.dtplat = { \t\t.ping_add\t\t= 0x5, \t\t.ping_expect\t\t= 0x5, -\t\t.reg\t\t\t= {0x5, 0x0}, +\t\t.reg\t\t\t= {0x5}, \t}, }; #include <dm/test.h>
Signature · 1 line
2.31.0.291.g576ba9dcdaf-goog
PATCH v2 2/6 dtoc: Adjust detection of 64-bit properties
At present an empty size is considered to be a 64-bit value. This does not seem useful and wastes space. Limit the 64-bit detection to where one or both of the addr/size is two cells or more.
---
Changes in v2:
- Add new patch to adjust detection of 64-bit properties
tools/dtoc/dtb_platdata.py | 6 +++--- tools/dtoc/test_dtoc.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)
Applied to u-boot-dm, thanks!
PATCH v2 3/6 dtoc: Improve handling of reg properties
In reply to Simon GlassThis existing code assumes that a reg property is larger than one cell, but this is not always the case. Fix this assumption.
Also if a node's parent is missing the #address-cells and #size-cells properties we use 2 as a default for each. But this should not happen in practice. More likely the properties were removed for SPL due to there being no 'u-boot,dm-pre-reloc' property, or similar. Add a warning for this as the failure can be very confusing.
---
Changes in v2:
- Drop the reg_val temporary var
- Add two new tests
tools/dtoc/dtb_platdata.py | 8 +++++-- tools/dtoc/test/dtoc_test_noprops.dts | 21 +++++++++++++++++ tools/dtoc/test/dtoc_test_single_reg.dts | 30 ++++++++++++++++++++++++ tools/dtoc/test_dtoc.py | 17 +++++++++++++- 4 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 tools/dtoc/test/dtoc_test_noprops.dts create mode 100644 tools/dtoc/test/dtoc_test_single_reg.dts
tools/dtoc/dtb_platdata.py +6 -2
@@ -440,6 +440,9 @@ class DtbPlatdata(): Number of size cells for this node """ parent = node.parent + if parent and not parent.props: + raise ValueError("Parent node '%s' has no properties - do you need u-boot,dm-spl or similar?" % + parent.path) num_addr, num_size = 2, 2 if parent: addr_prop = parent.props.get('#address-cells')
@@ -471,9 +474,10 @@ class DtbPlatdata(): reg.value = [reg.value] if len(reg.value) % total: raise ValueError( - "Node '%s' reg property has %d cells " + "Node '%s' (parent '%s') reg property has %d cells " 'which is not a multiple of na + ns = %d + %d)' % - (node.name, len(reg.value), num_addr, num_size)) + (node.name, node.parent.name, len(reg.value), num_addr, + num_size)) reg.num_addr = num_addr reg.num_size = num_size if num_addr > 1 or num_size > 1:
tools/dtoc/test/dtoc_test_noprops.dts new file +21 -0
@@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Test device tree file for dtoc + * + * Copyright 2017 Google, Inc + */ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + i2c at 0 { + pmic at 9 { + compatible = "sandbox,pmic"; + u-boot,dm-pre-reloc; + reg = <9>; + low-power; + }; + }; +};
tools/dtoc/test/dtoc_test_single_reg.dts new file +30 -0
@@ -0,0 +1,30 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Test device tree file for dtoc + * + * Copyright 2017 Google, Inc + */ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + i2c at 0 { + compatible = "sandbox,i2c"; + u-boot,dm-pre-reloc; + #address-cells = <1>; + #size-cells = <0>; + pmic at 9 { + compatible = "sandbox,pmic"; + u-boot,dm-pre-reloc; + reg = <9>; + low-power; + + gpio { + compatible = "sandbox,gpio"; + }; + }; + }; +};
tools/dtoc/test_dtoc.py +16 -1
@@ -1462,7 +1462,7 @@ U_BOOT_DRVINFO(test3) = { with self.assertRaises(ValueError) as exc: self.run_test(['struct'], dtb_file, output) self.assertIn( - "Node 'spl-test' reg property has 3 cells which is not a multiple of na + ns = 1 + 1)", + "Node 'spl-test' (parent '/') reg property has 3 cells which is not a multiple of na + ns = 1 + 1)", str(exc.exception)) def test_add_prop(self):
@@ -1824,3 +1824,18 @@ U_BOOT_DRVINFO(spl_test2) = { self.assertEqual( 'Warning: Cannot find header file for struct dm_test_uc_priv', stdout.getvalue().strip()) + + def test_missing_props(self): + """Test detection of a parent node with no properties""" + dtb_file = get_dtb_file('dtoc_test_noprops.dts', capture_stderr=True) + output = tools.GetOutputFilename('output') + with self.assertRaises(ValueError) as exc: + self.run_test(['struct'], dtb_file, output) + self.assertIn("Parent node '/i2c at 0' has no properties - do you need", + str(exc.exception)) + + def test_single_reg(self): + """Test detection of a parent node with no properties""" + dtb_file = get_dtb_file('dtoc_test_single_reg.dts') + output = tools.GetOutputFilename('output') + self.run_test(['struct'], dtb_file, output)
Signature · 1 line
2.31.0.291.g576ba9dcdaf-goog
PATCH v2 3/6 dtoc: Improve handling of reg properties
This existing code assumes that a reg property is larger than one cell, but this is not always the case. Fix this assumption.
Also if a node's parent is missing the #address-cells and #size-cells properties we use 2 as a default for each. But this should not happen in practice. More likely the properties were removed for SPL due to there being no 'u-boot,dm-pre-reloc' property, or similar. Add a warning for this as the failure can be very confusing.
---
Changes in v2:
- Drop the reg_val temporary var
- Add two new tests
tools/dtoc/dtb_platdata.py | 8 +++++-- tools/dtoc/test/dtoc_test_noprops.dts | 21 +++++++++++++++++ tools/dtoc/test/dtoc_test_single_reg.dts | 30 ++++++++++++++++++++++++ tools/dtoc/test_dtoc.py | 17 +++++++++++++- 4 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 tools/dtoc/test/dtoc_test_noprops.dts create mode 100644 tools/dtoc/test/dtoc_test_single_reg.dts
Applied to u-boot-dm, thanks!
PATCH v2 4/6 log: Fix up debug_cond() when LOG is enabled
In reply to Simon GlassAt present debug() statements can cause debuf output to appear when LOG is enabled but DEBUG is not. This is not intended and it seems that the condition is wrong.
Fix it.
---
(no changes since v1)
include/log.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
include/log.h +7 -4
@@ -234,11 +234,14 @@ int _log_buffer(enum log_category_t cat, enum log_level_t level,#define _SPL_BUILD 0#endif -#if !_DEBUG &&CONFIG_IS_ENABLED (LOG ) +#if CONFIG_IS_ENABLED (LOG ) -#define debug_cond(cond, fmt, args...) \ -({ \ - log(LOG_CATEGORY, LOGL_DEBUG, fmt, ##args); \ +#define debug_cond(cond, fmt, args...) \ +({ \ + if (cond) \ + log(LOG_CATEGORY, \ + (enum log_level_t)(LOGL_FORCE_DEBUG | _LOG_DEBUG), \ + fmt, ##args); \ })#else /* _DEBUG */
Signature · 1 line
2.31.0.291.g576ba9dcdaf-goog
PATCH v2 4/6 log: Fix up debug_cond() when LOG is enabled
At present debug() statements can cause debuf output to appear when LOG is enabled but DEBUG is not. This is not intended and it seems that the condition is wrong.
Fix it.
---
(no changes since v1)
include/log.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
Applied to u-boot-dm, thanks!
PATCH v2 5/6 moveconfig: Handle binary files cleanly
In reply to Simon GlassSome files are not actually source code and thus can produce unicode errors. Report this and continue.
---
(no changes since v1)
tools/moveconfig.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)
tools/moveconfig.py +14 -2
@@ -12,6 +12,10 @@ config options from headers to Kconfig (defconfig). This tool intends to help this tremendous work. +Installing +---------- + +You may need to install 'python3-asteval' for the 'asteval' module. Usage -----
@@ -573,7 +577,11 @@ def cleanup_empty_blocks(header_path, options): """ pattern = re.compile(r'^\s*#\s*if.*$\n^\s*#\s*endif.*$\n*', flags=re.M) with open(header_path) as f: - data = f.read() + try: + data = f.read() + except UnicodeDecodeError as e: + print("Failed on file %s': %s" % (header_path, e)) + return new_data = pattern.sub('\n', data)
@@ -596,7 +604,11 @@ def cleanup_one_header(header_path, patterns, options): options: option flags. """ with open(header_path) as f: - lines = f.readlines() + try: + lines = f.readlines() + except UnicodeDecodeError as e: + print("Failed on file %s': %s" % (header_path, e)) + return matched = [] for i, line in enumerate(lines):
Signature · 1 line
2.31.0.291.g576ba9dcdaf-goog
PATCH v2 5/6 moveconfig: Handle binary files cleanly
Some files are not actually source code and thus can produce unicode errors. Report this and continue.
---
(no changes since v1)
tools/moveconfig.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)
Applied to u-boot-dm, thanks!
PATCH v2 6/6 Convert CONFIG_MISC_INIT_F to Kconfig
In reply to Simon GlassThis converts the following to Kconfig:
CONFIG_MISC_INIT_F
---
(no changes since v1)
common/Kconfig | 6 ++++++ configs/MPC8349ITXGP_defconfig | 1 + configs/MPC8349ITX_LOWBOOT_defconfig | 1 + configs/MPC8349ITX_defconfig | 1 + configs/kmcoge4_defconfig | 1 + configs/sandbox64_defconfig | 2 +- configs/sandbox_defconfig | 1 + configs/sandbox_flattree_defconfig | 2 +- configs/sandbox_spl_defconfig | 2 ++ configs/tools-only_defconfig | 1 + include/configs/MPC8349ITX.h | 2 -- include/configs/kmp204x.h | 2 -- include/configs/sandbox.h | 2 -- scripts/config_whitelist.txt | 1 - 14 files changed, 16 insertions(+), 9 deletions(-)
common/Kconfig +6 -0
@@ -527,6 +527,12 @@ config LAST_STAGE_INIT U-Boot calls last_stage_init() before the command-line interpreter is started. +config MISC_INIT_F + bool "Execute pre-relocation misc init" + help + Enabling this option calls the 'misc_init_f' function in the init + sequence just before DRAM is inited. + config MISC_INIT_R bool "Execute Misc Init" default y if ARCH_KEYSTONE || ARCH_SUNXI || MPC85xx
configs/MPC8349ITXGP_defconfig +1 -0
@@ -154,6 +154,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SYS_TEXT_BASE=0xFE000000" CONFIG_BOOTDELAY=6 CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="root=/dev/nfs rw nfsroot=:/nfsroot/rootfs ip=::::mpc8349emitxgp:eth0:off console=ttyS0,115200" +CONFIG_MISC_INIT_F=y CONFIG_MISC_INIT_R=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="MPC8349E-mITX-GP> "
configs/MPC8349ITX_LOWBOOT_defconfig +1 -0
@@ -153,6 +153,7 @@ CONFIG_OF_STDOUT_VIA_ALIAS=y CONFIG_BOOTDELAY=6 CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="root=/dev/nfs rw nfsroot=:/nfsroot/rootfs ip=::::mpc8349emitx:eth0:off console=ttyS0,115200" +CONFIG_MISC_INIT_F=y CONFIG_MISC_INIT_R=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="MPC8349E-mITX> "
configs/MPC8349ITX_defconfig +1 -0
@@ -152,6 +152,7 @@ CONFIG_OF_STDOUT_VIA_ALIAS=y CONFIG_BOOTDELAY=6 CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="root=/dev/nfs rw nfsroot=:/nfsroot/rootfs ip=::::mpc8349emitx:eth0:off console=ttyS0,115200" +CONFIG_MISC_INIT_F=y CONFIG_MISC_INIT_R=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="MPC8349E-mITX> "
configs/kmcoge4_defconfig +1 -0
@@ -20,6 +20,7 @@ CONFIG_AUTOBOOT_STOP_STR=" " CONFIG_BOARD_EARLY_INIT_F=y CONFIG_BOARD_EARLY_INIT_R=y CONFIG_LAST_STAGE_INIT=y +CONFIG_MISC_INIT_F=y CONFIG_HUSH_PARSER=y CONFIG_CMD_ASKENV=y CONFIG_CMD_GREPENV=y
configs/sandbox64_defconfig +1 -1
@@ -20,8 +20,8 @@ CONFIG_BOOTSTAGE_STASH_SIZE=0x4096 CONFIG_CONSOLE_RECORD=y CONFIG_CONSOLE_RECORD_OUT_SIZE=0x1000 CONFIG_PRE_CONSOLE_BUFFER=y -CONFIG_LOG_SYSLOG=y CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_MISC_INIT_F=y CONFIG_CMD_CPU=y CONFIG_CMD_LICENSE=y CONFIG_CMD_BOOTZ=y
configs/sandbox_defconfig +1 -0
@@ -25,6 +25,7 @@ CONFIG_LOG=y CONFIG_LOG_SYSLOG=y CONFIG_LOG_ERROR_RETURN=y CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_MISC_INIT_F=y CONFIG_ANDROID_AB=y CONFIG_CMD_CPU=y CONFIG_CMD_LICENSE=y
configs/sandbox_flattree_defconfig +1 -1
@@ -17,8 +17,8 @@ CONFIG_BOOTSTAGE_STASH=y CONFIG_BOOTSTAGE_STASH_SIZE=0x4096 CONFIG_CONSOLE_RECORD=y CONFIG_CONSOLE_RECORD_OUT_SIZE=0x1000 -CONFIG_LOG_SYSLOG=y CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_MISC_INIT_F=y CONFIG_CMD_CPU=y CONFIG_CMD_LICENSE=y CONFIG_CMD_BOOTZ=y
configs/sandbox_spl_defconfig +2 -0
@@ -11,6 +11,7 @@ CONFIG_SPL_SYS_MALLOC_F_LEN=0x8000 CONFIG_SPL=y CONFIG_BOOTSTAGE_STASH_ADDR=0x0 CONFIG_DEFAULT_DEVICE_TREE="sandbox" +CONFIG_TARGET_SANDBOX_SPL=y CONFIG_SANDBOX_SPL=y CONFIG_DEBUG_UART=y CONFIG_DISTRO_DEFAULTS=y
@@ -27,6 +28,7 @@ CONFIG_BOOTSTAGE_STASH_SIZE=0x4096 CONFIG_CONSOLE_RECORD=y CONFIG_CONSOLE_RECORD_OUT_SIZE=0x1000 CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_MISC_INIT_F=y CONFIG_HANDOFF=y CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_ENV_SUPPORT=y
configs/tools-only_defconfig +1 -0
@@ -4,6 +4,7 @@ CONFIG_DEFAULT_DEVICE_TREE="sandbox" CONFIG_ANDROID_BOOT_IMAGE=y CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y +CONFIG_MISC_INIT_F=y # CONFIG_CMD_BOOTD is not set # CONFIG_CMD_BOOTM is not set # CONFIG_CMD_ELF is not set
include/configs/MPC8349ITX.h +0 -2
@@ -39,8 +39,6 @@#ifndef __CONFIG_H#define __CONFIG_H -#define CONFIG_MISC_INIT_F -/* * On-board devices */
include/configs/kmp204x.h +0 -2
@@ -177,8 +177,6 @@ unsigned long get_board_sys_clk(unsigned long dummy);#define CONFIG_SYS_BR1_PRELIM CONFIG_SYS_QRIO_BR_PRELIM/* QRIO Base Address */ #define CONFIG_SYS_OR1_PRELIM CONFIG_SYS_QRIO_OR_PRELIM/* QRIO Options */ -#define CONFIG_MISC_INIT_F -#define CONFIG_HWCONFIG /* define to use L1 as initial stack */
include/configs/sandbox.h +0 -2
@@ -130,6 +130,4 @@#define CONFIG_SYS_SATA_MAX_DEVICE 2 -#define CONFIG_MISC_INIT_F -#endif
scripts/config_whitelist.txt +0 -1
@@ -1030,7 +1030,6 @@ CONFIG_MIPS_HUGE_TLB_SUPPORT CONFIG_MIPS_MT_FPAFF CONFIG_MIRQ_EN CONFIG_MISC_COMMON -CONFIG_MISC_INIT_F CONFIG_MIU_1BIT_INTERLEAVED CONFIG_MIU_2BIT_21_7_INTERLEAVED CONFIG_MIU_2BIT_INTERLEAVED
Signature · 1 line
2.31.0.291.g576ba9dcdaf-goog
PATCH v2 6/6 Convert CONFIG_MISC_INIT_F to Kconfig
This converts the following to Kconfig:
CONFIG_MISC_INIT_F
---
(no changes since v1)
common/Kconfig | 6 ++++++ configs/MPC8349ITXGP_defconfig | 1 + configs/MPC8349ITX_LOWBOOT_defconfig | 1 + configs/MPC8349ITX_defconfig | 1 + configs/kmcoge4_defconfig | 1 + configs/sandbox64_defconfig | 2 +- configs/sandbox_defconfig | 1 + configs/sandbox_flattree_defconfig | 2 +- configs/sandbox_spl_defconfig | 2 ++ configs/tools-only_defconfig | 1 + include/configs/MPC8349ITX.h | 2 -- include/configs/kmp204x.h | 2 -- include/configs/sandbox.h | 2 -- scripts/config_whitelist.txt | 1 - 14 files changed, 16 insertions(+), 9 deletions(-)
Applied to u-boot-dm, thanks!