summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-09-03lmb: init: initialise the lmb data structures during board initSughosh Ganu
The memory map maintained by the LMB module is now persistent and global. This memory map is being maintained through the alloced list structure which can be extended at runtime -- there is one list for the available memory, and one for the used memory. Allocate and initialise these lists during the board init. Signed-off-by: Sughosh Ganu <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2024-09-03lmb: bootm: remove superfluous lmb stub functionsSughosh Ganu
Remove a couple of superfluous LMB stub functions, and instead put a check for calling the lmb_reserve() function. Signed-off-by: Sughosh Ganu <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2024-09-03lmb: remove lmb_init_and_reserve_range() functionSughosh Ganu
With the move to make the LMB allocations persistent and the common memory regions being reserved during board init, there is no need for an explicit reservation of a memory range. Remove the lmb_init_and_reserve_range() function. Signed-off-by: Sughosh Ganu <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Reviewed-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2024-09-03lmb: remove the lmb_init_and_reserve() functionSughosh Ganu
With the changes to make the LMB reservations persistent, the common memory regions are being added during board init. Remove the now superfluous lmb_init_and_reserve() function. Signed-off-by: Sughosh Ganu <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2024-09-03lmb: reserve common areas during board initSughosh Ganu
The LMB module provides API's for allocating and reserving chunks of memory which is then typically used for things like loading images for booting. Reserve the portion of memory that is occupied by the U-Boot image itself, and other parts of memory that might have been marked as reserved in the board's DTB. When executing in SPL, reserve the sections that get relocated to the ram memory, the stack and the global data structure and also the bss. Mark these regions of memory with the LMB_NOOVERWRITE flag to indicate that these regions cannot be re-requested or overwritten. Signed-off-by: Sughosh Ganu <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2024-09-03lmb: introduce a function to add memory to the lmb memory mapSughosh Ganu
Introduce a function lmb_add_memory() to add available memory to the LMB memory map. Call this function during board init once the LMB data structures have been initialised. Signed-off-by: Sughosh Ganu <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2024-09-03lmb: allow lmb module to be used in SPLSughosh Ganu
With the introduction of separate config symbols for the SPL phase of U-Boot, the condition checks need to be tweaked so that platforms that enable the LMB module in SPL are also able to call the LMB API's. Use the appropriate condition checks to achieve this. Signed-off-by: Sughosh Ganu <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2024-09-03lmb: config: add lmb config symbols for SPLSughosh Ganu
Add separate config symbols for enabling the LMB module for the SPL phase. The LMB module implementation now relies on alloced list data structure which requires heap area to be present. Add specific config symbol for the SPL phase of U-Boot so that this can be enabled on platforms which support a heap in SPL. Signed-off-by: Sughosh Ganu <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2024-09-03lmb: remove config symbols used for lmb region countSughosh Ganu
The LMB memory maps are now being maintained through a couple of alloced lists, one for the available(added) memory, and one for the used memory. These lists are not static arrays but can be extended at runtime. Remove the config symbols which were being used to define the size of these lists with the earlier implementation of static arrays. Signed-off-by: Sughosh Ganu <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2024-09-03lmb: allow for resizing lmb regionsSughosh Ganu
Allow for resizing of LMB regions if the region attributes match. The current code returns a failure status on detecting an overlapping address. This worked up until now since the LMB calls were not persistent and global -- the LMB memory map was specific and private to a given caller of the LMB API's. With the change in the LMB code to make the LMB reservations persistent, there needs to be a check on whether the memory region can be resized, and then do it if so. To distinguish between memory that cannot be resized, add a new flag, LMB_NOOVERWRITE. Reserving a region of memory with this attribute would indicate that the region cannot be resized. Signed-off-by: Sughosh Ganu <[email protected]>
2024-09-03lmb: make LMB memory map persistent and globalSughosh Ganu
The current LMB API's for allocating and reserving memory use a per-caller based memory view. Memory allocated by a caller can then be overwritten by another caller. Make these allocations and reservations persistent using the alloced list data structure. Two alloced lists are declared -- one for the available(free) memory, and one for the used memory. Once full, the list can then be extended at runtime. [sjg: Use a stack to store pointer of lmb struct when running lmb tests] Signed-off-by: Sughosh Ganu <[email protected]> Signed-off-by: Simon Glass <[email protected]> [sjg: Optimise the logic to add a region in lmb_add_region_flags()]
2024-09-03lmb: use the BIT macro for lmb flagsSughosh Ganu
Use the BIT macro for assigning values to the LMB flags instead of assigning random values to them. Signed-off-by: Sughosh Ganu <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2024-09-03lmb: staticize __lmb_alloc_base()Sughosh Ganu
The __lmb_alloc_base() function is only called from within the lmb module. Moreover, the lmb_alloc() and lmb_alloc_base() API's are good enough for the allocation API calls. Make the __lmb_alloc_base() function static. Signed-off-by: Sughosh Ganu <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2024-09-03lmb: remove the unused lmb_is_reserved() functionSughosh Ganu
The lmb_is_reserved() API is not used. There is another API, lmb_is_reserved_flags() which can be used to check if a particular memory region is reserved. Remove the unused API. Signed-off-by: Sughosh Ganu <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2024-09-03alist: add a helper to check if the list is fullSughosh Ganu
Add a helper function to check if the alist is full. This can then be used to extend the alist. Signed-off-by: Sughosh Ganu <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2024-09-03Merge patch series "net: dwc_eth_qos: Add glue driver for Intel MAC"Tom Rini
Philip Oberfichtner <[email protected]> says: This patch series implements the dwc_eth_qos glue driver for Intel SOCs. Before doing that, a few general adaptions to the dwc_eth_qos.c main driver are required. Most notably, the preparation for PCI based driver instances, which do not necessarily use a device tree.
2024-09-03net: dwc_eth_qos: Add glue driver for Intel MACPhilip Oberfichtner
Add dwc_eth_qos glue driver for the Intel Elkhart-Lake SOC. Signed-off-by: Philip Oberfichtner <[email protected]>
2024-09-03net: dwc_eth_qos: Implement bind() for PCI devicesPhilip Oberfichtner
PCI devices do not necessarily use a device tree. Implement a bind() function to assign unique device names in that case. Signed-off-by: Philip Oberfichtner <[email protected]>
2024-09-03net: dwc_eth_qos: Adapt probe() for PCI devicesPhilip Oberfichtner
PCI devices do not necessarily use a device tree. In that case, the driver currently fails to find eqos->config and eqos->regs. This commit factors out the respective functionality. Device tree usage remains default, but board specific implementations will be possible as well. Signed-off-by: Philip Oberfichtner <[email protected]>
2024-09-03net: dwc_eth_qos: Fix header to be self-containedPhilip Oberfichtner
Before this commit, usage of this header relied on a specific include order. Fix it by including all dependencies. Signed-off-by: Philip Oberfichtner <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
2024-09-03x86: provide mb() macroPhilip Oberfichtner
Implement a x86 memory barrier mb(). Furthermore, remove the previously used mfence() function, which does the same thing. The mb() macro is now equivalent to Linux (v6.9): linux/arch/x86/include/asm/barrier.h Signed-off-by: Philip Oberfichtner <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2024-09-03arm: mvebu: turris_omnia: Switch DDR speed to 1333H when reset 9 is selectedMarek Behún
Users experiencing random kernel crashes due to new versions of Marvell's DDR training algorithm can solve the issue by setting DDR speed to 1333H. But if kernel crashes, it has to be done in U-Boot, which is impossible without UART connection. In order to make it easier for users, use the rescue button mechanism: when rescue mode 9 is selected (that is when 10 LEDs are ON), U-Boot will train DDR in 1333H mode and also update EEPROM so that subsequent boot will use this mode. User has to use the `eeprom` command in U-Boot or `omnia-eeprom` command in OS to switch back to 1600K mode. Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2024-09-03arm: mvebu: turris_omnia: Use the i2c_eeprom misc driver for EEPROM reading ↵Marek Behún
in U-Boot proper Use the i2c_eeprom miscellaneous driver for reading Turris Omnia EEPROM in U-Boot proper. Keep using dm_i2c_read() in SPL build, since adding the i2c_eeprom driver to SPL build increases the image by 1.5 KiB. Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2024-09-03arm: mvebu: turris_omnia: Rename variable holding EEPROM udeviceMarek Behún
Rename the variable holding the EEPROM udevice from `chip` to `eeprom`. Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2024-09-02Merge tag 'u-boot-imx-next-20240902' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/22211 - Enable SPI NOR flash support and MTD partitions for phycore_imx8mp. - Convert mx6slevk to OF_UPSTREAM and watchdog DM. - Cleanup some mx5/mx6 USB options. - Make PLL settings configurable at board level. - Set CONFIG_SPL_LOAD_FIT_ADDRESS for verdin-imx8m/p. - Make the mxc-gpio reading state of GPIO pins in output mode to be consistent with the Linux kernel. - Add HUK derivation support for ELE AHAB.
2024-09-02Merge tag 'u-boot-amlogic-next-20240902' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-amlogic into next - meson_nand: R/W support for pages used by boot ROM
2024-09-02Merge tag 'v2024.10-rc4' into nextTom Rini
Prepare v2024.10-rc4
2024-09-02Prepare v2024.10-rc4v2024.10-rc4Tom Rini
Signed-off-by: Tom Rini <[email protected]>
2024-09-02ARM: imx: Wrap i.MX config options in MACH_IMXMarek Vasut
Wrap all the i.MX specific options in MACH_IMX, otherwise they keep showing up in other SoC vendor configurations. No functional change. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2024-09-01Merge tag 'dm-pull-1sep24' of https://gitlab.denx.de/u-boot/custodians/u-boot-dmTom Rini
Minor fixes for qconfig and patman
2024-09-01qconfig: Fix an incorrect format-string with negative valueSimon Glass
This is not allowed, so use ljust() instead. This fixes the 'qconfig -i -I help' command. Signed-off-by: Simon Glass <[email protected]> Fixes: 1bd43060b3e ("moveconfig: Use f strings where possible")
2024-09-01patman: Resolve python string vs. regex escaping syntaxBrian Norris
Python strings have their own notion of backslash-escaping, and that can conflict with the intentions for strings passed to the 're' module. In particular, I get warnings like this: tools/patman/../patman/commit.py:9: SyntaxWarning: invalid escape sequence '\s' re_subject_tag = re.compile('([^:\s]*):\s*(.*)') We should use a raw string (r'...') so that all escaping is passed into the regex module, not interpreted within the string itself. Signed-off-by: Brian Norris <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2024-08-30ARM: imx: Make PLL settings configurable at board levelMarek Vasut
Staticize intpll_configure(). Add weak board_imx_intpll_override() function which can be defined at board level to override specific PLL frequency settings early during boot. This can be used to for example force faster CPU core clock frequency if the hardware can handle it. Example of increasing CPU core clock to 1600 MHz on i.MX8M Plus: ``` int board_imx_intpll_override(enum pll_clocks pll, ulong *freq) { if (pll == ANATOP_ARM_PLL) *freq = MHZ(1600); return 0; } ``` Signed-off-by: Marek Vasut <[email protected]>
2024-08-30imx: Remove CFG_MXC_USB_PORTSCFabio Estevam
The definition of CFG_MXC_USB_PORTSC as (PORT_PTS_UTMI | PORT_PTS_PTW) can be removed from mx5/mx6/mx7/mx8m board config files as it is the default in drivers/usb/host/ehci-mx5.c and drivers/usb/host/ehci-mx6.c. Suggested-by: Tim Harvey <[email protected]> Signed-off-by: Fabio Estevam <[email protected]> Reviewed-by: Tim Harvey <[email protected]>
2024-08-30mx5: Remove CFG_MXC_USB_PORTFabio Estevam
CFG_MXC_USB_PORT is not used anywhere, so remove this unused symbol. Suggested-by: Tim Harvey <[email protected]> Signed-off-by: Fabio Estevam <[email protected]> Reviewed-by: Peng Fan <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
2024-08-30usb: ehci-mx5: Add a default for CFG_MXC_USB_PORTSCFabio Estevam
Just like drivers/usb/host/ehci-mx6.c, add a default for drivers/usb/host/ehci-mx5.c. The motivation for doing this is to remove CFG_MXC_USB_PORTSC from board config files. All the mx5 boards, with the exeption of mx51evk, define CFG_MXC_USB_PORTSC as: #define CFG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) So move this definition as a default into ehci-mx5.c. Signed-off-by: Fabio Estevam <[email protected]> Reviewed-by: Peng Fan <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
2024-08-30imx: Remove CFG_MXC_USB_FLAGSFabio Estevam
CFG_MXC_USB_FLAGS is only used for drivers/usb/host/ehci-mx5.c, so it can be removed from all the imx6/imx7/imx8m board config files. mx51evk.h is the only place CFG_MXC_USB_FLAGS is not set to 0. Suggested-by: Tim Harvey <[email protected]> Signed-off-by: Fabio Estevam <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2024-08-30configs: verdin-imx8m[mp]: set CONFIG_SPL_LOAD_FIT_ADDRESSRogerio Guerra Borin
Set the CONFIG_SPL_LOAD_FIT_ADDRESS for both verdin-imx8mm and verdin-imx8mp configurations to specify the load address for FIT images loaded by the SPL. As per lastest instructions from NXP, the generation of a HABv4 CSF (Command Sequence File) requires the U-Boot FIT image (u-boot.itb) load address to be set to a fixed value when binman is used. The address is defined by CONFIG_SPL_LOAD_FIT_ADDRESS. Here we set CONFIG_SPL_LOAD_FIT_ADDRESS to an address 64MB past the start of the DDR memory leaving plenty of room for the various DDR- residing artifacts to be moved to their usual load addresses which are close to the start of the DDR. Signed-off-by: Rogerio Guerra Borin <[email protected]> Signed-off-by: Hiago De Franco <[email protected]> Acked-by: Francesco Dolcini <[email protected]>
2024-08-30gpio: mxc_gpio: fix reading state of GPIO pins in output modeTomas Paukrt
The PSR register works correctly for GPIO pins in input mode, but always returns 0 for GPIO pins in output mode unless the SION bit is set. The DR register should be used for GPIO pins in output mode to allow correct getting of previously set output value. Please note that the Linux gpio-mxc driver and the NXP U-Boot mxc_gpio driver already use the DR register for all GPIO pins in output mode: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=442b2494b17d1a4f0a14721580271eb23ebffd42 https://github.com/nxp-imx/uboot-imx/commit/4afc3f90943c6b117f79b66d2cd04e64f437b0c2 Signed-off-by: Tomas Paukrt <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Reviewed-by: Fabio Estevam <[email protected]> Tested-by: Fabio Estevam <[email protected]>
2024-08-30Merge patch series "Add support for Ethernet Boot on SK-AM62"Tom Rini
Chintan Vankar <[email protected]> says: This series enables Ethernet Boot on SK-AM62 device. This series is based on commit 'f4f845b85926' of origin/next branch of U-Boot. Logs for Ethernet Boot for AM625-SK: https://gist.github.com/chintanv133/464782796a9a60b9f5a49e674c5fc31a
2024-08-30arm64: dts: ti: k3-am62x-sk-common: Add bootph-all property in phy_gmii_sel nodeChintan Vankar
Add missing bootph-all property for CPSW MAC's PHY node phy_gmii_sel. Reviewed-by: Sumit Garg <[email protected]> Signed-off-by: Chintan Vankar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vignesh Raghavendra <[email protected]> [ upstream commit: ba50141137fae205a731005e70687f4a52289050 ] (cherry picked from commit 2bdd1743a9f6515efe7c3648a25d63b4a9ce4a10) Reviewed-by: Sumit Garg <[email protected]>
2024-08-30arm: dts: k3-am625-r5-sk: Enable DM services for main_pktdmaSiddharth Vadapalli
Enable DM services for main_pktdma during R5 SPL stage. Reviewed-by: Alexander Sverdlin <[email protected]> Signed-off-by: Siddharth Vadapalli <[email protected]> Signed-off-by: Chintan Vankar <[email protected]>
2024-08-30configs: am62: Enable configs required for EthbootKishon Vijay Abraham I
Enable config options needed to support Ethernet boot on AM62x SK. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Siddharth Vadapalli <[email protected]> Signed-off-by: Chintan Vankar <[email protected]>
2024-08-30configs: am62: Add configs for enabling ETHBOOT in R5SPLKishon Vijay Abraham I
Add configs for enabling ETHBOOT in R5SPL. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Andreas Dannenberg <[email protected]> Signed-off-by: Siddharth Vadapalli <[email protected]> Signed-off-by: Chintan Vankar <[email protected]>
2024-08-30arm: mach-k3: am62x: am625_init: Probe AM65 CPSW NUSSKishon Vijay Abraham I
In order to support Ethernet boot on AM62x, probe AM65 CPSW NUSS driver in board_init_f(). Reviewed-by: Alexander Sverdlin <[email protected]> Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Siddharth Vadapalli <[email protected]> Signed-off-by: Chintan Vankar <[email protected]>
2024-08-30dma: ti: k3-udma: Add support for native configuration of chan/flowKishon Vijay Abraham I
In absence of Device Manager (DM) services such as at R5 SPL stage, driver will have to natively setup TCHAN/RCHAN/RFLOW cfg registers. Existing UDMA driver performed the above mentioned configuration for UDMA. Add similar configuration for PKTDMA here. Reviewed-by: Alexander Sverdlin <[email protected]> Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Siddharth Vadapalli <[email protected]> Signed-off-by: Chintan Vankar <[email protected]>
2024-08-30soc: ti: k3-navss-ringacc: Fix reconfiguration of qmode APIChintan Vankar
Function "k3_ringacc_ring_reconfig_qmode_raw()" should reset qmode to requested value and should not update other fields in ring configuration register. Signed-off-by: Chintan Vankar <[email protected]> Reviewed-by: Alexander Sverdlin <[email protected]> Reviewed-by: Vignesh Raghavendra <[email protected]>
2024-08-30soc: ti: k3-navss-ringacc: Fix reset ring APIVignesh Raghavendra
Expectation of k3_ringacc_ring_reset_raw() is to reset the ring to requested size and not to 0. Fix this. Signed-off-by: Vignesh Raghavendra <[email protected]> Signed-off-by: Siddharth Vadapalli <[email protected]> Signed-off-by: Chintan Vankar <[email protected]> Reviewed-by: Alexander Sverdlin <[email protected]>
2024-08-30soc: ti: k3-navss-ringacc: Initialize base address of ring cfg registersKishon Vijay Abraham I
Initialize base address of ring config registers required to natively setup ring cfg registers in the absence of Device Manager (DM) services at R5 SPL stage. Since register property is defined as "ring" for PKTDMA and "cfg" for UDMA, configure base address of ring configuration register accordingly. Reviewed-by: Alexander Sverdlin <[email protected]> Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Siddharth Vadapalli <[email protected]> Signed-off-by: Chintan Vankar <[email protected]>
2024-08-30firmware: ti_sci: Add No-OP for "RX_FL_CFG"Kishon Vijay Abraham I
RX_FL_CFG message should not be forwarded to TIFS and should be handled within R5 SPL (when DM services are not available). Add a no-op function to not handle RX_FL_CFG messages. Reviewed-by: Alexander Sverdlin <[email protected]> Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Siddharth Vadapalli <[email protected]> Signed-off-by: Chintan Vankar <[email protected]>