summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* arm: Add support for Kobol Helios64 boardHEADmasterChristian Glombek2021-06-1212-0/+2064
| | | | | | | | | | | | | | The hardware is described in detail on Kobol's wiki at https://wiki.kobol.io/helios64/intro/. This commit is based on downstream work in Armbian by Aditya Prayoga [1]. The devicetree is taken from Linux v5.12-rc1 and was originally submitted there by Uwe Kleine-Koenig [2]. [1] https://github.com/ukleinek/armbian-build/blob/35c85295d351830aa59b624db524ba04b238faae/patch/kernel/rockchip64-current/add-board-helios64.patch [2] https://github.com/torvalds/linux/blob/7a7fd0de4a9804299793e564a555a49c1fc924cb/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts Signed-off-by: Dennis Gilmore <dennis@ausil.us>
* Merge https://source.denx.de/u-boot/custodians/u-boot-marvellTom Rini2021-06-105-5/+190
|\ | | | | | | | | | | - mvebu: Turris MOX misc updates (cmds, rescue mode, LED's etc) (Marek) - mvebu: correct Armada 8K addresses (Heinrich)
| * arm64: mvebu: correct Armada 8K addressesHeinrich Schuchardt2021-06-101-5/+5
| | | | | | | | | | | | | | 0x04000000- 0x06000000 is reserved memory. We cannot load to anything here. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Stefan Roese <sr@denx.de>
| * arm: mvebu: turris_mox: enable options for Turris network bootMarek Behún2021-06-101-0/+8
| | | | | | | | | | | | | | | | | | Enable configuration options to support Turris network boot. This includes FIT support and some crypto commands. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
| * arm: mvebu: dts: turris_mox: add nodes for SPI NOR partitionsMarek Behún2021-06-101-0/+31
| | | | | | | | | | | | | | | | Add nodes for SPI NOR partitions to the device tree of Turris MOX, as are in Linux' device tree. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
| * arm: mvebu: configs: turris_mox: add fdtfile default env variableMarek Behún2021-06-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | Add default fdtfile environment variable with value marvell/armada-3720-turris-mox.dtb. This can be useful for some boot scenarios. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
| * arm: mvebu: turris_mox: start blinking PHY LEDs when entering rescueMarek Behún2021-06-101-0/+35
| | | | | | | | | | | | | | | | | | Configure blinking on ethernet PHY LEDs on the MOX A board when entering rescue mode via reset button. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
| * arm: mvebu: turris_mox: add support for board rescue modeMarek Behún2021-06-103-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add necessary config options and board code to support board factory reset / rescue mode on Turris MOX. In order to also support invoking rescue mode from U-Boot console, without having to press the factory reset button, put the rescue command into `bootcmd_rescue` default environment variable. When factory reset button is pressed, invoke rescue mode via distroboot by setting `boot_targets` to `rescue`. Rescue boot from console can be invoked by running run bootcmd_rescue Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
| * arm: mvebu: dts: turris_mox: add button and LED nodesMarek Behún2021-06-101-0/+24
|/ | | | | | | | | Add nodes for indicator LED and reset button so that board code can implement board factory reset mechanism. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
* fs/squashfs: fix reading of fragmented filesJoao Marcos Costa2021-06-091-10/+6
| | | | | | | | | | | | | | | | | | | | | | | The fragmented files were not correctly read because of two issues: - The squashfs_file_info struct has a field named 'comp', which tells if the file's fragment is compressed or not. This field was always set to 'true' in sqfs_get_regfile_info and sqfs_get_lregfile_info. It should actually take sqfs_frag_lookup's return value. This patch addresses these two assignments. - In sqfs_read, the fragments (compressed or not) were copied to the output buffer through a for loop which was reading data at the wrong offset. Replace these loops by equivalent calls to memcpy, with the right parameters. I tested this patch by comparing the MD5 checksum of a few fragmented files with the respective md5sum output in sandbox, considering both compressed and uncompressed fragments. Signed-off-by: Joao Marcos Costa <jmcosta944@gmail.com> Tested-by: Richard Genoud <richard.genoud@posteo.net> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
* Merge https://source.denx.de/u-boot/custodians/u-boot-usbTom Rini2021-06-092-2/+9
|\ | | | | | | - dwc2 and cdns3 fixes
| * usb: dwc2: Avoid delay when initializing USB peripheral by dwc2João Loureiro2021-06-091-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When `usb start` is called on the terminal, the dwc2 driver will try to start every USB device as host first, even if it is explicitly configured as peripheral in the device tree (dr_mode = "peripheral"). So to avoid an unwanted 15 seconds delay when initializing the usb (one second per channel = 1s x 15), this patch adds a check to the initialization, and will skip host initialization of the device is explicitly set as peripheral. The checking is already done similarly in the `drivers/usb/gadget/dwc2_udc_otg.c` driver. Signed-off-by: João Loureiro <joaofl@gmail.com>
| * usb: cdns3: cdns3-ti: Fix clk_get_by_name() to get the correct nameKishon Vijay Abraham I2021-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | Kernel device tree got updated to use clock name as "ref" instead of "usb2_refclk". Fix cdns3-ti.c to use the correct name. Fixes: 70e167495ab2 ("arm: dts: k3-j721e: Sync Linux v5.11-rc6 dts into U-Boot") Fixes: 6239cc8c4e84 ("arm: dts: k3-j7200: Sync Linux v5.11-rc6 dts into U-Boot") Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
* | Merge tag 'efi-2021-07-rc5' of ↵Tom Rini2021-06-098-9/+167
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2021-07-rc5 Documentation: * pinmux and ums man-page Bug fixes: * Consider that partition numbers as hexadecimal. * Avoid a possible NULL dereference in efi_capsule_delete_file().
| * | efi_loader: fix Sphinx warningHeinrich Schuchardt2021-06-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Brackets '[' need to be escaped to avoid a build warning lib/efi_loader/efi_image_loader.c:223: WARNING: Inline strong start-string without end-string. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Masahisa Kojima <masahisa.kojima@linaro.org>
| * | efi_loader: efi_capsule_delete_file() NULL dereferenceHeinrich Schuchardt2021-06-091-1/+2
| | | | | | | | | | | | | | | | | | | | | If opening a file fails, the file handle pointer is not valid and must not be dereferenced. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | efi_loader: partition numbers are hexadecimalHeinrich Schuchardt2021-06-092-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we want to address partition 15 of virtio block device 11, we have to write: virtio b:f When calling sprintf() we must use %x for the device and partition numbers. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | doc: usage: man-page for ums commandPatrick Delaunay2021-06-092-0/+58
| | | | | | | | | | | | | | | | | | | | | Provide a man-page for the ums command - USB Mass Storage. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | cmd: Add dependency for ums commandPatrick Delaunay2021-06-091-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add the missing dependency for the command ums: - CONFIG_BLK: call of blk_* functions in usb_mass_storage.c - CONFIG_USB_GADGET: required to select CONFIG_USB_FUNCTION_MASS_STORAGE Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | doc: usage: man-page for pinmux commandPatrick Delaunay2021-06-092-0/+96
| | | | | | | | | | | | | | | | | | | | | Provide a man-page for the pinmux command. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
| * | doc: usage: reorder commands in index.rstPatrick Delaunay2021-06-091-3/+3
|/ / | | | | | | | | | | | | | | Reorder alphabetically the command in the index of usage in U-Boot documentation. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* | Merge https://source.denx.de/u-boot/custodians/u-boot-shTom Rini2021-06-0812-1115/+1834
|\ \ | |/ |/| | | - More pinctrl updates
| * pinctrl: renesas: Synchronize R-Car Gen2/Gen3 tables with Linux 5.12Marek Vasut2021-06-0712-1115/+1834
|/ | | | | | | | | Synchronize R-Car Gen2/Gen3 pinctrl tables with Linux 5.12, commit 9f4ad9e425a1 ("Linux 5.12") . This is a rather large commit, since the macros in sh-pfc.h also got updated, so all the PFC tables must be updated in lockstep. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
* Prepare v2021.07-rc4Tom Rini2021-06-071-1/+1
| | | | Signed-off-by: Tom Rini <trini@konsulko.com>
* configs: Resync with savedefconfigTom Rini2021-06-0712-68/+13
| | | | | | Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge tag 'u-boot-rockchip-20210606' of ↵Tom Rini2021-06-071-1/+1
|\ | | | | | | https://source.denx.de/u-boot/custodians/u-boot-rockchip
| * MAINTAINERS: Update maintainer's mail addressKever Yang2021-06-011-1/+1
| | | | | | | | | | | | | | | | Philipp has change the mail and the legacy one is not available, update it to the new one. CC: Philipp Tomsich <philipp.tomsich@vrull.eu> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
* | Merge tag 'dm-pull-6jun21' of https://source.denx.de/u-boot/custodians/u-boot-dmTom Rini2021-06-065-13/+44
|\ \ | | | | | | | | | Minor fixes for sandbox and handling of dm-ranges
| * | test: add dm_test_read_resourcePatrick Delaunay2021-06-051-0/+33
| | | | | | | | | | | | | | | | | | | | | Add a test of dev_read_resource with translation or without translation Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | net: luton: remove address translation after ofnode_read_resourcePatrick Delaunay2021-06-051-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed call of ofnode_translate_address() after ofnode_read_resource in luton_switch.c:luton_probe(); it is unnecessary since the commit feb7ac457c20 ("dm: core: Add address translation in fdt_get_resource"). Fixes: feb7ac457c20 ("dm: core: Add address translation in fdt_get_resource") Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reported-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
| * | pwm: cros_ec: Rename "priv_auto_alloc_size" to "priv_auto"Alper Nebi Yasak2021-06-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With commit 41575d8e4c33 ("dm: treewide: Rename auto_alloc_size members to be shorter") "priv_auto_alloc_size" was renamed to "priv_auto". This driver was sent to the mailing list before that change, merged after it, and still has the old form. Apply the rename here as well. Fixes: 1b9ee2882e6b ("pwm: Add a driver for Chrome OS EC PWM") Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | sandbox: correct determination of the text baseHeinrich Schuchardt2021-06-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | os_find_text_base() assumes that first line of /proc/self/maps holds information about the text. Hence we must call the function before calling os_malloc() which calls mmap(0x10000000,). Failure to do so has led to incorrect values for pc_reloc when an exception was reported => exception undefined Illegal instruction pc = 0x5628d82e9d3c, pc_reloc = 0x5628c82e9d3c as well as incorrect output of the bdinfo command => bdinfo relocaddr = 0x0000000007858000 reloc off = 0x0000000010000000 Fixes: b308d9fd18fa ("sandbox: Avoid using malloc() for system state") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | of: addr: Remove call to dev_count_cells() in of_get_address()Bin Meng2021-06-051-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In of_get_address(), there is: dev_count_cells(dev, &na, &ns); followed by: bus->count_cells(dev, &na, &ns); but no codes in between use na/ns, hence the first call is useless. By dropping the first call, dev_count_cells() is now useless too. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | of: addr: Translate 'dma-ranges' for parent nodes missing 'dma-ranges'Bin Meng2021-06-051-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'dma-ranges' frequently exists without parent nodes having 'dma-ranges'. While this is an error for 'ranges', this is fine because DMA capable devices always have a translatable DMA address. Also, with no 'dma-ranges' at all, the assumption is that DMA addresses are 1:1 with no restrictions unless perhaps the device itself has implicit restrictions. This keeps in sync with Linux kernel commit: 81db12ee15cb: of/address: Translate 'dma-ranges' for parent nodes missing 'dma-ranges' Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | Merge tag 'video-for-2021-07-rc3' of ↵Tom Rini2021-06-0511-25/+33
|\ \ \ | |/ / |/| | | | | | | | | | | | | | https://source.denx.de/u-boot/custodians/u-boot-video - disable legacy video for brxre1, mx28evk, pico-imx6ul, pxm2 and rut boards after DM_VIDEO conversion deadline
| * | pico-imx6ul: disable video after DM_VIDEO conversion deadlineAnatolij Gustschin2021-06-053-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | These boards were not converted to DM_VIDEO before deadline, so disable video support for now. Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Richard Hu <richard.hu@technexion.com> Cc: Fabio Estevam <festevam@gmail.com>
| * | brxre1: disable video after DM_VIDEO conversion deadlineAnatolij Gustschin2021-06-052-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | The board was not converted to DM_VIDEO before deadline, so disable video support for now. Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
| * | mx28evk: disable video after DM_VIDEO conversion deadlineAnatolij Gustschin2021-06-054-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | The board was not converted to DM_VIDEO before deadline, so disable video support for now. Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Fabio Estevam <festevam@gmail.com>
| * | siemens: pxm2: disable video after DM_VIDEO conversion deadlineAnatolij Gustschin2021-06-051-2/+2
| | | | | | | | | | | | | | | | | | | | | The board was not converted to DM_VIDEO before deadline, so disable video support for now. Signed-off-by: Anatolij Gustschin <agust@denx.de>
| * | siemens: rut: disable video after DM_VIDEO conversion deadlineAnatolij Gustschin2021-06-051-3/+2
|/ / | | | | | | | | | | | | The board was not converted to DM_VIDEO before deadline, so disable video support for now. Signed-off-by: Anatolij Gustschin <agust@denx.de>
* | Merge https://source.denx.de/u-boot/custodians/u-boot-marvellTom Rini2021-06-045-46/+287
|\ \ | | | | | | | | | | | | | | | - mvebu: a37xx: PCI related enhancements and fixes (Pali) - mvebu: turris_omnia: Board specific updates, e.g. rescue boot cmd etc (Marek)
| * | arm: mvebu: turris_omnia: support invoking rescue boot from consoleMarek Behún2021-06-042-24/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it possible to invoke rescue boot from U-Boot console, without having to press the factory reset button. This is needed when accessing the device remotely, for example. Achieve this by putting rescue command into `bootcmd_rescue` default environment variable and setting some distroboot environment variables to their default values when the factory button is pressed. Rescue boot from console can be invoked by running run bootcmd_rescue Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
| * | arm: mvebu: turris_omnia: update rescue mode boot commandMarek Behún2021-06-041-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Update rescue mode boot command on Turris Omnia. We are compressing the image with lzma now. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
| * | arm: a37xx: pci: Fix configuring PCIe resourcesPali Rohár2021-06-041-1/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `ranges` DT property of the PCIe node is currently ignored by Aardvark driver - all entries are used as transparent PCIe MEM, despite some of them being defined for IO in DT. This is because the driver does not setup PCIe outbound windows and thus a default configuration is used. This can cause an external abort on CPU when a device driver tries to access non-MEM space. Setup the PCIe windows according to the `ranges` property for all non-MEM resources (currently only IO) and also non-transparent MEM resources. Because Linux expects that bootloader does not setup Aardvark PCIe windows, disable them before booting Linux. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
| * | arm: a37xx: pci: Increase PCIe MEM size from 16 MiB to 127 MiBPali Rohár2021-06-041-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some configurations with more PCIe cards and PCIe bridges, 16 MiB of PCIe MEM space may not be enough. Since TF-A already allocates a 128 MiB CPU window for PCIe, and since IO port space is only 64 KiB in total, use all the remaining space (64 + 32 + 16 + 8 + 4 + 2 + 1 = 127 MiB) for PCIe MEM. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
| * | arm: a37xx: pci: Fix a3700_fdt_fix_pcie_regions() functionPali Rohár2021-06-041-14/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current version of this function uses a lot of incorrect assumptions about the `ranges` DT property: * parent(#address-cells) == 2 * #size-cells == 2 * number of entries == 2 * address size of first entry == 0x1000000 * second child address entry == base + 0x1000000 Trying to increase PCIe MEM space to more than 16 MiB leads to an overlap with PCIe IO space, and trying to define additional MEM space (as a third entry in the `ranges` DT property) causes U-Boot to crash when booting the kernel. ## Flattened Device Tree blob at 04f00000 Booting using the fdt blob at 0x4f00000 Loading Device Tree to 000000001fb01000, end 000000001fb08f12 ... OK ERROR: board-specific fdt fixup failed: <unknown error> - must RESET the board to recover. Fix a3700_fdt_fix_pcie_regions() to properly parse and update all addresses in the `ranges` property according to https://elinux.org/Device_Tree_Usage#PCI_Address_Translation Now it is possible to increase PCIe MEM space from 16 MiB to maximal value of 127 MiB. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Fixes: cb2ddb291ee6 ("arm64: mvebu: a37xx: add device-tree fixer for PCIe regions") Reviewed-by: Stefan Roese <sr@denx.de>
| * | arm: a37xx: pci: Find PCIe controller node by compatible instead of pathPali Rohár2021-06-041-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Find PCIe DT node by compatible string instead of retrieving it by using hardcoded DT path. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
| * | arm: a37xx: pci: Fix DT compatible string to Linux' DT compatiblePali Rohár2021-06-042-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change DT compatible string for A3700 PCIe from 'marvell,armada-37xx-pcie' to 'marvell,armada-3700-pcie' to make U-Boot A3700 PCIe DT node compatible with Linux' DT node. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
| * | arm: a37xx: pci: Disable bus mastering when unloading driverPali Rohár2021-06-041-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable Root Bridge I/O space, memory space and bus mastering in Aardvark's remove method, which is called before booting Linux kernel. This ensures that PCIe device which was initialized and used by U-Boot cannot do new DMA transfers until Linux initializes PCI subsystem and loads appropriate drivers for the device. During initialization of PCI subsystem Linux in fact disables this bus mastering on Root Bridge (and later enables it when driver is loaded and configured), but there is a possibility of a small window after U-Boot boots Linux when bus mastering is enabled, which is not correct. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
| * | arm: a37xx: pci: Don't put link into LTSSM Recovery state during probePali Rohár2021-06-041-5/+0
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During our debugging of the Aardvark driver in Linux we have discovered that the PCIE_CORE_LINK_CTRL_STAT_REG register in fact controls standard PCIe Link Control Register for PCIe Root Bridge. This led us to discover that the name of the PCIE_CORE_LINK_TRAINING macro and the corresponding comment by this macro's usage is misleading; this bit in fact controls Retrain Link, which, according to PCIe base spec is defined as: A write of 1b to this bit initiates Link retraining by directing the Physical Layer LTSSM to the Recovery state. If the LTSSM is already in Recovery or Configuration, re-entering Recovery is permitted but not required. Entering Recovery state is normally done from LTSSM L0, L0s and L1 states. But since the pci-aardvark.c driver enables Link Training just a few lines above, the controller is not in L0 ready state yet. So setting aardvark bit PCIE_CORE_LINK_TRAINING does not actually enter Recovery state at this place. Moreover, trying to enter LTSSM Recovery state without other configuration is causing issues for some cards (e.g. Atheros AR9xxx and QCA9xxx). Since Recovery state is not entered, these issues are not triggered. Remove code which tries to enter LTSSM Recovery state completely. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>