summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* common: Move hang() to the same header as panic()Simon Glass2020-01-17128-11/+153
| | | | | | | | | | At present panic() is in the vsprintf.h header file. That does not seem like an obvious choice for hang(), even though it relates to panic(). So let's put hang() in its own header. Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Migrate a few more files] Signed-off-by: Tom Rini <trini@konsulko.com>
* common: Move testdram() into init.hSimon Glass2020-01-1720-10/+26
| | | | | | This function is called during init so move it to the init header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move RAM-sizing functions to init.hSimon Glass2020-01-17103-5/+106
| | | | | | | These functions relate to memory init so move them into the init header. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Rename and move source()Simon Glass2020-01-174-7/+15
| | | | | | | | This function has a very generic name which does not adequately describe its purpose. Rename it and move it to image.h, since it relates to reading a script from an image. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move the image globals into image.hSimon Glass2020-01-1720-4/+22
| | | | | | | These three globals relate to image handling. Move them to the image header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* image: Rename load_addr, save_addr, save_sizeSimon Glass2020-01-1727-69/+74
| | | | | | | | | These global variables are quite short and generic. In fact the same name is more often used locally for struct members and function arguments. Add a image_ prefix to make them easier to distinguish. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move reset_cpu() to the CPU headerSimon Glass2020-01-17102-6/+105
| | | | | | Move this function out of common.h and into a relevant header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move reset_misc() function to arch headerSimon Glass2020-01-172-1/+2
| | | | | | | This function is only used on ARM devices. Move it out of the common file and to a arch-specific header. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move get_tbclk() to time.hSimon Glass2020-01-1727-8/+29
| | | | | | | This function related to timer and most of the timer functions are in time.h, so move this function there. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move clock functions into a new fileSimon Glass2020-01-1771-11/+86
| | | | | | | These three clock functions don't use driver model and should be migrated. In the meantime, create a new file to hold them. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move upmconfig() to ppc.hSimon Glass2020-01-173-3/+3
| | | | | | | This file is only used by PowerPC so move it to an arch-specific header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move ll_boot_init() to init.hSimon Glass2020-01-179-7/+14
| | | | | | This is an init-related function so belongs in that file. Move it. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: arm: Move s_init() to an ARM-specific headerSimon Glass2020-01-172-2/+2
| | | | | | | This function is only used on ARM devices so does not belong in the global common header file. Move it to an ARM header. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move device-tree setup functions to fdt_support.hSimon Glass2020-01-1738-12/+50
| | | | | | | | These functions relate to setting up the device tree for booting the OS. The fdt_support.h header file supports similar functions, so move these there. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move type declarations to linux/types.hSimon Glass2020-01-172-4/+4
| | | | | | | | | This file already has lots of type declarations so it seems better to put all of them there. Move them. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop the symbol_lookup() declarationSimon Glass2020-01-171-3/+0
| | | | | | | This function is not called anywhere so we can drop the declaration. If it is needed one day, it should be added in its own header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop CONFIG_HAS_POSTSimon Glass2020-01-172-5/+3
| | | | | | | | This only exists to control whether the post/ directory is build. It is just as easy to check this in the Makefile. Remove CONFIG_HAS_POST and use an ifdef in the Makefile instead. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop CONFIG_POST_STD/ALT_LISTSimon Glass2020-01-173-6/+1
| | | | | | | | These CONFIG options are not used anymore. CONFIG_POST_ALT_LIST just causes CONFIG_POST_STD_LIST to be set and it causes tests.c to be compiled. So just make compiling tests.c unconditional. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move CONFIG_SYS_DEF_EEPROM_ADDR out of common.hSimon Glass2020-01-172-4/+4
| | | | | | | | | This define seems better suited to the eeprom header file, particularly as it is only used in the eeprom.c file. Move it. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move reset_phy() to net.hSimon Glass2020-01-1734-3/+40
| | | | | | This is a network function so let's move it into that header. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop floppy disk supportSimon Glass2020-01-1710-1159/+1
| | | | | | | | | This seems pretty old now. It has not been converted to driver model and is not used by any boards. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move jumptable_init() out of common.hSimon Glass2020-01-173-3/+4
| | | | | | | This function is defined in exports.c so move it to its header file. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* common: Move relocate_code() to init.hSimon Glass2020-01-1740-22/+48
| | | | | | | | | This is an init function so move it out of the common header. Avoid using the typedef so that we don't have to include the global_data header file. Also tidy up the function style in comments while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move functions for loading from fat/ext2 to fs.hSimon Glass2020-01-175-7/+25
| | | | | | | These are filesystem functions and belong in the filesystem header file. Move them. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move do_tftpb() to net.hSimon Glass2020-01-173-3/+12
| | | | | | This function belongs in the network header file. Move it. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move embedded fdt location to fdtdec.hSimon Glass2020-01-172-3/+3
| | | | | | | These declarations are only used in fdtdec.c so move them to its header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop checkflash() and checkdram()Simon Glass2020-01-171-2/+0
| | | | | | These functions are not used in U-Boot. Drop them. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move flash_perror() to flash.hSimon Glass2020-01-177-6/+14
| | | | | | | | This function belongs more in flash.h than common.h so move it. Also remove the space before the bracket in some calls. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move main_loop() to init.hSimon Glass2020-01-174-3/+9
| | | | | | | Move this function out of common.h and into a better place. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
* common: Drop mdm_init()Simon Glass2020-01-171-1/+0
| | | | | | | This is not used in U-Boot. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
* Merge branch '2020-01-17-improve-aes-support'Tom Rini2020-01-1719-87/+1268
|\ | | | | | | - Add support and tests for AES192 and AES256
| * u-boot: fit: add support to decrypt fit with aesWIP/2020-01-17-improve-aes-supportPhilippe Reynes2020-01-178-1/+240
| | | | | | | | | | | | | | | | | | | | This commit add to u-boot the support to decrypt fit image encrypted with aes. The FIT image contains the key name and the IV name. Then u-boot look for the key and IV in his device tree and decrypt images before moving to the next stage. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
| * mkimage: fit: add support to encrypt image with aesPhilippe Reynes2020-01-1710-2/+716
| | | | | | | | | | | | | | | | | | | | | | This commit add the support of encrypting image with aes in mkimage. To enable the ciphering, a node cipher with a reference to a key and IV (Initialization Vector) must be added to the its file. Then mkimage add the encrypted image to the FIT and add the key and IV to the u-boot device tree. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
| * aes: add test unit for aes196 and aes256Philippe Reynes2020-01-171-0/+4
| | | | | | | | | | | | | | This commit add test unit for aes196 and aes256. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * aes: add test unit for aes128Philippe Reynes2020-01-172-0/+163
| | | | | | | | | | | | | | This commit add test unit for aes128. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * aes: add support of aes192 and aes256Philippe Reynes2020-01-174-65/+125
| | | | | | | | | | | | | | | | Until now, we only support aes128. This commit add the support of aes192 and aes256. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * aes: add a define for the size of a blockPhilippe Reynes2020-01-173-20/+21
|/ | | | | | | | | | | In the code, we use the size of the key for the size of the block. It's true when the key is 128 bits, but it become false for key of 192 bits and 256 bits. So to prepare the support of aes192 and 256, we introduce a constant for the iaes block size. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* Merge tag 'mmc-1-16-2020' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmcWIP/16Jan2020Tom Rini2020-01-1619-166/+66
|\ | | | | | | | | - Cleanup of fsl_esdhc driver together with arch/defconfig change - Add quirk for APP_CMD retry
| * mmc: config help typo fixJoel Johnson2020-01-161-1/+1
| | | | | | | | | | | | Fix typo in description of MMC_QUIRKS config option. Signed-off-by: Joel Johnson <mrjoel@lixil.net>
| * mmc: add additional quirk for APP_CMD retryJoel Johnson2020-01-162-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | It was observed (on ClearFog Base) that sending MMC APP_CMD returned an error on the first attempt. The issue appears to be timing related since even inserting a puts() short debug entry before the execution added sufficient delay to receive success on first attempt. Follow the existing quirks pattern to retry if initial issuance failed so as to not introduce any delay unless needed. Signed-off-by: Joel Johnson <mrjoel@lixil.net>
| * Drop CONFIG_FSL_ESDHC_USE_PERIPHERAL_CLK usageYangbo Lu2020-01-164-50/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The eSDHC reference clocks should be provided by speed.c in arch/. And we do not need CONFIG_FSL_ESDHC_USE_PERIPHERAL_CLK option to select which clock to use. Because we can make the driver to select the periperhal clock which is better (provides higher frequency) automatically if its value is provided by speed.c. This patch is to drop this option and make driver to select clock automatically. Also fix peripheral clock calculation issue in fsl_lsch2_speed.c/fsl_lsch3_speed.c. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
| * configs: ls1028a: use default SDHC clock divider valueYangbo Lu2020-01-164-4/+0
| | | | | | | | | | | | | | The SDHC clock divider value for LS1028A should be default 2, not 1. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
| * Add global variable sdhc_per_clk for arm/powerpcYangbo Lu2020-01-162-0/+5
| | | | | | | | | | | | | | | | | | | | | | The QorIQ eSDHC controller supports two reference clocks. They are platform clock and periperhal clock. The global variable sdhc_clk has already been used for platform clock. This patch is to add another global variable sdhc_per_clk for periperhal clock, which provides higher frequency and is required to be used for SD UHS and eMMC HS200/HS400 speed modes. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
| * powerpc/mpc85xx: drop eSDHC periperhal clock codeYangbo Lu2020-01-166-61/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The below patch added eSDHC periperhal clock code initially. 2d9ca2c mmc: fsl_esdhc: Add peripheral clock support The purpose was to fix up device tree properties "peripheral-frequency" so that linux could get the periperhal clock by it. However the implementation on both u-boot and linux was only for a Freescale SDK release. The linux part implementation had never been upstreamed. These code should not have been exist on u-boot mainline. Let's remove the powerpc part changes but keep the changes in fsl_esdhc driver. The changes in fsl_esdhc driver could be utilized to support SD UHS and eMMC HS200/HS400 speed modes for current Layerscape ARM platforms. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
| * mmc: fsl_esdhc: drop useless fdt fixupYangbo Lu2020-01-161-9/+0
| | | | | | | | | | | | | | | | The fdt fixup for properties "peripheral-frequency" and "adapter-type" was once for a Freescale SDK release. The properties haven't been existed in linux mainline. Drop these useless code. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
| * mmc: fsl_esdhc_imx: drop QorIQ eSDHC specific peripheral clock codeYangbo Lu2020-01-161-40/+0
| | | | | | | | | | | | Drop QorIQ eSDHC specific peripheral clock code. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
* | Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvellTom Rini2020-01-164-9/+27
|\ \ | | | | | | | | | | | | | | | - Clearfog: Fix SD booting (Baruch) - Misc updates to MMC handling in SPL to support booting from main data partition (vs hardware boot partition) on MVEBU (Baruch)
| * | arm: mvebu: clearfog: update eMMC documentationBaruch Siach2020-01-161-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SPL now automatically selects the correct U-Boot image offset for both eMMC and SD card. No need to tweak CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR anymore. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
| * | arm: mvebu: clearfog: set uboot image SD card offsetBaruch Siach2020-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Armada 38x ROM skips the first SD card offset when loading SPL. This affects the location of the main U-Boot image. SPL MMC code now supports U-Boot image offset based on run-time detection of the boot partition. Use this feature to make the same generated image support both SD card and eMMC boot partition. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
| * | spl: mmc: support uboot image offset on main partitionBaruch Siach2020-01-162-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Armada 38x platforms the ROM code loads SPL from offset 0 of eMMC hardware boot partitions. When there are no boot partitions (i.e. SD card) the ROM skips the first sector that usually contains the (logical) partition table. Since the generated .kwb image contains the main U-Boot image in a fixed location (0x140 sectors by default), we end up with the main U-Boot image in offset of 1 sector. The current workaround is to manually set CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR to 0x141 to compensate for that. This patch uses the run-time detected boot partition to determine the right offset of the main U-Boot partition. The generated .kwb image is now compatible with both eMMC boot partition, and SD card main data partition. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>