aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-07-30Kconfig: Sort bool, default, select and imply optionsMichal Simek20-108/+109
Another round of sorting Kconfig entries aplhabetically. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Alexey Brodkin <abrodkin@synopsys.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-30dm: Change CMD_DM enablingMichal Simek15-1/+113
CMD_DM is used for debug purpose and it shouldn't be enabled by default via Kconfig. Unfortunately this is in the tree for quite a long time that's why solution is to use imply DM for all targets which are enabling DM. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-30Kconfig: Sort bool, default, select and imply optionsMichal Simek14-334/+334
Fix Kconfig bool, default, select and imply options to be alphabetically sorted. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-07-30Kconfig: Replace spaces with tabs and missing newlineMichal Simek3-14/+15
Trivial Kconfig cleanup. Use tabs instead of spaces and every Kconfig entry should be separated by newline. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-30common: Log should depends on DM not be selected by DMMichal Simek1-1/+1
Better use depends on instead of select. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-07-30u-boot: remove driver lookup loop from env_save()Nicholas Faustini2-19/+17
When called with ENVOP_SAVE, env_get_location() only returns the gd->env_load_location variable without actually checking for the environment location and priority. This behaviour causes env_save() to fall into an infinite loop when the low-level drv->save() call fails. The env_save() function should not loop through the environment location list but it should save the environment into the location stored in gd->env_load_location by the last env_load() call. Signed-off-by: Nicholas Faustini <nicholas.faustini@azcomtech.com> Reviewed-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com>
2018-07-30Kconfig: Remove trailing whitespaces in promptMichal Simek2-2/+2
Remove additional trailing whitespaces in prompt reported by kconfiglib: warning: DM_PMIC_SANDBOX (defined at drivers/power/pmic/Kconfig:133) has leading or trailing whitespace in its prompt warning: <choice> (defined at dts/Kconfig:204) has leading or trailing whitespace in its prompt Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Felix Brack <fb@ltec.ch>
2018-07-28Revert "fdt_support: Use CONFIG_NR_DRAM_BANKS if defined"Ramon Fried1-4/+0
This reverts commit 5e5745465c94605720295fab942eacbdd215db90. The reverted commit didn't support the scenario where there are less DRAM banks in U-Boot than in Linux. Also, it didn't introduce any new functionality, only limitaion. User could just increase MEMORY_BANKS_MAX if it's too small. Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-28configs: omap3_logic: Remove USB Storage and enable CONFIG_BLKAdam Ford1-2/+0
With the pending requirement for CONFIG_BLK, this patch removes the USB_STORAGE option which assumes that DM_USB is enabled, but isn't yet available for the omap2340 musb glue among other issues. Once the USB issues are resolved, a future patch can enable them again. Signed-off-by: Adam Ford <aford173@gmail.com>
2018-07-28drivers: rtc: correctly set week day for mc146818Heinrich Schuchardt1-1/+2
The driver sets the weekday incorrectly when called by the 'date set' command. Sunday is 1, Saturday is 7 unlike in U-Boot (see data sheet https://www.nxp.com/docs/en/data-sheet/MC146818.pdf, table 3). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-07-28sandbox: compile both TPM stack versions and driversMiquel Raynal1-0/+3
Now that TPMv1 and TPMv2 can be compiled at the same time, let's compile them both with Sandbox as well as both drivers (and, it is already implied in Kconfig: both commands). Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-28tpm: make TPM_V2 be compiled by defaultMiquel Raynal1-0/+1
TPM_V1 was already compiled by default. Now that both can be compiled at the same time, compiled them both by default. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-28test/py: tpm2: switch from 'tpm' to 'tpm2' commandMiquel Raynal1-20/+20
While using the 'tpm' command should work on most cases, this test suite only works with TPMv2 and since the work to make both versions build at the same time, we might end up having both 'tpm' (TPMv1) and 'tpm2' (TPMv2) commands available at the same time. Ensure this test suite always use the right one. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-28tpm: allow TPM v1 and v2 to be compiled at the same timeMiquel Raynal8-19/+70
While there is probably no reason to do so in a real life situation, it will allow to compile test both stacks with the same sandbox defconfig. As we cannot define two 'tpm' commands at the same time, the command for TPM v1 is still called 'tpm' and the one for TPM v2 'tpm2'. While this is the exact command name that must be written into eg. test files, any user already using the TPM v2 stack can continue to do so by just writing 'tpm' because as long as TPM v1 support is not compiled, U-Boot prompt will search for the closest command named after 'tpm'. The command set can also be changed at runtime (not supported yet, but ready to be), but as one can compile only either one stack or the other, there is still one spot in the code where conditionals are used: to retrieve the v1 or v2 command set. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: In sandbox_tpm2_fill_buf() use NULL not \0 to ensure NULL terminated string due to LLVM warning] Signed-off-by: Tom Rini <trini@konsulko.com>
2018-07-28tpm: remove stale symbol in KconfigMiquel Raynal1-3/+0
The TPM_DRIVER_SELECTED symbol was used in one of the initial series about TPMv2 but its use has been dropped, making these selects useless, remove them. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-28tpm: compile Sandbox driver by defaultMiquel Raynal1-0/+2
When Sandbox and the TPM stack are both selected, compile Sandbox TPM driver by default. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-28tpm: fix typo in kernel docMiquel Raynal1-1/+1
The udevice given to the open() function of course must be opened, not closed. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-27Merge git://git.denx.de/u-boot-fsl-qoriqTom Rini54-182/+334
2018-07-27openrd: Once again shrink binary sizeTom Rini2-11/+1
With some recent changes to relevant drivers here the openrd board (openrd_client in this case) does not fit within its size constraint. We can however drop the slightly extended baudrate table and then the duplication of mtdparts/mtdids in the default environment. These defaults are set in the environment by the 'mtdparts' command and otherwise referenced throughout the code. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-07-26Merge git://git.denx.de/u-boot-dmTom Rini5-10/+20
2018-07-26Merge branch 'master' of git://git.denx.de/u-boot-tegraTom Rini9-33/+57
2018-07-26fdt_support: make FDT_FIXUP_PARTITIONS depend on CMD_MTDPARTSMasahiro Yamada1-1/+1
fdt_fixup_mtdparts() calls mtdparts_init() and device_find(), which are defined in cmd/mtdparts.c The combination of FDT_FIXUP_PARTITIONS=y and CMD_MTDPARTS=n emits the following link error: common/fdt_support.c:903: undefined reference to `mtdparts_init' common/fdt_support.c:914: undefined reference to `device_find' Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-26fdt: fix fdtdec_setup_memory_banksize()Jens Wiklander1-5/+15
Prior to this patch is fdtdec_setup_memory_banksize() incorrectly ignoring the "status" field. This patch fixes that by testing the status with fdtdec_get_is_enabled() before using a memory node. Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-26doc: driver-model: Fix typoChris Packham1-1/+1
Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-26patman: Split alias entries on arbitrary whitespaceAdam Sampson1-1/+1
Previously the first three words in a git-mailrc alias entry could only be separated by spaces. git-send-email and Mutt both allow arbitrary whitespace here. Signed-off-by: Adam Sampson <ats@offog.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-26git-mailrc: Replace tabs with spaces in alias entriesAdam Sampson1-2/+2
patman's _ReadAliasFile only splits on spaces, not tabs, so the entries for dinh and maxime weren't being recognised as valid. I'll fix patman in a separate patch, but this makes all the entries consistent. Signed-off-by: Adam Sampson <ats@offog.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-26tegra: beaver/apalis: Fix DTC warningTom Warren2-6/+0
Fix warning when compiling tegra30-beaver/-apalis.dts with latest DTC: "Warning (avoid_unnecessary_addr_size): /pci/pch@1f,0: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property" Signed-off-by: Tom Warren <twarren@nvidia.com>
2018-07-26ARM: tegra: avoid using secure carveout RAMStephen Warren1-0/+4
If a secure carveout exists, U-Boot cannot use that memory. Fix carveout_size() to reflect this, and hence transitively fix usable_ram_size_below_4g() and board_get_usable_ram_top(). This change ensures that when U-Boot copies the secure monitor code to install it, the copy target is not in-use for U-Boot code/data. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
2018-07-26ARM: PSCI: Enable the PSCI nodeStephen Warren1-0/+4
When fixing up the DT to report PSCI support, explicitly enable the node. DTs may ship with the node disabled in case a PSCI implementation is not present, and expect any PSCI implementation to enable the node if they are actually present. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
2018-07-26ARM: PSCI: Support PSCI v0.2Stephen Warren2-0/+3
Enhance the PSCI DT editing code to allow setting a PSCI v0.2 compatible value in the DT. The CONFIG_ option is added to the whitelist to match the existing PSCI_1_0 option. While not adding new options to Kconfig isn't ideal, I figure it's better to keep related options together. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
2018-07-26ARM: define MON_MODEStephen Warren1-0/+1
Add a MON_MODE define for ARM's monitor mode. This can be used later by a secure monitor to avoid hard-coding mode IDs. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
2018-07-26ARM: tegra: implement RAM repairBibek Basu2-2/+50
RAM repair has a few pre-requisites: 1) PMIC power supply (rail) enabled. 2) PMC CRAIL power partition powered. 3) Fuse clock active (it's the default). 4) PLLP reshift branch enabled (it's the default, when PLLP is active). RAM repair also only need run whenever specific partitions are powered (main SoC and CCPLEX respectively); RAM repair does not need to be triggered when any other partition changes state. start_cpu() needs to be re-ordered slightly to match these requirements. Note that C0NC and CE0 aren't required for RAM repair to operate, but they also do no harm, so the entire of powerup_cpus() is moved rather than splitting it up. The call to remove_cpu_resets() is moved last to ensure that all other actions complete before releasing reset; since the PMC power partitions are now enabled early, releasing reset is what causes the CPUs to start executing code, and RAM repair must complete before the CPU boots. Note that this commit is the result of squashing a numbmer of commits in NVIDIA's downstream L4T branch, hence the multiple signoffs below. Signed-off-by: Bibek Basu <bbasu@nvidia.com> Signed-off-by: Sandipan Patra <spatra@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
2018-07-26Revert "tegra: Introduce SRAM repair on tegra124"Stephen Warren2-31/+1
This reverts commit 701b7b1d2cf657d435d2bd6caf43d0247d37220d. It will be immediately replaced by a different implementation that is more complete and runs are more targetted times. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
2018-07-26Merge branch 'master' of git://git.denx.de/u-boot-netTom Rini44-318/+830
2018-07-26tegra: Indicate that binman makes all three output filesSimon Glass1-2/+3
Use GNU make pattern rules to indicate that a single run of binman produces all three Tegra output files. The avoids make running binman three times (perhaps in parallel) and those instances inteferring with each other. See http://patchwork.ozlabs.org/patch/944611/ for the bug report. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com>
2018-07-26MAINTAINERS: Mark NAND as OrphanedTom Rini2-4/+3
Scott is no longer maintaining the NAND subsystem, mark as orphaned for now. Acked-by: Scott Wood <oss@buserror.net> Signed-off-by: Tom Rini <trini@konsulko.com>
2018-07-26net: zynq_gem: convert to use livetreeSiva Durga Prasad Paladugu1-16/+14
This patch updates the zynq gem driver to support livetree. Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-26drivers: net: zynq_gem: fix phy dt node settingGrygorii Strashko1-1/+1
Now zynq_gem driver will overwrite UCLASS_ETH node when PHY is connected and configured which is not correct. Use struct phydev->node instead. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Tested-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
2018-07-26drivers: net: cpsw: fix phy dt node settingGrygorii Strashko1-1/+1
Now CPSW driver will overwrite UCLASS_ETH node when PHY is connected and configured which is not correct. Use struct phydev->node instead. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-26net: phy: xilinx: switch to use phy_get_ofnode()Grygorii Strashko1-4/+6
Use PHY API phy_get_ofnode() helper to get PHY DT node. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-26net: phy: dp83867: switch to use phy_get_ofnode()Grygorii Strashko1-2/+5
Use PHY API phy_get_ofnode() helper to get PHY DT node. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Tested-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
2018-07-26net: phy: add ofnode node to struct phy_deviceGrygorii Strashko2-0/+17
Now the UCLASS_ETH device "node" field is owerwritten by some network drivers in case of Ethernet PHYs which are linked to UCLASS_ETH device using "phy-handle" DT property and when Ethernet PHY driver needs to read some additional information from DT. In such cases following happens (in general): - network drivers priv->phydev = phy_connect(priv->bus, priv->phyaddr, dev, priv->interface); <-- phydev is connected to dev which is UCLASS_ETH device if (priv->phy_of_handle > 0) dev_set_of_offset(priv->phydev->dev, priv->phy_of_handle); <-- phydev->dev->node is overwritten by phy-handle DT node - PHY driver in .config() callback int node = dev_of_offset(dev); <-- PHY driver uses overwritten dev->node const void *fdt = gd->fdt_blob; if (fdtdec_get_bool(fdt, node, "property")) ... As result, UCLASS_ETH device can't be used any more for DT accessing. This patch adds additional ofnode node field to struct phy_device which can be set explicitly by network drivers and used by PHY drivers, so overwriting can be avoided. Also add helper function phy_get_ofnode() which will check and return phy_device->node or dev_ofnode(phydev->dev) for backward compatibility with existing drivers. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-26net: phy: Clean up includes of common.hJoe Hershberger14-11/+6
We want to be able to include some other system headers in phy.h but that requires us to have included common.h in the top-level first. Also, common.h includes config.h as the first thing it does, so don't include it directly. Series-to: u-boot Series-cc: Grygorii Strashko <grygorii.strashko@ti.com> Seried-cc: ti Series-process-log: sort, uniq Cover-letter: Prepare for net: phy: prevent uclass_eth device "node" field overwriting Prepare for [1] so that it doesn't break the build for a bunch of boards. There are a number of reasons this series broke the build but none of them depend on changes in the series, so fix up those situations ahead of applying that series. [1] https://patchwork.ozlabs.org/cover/940104/ END Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-26phy: Break include cycleJoe Hershberger3-56/+67
Because some phy wants to export some functions [1], export.h was including the whole phy subsystem which pulls in lots of stuff that causes some ordering and redefinition issues. Split out the only part that is actually needed in export.h and include it there and in phy.h. [1] commit 95279315076c ("board/ls2085rdb: Export functions for standalone AQ FW load apps") Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-26arm: Prevent redefinition error in fsl-layerscapeJoe Hershberger1-1/+1
The include/phy.h will start including dm.h, which pulls in linux/compat.h after the attempted redefinition in arch/arm/include/asm/armv8/mmu.h, so move this include to allow redefinition. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-26net: phy: dp83867: switch to use ofnode apiGrygorii Strashko1-13/+12
Switch to use more generic ofnode API instead of FDT API. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Tested-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
2018-07-26net: phy: dp83867: add workaround for incorrect RX_CTRL pin strapMurali Karicheri1-0/+13
The data manual for DP83867IR/CR, SNLS484E[1], revised march 2017, advises that strapping RX_DV/RX_CTRL pin in mode 1 and 2 is not supported (see note below Table 5 (4-Level Strap Pins)). It further advises that if a board has this pin strapped in mode 1 and mode 2, then bit[7] of Configuration Register 4 (address 0x0031) must be cleared to 0. This is to ensure proper operation of PHY. Since it is not possible to detect in software if RX_DV/RX_CTRL pin is incorrectly strapped, add a device-tree property to advertise this and allow corrective action in software. [1] http://www.ti.com/lit/ds/snls484e/snls484e.pdf Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Reviewed-by: Hannes Schmelzer <oe5hpm@oevsv.at> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Tested-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
2018-07-26net: mvgbe: convert to DMChris Packham3-51/+279
Add driver model support to the mvgbe driver. As a temporary measure both DM and non-DM uses are supported. Once all the users have been converted the non-DM support can be dropped. Signed-off-by: Chris Packham <judge.packham@gmail.com> Tested-by: Michael Walle <michael@walle.cc> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-26net: mvgbe: prepare for conversion to driver modelChris Packham1-32/+83
Extract some function bodies to helper functions that can be reused in the DM/non-DM implementations. Signed-off-by: Chris Packham <judge.packham@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-26initialize net_mode.if_typeAndrew Thomas1-0/+1
if_type is not correctly initialized Failure to initialize if_type means that grub2/efinet sends a bogus arp request. It therefore gets no response. On Raspberry Pi 3B+ this leads to a pause at: lan78xx_eth Waiting for PHY auto negotiation to complete....... done lan78xx_eth Waiting for PHY auto negotiation to complete....... done Signed-off-by: Andrew Thomas <andrew.thomas@oracle.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>