summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* drivers: fsl_mcdmafec: conversion to dmAngelo Durgehello2020-01-102-337/+389
| | | | | | Full conversion to dm for all boards, legacy code removed. Signed-off-by: Angelo Durgehello <angelo.dureghello@timesys.com>
* drivers: mcffec: conversion to dmAngelo Durgehello2020-01-102-294/+315
| | | | | | Full conversion to dm for all boards, legacy code removed. Signed-off-by: Angelo Durgehello <angelo.dureghello@timesys.com>
* drivers: net: add mcf fec dm Kconfig supportAngelo Durgehello2020-01-101-0/+16
| | | | | | Add ColdFire fec to Kconfig. Signed-off-by: Angelo Durgehello <angelo.dureghello@timesys.com>
* m68k: add dm fec supportAngelo Durgehello2020-01-1010-44/+151
| | | | | | Add architecture-related code for dm fec support. Signed-off-by: Angelo Durgehello <angelo.dureghello@timesys.com>
* configs: purge unneeded fec definesAngelo Durgehello2020-01-1016-104/+17
| | | | | | Remove unneeded fec-related defines after fec moved as dm. Signed-off-by: Angelo Durgehello <angelo.dureghello@timesys.com>
* configs: add eth dm support for all ColdFire boardsAngelo Durgehello2020-01-1041-0/+97
| | | | | | Add dm eth config options for all involved ColdFire-based boards. Signed-off-by: Angelo Durgehello <angelo.dureghello@timesys.com>
* m68k: add fec fdt overrides to all boardsAngelo Durgehello2020-01-1042-0/+290
| | | | | | Add ethernet controller overrides for all involved boards. Signed-off-by: Angelo Durgehello <angelo.dureghello@timesys.com>
* m68k: add fec base node to devicetreesAngelo Durgehello2020-01-1012-1/+186
| | | | | | | Add basic ethernet controller devicetree nodes for all ColdFire families. Signed-off-by: Angelo Durgehello <angelo.dureghello@timesys.com>
* Merge branch 'next' of https://gitlab.denx.de/u-boot/custodians/u-boot-mpc83xxTom Rini2020-01-0912-15/+16
|\ | | | | | | - A small PR with MC8309 fixes from Rasmus.
| * mpc83xx_clk: always treat MPC83XX_CLK_PCI as invalidRasmus Villemoes2020-01-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current mpc83xx_clk driver is broken for any board for which mpc83xx_has_pci() is true, i.e. anything not MPC8308: When is_clk_valid() reports that MPC83XX_CLK_PCI is valid, init_all_clks() proceeds to call init_single_clk(), but that doesn't know about either MPC83XX_CLK_PCI or has any handling of the TYPE_SCCR_ONOFF mode correctly returned by retrieve_mode(). Hence init_single_clk() ends up returning -EINVAL, and the whole board hangs in serial_init(). The quickest fix is to simply pretend that clock is invalid for all, since nobody can have been relying on it. Adding proper support seems to be a bit more involved than just handling TYPE_SCCR_ONOFF: - The power-on-reset value of SCCR[PCICM] is 0, so mpc83xx_clk_enable() would probably need to be tought to enable the clock. - The frequency of PCI_SYNC_OUT is either SYS_CLK_IN or SYS_CLK_IN/2 depending on the CFG_CLKIN_DIV configuration input, but that can't be read from software, so to properly fill out ->speed[MPC83XX_CLK_PCI] I think one would need guidance from Kconfig or dtb. Partially fixes: 07d538d281 clk: Add MPC83xx clock driver Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Mario Six <mario.six@gdsys.cc>
| * mpc83xx: set MPC83XX_GPIO_CTRLRS to 2 for MPC8309Rasmus Villemoes2020-01-081-1/+2
| | | | | | | | | | | | | | | | The MPC8309 has two gpio controllers (which is already correctly reflected in its struct immap definition). Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Mario Six <mario.six@gdsys.cc>
| * mpc83xx: immap_83xx: add spi8xxx_t in immap for mpc8309Rasmus Villemoes2020-01-082-2/+2
| | | | | | | | | | | | | | Allow drivers/spi/mpc8xxx_spi.c to be built for an mpc8309 target. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Mario Six <mario.six@gdsys.cc>
| * powerpc: mpc83xx: convert CONFIG_FSL_ELBC to KconfigRasmus Villemoes2020-01-088-11/+7
| | | | | | | | | | | | | | | | This complements commit 068789773d0 which did the conversion for mpc85xx. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Mario Six <mario.six@gdsys.cc>
| * mpc83xx: make ARCH_MPC8309 select SYS_FSL_ERRATUM_ESDHC111Rasmus Villemoes2020-01-081-0/+1
| | | | | | | | | | | | | | | | | | The mpc8309 is also affected by the "Manual Asynchronous CMD12 abort operation causes protocol violations" erratum, though it is enumerated as eSDHC16 in the errata sheet for mpc8309. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Mario Six <mario.six@gdsys.cc>
* | Merge tag 'dm-pull-8jan20' of git://git.denx.de/u-boot-dmWIP/09Jan2020Tom Rini2020-01-0927-297/+767
|\ \ | | | | | | | | | dm: Increased separation of ofdata_to_platdata() and probe methods
| * | log: Include missing header for log.hSean Anderson2020-01-071-0/+1
| | | | | | | | | | | | | | | | | | | | | log.h references cmd_tbl_t but command.h was not included Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | dm: Add a debug message when devices are skipped pre-relocSean Anderson2020-01-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a message to lists_bind_fdt when it skips initializing a device pre-relocation. I've had a couple errors where a device didn't initialize properly because one of its dependencies was missing. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | Include missing headers for fdt_support.hSean Anderson2020-01-071-0/+1
| | | | | | | | | | | | | | | | | | | | | fdt_support.h is missing declarations for bd_t. Including asm/u-boot.h pulls in the definition. Signed-off-by: Sean Anderson <seanga2@gmail.com>
| * | binman: fix default filename of u-boot-with-ucode-ptr in documentationMasahiro Yamada2020-01-072-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The suffix should be ".bin" instead of ".dtb" . Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | dm: devres: Add a new OFDATA phaseSimon Glass2020-01-074-9/+37
| | | | | | | | | | | | | | | | | | | | | Since the ofdata_to_platdata() method can allocate resources, add it as a new devres phase. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: devres: Use an enum for the allocation phaseSimon Glass2020-01-071-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | At present we only support two phases where devres can be used: bind and probe. This is handled with a boolean. We want to add a new phase (platdata), so change this to an enum. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: devres: Add testsSimon Glass2020-01-074-0/+212
| | | | | | | | | | | | | | | | | | | | | The devres functionality has very few users in U-Boot, but it still should have tests. Add a few basic tests of the main functions. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: test: Add a test driver for devresSimon Glass2020-01-074-0/+61
| | | | | | | | | | | | | | | | | | | | | Add a driver which does devres allocations so that we can write tests for devres. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: devres: Convert to use loggingSimon Glass2020-01-072-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present when CONFIG_DEBUG_DEVRES is enabled, U-Boot prints log messages to the console with every devres allocation/free event. This causes most tests to fail since the console output is not as expected. In particular this prevents us from adding a device to sandbox which uses devres in its bind method. Move devres over to use U-Boot's logging feature instead, and add a new category for devres. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | test: Add functions to find the amount of allocated memorySimon Glass2020-01-072-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | The malloc() implementations provides a way of finding out the approximate amount of memory that is allocated. Add helper functions to make it easier to access this and see changes over time. This is useful for tests that want to check if memory has been allocated or freed. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: devres: Create a new devres header fileSimon Glass2020-01-072-254/+270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present these functions are lumped in with the core device functions. They have their own #ifdef to control their availability, so it seems better to split them out. Move them into their own header file. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: core: Add a new flag to track platform dataSimon Glass2020-01-073-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to avoid allocating platform data twice. This could happen if device_probe() is called after device_ofdata_to_platdata() for the same device. Add a flag to track whether device_ofdata_to_platdata() has been called on a device. Check the flag to make sure it doesn't happen twice, and clear the flag when the data is freed. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: core: Export a new function to read platdataSimon Glass2020-01-072-2/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new internal function, device_ofdata_to_platdata() to handle allocating private space associated with each device and reading the platform data from the device tree. Call this new function from device_probe(). Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: core: Add a comment for DM_FLAG_OF_PLATDATASimon Glass2020-01-071-0/+1
| | | | | | | | | | | | | | | | | | This flag is missing a comment. Add one. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: core: Allocate parent data separate from probing parentSimon Glass2020-01-071-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | At present the parent is probed before the child's ofdata_to_platdata() method is called. Adjust the logic slightly so that probing parents is not done until afterwards. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: core: Move ofdata_to_platdata() call earlierSimon Glass2020-01-071-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | This method is supposed to extract platform data from the device tree. It should be done before the device itself is probed. Move it earlier in the device_probe() function. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: core: Don't clear active flag twice when probe() failsSimon Glass2020-01-071-3/+1
| | | | | | | | | | | | | | | | | | Remove this duplicated code, since the 'fail' label does this immediately. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | aspeed: ast2500: Read clock ofdata in the correct methodSimon Glass2020-01-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present the clock driver reads its ofdata in the probe() method. This is not correct although it is often harmless. However in this case it causes a problem, something like this: - ast_get_scu() is called (from somewhere) to get the SCI address - this probes the clock - first sets up ofdata (which does nothing at present) - DM marks clock device as active - DM calls pinctrl - pinctrl probes and calls ast_get_scu() in ast2500_pinctrl_probe() - ast_get_scu() probes the clock, but sees it already marked as probed - ast_get_scu() accesses the clock's private data, with scu as NULL - DM calls clock probe function ast2500_clk_probe() which reads scu By putting the read of scu into the correct method, scu is read as part of ofdata setup, and everything is OK. Note: This problem did not matter until now since DM always probed all parents before reading a child's ofdata. The fact that pinctrl is a child of clock seems to trigger this strange bug. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Cédric Le Goater <clg@kaod.org>
| * | pci: Print a warning if the bus is accessed before probingSimon Glass2020-01-071-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | It is not possible to access a device on a PCI bus that has not yet been probed, since the bus number is not known. Add a warning to catch this error. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | x86: apl: Avoid accessing the PCI bus before it is probedSimon Glass2020-01-072-11/+29
| | | | | | | | | | | | | | | | | | | | | | | | The PCI bus is not actually probed by the time the ofdata_to_platdata() method is called since that happens in the uclass's post_probe() method. Update the PMC and P2SB drivers to access the bus in its probe() method. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | usb: Drop use of BUG_ON() and WARN_ON()Simon Glass2020-01-074-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These macros use __FILE__ which inserts the full path of the object file into U-Boot, thus increasing file size. Drop these usages. An older version of this patch was submitted here: http://patchwork.ozlabs.org/patch/1205784/ Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: core: Use assert_noisy() in devresSimon Glass2020-01-071-3/+3
| | | | | | | | | | | | | | | | | | Use this macros instead of the linux ones, as the output is smaller. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | common: Add a noisy assert()Simon Glass2020-01-071-0/+14
| |/ | | | | | | | | | | | | | | | | | | Some U-Boot code uses BUG_ON() and WARN_ON() macros. These use __FILE__ which can include quite a large path, depending on how U-Boot is built. The existing assert() is only checked if DEBUG is enabled. Add a new one which is always checked, and prints a (smaller) error in that case. Signed-off-by: Simon Glass <sjg@chromium.org>
* | Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini2020-01-097-10/+71
|\ \ | | | | | | | | | - DFU updates
| * | x86: edison: Enable DFU timeoutAndy Shevchenko2020-01-071-0/+1
| | | | | | | | | | | | | | | | | | | | | The stock U-Boot on Intel Edison has timeout parameter for DFU command. Enable it here to be compatible with the original U-Boot configuration. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * | dfu: Add optional timeout parameterAndy Shevchenko2020-01-076-4/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the `dfu` command is called from the U-Boot environment, it now accepts an optional parameter that specifies a timeout (in seconds). If a DFU connection is not made within that time the `dfu` command exits (as it would if Ctrl+C was pressed). If the timeout is left empty or being zero the `dfu` command behaves as it does now. This is useful for allowing U-Boot to check to see if anything wants to upload new firmware before continuing to boot. The patch is based on the commit https://github.com/01org/edison-u-boot/commit/5e966ccc3c65c18c9783741fa04e0c45e021780c by Sebastien Colleur, which has been heavily reworked due to U-Boot changes in the past. Signed-off-by: Brad Campbell <bradjc5@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * | dfu: Refactor do_dfu() to handle optional argumentAndy Shevchenko2020-01-071-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | In the future we may utilize optional argument in 'dfu' command line. As a preparation for this, refactor do_dfu(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Lukasz Majewski <lukma@denx.de>
| * | dfu: Drop unused prototype of dfu_trigger_reset()Andy Shevchenko2020-01-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the commit 1cc03c5c53c0 ("dfu: Provide means to find difference between dfu-util -e and -R") the dangling ptototype appeared. Remove it here. Fixes: 1cc03c5c53c0 ("dfu: Provide means to find difference between dfu-util -e and -R") Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Stephen Warren <swarren@nvidia.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Lukasz Majewski <lukma@denx.de>
* | | Merge tag 'efi-2020-04-rc1' of ↵WIP/08Jan2020Tom Rini2020-01-0857-83/+1719
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2020-04-rc1 This pull request provides: * support for FIT images for UEFI binaries * drivers for hardware random number generators * an implementation of the EFI_RNG_PROTOCOL * a sub-command for efidebug to display configuration tables
| * | | efi_selftest: unit test for EFI_RNG_PROTOCOLHeinrich Schuchardt2020-01-072-0/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide a unit test for the EFI_RNG_PROTOCOL. The list of algorithms is read. Two random numbers are generated. The test checks that the two numbers differ. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | | efi_rng_protocol: Install the efi_rng_protocol on the root nodeSughosh Ganu2020-01-073-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Install the EFI_RNG_PROTOCOL implementation for it's subsequent use by the kernel for features like kaslr. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | | efi: qemu: arm64: Add efi_rng_protocol implementation for the platformSughosh Ganu2020-01-075-0/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for the EFI_RNG_PROTOCOL routines for the qemu arm64 platform. EFI_RNG_PROTOCOL is an uefi boottime service which is invoked by the efi stub in the kernel for getting random seed for kaslr. The routines are platform specific, and use the virtio-rng device on the platform to get random data. The feature can be enabled through the following config CONFIG_EFI_RNG_PROTOCOL Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Changed SPDX header to use /* instead of //. Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | | cmd: add rng commandHeinrich Schuchardt2020-01-073-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the RNG uclass we currently only have a test working on the sandbox. Provide a command to test the hardware random number generator on non-sandbox systems. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | | virtio: rng: Add a random number generator(rng) driverSughosh Ganu2020-01-075-1/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a driver for the virtio-rng device on the qemu platform. The device uses pci as a transport medium. The driver can be enabled with the following configs CONFIG_VIRTIO CONFIG_DM_RNG CONFIG_VIRTIO_PCI CONFIG_VIRTIO_RNG Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
| * | | test: rng: Add basic test for random number generator(rng) uclassSughosh Ganu2020-01-072-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a unit test for testing the rng uclass functionality using the sandbox rng driver. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>