summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* checkpatch: Don't allow common.h and dm.h in headersSimon Glass2020-08-032-2/+15
| | | | | | | These headers should not be included in other header files. Add a checkpatch rule and test for this. Signed-off-by: Simon Glass <sjg@chromium.org>
* patman: Fix up the test commentsSimon Glass2020-08-031-5/+5
| | | | | | | Many of the tests have the same comment and two have the same name. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: core: Guard against including dm.h in header filesSimon Glass2020-08-031-0/+4
| | | | | | | | | Header files generally should not include header files just for a struct, since forward declarations work just as well and reduce overhead. Add a warning for dm.h being included, since this has crept into U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>
* net: Drop duplicate include of dm.h in pcnet.cSimon Glass2020-08-031-1/+0
| | | | | | This file includes the header twice. Drop the second one. Signed-off-by: Simon Glass <sjg@chromium.org>
* net: Drop dm.h header file in eth_phy.hSimon Glass2020-08-031-1/+2
| | | | | | | This header file should not be included in other header files. Remove it and use a forward declaration instead. Signed-off-by: Simon Glass <sjg@chromium.org>
* clk: Drop dm.h header file in clk-provider.hSimon Glass2020-08-035-12/+20
| | | | | | | | | | | This header file should not be included in other header files. Remove it and use a forward declaration and un-inlining of dev_get_clk_ptr() instead. Fix up the kendryte header files to avoid build errors. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Sean Anderson <seanga2@gmail.com>
* usb: Drop dm.h header fileSimon Glass2020-08-033-36/+47
| | | | | | | | | | This header file should not be included in other header files. Remove it and use a forward declaration instead. Also move the inline function out into a C file. We should not include C code in headers. Signed-off-by: Simon Glass <sjg@chromium.org>
* ufs: Drop dm.h header fileSimon Glass2020-08-033-4/+5
| | | | | | | | | This header file should not be included in other header files. Remove it and use a forward declaration instead. Also drop asm/io.h Signed-off-by: Simon Glass <sjg@chromium.org>
* nand: Drop dm.h header fileSimon Glass2020-08-032-2/+3
| | | | | | | This header file should not be included in other header files. Remove it and use a forward declaration instead. Signed-off-by: Simon Glass <sjg@chromium.org>
* adc: Drop dm.h header fileSimon Glass2020-08-033-2/+4
| | | | | | | | | This header file should not be included in other header files. Remove it and use a forward declaration instead. Drop the common.h inclusion also. Signed-off-by: Simon Glass <sjg@chromium.org>
* mscc: Drop dm.h header fileSimon Glass2020-08-036-15/+2
| | | | | | | This header file should not be included in other header files. Remove it from each one and use a forward declaration instead. Signed-off-by: Simon Glass <sjg@chromium.org>
* mediatek: Drop dm.h header fileSimon Glass2020-08-031-1/+1
| | | | | | | This header file should not be included in other header files. Remove it and use a forward declaration instead. Signed-off-by: Simon Glass <sjg@chromium.org>
* pci: Drop dm.h inclusion from header fileSimon Glass2020-08-034-2/+3
| | | | | | The layerscape header should not include dm.h so remove it. Signed-off-by: Simon Glass <sjg@chromium.org>
* liebherr: Drop duplicate dm.h inclusionSimon Glass2020-08-031-1/+0
| | | | | | We only need to include this header once. Drop the duplicate. Signed-off-by: Simon Glass <sjg@chromium.org>
* ti: am654: Drop duplicate dm.h inclusionSimon Glass2020-08-031-1/+0
| | | | | | We only need to include this header once. Drop the duplicate. Signed-off-by: Simon Glass <sjg@chromium.org>
* spi: Drop duplicate dm.h inclusionSimon Glass2020-08-031-1/+0
| | | | | | We only need to include this header once. Drop the duplicate. Signed-off-by: Simon Glass <sjg@chromium.org>
* mmc: Drop duplicate dm.h inclusionSimon Glass2020-08-031-1/+0
| | | | | | We only need to include this header once. Drop the duplicate. Signed-off-by: Simon Glass <sjg@chromium.org>
* power: Tidy up inclusion of regulator_common.hSimon Glass2020-08-034-5/+7
| | | | | | | | This file should not include common.h and dm.h so remove them. Also move the inclusion of this file to after the normal includes. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
* efi: Tidy up header includesSimon Glass2020-08-033-2/+3
| | | | | | | | Two files relies on efi_driver.h to include common.h and dm.h which is incorrect. The former should always be included in a non-host C file and the latter should be included if driver model is used. Signed-off-by: Simon Glass <sjg@chromium.org>
* w1: Drop dm.h header fileSimon Glass2020-08-033-1/+3
| | | | | | | This header file should not be included in other header files. Remove it and use a forward declaration instead. Signed-off-by: Simon Glass <sjg@chromium.org>
* thermal: Drop dm.h header fileSimon Glass2020-08-032-1/+2
| | | | | | | This header file should not be included in other header files. Remove it and use a forward declaration instead. Signed-off-by: Simon Glass <sjg@chromium.org>
* sf: Drop dm.h header file from spi_flash.hSimon Glass2020-08-035-1/+6
| | | | | | | This header file should not be included in other header files. Remove it and use a forward declaration instead. Signed-off-by: Simon Glass <sjg@chromium.org>
* net: Drop dm.h header file from phy.hSimon Glass2020-08-036-3/+12
| | | | | | | This header file should not be included in other header files. Remove it and use other headers and C inclusions instead. Signed-off-by: Simon Glass <sjg@chromium.org>
* fs: fs-loader: Drop dm.h header fileSimon Glass2020-08-032-1/+2
| | | | | | | This header file should not be included in other header files. Remove it and use a forward declaration instead. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: core: Drop header files from dm/test.hSimon Glass2020-08-0363-20/+82
| | | | | | | | These header file should not be included in other header files. Remove them and add to each individual file. Add test/test.h to test/ui.h since that is a reasonable place. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: core: Drop dm.h header file from dm-demo.hSimon Glass2020-08-032-2/+1
| | | | | | | This header file should not be included in other header files. Remove it and add it to the cmd file instead. Signed-off-by: Simon Glass <sjg@chromium.org>
* mtd: spi: Drop SPI_XFER_MMAP*Simon Glass2020-08-031-2/+0
| | | | | | These two defines are no-longer supported. Drop them. Signed-off-by: Simon Glass <sjg@chromium.org>
* mtd: spi-mem: Drop dm.h header fileSimon Glass2020-08-034-5/+10
| | | | | | | This header file should not be included in other header files. Remove it and use a forward declaration instead. Signed-off-by: Simon Glass <sjg@chromium.org>
* wdt: Drop dm.h header fileSimon Glass2020-08-031-3/+1
| | | | | | | | | | | | This header file should not be included in other header files. Remove it and use a forward declaration instead. Also remove the other headers that are not needed, since the inline code was removed in a recent commit: b4d9452c4 ("watchdog: move initr_watchdog() to wdt-uclass.c") Signed-off-by: Simon Glass <sjg@chromium.org>
* mtd: spi-nor: Tidy up error handling / debug codeSimon Glass2020-08-033-4/+4
| | | | | | | | | | | | | The -ENODEV error value in spi_nor_read_id() is incorrect since there clearly is a device - it just cannot be supported. Use -ENOMEDIUM instead which has the virtue of being less common. Fix the return value in spi_nor_scan(). Also there are a few printf() statements which should be debug() since they bloat the code with unused strings at present. Fix those while here. Signed-off-by: Simon Glass <sjg@chromium.org>
* spi: Allow separate control of SPI_FLASH_TINY for SPL/TPLSimon Glass2020-08-032-1/+11
| | | | | | | In some cases SPL needs to be able to erase but TPL just needs to read. Allow these to have separate settings for SPI_FLASH_TINY. Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86Tom Rini2020-08-039-11/+81
|\ | | | | | | | | | | | | - ApolloLake: add u64 parameters support for FSP2 bindings - ApolloLake: add missing parameters to support full configuration of the latest FSP MR6 release - Append appropriate suffixes in various assembly codes
| * x86: call32: Append appropriate suffixesAndy Shevchenko2020-08-031-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Assembler is not happy: arch/x86/cpu/call32.S: Assembler messages: arch/x86/cpu/call32.S:36: Warning: no instruction mnemonic suffix given and no register operands; using default for `retf' Fix this by adding appropriate suffixes to the assembler commands. Fixes: 6f92ed8f1abf ("x86: Add a way to call 32-bit code from 64-bit mode") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * x86: sipi_vector: Append appropriate suffixesAndy Shevchenko2020-08-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Assembler is not happy: arch/x86/cpu/sipi_vector.S: Assembler messages: arch/x86/cpu/sipi_vector.S:134: Warning: no instruction mnemonic suffix given and no register operands; using default for `cmp' arch/x86/cpu/sipi_vector.S:139: Warning: no instruction mnemonic suffix given and no register operands; using default for `bts' arch/x86/cpu/sipi_vector.S:157: Warning: no instruction mnemonic suffix given and no register operands; using default for `cmp' Fix this by adding appropriate suffixes to the assembler commands. Fixes: 45b5a37836d5 ("x86: Add multi-processor init") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * arch: x86: apl: Update FSP parametersBernhard Messerklinger2020-08-035-2/+44
| | | | | | | | | | | | | | | | Add missing parameters to support full configuration of the latest FSP MR6 release. Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * x86: apl: fsp_bindings: Add support for u64 parametersBernhard Messerklinger2020-08-032-0/+29
| | | | | | | | | | | | | | | | Add FSP_UINT64 read support as preparation for FSP-M and FSP-S parameter update. Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * x86: irq: Fix some typosWolfgang Wallner2020-08-031-3/+3
| | | | | | | | | | | | | | Fix some typos in arch/x86/include/asm/irq.h. Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | Merge tag 'efi-2020-10-rc2' of ↵Tom Rini2020-08-0317-194/+245
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2020-10-rc2 This series comprises error corrections for the UEFI subsystem: * make the memory size reserved for the U-Boot stack customizable and reduce it for the MAIX board * correct build dependencies for UEFI unit test * enable read-only UEFI variable are enabled with the TEE backend * add 10 ms wait to sysreset to fix a problem with unit testing
| * efi_selftest: block device test requires CONFIG_DOS_PARTITIONHeinrich Schuchardt2020-08-012-1/+3
| | | | | | | | | | | | | | | | Do not execute the block device test if CONFIG_DOS_PARTITION=n. Imply CONFIG_DOS_PARTITION in Kconfig. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * efi_selftest: SNP test depends on networkHeinrich Schuchardt2020-08-011-1/+2
| | | | | | | | | | | | If CONFIG_NET=n, testing the simple network protocol makes no sense. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * dm: sysreset: wait after reset messageHeinrich Schuchardt2020-08-011-0/+1
| | | | | | | | | | | | | | | | | | | | In our Python tests we expect to see the word "resetting". It may be truncated if we reset before the serial console buffer is transferred. Wait for 100 ms between the "resetting ..." message and the actual reset like we do when powering off. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * configs: reduce stack size of Sipeed MAIXHeinrich Schuchardt2020-08-011-0/+1
| | | | | | | | | | | | | | | | The K210 has only 8 MiB RAM thereof 2 MiB reserved for AI. Allow only 1 MiB for the stack. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * efi_loader: use CONFIG_STACK_SIZE in the UEFI sub-systemHeinrich Schuchardt2020-08-014-26/+11
| | | | | | | | | | | | | | | | | | | | | | The Kconfig symbol CONFIG_STACK_SIZE is used both by ARM and Microblaze with the same meaning. Move it to menu 'General setup' so that we can use it for all architectures. Use the value of CONFIG_STACK_SIZE instead of a hard coded 16 MiB value for reserving memory in the UEFI sub-system. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * x86: rename CONFIG_STACK_SIZEHeinrich Schuchardt2020-08-012-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Configuration variables should have the same meaning independent of the architecture. x86 and ARM both use CONFIG_STACK_SIZE: * x86: U-Boot's runtime stack size during reboot * ARM: max stack size that can be used by U-Boot Rename the x86 configuration variable to CONFIG_STACK_SIZE_REBOOT Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * efi_loader: Enable run-time variable support for tee based variablesIlias Apalodimas2020-08-017-154/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We recently added functions for storing/restoring variables from a file to a memory backed buffer marked as __efi_runtime_data commit f1f990a8c958 ("efi_loader: memory buffer for variables") commit 5f7dcf079de8 ("efi_loader: UEFI variable persistence") Using the same idea we now can support GetVariable() and GetNextVariable() on the OP-TEE based variables as well. So let's re-arrange the code a bit and move the commmon code for accessing variables out of efi_variable.c. Create common functions for reading variables from memory that both implementations can use on run-time. Then just use those functions in the run-time variants of the OP-TEE based EFI variable implementation and initialize the memory buffer on ExitBootServices() Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * efi_loader: Trim output buffer size correctly for tee variablesIlias Apalodimas2020-08-011-10/+3
|/ | | | | | | | | | | | | | | | The current code does not trim the output buffer correctly. In fact it doesn't trim the buffer at all, since it calculates a wrong value for it, which isn't even applied. So let's remove the unused temporary size variable and trim the buffer correctly. Since we are editing efi_get_next_variable_name_int(), fix an indentation error along the way. Fixes: f042e47e8fb43 ("efi_loader: Implement EFI variable handling via OP-TEE") Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Remove superfluous conversion to (u8 *) for memcpy argument. Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* Merge branch '2020-07-31-more-env-updates'WIP/31Jul2020Tom Rini2020-07-3133-65/+507
|\ | | | | | | | | | | | | | | | | - Fix EFI selftest to not force setting serial# environment (and also get the U-Boot prompt dynamically). - Support for append only environment and other related features. - Improved ext4 environment support - Fix the case of fw_setenv being used on flash devices that were not already locked.
| * fw_setenv: lock the flash only if it was locked beforeIvan Mikhaylov2020-07-311-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With current implementation of fw_setenv, it is always locks u-boot-env region if lock interface is implemented for such mtd device. You can not control lock of this region with fw_setenv, there is no option for it in config or in application itself. Because of this situation may happen problems like in this thread on xilinx forum: https://forums.xilinx.com/t5/Embedded-Linux/Flash-be-locked-after-use-fw-setenv-from-user-space /td-p/1027851 A short summary of that link is: some person has issue with some spi chip which has lock interface but doesn't locks properly which leads to lock of whole flash memory on lock of u-boot-env region. As resulted solution hack was added into spi-nor.c driver for this chip with lock disablement. Instead fix this problem by adding logic to fw_setenv only lock the flash if it was already locked when we attempted to use it. Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com>
| * env: Add support for explicit write access listMarek Vasut2020-07-314-13/+68
| | | | | | | | | | | | | | | | | | | | | | This option marks any U-Boot variable which does not have explicit 'w' writeable flag set as read-only. This way the environment can be locked down and only variables explicitly configured to be writeable can ever be changed by either 'env import', 'env set' or loading user environment from environment storage. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
| * env: Add option to only ever append environmentMarek Vasut2020-07-313-0/+15
| | | | | | | | | | | | | | | | | | | | Add configuration option which prevents the environment hash table to be ever cleared and reloaded with different content. This is useful in case the first environment loaded into the hash table contains e.g. sensitive content which must not be dropped or reloaded. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>