aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-08-04net: ping: reset stored IP addressMarek Szyprowski1-0/+4
Reset the stored ping IP address before entering a netloop with different protocol to ensure that it won't be interrupted by the received correct ICMP_ECHO_REPLY packet. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2020-08-04net: dwc_eth_qos: add Kconfig option to select supported configurationPatrick Delaunay2-6/+33
Add configuration flag to select the supported dwc driver configuration: - CONFIG_DWC_ETH_QOS_TEGRA186 - CONFIG_DWC_ETH_QOS_IMX - CONFIG_DWC_ETH_QOS_STM32 See Linux driver ethernet/stmicro/stmmac and associated glue layers for other configuration examples. This patch removes the not-selected compatibles and lets the linker remove the unused functions to reduce the size of the driver. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2020-08-04lmb/bdinfo: dump lmb info via bdinfoTero Kristo3-19/+31
Dump lmb status from the bdinfo command. This is useful for seeing the reserved memory regions from the u-boot cmdline. Signed-off-by: Tero Kristo <t-kristo@ti.com>
2020-08-04net: tftp: Add client support for RFC 7440Ramon Fried3-7/+86
Add support for RFC 7440: "TFTP Windowsize Option". This optional feature allows the client and server to negotiate a window size of consecutive blocks to send as an alternative for replacing the single-block lockstep schema. windowsize can be defined statically during compilation by setting CONFIG_TFTP_WINDOWSIZE, or defined in runtime by setting an environment variable: "tftpwindowsize" If not defined, the windowsize is set to 1, meaning that it behaves as it was never defined. Choosing the appropriate windowsize depends on the specific network topology, underlying NIC. You should test various windowsize scenarios and see which best work for you. Setting a windowsize too big can actually decreases performance. Signed-off-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Marek Vasut <marex@denx.de>
2020-08-04psci: put psci_method in .data section if EFI_LOADER is not enabledYann Gautier1-0/+4
Move the variable psci_method in .data section when EFI is not activated and the psci driver safely access it before relocation. Without this patch the variable is located in .bss section and the psci probe requested before relocation corrupts the device tree (probe is requested by board_f.c::print_resetinfo()). When EFI_LOADER is activated, this variable in already located in the .data.efi_runtime section by __efi_runtime_data. Signed-off-by: Yann Gautier <yann.gautier@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2020-08-04Fix corner case in bad block table handling.Doyle, Patrick1-1/+1
In the unlikely event that both blocks 10 and 11 are marked as bad (on a 32 bit machine), then the process of marking block 10 as bad stomps on cached entry for block 11. There are (of course) other examples. Signed-off-by: Patrick Doyle <pdoyle@irobot.com> Reviewed-by: Richard Weinberger <richard@nod.at>
2020-08-04cmd: add clone commandJohn Chau4-0/+136
This patch adds a feature for block device cloning similar to dd command, this should be useful for boot-strapping a device where usb gadget or networking is not available. For instance one can clone a factory image into a blank emmc from an external sd card. Signed-off-by: John Chau <john@harmon.hk>
2020-08-04fs/fat/fat.c: Do not perform zero block reads if there are no blocks leftJason Wessel1-1/+4
While using u-boot with qemu's virtio driver I stumbled across a problem reading files less than sector size. On the real hardware the block reader seems ok with reading zero blocks, and while we could fix the virtio host side of qemu to deal with a zero block read instead of crashing, the u-boot fat driver should not be doing zero block reads in the first place. If you ask hardware to read zero blocks you are just going to get zero data. There may also be other hardware that responds similarly to the virtio interface so this is worth fixing. Without the patch I get the following and have to restart qemu because it dies. --------------------------------- => fatls virtio 0:1 30 cmdline.txt => fatload virtio 0:1 ${loadaddr} cmdline.txt qemu-system-aarch64: virtio: zero sized buffers are not allowed --------------------------------- With the patch I get the expected results. --------------------------------- => fatls virtio 0:1 30 cmdline.txt => fatload virtio 0:1 ${loadaddr} cmdline.txt 30 bytes read in 11 ms (2 KiB/s) => md.b ${loadaddr} 0x1E 40080000: 64 77 63 5f 6f 74 67 2e 6c 70 6d 5f 65 6e 61 62 dwc_otg.lpm_enab 40080010: 6c 65 3d 30 20 72 6f 6f 74 77 61 69 74 0a le=0 rootwait. --------------------------------- Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2020-08-04Merge tag 'u-boot-imx-20200804' of ↵Tom Rini52-247/+1716
https://gitlab.denx.de/u-boot/custodians/u-boot-imx For 2020.10 ----------- - fixes for Toradex board - fix warnings from previous PR - HAB: reset instead of panic after failure - new board: MYiR Tech MYS-6ULX - mx6cuboxi: use OF_PLATDATA - further changes for DM Travis: https://travis-ci.org/github/sbabic/u-boot-imx/builds/714513163
2020-08-04Merge tag 'fixes-for-2020.10-rc1' of ↵Tom Rini2-4/+10
https://gitlab.denx.de/u-boot/custodians/u-boot-video - Fix tbs2910 vidconsole environment - Fix ipuv3 framebuffer output on i.MX6Q/D
2020-08-04Merge https://gitlab.denx.de/u-boot/custodians/u-boot-riscvTom Rini8-25/+239
- add DM based reset driver for SiFive SoC's.
2020-08-04Merge tag 'mips-pull-2020-08-03' of ↵Tom Rini15-8/+1072
https://gitlab.denx.de/u-boot/custodians/u-boot-mips - doc: fix qemu-mips build instructions - MIPS: add GPIO, CLK and SPI drivers for Octeon MIPS64
2020-08-03Merge branch '2020-08-01-misc-cleanups'Tom Rini137-138/+255
- Further cleanup of common.h and dm.h usage in headers
2020-08-03checkpatch: Don't allow common.h and dm.h in headersSimon Glass2-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>
2020-08-03patman: Fix up the test commentsSimon Glass1-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>
2020-08-03dm: core: Guard against including dm.h in header filesSimon Glass1-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>
2020-08-03net: Drop duplicate include of dm.h in pcnet.cSimon Glass1-1/+0
This file includes the header twice. Drop the second one. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-08-03net: Drop dm.h header file in eth_phy.hSimon Glass1-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>
2020-08-03clk: Drop dm.h header file in clk-provider.hSimon Glass5-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>
2020-08-03usb: Drop dm.h header fileSimon Glass3-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>
2020-08-03ufs: Drop dm.h header fileSimon Glass3-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>
2020-08-03nand: Drop dm.h header fileSimon Glass2-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>
2020-08-03adc: Drop dm.h header fileSimon Glass3-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>
2020-08-03mscc: Drop dm.h header fileSimon Glass6-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>
2020-08-03mediatek: Drop dm.h header fileSimon Glass1-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>
2020-08-03pci: Drop dm.h inclusion from header fileSimon Glass4-2/+3
The layerscape header should not include dm.h so remove it. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-08-03liebherr: Drop duplicate dm.h inclusionSimon Glass1-1/+0
We only need to include this header once. Drop the duplicate. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-08-03ti: am654: Drop duplicate dm.h inclusionSimon Glass1-1/+0
We only need to include this header once. Drop the duplicate. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-08-03spi: Drop duplicate dm.h inclusionSimon Glass1-1/+0
We only need to include this header once. Drop the duplicate. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-08-03mmc: Drop duplicate dm.h inclusionSimon Glass1-1/+0
We only need to include this header once. Drop the duplicate. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-08-03power: Tidy up inclusion of regulator_common.hSimon Glass4-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>
2020-08-03efi: Tidy up header includesSimon Glass3-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>
2020-08-03w1: Drop dm.h header fileSimon Glass3-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>
2020-08-03thermal: Drop dm.h header fileSimon Glass2-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>
2020-08-03sf: Drop dm.h header file from spi_flash.hSimon Glass5-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>
2020-08-03net: Drop dm.h header file from phy.hSimon Glass6-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>
2020-08-03fs: fs-loader: Drop dm.h header fileSimon Glass2-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>
2020-08-03dm: core: Drop header files from dm/test.hSimon Glass63-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>
2020-08-03dm: core: Drop dm.h header file from dm-demo.hSimon Glass2-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>
2020-08-03mtd: spi: Drop SPI_XFER_MMAP*Simon Glass1-2/+0
These two defines are no-longer supported. Drop them. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-08-03mtd: spi-mem: Drop dm.h header fileSimon Glass4-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>
2020-08-03wdt: Drop dm.h header fileSimon Glass1-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>
2020-08-03mtd: spi-nor: Tidy up error handling / debug codeSimon Glass3-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>
2020-08-03spi: Allow separate control of SPI_FLASH_TINY for SPL/TPLSimon Glass2-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>
2020-08-04configs: reset: fu540: enable dm reset framework for SiFiveSagar Shrikant Kadam3-0/+12
Add necessary defconfig and Kconfig entries to enable SiFive SoC's reset driver so as to utilise U-Boot's reset framework. Signed-off-by: Sagar Shrikant Kadam <sagar.kadam@sifive.com> Reviewed-by: Pragnesh Patel <Pragnesh.patel@sifive.com> Reviewed-by: Bin Meng <bin.meng@windriver.com> Tested-by: Bin Meng <bin.meng@windriver.com>
2020-08-04sifive: reset: add DM based reset driver for SiFive SoC'sSagar Shrikant Kadam3-15/+189
PRCI module within SiFive SoC's has register with which we can reset the sub-systems within the SoC. The resets to DDR and ethernet sub systems within FU540-C000 SoC are active low, and are hold low by default on power-up. Currently these are directly asserted within prci driver via register read/write. With the DM based reset driver support here, we bind the reset driver with clock (prci) driver and assert the reset signals of both sub-system's appropriately. Signed-off-by: Sagar Shrikant Kadam <sagar.kadam@sifive.com> Reviewed-by: Pragnesh Patel <Pragnesh.patel@sifive.com> Reviewed-by: Bin Meng <bin.meng@windriver.com> Tested-by: Bin Meng <bin.meng@windriver.com>
2020-08-04fu540: dtsi: add reset producer and consumer entriesSagar Shrikant Kadam1-0/+12
The resets to DDR and ethernet sub-system are connected to PRCI device reset control register, these reset signals are active low and are held low at power-up. Add these reset producer and consumer details needed by the reset driver. Signed-off-by: Sagar Shrikant Kadam <sagar.kadam@sifive.com> Reviewed-by: Pragnesh Patel <pragnesh.patel@sifive.com> Reviewed-by: Bin Meng <bin.meng@windriver.com>
2020-08-04fu540: prci: use common reset indexes defined in binding headerSagar Shrikant Kadam1-10/+7
Indexes of reset signals available in PRCI driver are also defined in include/dt-bindings/reset/sifive-fu540-prci.h. So use those instead of defining new ones again within the fu540-prci driver. Signed-off-by: Sagar Shrikant Kadam <sagar.kadam@sifive.com> Reviewed-by: Pragnesh Patel <pragnesh.patel@sifive.com> Reviewed-by: Bin Meng <bin.meng@windriver.com>
2020-08-04dt-bindings: prci: add indexes for reset signals available in prciSagar Shrikant Kadam1-0/+19
Add bit indexes for reset signals within the PRCI module on FU540-C000 SoC. The DDR and ethernet sub-system's have reset signals indicated by these reset indexes. Signed-off-by: Sagar Shrikant Kadam <sagar.kadam@sifive.com> Reviewed-by: Pragnesh Patel <pragnesh.patel@sifive.com> Reviewed-by: Bin Meng <bin.meng@windriver.com>
2020-08-03video: ipuv3: fix framebuffer base address init with multiple IPUsAnatolij Gustschin1-4/+9
Since commit 7812bbdc3732 ("video: Correctly handle multiple framebuffers") the vidconsole output is missing on the primary display on boards with two IPU units (all i.MX6Q/D based boards). The base address of the allocated framebuffer is not correctly programmed in the display controller. Fix it. Reported-by: Soeren Moch <smoch@web.de> Signed-off-by: Anatolij Gustschin <agust@denx.de> Tested-by: Soeren Moch <smoch@web.de>