summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-09-18dm: usb: Deal with USB keyboard persisting across testsSimon Glass
Clear any USB-keyboard devices before running a unit test, to avoid using a stale udevice pointer in stdio. Add a long comment to explain this situation and why this solution seems best, at least for now. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-18usb: Add DEV_FLAGS_DM to stdio for USB keyboardSimon Glass
This device contains a pointer to struct udevice so set the flag indicating that, just to be tidy. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-18log: Add a new log category for the consoleSimon Glass
Add a new category which covers the console, including the stdio drivers. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-18usb: Drop old non-DM codeSimon Glass
The driver model deadline for USB was in 2019, so drop the old USB keyboard code, to avoid needing to deal with the extra code path. Drop the unnecessary #ifdef around USB_KBD_BOOT_REPORT_SIZE while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-18bootstd: Create a function to reset USBSimon Glass
Set up a function for this, since it needs to be used from multiple test files. This test file is only used on sandbox, where USB is enabled, so drop the local declaration of usb_started Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-18scripts: Update pylint.baseSimon Glass
There have been quite a few changes in the Python scripts, so update the pylint baseline. This was created using: make pylint cp pylint.cur scripts/pylint.base Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-18test/py: Fix some pylint warnings in test_ut.pySimon Glass
Tidy up most of these warnings. Remaining are four of these: R0914: Too many local variables which can only by fixed by splitting things into functions, so that is left for another time. Part of this change was done by the flynt tool. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-18nvmxip: Avoid probing on bootSimon Glass
Devices should be probed when they are used, not before. Drop this boot-time probing. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-18nvmxip: Drop the message on probeSimon Glass
We should not need to announce this device. Drop the message. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-08-26test: Tidy up checking for console endSimon Glass
Use the ut_assert_console_end() function provided, rather than doing it separately. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-08-26test: Use UTF_CONSOLE in remaining testsSimon Glass
Set this flag rather than doing things manually in the test. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-08-26test: log: Use UTF_CONSOLE in testsSimon Glass
Set this flag rather than doing things manually in the test. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-08-26test: hush: Use UTF_CONSOLE in testsSimon Glass
Set this flag rather than doing things manually in the test. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-08-26test: dm: Use UTF_CONSOLE in testsSimon Glass
Set this flag rather than doing things manually in the test. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-08-26test: cmd: Drop unnecessary console_record_reset_enable()Simon Glass
It is seldom necessary to call this function. Drop its use in the command tests. Add a few extra checks to the wget test so that resetting is not needed. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-08-26test: cmd: Use UTF_CONSOLE in testsSimon Glass
Set this flag rather than doing things manually in the test. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-08-26test: fdt: Move common code into the setup functionsSimon Glass
Quite a lot of tests have the same two lines of code at the start. Move this into the two setup functions to reduce redundancy. Add a line to check the output from set_working_fdt_addr() since this is always emitted. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-08-26test: fdt: Check internal-function return valuesSimon Glass
Some functions are using asserts but the result of the functions themselves is not checked. This means that if a test fails, the result is not noticed until later, which can be confusing to debug. Add the missing asserts. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-08-26test: boot: Use UTF_CONSOLE in testsSimon Glass
Set this flag rather than doing things manually in the test. Drop unnecessary calls to console_record_reset_enable() Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-08-26test: bloblist: Use UTF_CONSOLE in testsSimon Glass
Set this flag rather than doing things manually in the test. Drop the code which is now unnecessary. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-08-26test: Update NAND test to avoid extra macrosSimon Glass
Write out the tests in full to allow the test to be found more easily when there is a failure. We could use a single test function with a for() loop but this would stop at the first failure, and some variations might while other pass. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-08-26mmc: Drop the blank line before accessesSimon Glass
Several mmc subcommand print a blank line before starting and after finishing. It isn't necessary to do both, so drop the first one. It is questionable whether these command should produce any output at all, but leave it for now. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-08-26test: Rename UTF_CONSOLE_REC to UTF_CONSOLESimon Glass
The _REC suffix doesn't add much. Really what we want to know is whether the test uses the console, so rename this flag. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-08-26test: Drop the blank line before test macrosSimon Glass
Most tests don't have this. It helps to keep the test declaration clearly associated with the function it relates to, rather than the next one in the file. Remove the extra blank line and mention this in the docs. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-08-26test: Rename unit-test flagsSimon Glass
The UT_TESTF_ macros read as 'unit test test flags' which is not right. Rename to UTF ('unit test flags'). This has the benefit of being shorter, which helps keep UNIT_TEST() declarations on a single line. Give the enum a name and reference it from the UNIT_TEST() macros while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-08-26test: Fail when an empty line is expected but not presentSimon Glass
The existing implementation of ut_assert_nextline_empty() cannot distinguish between an empty line and no line at all. It can in fact be called at the end of the recorded output and will happily return success. Adjust the logic so that this condition is detected. Show a failure message in this case. Fix the one test which falls foul of this fix. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 400175b0a7d ("test: Add a way to check each line of console...") Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-08-26buildman: Make test_process_limit handle time.monotonic()Simon Glass
Newer versions of filelock use time.monotonic() instead of time.time(). Update the test the handle this. It would be better if filelock had support for writing unit tests which use locking. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-08-22Merge branch 'master' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-samsung into next
2024-08-20Merge tag 'u-boot-dfu-next-20240820' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-dfu into next u-boot-dfu-next-20240820 - Migrate Atmel usb gadget to DM_USB_GADGET - More small cleanups/improvements on the atmel UDC driver - Change udc uclass name from "usb" -> "usb_gadget"
2024-08-20usb: gadget: udc: Fix duplicate uclass nameZixun LI
Currently both USB host uclass and USB gadget uclass are using the same name "usb" which break uclass functions like uclass_get_by_name(). Rename the uclass to "usb_gadget" to fix, also makes bind/unbind by class index (or sequence) working. This breaks the capacity of using "usb" as DT alias sequence numbering which needs a fix afterwards. Signed-off-by: Zixun LI <admin@hifiphile.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/all/20240802092820.917450-1-admin@hifiphile.com Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-08-19Merge tag 'v2024.10-rc3' into nextTom Rini
Prepare v2024.10-rc3
2024-08-19Prepare v2024.10-rc3v2024.10-rc3Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2024-08-19Merge patch series "clk: mediatek: mt7622: clk migration for OF_UPSTREAM"Tom Rini
Christian Marangi <ansuelsmth@gmail.com> says: These are all the required patches to migrate clk and correctly support OF_UPSTREAM. This will align the clk index to upstream to support the same clk implementation with downstream and upstream DTS.
2024-08-19clk: mediatek: mt7622: add missing A1/2SYS clock IDChristian Marangi
Add missing A1/2SYS clock ID just as a reference for OF_UPSTREAM support. These clocks are not defined and are not usable as current clock topckgen OPs doesn't support gates. These special node won't ever be used by uboot hence just add them for reference. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Tested-by: Frank Wunderlich <frank-w@public-files.de>
2024-08-19clk: mediatek: mt7622: add missing clock PERIBUS_SEL clockChristian Marangi
Add missing PERIBUS_SEL clock to match upstream linux clk ID order. Also convert pericfg to mux + gate implementation as now we have also mux on top of gates. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19clk: mediatek: mt7622: add missing clock PERI_UART4_PDChristian Marangi
Add missing clock PERI_UART4_PD for peri clock gates. This is needed to match upstream linux clk ID in preparation for OF_UPSTREAM. Also convert infracfg to mux + gate implementation as now we have mux on top of gates. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19clk: mediatek: mt7622: add missing clock MUX1_SELChristian Marangi
Add missing infra clock MUX1_SEL needed for CPU clock. This is needed to match the upstream clk ID order in preparation for OF_UPSTREAM. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19clk: mediatek: mt7622: add missing clock define for MAIN_CORE_ENChristian Marangi
Add missing clock for MAIN_CORE_EN. This is a special clock as it's a gate for the APMIXED clocks required as a parent for CPU clocks. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19clk: mediatek: mt7622: move INFRA_TRNG to the bottomChristian Marangi
Move INFRA_TRNG clock to the bottom of the clk ID to match upstream linux order. This is in preparation of OF_UPSTREAM. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19clk: mediatek: mt7622: rename AUDIO_AWB3 to AUDIO_AWB2Christian Marangi
Rename AUDIO_AWB3 to AUDIO_AWB2 to match upstream linux naming in preparation for OF_UPSTREAM support. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19clk: mediatek: mt7622: fix broken peri_cgs clk with XTAL parentsChristian Marangi
Fix broken peri_cgs clock with XTAL parents as they have wrong definition of the parent type. Correctly fix them and use CLK_PARENT_XTAL for them. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19Merge patch series "clk: mediatek: mt7986: clk migration for OF_UPSTREAM"Tom Rini
Christian Marangi <ansuelsmth@gmail.com> says: These are all the required patches to migrate clk and correctly support OF_UPSTREAM. This will align the clk index to upstream to support the same clk implementation with downstream and upstream DTS.
2024-08-19clk: mediatek: mt7986: rename CK to CLKChristian Marangi
Rename each entry from CK to CLK to match the include in upstream kernel linux. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Tested-by: Frank Wunderlich <frank-w@public-files.de>
2024-08-19clk: mediatek: mt7986: convert to unified infracfg gates + muxesChristian Marangi
Convert to infracfg gates + muxes implementation now that it's supported. Drop infracfg-ao nodes and rename all infracfg-ao clocks to infracfg. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19clk: mediatek: mt7986: replace infracfg ID with upstream linuxChristian Marangi
Replace infracfg clk ID with upstream linux version. The same format is used here with the factor first, then mux and then gates. To correctly reference the gates in clk_gate function, define the gates_offs value in clk_tree now that they are at an offset from mux and factor. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19clk: mediatek: mt7986: move INFRA_TRNG_CK to the bottom of the listChristian Marangi
Move INFRA_TRNG_CK to the bottom of the list to have a 1:1 match with upstream linux clock ID. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19clk: mediatek: mt7986: comment out CK_TOP_A_TUNER as not usedChristian Marangi
Comment out CK_TOP_A_TUNER as not used and not defined in upstream kernel linux. This is to permit support of OF_UPSTREAM and have a 1:1 match with upstream linux clock ID. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19clk: mediatek: mt7986: drop 1/1 spurious factor for topckgenChristian Marangi
Now that we can have advanced parent handling for mux, we can drop spurious topckgen 1/1 factor. This is in preparation to make the clk ID match the ID in upstream include for mt7986. Drop the factor entry from mt7986-clk.h and reference to them in mt7981.dtsi. Muxes and gates are updated to reference the apmixed clk following how it's done in upstream kernel linux. Add relevant clk type flag in clk_tree for apmixed. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19clk: mediatek: mt7986: reorder TOPCKGEN factor IDChristian Marangi
Reorder TOPCKGEN factor ID to put TOP_FACTOR first and then PLL. This is to match how it's done in upstream kernel linux and in preparation for OF_UPSTREAM support. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19clk: mediatek: mt7986: rename TOPCKGEN factor clock to upstream namingChristian Marangi
Rename TOPCKGEN factor clock to upstream neaming. Upstream kernel linux reference the factor clock for apmixedpll with the "pll" suffix. Align the naming to the upstream naming format in preparation for OF_UPSTREAM support. Also rename rtc clock to drop the CB_ as upstream doesn't have that. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>