Re: [PATCH v2 32/32] lmb: add logic to print lmb flag strings

2024-08-21 Thread Sughosh Ganu
On Wed, 21 Aug 2024 at 07:41, Simon Glass wrote: > > Hi Sughosh, > > On Tue, 20 Aug 2024 at 04:23, Sughosh Ganu wrote: > > > > On Fri, 16 Aug 2024 at 02:03, Simon Glass wrote: > > > > > > Hi Sughosh, > > > > > > On Wed, 14 Aug 2024 at 05:03, Sughosh Ganu > > > wrote: > > > > > > > > Instead of

Re: [PATCH] board/qualcomm: add debug config fragments for some SoCs

2024-08-21 Thread Neil Armstrong
On 21/08/2024 01:00, Caleb Connolly wrote: We already have some documentation describing how to enable debug UART for Qualcomm SoCs. However the UART address varies per-soc... Add some config fragments to enable debug UART for few well supported SoCs. These can be used like: $ make qcom_defconf

Re: clarifying i2c_get_chip_for_busnum()

2024-08-21 Thread Quentin Schulz
Hi Simon, On 8/21/24 4:11 AM, Simon Glass wrote: Hi, On Tue, 20 Aug 2024 at 07:34, Quentin Schulz wrote: Hi, On 8/20/24 3:01 PM, Sahaj Sarup wrote: [You don't often get email from sahaj.sa...@linaro.org. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] On Tu

Re: [PATCH] config: imx: Add PHYTEC's phycore-imx8mm-fspi_defconfig

2024-08-21 Thread Lukasz Majewski
Hi Teresa, > Hello Lukasz, > > Am Donnerstag, dem 15.08.2024 um 10:40 +0200 schrieb Lukasz Majewski: > > This configuration file provides support for booting phycore module > > (on e.g. polis-rdk base development board) from QSPI memory. > > > > Moreover, the SDP SPL gadget is supported, so sing

Re: [PATCH v8 00/23] Introduce the lwIP network stack

2024-08-21 Thread Jerome Forissier
On 8/20/24 00:08, Tom Rini wrote: > On Mon, Aug 19, 2024 at 04:53:51PM +0200, Jerome Forissier wrote: >> >> >> On 8/16/24 20:40, Tom Rini wrote: >>> On Fri, Aug 16, 2024 at 06:21:24PM +0200, Jerome Forissier wrote: On 8/7/24 22:44, Tom Rini wrote: > On Wed, Aug 07, 2024 at 07:

Re: [PATCH v1 2/3] riscv: cache: Add CBO instructions

2024-08-21 Thread Mayuresh Chitale
On Tue, Aug 20, 2024 at 5:49 PM Heinrich Schuchardt wrote: > > On 20.08.24 11:37, Mayuresh Chitale wrote: > > Define CBO inval and flush instructions and use those for the > > dcache inval and flush operations respectively. > > > > Signed-off-by: Mayuresh Chitale > > --- > > arch/riscv/Kconfig

Re: [PATCH v1 3/3] board: qemu-riscv: Override enable_caches

2024-08-21 Thread Mayuresh Chitale
Hi Heinrich, On Tue, Aug 20, 2024 at 5:43 PM Heinrich Schuchardt wrote: > > On 20.08.24 11:37, Mayuresh Chitale wrote: > > Define enable_caches function for the qemu-riscv board which probes for > > the cbom-block-size dt property when RISCV_ISA_ZICBOM is enabled. Also > > add flush_dcache_range

Re: [PATCH v1 3/3] board: qemu-riscv: Override enable_caches

2024-08-21 Thread Heinrich Schuchardt
On 21.08.24 11:11, Mayuresh Chitale wrote: Hi Heinrich, On Tue, Aug 20, 2024 at 5:43 PM Heinrich Schuchardt wrote: On 20.08.24 11:37, Mayuresh Chitale wrote: Define enable_caches function for the qemu-riscv board which probes for the cbom-block-size dt property when RISCV_ISA_ZICBOM is enabl

Re: [PATCH] config: imx: Add support for Phytec's phycore imx8mm running SDP gadget

2024-08-21 Thread Benjamin Hahn
On 19.08.24 16:36, Lukasz Majewski wrote: > Hi Benjamin, > >> Hi Lukasz, >> did you test this? It does not work for me. When I try it, the U-Boot >> hangs in SPL. Here is what I got: >> From Host: >> >> bhahn@llp-hahn:~/git-repos/u-boot$ sudo uuu -b spl >> build/mini/flash.bin uuu (Universal Upda

Re: [PATCH v1 2/3] riscv: cache: Add CBO instructions

2024-08-21 Thread Conor Dooley
On Tue, Aug 20, 2024 at 02:14:01PM +0200, Heinrich Schuchardt wrote: > On 20.08.24 11:37, Mayuresh Chitale wrote: > > +void riscv_zicbom_init(void) > > +{ > > + struct udevice *dev; > > + > > + if (!CONFIG_IS_ENABLED(RISCV_ISA_ZICBOM)) > > + return; > > + > > + uclass_first_device(U

Re: [PATCH v1 2/3] riscv: cache: Add CBO instructions

2024-08-21 Thread Conor.Dooley
On 21/08/2024 10:57, Conor Dooley wrote: > On Tue, Aug 20, 2024 at 02:14:01PM +0200, Heinrich Schuchardt wrote: >> On 20.08.24 11:37, Mayuresh Chitale wrote: >>> +void riscv_zicbom_init(void) >>> +{ >>> + struct udevice *dev; >>> + >>> + if (!CONFIG_IS_ENABLED(RISCV_ISA_ZICBOM)) >>> +

Re: [PATCH v2 14/32] lmb: introduce a function to add memory to the lmb memory map

2024-08-21 Thread Sughosh Ganu
On Wed, 21 Aug 2024 at 10:59, Sughosh Ganu wrote: > > On Wed, 21 Aug 2024 at 07:41, Simon Glass wrote: > > > > Hi Sughosh, > > > > On Tue, 20 Aug 2024 at 02:17, Sughosh Ganu wrote: > > > > > > On Fri, 16 Aug 2024 at 02:04, Simon Glass wrote: > > > > > > > > Hi Sughosh, > > > > > > > > On Wed, 1

Re: [PATCH] config: imx: Add support for Phytec's phycore imx8mm running SDP gadget

2024-08-21 Thread Lukasz Majewski
Hi Benjamin, > On 19.08.24 16:36, Lukasz Majewski wrote: > > Hi Benjamin, > > > >> Hi Lukasz, > >> did you test this? It does not work for me. When I try it, the > >> U-Boot hangs in SPL. Here is what I got: > >> From Host: > >> > >> bhahn@llp-hahn:~/git-repos/u-boot$ sudo uuu -b spl > >> buil

[PATCH v3 00/27] Make LMB memory map global and persistent

2024-08-21 Thread Sughosh Ganu
This is a follow-up from an earlier RFC series [1] for making the LMB and EFI memory allocations work together. This is a non-rfc version with only the LMB part of the patches, for making the LMB memory map global and persistent. This is part one of a set of patches which aim to have the LMB and

[PATCH v3 01/27] alist: add a helper to check if the list is full

2024-08-21 Thread Sughosh 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 --- Changes since V2: None include/alist.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/alist.h b/include/alist.h index 586a1efa5c..68d268f01a

[PATCH v3 02/27] lmb: remove the unused lmb_is_reserved() function

2024-08-21 Thread Sughosh 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 Reviewed-by: Ilias Apalodimas Reviewed-by: Simon Glass --- Changes since V2: None inclu

[PATCH v3 03/27] lmb: staticize __lmb_alloc_base()

2024-08-21 Thread 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 Reviewed-by: Ilias Apalodimas Reviewed-by: Simon

[PATCH v3 04/27] lmb: use the BIT macro for lmb flags

2024-08-21 Thread Sughosh Ganu
Use the BIT macro for assigning values to the LMB flags instead of assigning random values to them. Signed-off-by: Sughosh Ganu Reviewed-by: Simon Glass --- Changes since V2: * Use a value of 0 for LMB_NONE instead of BIT(0) include/lmb.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions

[PATCH v3 06/27] lmb: allow for resizing lmb regions

2024-08-21 Thread Sughosh 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 AP

[PATCH v3 07/27] lmb: remove config symbols used for lmb region count

2024-08-21 Thread Sughosh 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

[PATCH v3 08/27] lmb: config: add lmb config symbols for SPL

2024-08-21 Thread Sughosh 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

[PATCH v3 09/27] lmb: allow lmb module to be used in SPL

2024-08-21 Thread Sughosh 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 Reviewed

[PATCH v3 10/27] lmb: introduce a function to add memory to the lmb memory map

2024-08-21 Thread Sughosh 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 Reviewed-by: Simon Glass --- Changes since V2: * Do not define lmb_add_memory() as a weak func

[PATCH v3 11/27] lmb: reserve common areas during board init

2024-08-21 Thread Sughosh 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 bo

[PATCH v3 12/27] lmb: remove the lmb_init_and_reserve() function

2024-08-21 Thread Sughosh 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 Reviewed-by: Simon Glass --- Changes since V2: None arch/arm/mach-apple/board.c

[PATCH v3 13/27] lmb: remove lmb_init_and_reserve_range() function

2024-08-21 Thread Sughosh 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 Reviewed-by: Ilias Apalodimas Reviewe

[PATCH v3 14/27] lmb: bootm: remove superfluous lmb stub functions

2024-08-21 Thread Sughosh 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 Reviewed-by: Simon Glass --- Changes since V2: None boot/bootm.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/boot/boot

[PATCH v3 15/27] lmb: init: initialise the lmb data structures during board init

2024-08-21 Thread Sughosh 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 th

[PATCH v3 16/27] ppc: lmb: move arch specific lmb reservations to arch_misc_init()

2024-08-21 Thread Sughosh Ganu
All the current function definitions of arch_lmb_reserve() are doing the same thing -- reserve the U-Boot memory region. The powerpc(ppc) architecture, in addition, is making some LMB reservations for the bootm related image loading. Move these ppc specific reservations to the arch_misc_init() func

[PATCH v3 17/27] lmb: do away with arch_lmb_reserve()

2024-08-21 Thread Sughosh Ganu
All of the current definitions of arch_lmb_reserve() are doing the same thing -- reserve the region of memory occupied by U-Boot, starting from the current stack address to the ram_top. Introduce a function lmb_reserve_uboot_region() which does this, and do away with the arch_lmb_reserve() function

[PATCH v3 18/27] lmb: remove the unused board_lmb_reserve() function

2024-08-21 Thread Sughosh Ganu
The board_lmb_reserve() function is not being used, and currently there is only an empty weak function defined. Remove this unused function. Signed-off-by: Sughosh Ganu --- Changes since V2: New patch include/lmb.h | 2 -- lib/lmb.c | 6 -- 2 files changed, 8 deletions(-) diff --git a/

[PATCH v3 19/27] sandbox: move the TCG event log to the start of ram memory

2024-08-21 Thread Sughosh Ganu
The TCG event log buffer is being set at the end of ram memory. This region of memory is to be reserved as LMB_NOMAP memory in the LMB memory map. The current location of this buffer overlaps with the memory region reserved for the U-Boot image, which is at the top of the usable memory. This worked

[PATCH v3 20/27] spl: call spl_board_init() at the end of the spl init sequence

2024-08-21 Thread Sughosh Ganu
The spl_board_init() function on sandbox invokes the unit tests. Invoking the tests should be done once the rest of the system has been initialised. Call the spl_board_init() function at the very end, once the rest of the initilisation functions have been called, including the setting up of the LMB

[PATCH v3 21/27] spl: sandbox: initialise the ram banksize in spl

2024-08-21 Thread Sughosh Ganu
Initialise the ram bank information for sandbox in SPL. The ram bank information gets initialised as part of the SPL initialisation sequence in board_init_r(), which is then used for adding available memory to the LMB memory map. Signed-off-by: Sughosh Ganu Reviewed-by: Simon Glass --- Changes s

[PATCH v3 22/27] sandbox: spl: enable lmb config for SPL

2024-08-21 Thread Sughosh Ganu
Enable the LMB config in SPL. This helps in testing the LMB code in SPL on sandbox. Signed-off-by: Sughosh Ganu Reviewed-by: Simon Glass --- Changes since V2: None configs/sandbox_noinst_defconfig | 1 + configs/sandbox_spl_defconfig| 1 + 2 files changed, 2 insertions(+) diff --git a/con

[PATCH v3 23/27] sandbox: iommu: remove lmb allocation in the driver

2024-08-21 Thread Sughosh Ganu
The sandbox iommu driver uses the LMB module to allocate a particular range of memory for the device virtual address(DVA). This used to work earlier since the LMB memory map was caller specific and not global. But with the change to make the LMB allocations global and persistent, adding this memory

[PATCH v3 24/27] zynq: lmb: do not add to lmb map before relocation

2024-08-21 Thread Sughosh Ganu
The LMB memory is typically not needed very early in the platform's boot. Do not add memory to the LMB map before relocation. Reservation of common areas and adding of memory is done after relocation. Signed-off-by: Sughosh Ganu --- Changes since V2: None board/xilinx/common/board.c | 31 --

[PATCH v3 25/27] stm32mp: allow calling optee_get_reserved_memory() from U-Boot

2024-08-21 Thread Sughosh Ganu
The optee_get_reserved_memory() function returns the OP-TEE base address and size. The function gets these values from the FDT. Currently, this function is defined only to be called in the SPL phase. Move this function to a place where it can be invoked from the main U-Boot phase, where it will be

[PATCH v3 26/27] stm32mp: compute ram_top based on the optee base address

2024-08-21 Thread Sughosh Ganu
The value of ram_top address currently gets computed in an indirect manner. The boot_fdt_add_mem_rsv_regions() function gets called first to reserve the memory region occupied by OP-TEE in the LMB memory map. This is followed by a call to the lmb_alloc() API, which returns an address which is below

[PATCH v3 27/27] lmb: add logic to print lmb flag strings

2024-08-21 Thread Sughosh Ganu
Instead of printing the LMB flags as numerical values, print them as strings. This makes it easier to understand what flags are associated with the lmb region. Also make corresponding changes to the bdinfo command's test code. Signed-off-by: Sughosh Ganu --- Changes since V2: * Change the logic t

Re: [PATCH] usb: gadget: ether: Handle gadget driver registration in start and stop

2024-08-21 Thread Mattijs Korpershoek
On mar., août 20, 2024 at 19:12, Marek Vasut wrote: > On 8/20/24 7:11 PM, Caleb Connolly wrote: >> >>> Instead, to enable usb ethernet, we should manually bind the UDC driver >>> to the usb_ether gadget. >>> >>> For example, on Khadas VIM3 board, this can be done with: >>> >>> => bind /soc/usb@f

[PATCH v3 05/27] lmb: make LMB memory map persistent and global

2024-08-21 Thread Sughosh 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

[PATCH v2 0/7] Qualcomm: add support for SC7280 and the RB3 Gen 2

2024-08-21 Thread Caleb Connolly
Introduce support for the SC7280 platform and specifically the RB3 Gen 2 development board. The RB3 Gen 2 is the latest robotics board from Qualcomm, featuring a QCM6490 SoC (the same SoC found in the Fairphone 5), 6GB of RAM, and 128GB of UFS storage, as well as a whole lot of I/O. Most of the I

[PATCH v2 1/7] clk/qcom: add initial clock driver for sc7280

2024-08-21 Thread Caleb Connolly
We don't actually need any clocks to get UFS up and running, resets are useful though. Reviewed-by: Neil Armstrong Signed-off-by: Caleb Connolly --- drivers/clk/qcom/Kconfig| 8 +++ drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/clock-qcom.h | 1 + drivers/clk/qcom/cloc

[PATCH v2 2/7] dts: qcs6490-rb3gen2-u-boot: add override dtsi

2024-08-21 Thread Caleb Connolly
For running U-Boot as primary bootloader we must define the memory layout statically. Signed-off-by: Caleb Connolly --- arch/arm/dts/qcs6490-rb3gen2-u-boot.dtsi | 23 +++ 1 file changed, 23 insertions(+) diff --git a/arch/arm/dts/qcs6490-rb3gen2-u-boot.dtsi b/arch/arm/dts/q

[PATCH v2 3/7] dts: qcs6490-rb3gen2-u-boot: USB host mode

2024-08-21 Thread Caleb Connolly
Adjust DTS so USB runs in host mode. The type-c port is the only supported port (since the others need PCIe). Booting from USB is possible with a powered type-c dock. Signed-off-by: Caleb Connolly --- arch/arm/dts/qcs6490-rb3gen2-u-boot.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git

[PATCH v2 4/7] iommu: qcom-smmu: add sc7280-smmu-500 compatible

2024-08-21 Thread Caleb Connolly
This soc doesn't have the generic compatible. Reviewed-by: Neil Armstrong Signed-off-by: Caleb Connolly --- drivers/iommu/qcom-hyp-smmu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iommu/qcom-hyp-smmu.c b/drivers/iommu/qcom-hyp-smmu.c index 7b646d840dd4..1b5a09bb7b39 100644 ---

[PATCH v2 5/7] qcom_defconfig: enable SC7280 clocks

2024-08-21 Thread Caleb Connolly
Enable clocks on SC7280 Reviewed-by: Neil Armstrong Signed-off-by: Caleb Connolly --- configs/qcom_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/qcom_defconfig b/configs/qcom_defconfig index 24b71ba7be29..1a079264a554 100644 --- a/configs/qcom_defconfig +++ b/configs/qco

[PATCH v2 6/7] configs: add qcm6490_defconfig

2024-08-21 Thread Caleb Connolly
Introduce a defconfig for the RB3 Gen 2 and other QCM6490 boards with a dedicated uefi partition. These can replace EDK2 entirely with U-Boot. Signed-off-by: Caleb Connolly --- MAINTAINERS | 1 + configs/qcm6490_defconfig | 18 ++ 2 files changed, 19 insertions(+)

[PATCH v2 7/7] doc: board/qualcomm: document rb3gen2 building/flashing

2024-08-21 Thread Caleb Connolly
The process here is almost identical to the Dragonboard 410c, we've come full circle! Signed-off-by: Caleb Connolly --- doc/board/qualcomm/index.rst | 1 + doc/board/qualcomm/rb3gen2.rst | 53 ++ 2 files changed, 54 insertions(+) diff --git a/doc/board

Re: clarifying i2c_get_chip_for_busnum()

2024-08-21 Thread Simon Glass
Hi Quentin, On Wed, 21 Aug 2024 at 02:19, Quentin Schulz wrote: > > Hi Simon, > > On 8/21/24 4:11 AM, Simon Glass wrote: > > Hi, > > > > On Tue, 20 Aug 2024 at 07:34, Quentin Schulz > > wrote: > >> > >> Hi, > >> > >> On 8/20/24 3:01 PM, Sahaj Sarup wrote: > >>> [You don't often get email from s

Re: [PATCH v2 32/32] lmb: add logic to print lmb flag strings

2024-08-21 Thread Simon Glass
Hi Sughosh, On Wed, 21 Aug 2024 at 01:48, Sughosh Ganu wrote: > > On Wed, 21 Aug 2024 at 07:41, Simon Glass wrote: > > > > Hi Sughosh, > > > > On Tue, 20 Aug 2024 at 04:23, Sughosh Ganu wrote: > > > > > > On Fri, 16 Aug 2024 at 02:03, Simon Glass wrote: > > > > > > > > Hi Sughosh, > > > > > >

Re: [PATCH v2 14/32] lmb: introduce a function to add memory to the lmb memory map

2024-08-21 Thread Simon Glass
+Bin Meng Hi Sughosh, On Tue, 20 Aug 2024 at 23:29, Sughosh Ganu wrote: > > On Wed, 21 Aug 2024 at 07:41, Simon Glass wrote: > > > > Hi Sughosh, > > > > On Tue, 20 Aug 2024 at 02:17, Sughosh Ganu wrote: > > > > > > On Fri, 16 Aug 2024 at 02:04, Simon Glass wrote: > > > > > > > > Hi Sughosh, >

Re: [PATCH v2 1/7] clk/qcom: add initial clock driver for sc7280

2024-08-21 Thread Simon Glass
Hi Caleb, On Wed, 21 Aug 2024 at 07:42, Caleb Connolly wrote: > > We don't actually need any clocks to get UFS up and running, resets are > useful though. > > Reviewed-by: Neil Armstrong > Signed-off-by: Caleb Connolly > --- > drivers/clk/qcom/Kconfig| 8 +++ > drivers/clk/qcom/Makef

Re: [PATCH v2 2/7] dts: qcs6490-rb3gen2-u-boot: add override dtsi

2024-08-21 Thread Simon Glass
Hi Caleb, On Wed, 21 Aug 2024 at 07:42, Caleb Connolly wrote: > > For running U-Boot as primary bootloader we must define the memory > layout statically. > > Signed-off-by: Caleb Connolly > --- > arch/arm/dts/qcs6490-rb3gen2-u-boot.dtsi | 23 +++ > 1 file changed, 23 inserti

Re: [PATCH v2 5/7] qcom_defconfig: enable SC7280 clocks

2024-08-21 Thread Simon Glass
On Wed, 21 Aug 2024 at 07:42, Caleb Connolly wrote: > > Enable clocks on SC7280 > > Reviewed-by: Neil Armstrong > Signed-off-by: Caleb Connolly > --- > configs/qcom_defconfig | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Simon Glass > > diff --git a/configs/qcom_defconfig b/configs/q

Re: [PATCH v2 4/7] iommu: qcom-smmu: add sc7280-smmu-500 compatible

2024-08-21 Thread Simon Glass
On Wed, 21 Aug 2024 at 07:42, Caleb Connolly wrote: > > This soc doesn't have the generic compatible. > > Reviewed-by: Neil Armstrong > Signed-off-by: Caleb Connolly > --- > drivers/iommu/qcom-hyp-smmu.c | 1 + > 1 file changed, 1 insertion(+) > Reviewed-by: Simon Glass > diff --git a/drive

Re: [PATCH v2 6/7] configs: add qcm6490_defconfig

2024-08-21 Thread Simon Glass
On Wed, 21 Aug 2024 at 07:43, Caleb Connolly wrote: > > Introduce a defconfig for the RB3 Gen 2 and other QCM6490 boards with a > dedicated uefi partition. These can replace EDK2 entirely with U-Boot. > > Signed-off-by: Caleb Connolly > --- > MAINTAINERS | 1 + > configs/qcm6490_d

Re: [PATCH v2 7/7] doc: board/qualcomm: document rb3gen2 building/flashing

2024-08-21 Thread Simon Glass
On Wed, 21 Aug 2024 at 07:43, Caleb Connolly wrote: > > The process here is almost identical to the Dragonboard 410c, we've come > full circle! > > Signed-off-by: Caleb Connolly > --- > doc/board/qualcomm/index.rst | 1 + > doc/board/qualcomm/rb3gen2.rst | 53 > ++

Re: [PATCH v2 1/7] clk/qcom: add initial clock driver for sc7280

2024-08-21 Thread Caleb Connolly
Hi Simon, +U_BOOT_DRIVER(gcc_sc7280) = { + .name = "gcc_sc7280", + .id = UCLASS_NOP, + .of_match = gcc_sc7280_of_match, + .bind = qcom_cc_bind, + .flags = DM_FLAG_PRE_RELOC | DM_FLAG_DEFAULT_PD_CTRL_OFF, +}; This shoul

Re: [PATCH v2 32/32] lmb: add logic to print lmb flag strings

2024-08-21 Thread Sughosh Ganu
On Wed, 21 Aug 2024 at 19:30, Simon Glass wrote: > > Hi Sughosh, > > On Wed, 21 Aug 2024 at 01:48, Sughosh Ganu wrote: > > > > On Wed, 21 Aug 2024 at 07:41, Simon Glass wrote: > > > > > > Hi Sughosh, > > > > > > On Tue, 20 Aug 2024 at 04:23, Sughosh Ganu > > > wrote: > > > > > > > > On Fri, 16

Re: [PATCH v2 1/7] clk/qcom: add initial clock driver for sc7280

2024-08-21 Thread Simon Glass
Hi Caleb, On Wed, 21 Aug 2024 at 08:11, Caleb Connolly wrote: > > Hi Simon, > >> +U_BOOT_DRIVER(gcc_sc7280) = { > >> + .name = "gcc_sc7280", > >> + .id = UCLASS_NOP, > >> + .of_match = gcc_sc7280_of_match, > >> + .bind = qcom_cc_bind,

Re: [PATCH v2 14/32] lmb: introduce a function to add memory to the lmb memory map

2024-08-21 Thread Sughosh Ganu
On Wed, 21 Aug 2024 at 19:30, Simon Glass wrote: > > +Bin Meng > > Hi Sughosh, > > On Tue, 20 Aug 2024 at 23:29, Sughosh Ganu wrote: > > > > On Wed, 21 Aug 2024 at 07:41, Simon Glass wrote: > > > > > > Hi Sughosh, > > > > > > On Tue, 20 Aug 2024 at 02:17, Sughosh Ganu > > > wrote: > > > > > >

Re: [PATCH v2 1/7] clk/qcom: add initial clock driver for sc7280

2024-08-21 Thread Caleb Connolly
On 21/08/2024 16:37, Simon Glass wrote: Hi Caleb, On Wed, 21 Aug 2024 at 08:11, Caleb Connolly wrote: Hi Simon, +U_BOOT_DRIVER(gcc_sc7280) = { + .name = "gcc_sc7280", + .id = UCLASS_NOP, + .of_match = gcc_sc7280_of_match, + .bind

[RFC PATCH 0/2] Add TI K3 PCIe Controller support for J7200

2024-08-21 Thread Siddharth Vadapalli
Hello, This series adds support for the Cadence PCIe controller on TI's K3 family of SoCs which J7200 belongs to. The driver is an adaptation of the Linux driver (drivers/pci/controller/cadence/pci-j721e.c) and has been implemented specifically for Root-Complex mode of operation on J7200. A minor

[RFC PATCH 1/2] pci: Add TI K3 Cadence PCIe Controller

2024-08-21 Thread Siddharth Vadapalli
Add support for the Cadence PCIe Controller present on TI's K3 SoCs. This driver is an adaptation of the Linux driver. Signed-off-by: Siddharth Vadapalli --- drivers/pci/Kconfig| 6 + drivers/pci/Makefile | 1 + drivers/pci/pcie_cdns_ti.c | 645 +

[RFC PATCH 2/2] configs: j7200_evm_a72_defconfig: Enable configs for PCI support

2024-08-21 Thread Siddharth Vadapalli
TI's J7200 SoC has a single instance of PCIe Controller namely PCIe1 which is a Cadence PCIe Controller. To support PCI functionality with the PCIe1 instance of PCIe, enable the corresponding configs. Signed-off-by: Siddharth Vadapalli --- configs/j7200_evm_a72_defconfig | 4 1 file changed

Re: [PATCH] config: imx: Add support for Phytec's phycore imx8mm running SDP gadget

2024-08-21 Thread Benjamin Hahn
Hi Lukasz, On 21.08.24 12:10, Lukasz Majewski wrote: > Hi Benjamin, > >> On 19.08.24 16:36, Lukasz Majewski wrote: >>> Hi Benjamin, >>> Hi Lukasz, did you test this? It does not work for me. When I try it, the U-Boot hangs in SPL. Here is what I got: From Host:

Re: [RESEND PATCH v4 10/10] mtd: nand: add initial ecc engine support

2024-08-21 Thread Miquel Raynal
Hi Simon, mikhail.kshevets...@genexis.eu wrote on Sat, 17 Aug 2024 23:25:31 +0400: > On 8/17/24 19:58, Simon Glass wrote: > > Hi Mikhail, > > > > On Wed, 14 Aug 2024 at 04:20, Mikhail Kshevetskiy > > wrote: > >> only spinand on_die ecc is supported for a moment > >> > >> Signed-off-by: Mikhail

Re: [PATCH v1 2/3] riscv: cache: Add CBO instructions

2024-08-21 Thread Mayuresh Chitale
On Wed, Aug 21, 2024 at 3:28 PM Conor Dooley wrote: > > On Tue, Aug 20, 2024 at 02:14:01PM +0200, Heinrich Schuchardt wrote: > > On 20.08.24 11:37, Mayuresh Chitale wrote: > > > +void riscv_zicbom_init(void) > > > +{ > > > + struct udevice *dev; > > > + > > > + if (!CONFIG_IS_ENABLED(RISCV_ISA

Re: [PATCH v1 2/3] riscv: cache: Add CBO instructions

2024-08-21 Thread Mayuresh Chitale
On Wed, Aug 21, 2024 at 3:33 PM wrote: > > On 21/08/2024 10:57, Conor Dooley wrote: > > On Tue, Aug 20, 2024 at 02:14:01PM +0200, Heinrich Schuchardt wrote: > >> On 20.08.24 11:37, Mayuresh Chitale wrote: > >>> +void riscv_zicbom_init(void) > >>> +{ > >>> + struct udevice *dev; > >>> + > >>> +

Re: [PATCH v1 2/3] riscv: cache: Add CBO instructions

2024-08-21 Thread Conor Dooley
On Wed, Aug 21, 2024 at 09:27:03PM +0530, Mayuresh Chitale wrote: > On Wed, Aug 21, 2024 at 3:28 PM Conor Dooley > wrote: > > > > On Tue, Aug 20, 2024 at 02:14:01PM +0200, Heinrich Schuchardt wrote: > > > On 20.08.24 11:37, Mayuresh Chitale wrote: > > > > +void riscv_zicbom_init(void) > > > > +{

Re: [PATCH v2 1/7] clk/qcom: add initial clock driver for sc7280

2024-08-21 Thread Simon Glass
Hi Caleb, On Wed, 21 Aug 2024 at 08:49, Caleb Connolly wrote: > > > > On 21/08/2024 16:37, Simon Glass wrote: > > Hi Caleb, > > > > On Wed, 21 Aug 2024 at 08:11, Caleb Connolly > > wrote: > >> > >> Hi Simon, > +U_BOOT_DRIVER(gcc_sc7280) = { > + .name = "gcc_sc7280", >

[PATCH v2 00/35] global_data: Reduce size of struct global_data

2024-08-21 Thread Simon Glass
The global data structure has grown quite a lot over the years, being the best place to put an important pointer or something that must be accessed before and after relocation. This series attempts to reduce the size a little, by moving some things out and shrinking and aligning some fields. Some

[PATCH v2 01/35] global_data: Move pci_clk to m68k and powerpc

2024-08-21 Thread Simon Glass
Only m68k and powerpc use this field, so move it to the arch-specific info, to reduce the size for other archs. Signed-off-by: Simon Glass --- (no changes since v1) arch/m68k/cpu/mcf5445x/cpu.c | 2 +- arch/m68k/include/asm/global_data.h| 2 ++ arch/m68k/lib/bdinfo.c

[PATCH v2 02/35] x86: Drop use of global_data fb_base

2024-08-21 Thread Simon Glass
This value is set by not used on x86 so there is no point in setting it. Drop the assignment. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/lib/fsp/fsp_graphics.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/lib/fsp/fsp_graphics.c b/arch/x86/lib/fsp/fsp_graphics.

[PATCH v2 03/35] video: Add a function to obtain the framebuffer address

2024-08-21 Thread Simon Glass
Add a new function which returns the framebuffer address of the first video device. This will allow the global_data field top be dropped. Signed-off-by: Simon Glass --- (no changes since v1) drivers/video/video-uclass.c | 14 ++ include/video.h | 11 +++ 2 file

[PATCH v2 04/35] video: mxc: Avoid setting global_data fb_base

2024-08-21 Thread Simon Glass
This is not used, so don't set it. Signed-off-by: Simon Glass --- (no changes since v1) drivers/video/imx/mxc_ipuv3_fb.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/video/imx/mxc_ipuv3_fb.c b/drivers/video/imx/mxc_ipuv3_fb.c index 039b22086a9..fdeb3cabea7 100644 --- a/drivers/

[PATCH v2 05/35] video: mxs: Avoid setting global_data fb_base

2024-08-21 Thread Simon Glass
This is not used, so don't set it. Signed-off-by: Simon Glass --- (no changes since v1) drivers/video/mxsfb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 792d6314d15..e72839cead4 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/m

[PATCH v2 06/35] arm: friendlyarm: Avoid accessing global_data fb_base

2024-08-21 Thread Simon Glass
Use the new video function to get the framebuffer base. Signed-off-by: Simon Glass --- (no changes since v1) board/friendlyarm/nanopi2/board.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/board/friendlyarm/nanopi2/board.c b/board/friendlyarm/nanopi2/board.c ind

[PATCH v2 07/35] arm: ronetix: Avoid accessing global_data fb_base

2024-08-21 Thread Simon Glass
Use the new video function to get the framebuffer base. Signed-off-by: Simon Glass --- (no changes since v1) board/ronetix/pm9263/pm9263.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/board/ronetix/pm9263/pm9263.c b/board/ronetix/pm9263/pm9263.c index 1de1bd68701..

[PATCH v2 08/35] zynqmp: Avoid setting the framebuffer address

2024-08-21 Thread Simon Glass
This is handled by driver model so this driver should not be setting the framebuffer address. Drop the assignment. Signed-off-by: Simon Glass --- (no changes since v1) drivers/video/zynqmp/zynqmp_dpsub.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/video/zynqmp

[PATCH v2 09/35] video: Avoid setting global_data fb_base from SPL handoff

2024-08-21 Thread Simon Glass
This field is not used, so don't set it. Signed-off-by: Simon Glass --- (no changes since v1) drivers/video/video-uclass.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index e358a7949e0..ef780a6730c 100644 --- a/drivers/video/vi

[PATCH v2 10/35] video: Avoid setting global_data fb_base in video setup

2024-08-21 Thread Simon Glass
This field is not used, so don't set it. Signed-off-by: Simon Glass --- (no changes since v1) drivers/video/video-uclass.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index ef780a6730c..41bb7647fda 100644 --- a/drivers/video/vi

[PATCH v2 11/35] global_data: Drop fb_base

2024-08-21 Thread Simon Glass
This value mirrors information recorded by driver model video drivers, so can be removed to save space. Drop it. Signed-off-by: Simon Glass --- (no changes since v1) include/asm-generic/global_data.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/include/asm-generic/global_data.h b/

[PATCH v2 12/35] global_data: Convert have_console into a flag

2024-08-21 Thread Simon Glass
We don't need a full word for this boolean value. Convert it into a flag to save space in global_data. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/cpu/arm926ejs/mxs/spl_boot.c | 2 +- arch/arm/mach-exynos/spl_boot.c | 2 +- arch/arm/mach-k3/common.c | 2 +

[PATCH v2 13/35] global_data: Remove pci_ram_top

2024-08-21 Thread Simon Glass
This field is set but not used. Drop it. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/mach-tegra/board2.c | 4 arch/arm/mach-tegra/cboot.c | 4 arch/x86/cpu/i386/cpu.c | 8 include/asm-generic/global_data.h | 10 -- 4 files ch

[PATCH v2 14/35] global_data: Drop global_data hose

2024-08-21 Thread Simon Glass
This is set on one x86 boards, but is not used anymore. Drop it. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/ivybridge/cpu.c | 5 - include/asm-generic/global_data.h | 8 +--- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/arch/x86/cpu/ivybrid

[PATCH v2 15/35] global_data: Drop pci_bootdelay

2024-08-21 Thread Simon Glass
This is not used. Drop the field and the environment code which uses it. Signed-off-by: Simon Glass --- (no changes since v1) include/asm-generic/global_data.h | 11 --- include/env_default.h | 3 --- 2 files changed, 14 deletions(-) diff --git a/include/asm-generic/globa

[PATCH v2 16/35] global_data: Use less space for environment fields

2024-08-21 Thread Simon Glass
Use shorter types for some of these fields to save space. Reorder to put fields with like alignment together. Signed-off-by: Simon Glass --- (no changes since v1) include/asm-generic/global_data.h | 14 +++--- include/env_internal.h| 1 + 2 files changed, 8 insertions(+),

[PATCH v2 17/35] board_f: Add a new struct to hold pre-relocation info

2024-08-21 Thread Simon Glass
Quite a few of the members of struct global_data are only used before reloction, or have little meaning afterwards, yet they hang around in struct global_data for the lifetime of U-Boot. This uses up precious pre-relocation SRAM on many boards. To help with this, start a new struct which exists on

[PATCH v2 18/35] board_f: Move fdt_size to board

2024-08-21 Thread Simon Glass
This value is only really used before relocation. There is not much use to showing its value in bdinfo, so drop it. Move it to the new boardf struct. Signed-off-by: Simon Glass --- (no changes since v1) cmd/bdinfo.c | 1 - common/board_f.c | 11 +++---

[PATCH v2 19/35] board_f: Move new_bootstage to boardf

2024-08-21 Thread Simon Glass
This value is only used before relocation. Move it to the new boardf struct. Signed-off-by: Simon Glass --- (no changes since v1) common/board_f.c | 7 +++ include/asm-generic/global_data.h | 4 include/board_f.h | 4 3 files changed, 7 insertions

[PATCH v2 20/35] board_f: Move new_bloblist to boardf

2024-08-21 Thread Simon Glass
This value is only used before relocation. Move it to the new boardf struct. Signed-off-by: Simon Glass --- (no changes since v1) common/board_f.c | 11 ++- include/asm-generic/global_data.h | 4 include/board_f.h | 4 3 files changed, 10 in

[PATCH v2 21/35] global_data: Drop spl_handoff

2024-08-21 Thread Simon Glass
Provide a function to locate this information, rather than doing it automatically on startup, to save space in global_data. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/intel_common/cpu_from_spl.c | 4 +--- arch/x86/lib/fsp2/fsp_dram.c | 4 ++-- cmd/sb.c

[PATCH v2 22/35] global_data: Collect common fields at the top

2024-08-21 Thread Simon Glass
Move all the fields which are always present to the top of the struct, so we can potentially save some space by taking note of alignment. Signed-off-by: Simon Glass --- (no changes since v1) include/asm-generic/global_data.h | 166 +++--- 1 file changed, 82 insertions(+

[PATCH v2 25/35] global_data: log: Reorder and shrink fields

2024-08-21 Thread Simon Glass
Some of the logging fields are larger than they need to be. Shrink them and adjust the ordering to improve alignment. Signed-off-by: Simon Glass --- (no changes since v1) include/asm-generic/global_data.h | 43 +++ test/log/log_test.c | 6 ++--- 2 fil

[PATCH v2 26/35] global_data: Reduce size of early-malloc vars

2024-08-21 Thread Simon Glass
The early malloc region is normally quite small and is certainly less than 4GB, so use a 32-bit value for the limit and pointer. Update the comment for clarity while we are here. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/lib/bdinfo.c | 2 +- common/board_r.c

[PATCH v2 23/35] global_data: Reduce the size of bus_clk and mem_clk

2024-08-21 Thread Simon Glass
The bus clock and memory clock are unlikely to go above 4GHz for now, so reduce the field size to 32 bits. Signed-off-by: Simon Glass --- (no changes since v1) arch/mips/mach-ath79/ar934x/clk.c | 4 ++-- arch/mips/mach-octeon/cpu.c | 2 +- include/asm-generic/global_data.h | 4 ++-- 3 fi

[PATCH v2 27/35] global_data: Move baud_rate field lower

2024-08-21 Thread Simon Glass
Move this field to be with others of the same alignment. Signed-off-by: Simon Glass --- (no changes since v1) include/asm-generic/global_data.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h ind

  1   2   >