summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ARM: dts: at91: at91sam9261ek: fix SPI unit address warningEugen Hristev2020-11-021-1/+1
| | | | | | w+arch/arm/dts/.at91sam9261ek.dtb.pre.tmp:124.15-144.7: Warning (spi_bus_reg): /ahb/apb/spi@fffc8000/tsc2046@0: SPI bus unit address format error, expected "2" Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
* ARM: dts: at91: vinco: fix I2C warning bus unit addressEugen Hristev2020-11-021-1/+1
| | | | | | w+arch/arm/dts/.at91-vinco.dtb.pre.tmp:131.18-134.7: Warning (i2c_bus_reg): /ahb/apb/i2c@f8024000/rtc@64: I2C bus unit address format error, expected "32" Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
* Prepare v2021.01-rc1v2021.01-rc1Tom Rini2020-10-281-3/+3
| | | | Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge branch '2020-10-28-mux-driver-framework'Tom Rini2020-10-2821-1/+1461
|\ | | | | | | - Add a framework for mux drivers
| * test: mux-cmd: Add tests for the 'mux' commandWIP/2020-10-28-mux-driver-frameworkPratyush Yadav2020-10-283-0/+179
| | | | | | | | | | | | | | | | Tests tests run the three mux subcommands: list, select, and deselect, and verify that the commands do what we expect. Signed-off-by: Pratyush Yadav <p.yadav@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * cmd: Add a mux commandPratyush Yadav2020-10-283-0/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This command lets the user list, select, and deselect mux controllers introduced with the mux framework on the fly. It has 3 subcommands: list, select, and deselect. List: Lists all the mux present on the system. The muxes are listed for each chip. The chip is identified by its device name. Each chip can have a number of mux controllers. Each is listed in sequence and is assigned a sequential ID based on its position in the mux chip. It lists details like ID, whether the mux is currently selected or not, the current state, the idle state, and the number of states. A sample output would look something like: => mux list a-mux-controller: ID Selected Current State Idle State Num States 0 no unknown as-is 0x4 1 no 0x2 0x2 0x10 2 no 0x73 0x73 0x100 another-mux-controller: ID Selected Current State Idle State Num States 0 no 0x1 0x1 0x4 1 no 0x2 0x2 0x4 Select: Selects a given mux and puts it in the specified state. This subcommand takes 3 arguments: mux chip, mux ID, state to set the mux in. The arguments mux chip and mux ID are used to identify which mux needs to be selected, and then it is selected to the given state. The mux needs to be deselected before it can be selected again in another state. The state should be a hexadecimal number. For example: => mux list a-mux-controller: ID Selected Current State Idle State Num States 0 no 0x1 0x1 0x4 1 no 0x1 0x1 0x4 => mux select a-mux-controller 0 0x3 => mux list a-mux-controller: ID Selected Current State Idle State Num States 0 yes 0x3 0x1 0x4 1 no 0x1 0x1 0x4 Deselect: Deselects a given mux and puts it in its idle state. This subcommand takes 2 arguments: the mux chip and mux ID to identify which mux needs to be deselected. So in the above example, we can deselect mux 0 using: => mux deselect a-mux-controller 0 => mux list a-mux-controller: ID Selected Current State Idle State Num States 0 no 0x1 0x1 0x4 1 no 0x1 0x1 0x4 Signed-off-by: Pratyush Yadav <p.yadav@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * test: Add tests for the multiplexer frameworkJean-Jacques Hiblot2020-10-285-0/+280
| | | | | | | | | | | | | | | | | | | | | | | | Provide tests to check the behavior of the multiplexer framework. Two sets of tests are added. One is using an emulated multiplexer driver that can be used to test basic functionality like select, deselect, etc. The other is using the mmio mux which adds tests specific to it. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Signed-off-by: Pratyush Yadav <p.yadav@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * Kconfig: Increase the pre-relocation memoryPratyush Yadav2020-10-281-1/+1
| | | | | | | | | | | | | | | | The memory is close to full and adding a syscon node in test.dts makes it go over the limit and makes malloc() fail on startup. Signed-off-by: Pratyush Yadav <p.yadav@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * drivers: mux: mmio-based syscon mux controllerJean-Jacques Hiblot2020-10-283-0/+157
| | | | | | | | | | | | | | | | | | | | This adds a driver for mmio-based syscon multiplexers controlled by bitfields in a syscon register range. This is heavily based on the linux mmio-mux driver. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
| * dm: board: complete the initialization of the muxes in initr_dm()Jean-Jacques Hiblot2020-10-283-0/+47
| | | | | | | | | | | | | | | | | | This will probe the multiplexer devices that have a "u-boot,mux-autoprobe" property. As a consequence they will be put in their idle state. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
| * drivers: Add a new framework for multiplexer devicesJean-Jacques Hiblot2020-10-289-0/+606
|/ | | | | | | | | | | | Add a new subsystem that handles multiplexer controllers. The API is the same as in Linux. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Pratyush Yadav <p.yadav@ti.com> [trini: Update some error calls to use different functions or pass correct arguments] Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge tag 'efi-2021-01-rc2' of ↵WIP/28Oct2020Tom Rini2020-10-288-8/+121
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2021-01-rc2 A software RTC driver is supplied for UEFI SCT testing. The following UEFI related bugs are fixed: * correct handling of daylight saving time in GetTime() and SetTime() * handling of the gd register in function tracing on RISC-V * disable U-Boot devices in ExitBootServices()
| * efi_loader: daylight saving timeHeinrich Schuchardt2020-10-271-3/+16
| | | | | | | | | | | | | | Adjust the SetTime() and GetTime() runtime services to correctly convert the daylight saving time information when communicating with the RTC. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * efi_loader: Disable devices before handing over controlIlias Apalodimas2020-10-271-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | U-Boot Driver Model is supposed to remove devices with either DM_REMOVE_ACTIVE_DMA or DM_REMOVE_OS_PREPARE flags set, before exiting. Our bootm command does that by explicitly calling calling "dm_remove_devices_flags(DM_REMOVE_ACTIVE_ALL);" and we also disable any USB devices. The EFI equivalent is doing none of those at the moment. As a result probing an fTPM driver now renders it unusable in Linux. During our (*probe) callback we open a session with OP-TEE, which is supposed to close with our (*remove) callback. Since the (*remove) is never called, once we boot into Linux and try to probe the device again we are getting a busy error response. Moreover all uclass (*preremove) functions won't run. So let's fix this by mimicking what bootm does and disconnect devices when efi_exit_boot_services() is called. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * efi_loader: Sort header file orderingIlias Apalodimas2020-10-271-4/+3
| | | | | | | | | | | | | | | | Order header files according to https://www.denx.de/wiki/U-Boot/CodingStyle Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * trace: conserve gd register on RISC-VHeinrich Schuchardt2020-10-271-1/+1
| | | | | | | | | | | | | | | | | | | | An UEFI application may change the value of the register that gd lives in. But some of our functions like get_ticks() access this register. So we have to set the gd register to the U-Boot value when entering a trace point and set it back to the application value when exiting the trace point. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * rtc: provide an emulated RTCHeinrich Schuchardt2020-10-274-0/+93
| | | | | | | | | | | | | | | | | | | | | | On a board without hardware clock this software real time clock can be used. The build time is used to initialize the RTC. So you will have to adjust the time either manually using the 'date' command or use the 'sntp' to update the RTC with the time from a network time server. See CONFIG_CMD_SNTP and CONFIG_BOOTP_NTPSERVER. The RTC time is advanced according to CPU ticks. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * Makefile: provide constant with seconds since epochHeinrich Schuchardt2020-10-271-0/+2
| | | | | | | | | | | | | | | | Provide a constant U_BOOT_EPOCH with the number of seconds since 1970-01-01. This constant can be used to initialize a software real time clock until it is updated via the 'sntp' command. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* | Merge branch '2020-10-27-further-log-enhancements'Tom Rini2020-10-286-12/+112
|\ \ | |/ |/| | | | | - Allow for log message continuation. - Test fix, build time error checking for new categories
| * log: correct and check array size of log categoriesWIP/2020-10-27-further-log-enhancementsHeinrich Schuchardt2020-10-271-2/+8
| | | | | | | | | | | | | | | | | | | | | | The log command has led to NULL dereferences if an unknown category name name was used due to missing entries in the list of category names. Add compile time checks for the array sizes of log_cat_name and log_lvl_name to avoid future mishaps. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
| * test: log: test message continuationHeinrich Schuchardt2020-10-272-1/+55
| | | | | | | | | | | | | | | | Provide a unit test checking that a continuation message will use the same log level and log category as the previous message. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
| * log: allow for message continuationHeinrich Schuchardt2020-10-274-5/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some drivers use macro pr_cont() for continuing a message sent via printk. Hence if we want to convert printk messaging to using the logging system, we must support continuation of log messages too. As pr_cont() does not provide a message level we need a means of remembering the last log level. With the patch a pseudo log level LOGL_CONT as well as a pseudo log category LOGC_CONT are introduced. Using these results in the application of the same log level and category as in the previous log message. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
| * log: move processing_msg to global dataHeinrich Schuchardt2020-10-272-4/+11
|/ | | | | | | | Replace the static variable processing_msg by a field in the global data. Make the field bool at it can only be true or false. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* nokia_rx51: re-enable CONSOLE_MUX and SYS_CONSOLE_IS_IN_ENVAnatolij Gustschin2020-10-271-0/+1
| | | | | | | | | With disabled legacy VIDEO option CONSOLE_MUX is not auto-selected any more, re-enable it. Fixes: 9dec5a0ea130 ("nokia_rx51: disable obsolete VIDEO config") Signed-off-by: Anatolij Gustschin <agust@denx.de> Reviewed-by: Pali Rohár <pali@kernel.org>
* Merge tag 'video-for-2021.01-rc1' of ↵WIP/26Oct2020Tom Rini2020-10-2650-74/+75
|\ | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-video - disable CONFIG_VIDEO to remove DM conversion warnings for boards: at91sam9, eb_cpu5282, ls1021aqds, ls1021atwr, mx23evk, mx6sxsabresd, mx7dsabresd, nokia_rx51, picosam9g45, sansa_fuze_plus, xfi3
| * nokia_rx51: disable obsolete VIDEO configAnatolij Gustschin2020-10-262-2/+2
| | | | | | | | | | | | | | Disable VIDEO config to fix DM_VIDEO conversion deadline warning. Signed-off-by: Anatolij Gustschin <agust@denx.de>
| * eb_cpu5282: fix CONFIG_DM_VIDEO build warningsAnatolij Gustschin2020-10-267-14/+15
| | | | | | | | | | | | | | Remove CONFIG_VIDEO dependency to fix board removal warnings. Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Jens Scharsig <esw@bus-elektronik.de>
| * sansa_fuze_plus: disable obsolete VIDEO configAnatolij Gustschin2020-10-261-1/+1
| | | | | | | | | | | | | | DM_VIDEO conversion deadline has passed, disable VIDEO config. Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com>
| * xfi3: disable obsolete VIDEO configAnatolij Gustschin2020-10-261-1/+1
| | | | | | | | | | | | | | DM_VIDEO conversion deadline has passed, disable VIDEO config. Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com>
| * mx23evk: disable obsolete VIDEO configAnatolij Gustschin2020-10-261-1/+1
| | | | | | | | | | | | | | DM_VIDEO conversion deadline has passed, disable VIDEO config. Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Otavio Salvador <otavio@ossystems.com.br>
| * at91sam9n12ek: disable obsolete VIDEO configAnatolij Gustschin2020-10-263-3/+3
| | | | | | | | | | | | | | | | | | DM_VIDEO conversion deadline has passed, disable VIDEO config. Boards should convert to DM_VIDEO if they need video console support. Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Eugen Hristev <eugen.hristev@microchip.com>
| * at91sam9: disable obsolete VIDEO configAnatolij Gustschin2020-10-2616-16/+16
| | | | | | | | | | | | DM_VIDEO conversion deadline has passed, disable VIDEO config. Signed-off-by: Anatolij Gustschin <agust@denx.de>
| * picosam9g45: disable obsolete VIDEO configAnatolij Gustschin2020-10-261-1/+1
| | | | | | | | | | | | | | DM_VIDEO conversion deadline has passed, disable VIDEO config. Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Erik van Luijk <evanluijk@interact.nl>
| * ls1021atwr: disable obsolete VIDEO configAnatolij Gustschin2020-10-267-14/+14
| | | | | | | | | | | | DM_VIDEO conversion deadline has passed, disable VIDEO config. Signed-off-by: Anatolij Gustschin <agust@denx.de>
| * ls1021aqds: disable obsolete VIDEO configAnatolij Gustschin2020-10-269-18/+18
| | | | | | | | | | | | | | DM_VIDEO conversion deadline has passed, disable VIDEO config. Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Alison Wang <alison.wang@nxp.com>
| * imx: mx7dsabresd: disable obsolete VIDEO configAnatolij Gustschin2020-10-262-2/+2
| | | | | | | | | | | | DM_VIDEO conversion deadline has passed, disable VIDEO config. Signed-off-by: Anatolij Gustschin <agust@denx.de>
| * imx: mx6sxsabresd: disable obsolete VIDEO configAnatolij Gustschin2020-10-261-1/+1
| | | | | | | | | | | | DM_VIDEO conversion deadline has passed, disable VIDEO config. Signed-off-by: Anatolij Gustschin <agust@denx.de>
* | Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-riscvTom Rini2020-10-2612-54/+66
|\ \ | |/ |/| | | | | | | | | | | - No need to check before free in kendryte clk. - Only enable OF_BOARD_FIXUP if U-Boot is configured for S-Mode. - Reduce k210 dts DMA block size - Move timers into drivers/timer - Correct fu540 dts reg size of clint node
| * riscv: fu540: dts: Correct reg size of clint nodePragnesh Patel2020-10-261-1/+1
| | | | | | | | | | | | Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com> Reviewed-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Rick Chen <rick@andestech.com>
| * riscv: Move timer portions of SiFive CLINT to drivers/timerSean Anderson2020-10-264-39/+51
| | | | | | | | | | | | | | | | | | | | | | | | Half of this driver is a DM-based timer driver, and half is RISC-V-specific IPI code. Move the timer portions in with the other timer drivers. The KConfig is not moved, since it also enables IPIs. It could also be split into two configs, but no boards use the timer but not the IPI atm, so I haven't split it. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Rick Chen <rick@andestech.com>
| * timer: Add _TIMER suffix to Andes PLMT KconfigSean Anderson2020-10-263-3/+3
| | | | | | | | | | | | | | | | This matches the naming scheme of other timer drivers. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Rick Chen <rick@andestech.com>
| * riscv: Move Andes PLMT driver to drivers/timerSean Anderson2020-10-266-8/+9
| | | | | | | | | | | | | | | | | | This is a regular timer driver, and should live with the other timer drivers. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Rick Chen <rick@andestech.com>
| * riscv: k210: Reduce DMA block sizeSean Anderson2020-10-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | Although the max DMA size supported by the hardware register is 22 bits (or 4M), the Linux driver for this device only supports transfers of up to 2M. On a device with 8M total memory, I don't think it will make too much of a difference. Reported-by: Damien Le Moal <Damien.LeMoal@wdc.com> Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Rick Chen <rick@andestech.com>
| * riscv: Only enable OF_BOARD_FIXUP for S-ModeSean Anderson2020-10-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is unsafe to enable OF_BOARD_FIXUP only based on OF_SEPARATE. OF_SEPARATE may indicate that the user wishes U-Boot to use a different device tree than one obtained via OF_PRIOR_STAGE. However, OF_SEPARATE may also indicate that the device tree which would be obtained via OF_PRIOR_STAGE is invalid, nonexistant, or otherwise unusable. In this latter case, enabling OF_BOARD_FIXUP will result in corruption of the device tree. To remedy this, only enable OF_BOARD_FIXUP if U-Boot is configured for S-Mode. Fixes: 1c17e55594a394ced7de88d91be294eaf8c564c1 Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Leo Liang <ycliang@andestech.com>
| * clk: kendryte: no need to check argument of free()Heinrich Schuchardt2020-10-261-2/+1
|/ | | | | | | free() checks if its argument is NULL. No need to check it twice. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Sean Anderson <seanga2@gmail.com>
* Merge branch '2020-10-23-misc-changes'Tom Rini2020-10-2466-182/+515
|\ | | | | | | | | | | | | | | | | Highlights: - Fix a problem with the bootm overlap tests - Remove duplicated code in fatwrite - Cleanup our current "misc" command code and add a new one for misc class devices. - Various GPIO fixes
| * power: regulator: add dummy helperWIP/2020-10-23-misc-changesPeng Fan2020-10-231-0/+114
| | | | | | | | | | | | | | Add dummy helper to enabling the header could be included when DM REGULATOR not enabled. Signed-off-by: Peng Fan <peng.fan@nxp.com>
| * phy: nop-phy: add clk bulkPeng Fan2020-10-231-0/+35
| | | | | | | | | | | | Add clk bulk for nop-phy driver. Signed-off-by: Peng Fan <peng.fan@nxp.com>
| * bootm: fix wrong conditions about images overlapJaehoon Chung2020-10-231-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It doesn't need to consider start byte address. If ramdisk size is 0x800000 and start address is 0x2700000, then it's used until 0x02efffff, not 0x02f00000. But it's detected to overlapt RD image, when kernel start address is 0x02f00000. Because it's doing wrong calculation about rd_len. This patch fixed wrong calculation address position when check condition. In addition, it needs to check one more condition about overlapping entire area. Fixes: commit fbde7589ce30 ("common: bootm: add checks to verify if ramdisk / fdtimage overlaps OS image") Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
| * cmd: fat: Use do_save() for fatwriteLad Prabhakar2020-10-232-45/+4
| | | | | | | | | | | | | | | | | | | | do_save() function defined in fs.c also supports FAT file system re-use the same for fatwrite command. Also fix the FAT test script to match the expected output. Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>