[U-Boot] [PATCH v4 15/19] ARM: tegra: Enable position independent build for 64-bit

2019-04-04 Thread Thierry Reding
From: Thierry Reding Note that U-Boot is always chainloaded from cboot starting with L4T release 28. cboot always loads U-Boot to a fixed address, so making the builds position independent isn't strictly necessary. However, position independent builds can be convenient because if U-Boot is ever

[U-Boot] [PATCH v4 18/19] lib: Implement strndup()

2019-04-04 Thread Thierry Reding
From: Thierry Reding Signed-off-by: Thierry Reding --- include/linux/string.h | 1 + lib/string.c | 23 +++ 2 files changed, 24 insertions(+) diff --git a/include/linux/string.h b/include/linux/string.h index 36066207392e..5d63be4ce5b0 100644 --- a/include/linux

[U-Boot] [PATCH v4 19/19] ARM: tegra: Import cbootargs value from cboot DTB

2019-04-04 Thread Thierry Reding
From: Thierry Reding Read the boot arguments passed by cboot via the /chosen/bootargs property and store it in the cbootargs environment variable. Signed-off-by: Thierry Reding --- arch/arm/mach-tegra/cboot.c | 47 + 1 file changed, 47 insertions(+) diff

[U-Boot] [PATCH v4 16/19] p2371-2180: Pass Ethernet MAC to the kernel

2019-04-04 Thread Thierry Reding
From: Thierry Reding Pass the ethernet MAC address to the kernel upon boot. This passes both the local-mac-address property (as passed to U-Boot from cboot) and the currently set MAC address via the mac-address property. The latter will only be set if it is different from the address

[U-Boot] [PATCH v4 12/19] ARM: tegra: Unify Tegra186 builds

2019-04-04 Thread Thierry Reding
From: Thierry Reding Tegra186 build are currently dealt with in very special ways, which is because Tegra186 is fundamentally different in many respects. It is no longer necessary to do many of the low-level programming because early boot firmware will already have taken care

[U-Boot] [PATCH v4 14/19] ARM: tegra: Implement cboot_get_ethaddr()

2019-04-04 Thread Thierry Reding
From: Thierry Reding This function will attempt to look up an ethernet address in the DTB that was passed in from cboot. It does so by first trying to locate the primary ethernet device for the board (identified by the "ethernet" alias) and if found, reads the "local-mac-ad

[U-Boot] [PATCH v4 10/19] ARM: tegra: Workaround UDC boot issues only if necessary

2019-04-04 Thread Thierry Reding
From: Thierry Reding Resetting the USB device controller on boot is only necessary if the SoC actually has a UDC controller and U-Boot enables support for it. All the Tegra boards support UDC via the ChipIdea UDC driver, so make the UDC on boot workaround depend on the ChipIdea UDC driver

[U-Boot] [PATCH v4 06/19] ARM: tegra: Guard powergate code with a Kconfig symbol

2019-04-04 Thread Thierry Reding
From: Thierry Reding Powergate code is not relevant on all Tegra SoC generations, so guard it with a Kconfig symbol that can be selected by the generations that need it. This is in preparation for unifying Tegra186 code with the code used on older generations. Signed-off-by: Thierry Reding

[U-Boot] [PATCH v4 17/19] p2771-0000: Pass Ethernet MAC to the kernel

2019-04-04 Thread Thierry Reding
From: Thierry Reding Pass the ethernet MAC address to the kernel upon boot. This passes both the local-mac-address property (as passed to U-Boot from cboot) and the currently set MAC address via the mac-address property. The latter will only be set if it is different from the address

[U-Boot] [PATCH v4 09/19] ARM: tegra: Support TZ-only access to PMC

2019-04-04 Thread Thierry Reding
From: Thierry Reding Some devices may restrict access to the PMC to TrustZone software only. Non-TZ software can detect this and use SMC calls to the firmware that runs in the TrustZone to perform accesses to PMC registers. Note that this also fixes reset_cpu() and the enterrcm command

[U-Boot] [PATCH v4 11/19] ARM: tegra: Restore DRAM bank count

2019-04-04 Thread Thierry Reding
From: Thierry Reding Commit 86cf1c82850f ("configs: Migrate CONFIG_NR_DRAM_BANKS") reduced the number of DRAM banks supported by U-Boot from 1026 to 8 on P2771-000 boards. However, as explained in commit a9819b9e33bd ("ARM: tegra: p2771-000: increase max DRAM bank count"), t

Re: [U-Boot] [PATCH 1/3] vsprintf: Support phys_addr_t specifier unconditionally

2019-04-01 Thread Thierry Reding
On Sat, Mar 30, 2019 at 03:19:27PM -0600, Simon Glass wrote: > On Tue, 12 Mar 2019 at 04:38, Thierry Reding wrote: > > > > From: Thierry Reding > > > > When phys_addr_t printf specifier support was first introduced in commit > > 1eebd14b7902 ("

[U-Boot] [PATCH] fdt: Remove duplicate code

2019-03-01 Thread Thierry Reding
From: Thierry Reding Commit 6d29cc7dcf2d ("fdt: Fixup only valid memory banks") ended up being merged twice, first as: commit 6d29cc7dcf2d35966aa0b6119fd1cbca0d21d5e6 Author: Thierry Reding AuthorDate: Tue Jan 30 11:34:17 2018 +0100 Commit: S

[U-Boot] [PATCH 1/2] pci: Add boundary check for hose->regions

2019-03-15 Thread Thierry Reding
From: Thierry Reding Make sure that we don't overflow the hose->regions array, otherwise we would end up overwriting the hose->region_count field and cause mayhem to ensue. Also print an error message when we'd be overflowing because it indicates that there aren't enough regions ava

[U-Boot] [PATCH 2/2] pci: Scale MAX_PCI_REGIONS based on CONFIG_NR_DRAM_BANKS

2019-03-15 Thread Thierry Reding
From: Thierry Reding If a platform defines CONFIG_NR_DRAM_BANKS, each DRAM bank will be added as a PCI region. The number of MAX_PCI_REGIONS therefore needs to scale with the number of DRAM banks, otherwise we will end up with too little space in the hose->regions array to store all sys

Re: [U-Boot] [PATCH 2/6] fdtdec: Implement fdtdec_get_max_phandle()

2019-03-11 Thread Thierry Reding
On Sun, Mar 10, 2019 at 03:51:31PM -0600, Simon Glass wrote: > Hi Thierry, > > On Fri, 8 Mar 2019 at 13:11, Thierry Reding wrote: > > > > From: Thierry Reding > > > > This function allows looking up the highest phandle value stored in a > > device tree

Re: [U-Boot] [PATCH 3/6] fdtdec: Implement fdtdec_set_phandle()

2019-03-11 Thread Thierry Reding
On Sun, Mar 10, 2019 at 03:51:40PM -0600, Simon Glass wrote: > Hi Thierry, > > On Fri, 8 Mar 2019 at 13:11, Thierry Reding wrote: > > > > From: Thierry Reding > > > > This function can be used to set a phandle for a given node. > > > > Signed

Re: [U-Boot] [PATCH 4/6] fdtdec: Implement fdtdec_add_reserved_memory()

2019-03-11 Thread Thierry Reding
On Sun, Mar 10, 2019 at 03:51:42PM -0600, Simon Glass wrote: > On Fri, 8 Mar 2019 at 13:11, Thierry Reding wrote: > > > > From: Thierry Reding > > > > This function can be used to add subnodes in the /reserved-memory node. > > > > Signed-off-by: Thierr

[U-Boot] [PATCH 04/12] ARM: tegra: Guard memory controller code with a Kconfig symbol

2019-03-08 Thread Thierry Reding
From: Thierry Reding Memory controller code is not relevant on all Tegra SoC generations, so guard it with a Kconfig symbol that can be selected by the generations that need it. This is in preparation for unifying Tegra186 code with the code used on older generations. Signed-off-by: Thierry

[U-Boot] [PATCH 11/12] ARM: tegra: Support TZ-only access to PMC

2019-03-08 Thread Thierry Reding
From: Thierry Reding Some devices may restrict access to the PMC to TrustZone software only. Non-TZ software can detect this and use SMC calls to the firmware that runs in the TrustZone to perform accesses to PMC registers. Based on work by Kalyani Chidambaram and Tom Warren . Signed-off

[U-Boot] [PATCH 09/12] ARM: tegra: Allow boards to override boot target devices

2019-03-08 Thread Thierry Reding
From: Thierry Reding Boards may not support all the boot target devices in the default list for Tegra devices. Allow a board to override the list and default to the standard list only if the board hasn't specified one itself. Signed-off-by: Thierry Reding --- include/configs/tegra-common

[U-Boot] [PATCH 05/12] ARM: tegra: Guard pin controller code with a Kconfig symbol

2019-03-08 Thread Thierry Reding
From: Thierry Reding Pin controller code is not relevant on all Tegra SoC generations, so guard it with a Kconfig symbol that can be selected by the generations that need it. This is in preparation for unifying Tegra186 code with the code used on older generations. Signed-off-by: Thierry

[U-Boot] [PATCH 08/12] ARM: tegra: Unify Tegra186 builds

2019-03-08 Thread Thierry Reding
From: Thierry Reding Tegra186 build are currently dealt with in very special ways, which is because Tegra186 is fundamentally different in many respects. It is no longer necessary to do many of the low-level programming because early boot firmware will already have taken care

[U-Boot] [PATCH 12/12] ARM: tegra: Implement cboot_get_ethaddr()

2019-03-08 Thread Thierry Reding
From: Thierry Reding This function will attempt to look up an ethernet address in the DTB that was passed in from cboot. It does so by first trying to locate the primary ethernet device for the board (identified by the "ethernet" alias) and if found, reads the "local-mac-ad

[U-Boot] [PATCH 10/12] ARM: tegra: Implement cboot_save_boot_params() in C

2019-03-08 Thread Thierry Reding
From: Thierry Reding This is easier to deal with and works just as well for this simple function. Signed-off-by: Thierry Reding --- arch/arm/mach-tegra/Makefile | 2 +- arch/arm/mach-tegra/cboot.c| 12 arch/arm/mach-tegra/cboot_ll.S | 20 3 files

[U-Boot] [PATCH 5/6] fdtdec: Implement carveout support functions

2019-03-08 Thread Thierry Reding
From: Thierry Reding The fdtdec_get_carveout() and fdtdec_set_carveout() function can be used to read a carveout from a given node or add a carveout to a given node using the standard device tree bindings (involving reserved-memory nodes and the memory-region property). Signed-off-by: Thierry

[U-Boot] [PATCH 1/3] net: eth-uclass: Write MAC address to hardware after probe

2019-03-08 Thread Thierry Reding
From: Thierry Reding In order for the device to use the proper MAC address, which can have been configured in the environment prior to the device being registered, ensure that the MAC address is written after the device has been probed. For devices that are registered before the network stack

[U-Boot] [PATCH 06/12] ARM: tegra: Guard powergate code with a Kconfig symbol

2019-03-08 Thread Thierry Reding
From: Thierry Reding Powergate code is not relevant on all Tegra SoC generations, so guard it with a Kconfig symbol that can be selected by the generations that need it. This is in preparation for unifying Tegra186 code with the code used on older generations. Signed-off-by: Thierry Reding

[U-Boot] [PATCH 03/12] ARM: tegra: Guard GP pad control code with a Kconfig symbol

2019-03-08 Thread Thierry Reding
From: Thierry Reding The GP pad control code is not relevant on all Tegra SoC generations, so guard it with a Kconfig symbol that can be selected by the generations that need it. This is in preparation for unifying Tegra186 code with the code used on older generations. Signed-off-by: Thierry

[U-Boot] [PATCH 02/12] ARM: tegra: Guard clock code with a Kconfig symbol

2019-03-08 Thread Thierry Reding
From: Thierry Reding Clock code is not relevant on all Tegra SoC generations, so guard it with a Kconfig symbol that can be selected by the generations that need it. This is in preparation for unifying Tegra186 code with the code used on older generations. Signed-off-by: Thierry Reding

[U-Boot] [PATCH 07/12] ARM: tegra: Fix save_boot_params() prototype

2019-03-08 Thread Thierry Reding
From: Thierry Reding The save_boot_params() function takes as its first four arguments the first four registers. On 32-bit ARM these are r0, r1, r2 and r3, all of which are 32 bits wide. However, on 64-bit ARM thene registers are x0, x1, x2 and x3, all of which are 64 bits wide. In order

[U-Boot] [PATCH 2/6] fdtdec: Implement fdtdec_get_max_phandle()

2019-03-08 Thread Thierry Reding
From: Thierry Reding This function allows looking up the highest phandle value stored in a device tree, which is useful to determine the next best phandle value for new nodes. Signed-off-by: Thierry Reding --- include/fdtdec.h | 12 lib/fdtdec.c | 28

[U-Boot] [PATCH 6/6] p2371-2180: Add support for framebuffer carveouts

2019-03-08 Thread Thierry Reding
From: Thierry Reding If early firmware initialized the display hardware and the display controllers are scanning out a framebuffer (e.g. a splash screen), make sure to pass information about the memory location of that framebuffer to the kernel before booting to avoid the kernel from using

[U-Boot] [PATCH 3/6] fdtdec: Implement fdtdec_set_phandle()

2019-03-08 Thread Thierry Reding
From: Thierry Reding This function can be used to set a phandle for a given node. Signed-off-by: Thierry Reding --- include/fdtdec.h | 11 +++ lib/fdtdec.c | 16 2 files changed, 27 insertions(+) diff --git a/include/fdtdec.h b/include/fdtdec.h index 5eb3c0c237a9

[U-Boot] [PATCH 00/12] ARM: tegra: Share cboot code with Tegra210

2019-03-08 Thread Thierry Reding
From: Thierry Reding Code to support chainloading by nvtboot was introduced along with Tegar186 support. Since then, support for chainloading U-Boot has been extended to other Tegra SoC generations. This series of patches makes this code more widely available so that it can be reused. Also

[U-Boot] [PATCH 01/12] ARM: tegra: Use common header for PMU declarations

2019-03-08 Thread Thierry Reding
From: Thierry Reding There's no need to replicate the pmu.h header file for every Tegra SoC generation. Use a single header that is shared across generations. Signed-off-by: Thierry Reding --- .../include/asm/{arch-tegra20 => arch-tegra}/pmu.h | 6 +++--- arch/arm/include/asm/arch-tegra

[U-Boot] [PATCH 3/3] net: rtl8169: Support RTL-8168h/8111h

2019-03-08 Thread Thierry Reding
From: Thierry Reding This version of the RTL-8168 is present on some development boards and is compatible with this driver. Add support for identifying this version of the chip so that U-Boot won't complain about it being unknown. Signed-off-by: Thierry Reding --- drivers/net/rtl8169.c | 1

[U-Boot] [PATCH 2/3] net: rtl8169: Implement ->hwaddr_write() callback

2019-03-08 Thread Thierry Reding
From: Thierry Reding Implement this callback that allows the MAC address to be set for the Ethernet card. This is necessary in order for the device to be able to receive packets for the MAC address that U-Boot advertises. Signed-off-by: Thierry Reding --- drivers/net/rtl8169.c | 18

[U-Boot] [PATCH 4/6] fdtdec: Implement fdtdec_add_reserved_memory()

2019-03-08 Thread Thierry Reding
From: Thierry Reding This function can be used to add subnodes in the /reserved-memory node. Signed-off-by: Thierry Reding --- include/fdtdec.h | 17 + lib/fdtdec.c | 158 +++ 2 files changed, 175 insertions(+) diff --git a/include

[U-Boot] [PATCH] p2371-2180: Build position independent binary

2019-03-08 Thread Thierry Reding
From: Thierry Reding In order to support chainloading of U-Boot by an earlier bootloader, make sure the binary is position independent, so that the earlier boot- loader can relocate it if necessary. Signed-off-by: Thierry Reding --- configs/p2371-2180_defconfig | 1 + 1 file changed, 1

[U-Boot] [PATCH 1/6] fdtdec: Add cpu_to_fdt_{addr,size}() macros

2019-03-08 Thread Thierry Reding
From: Thierry Reding These macros are useful for converting the endianness of variables of type fdt_addr_t and fdt_size_t. Signed-off-by: Thierry Reding --- include/fdtdec.h | 4 1 file changed, 4 insertions(+) diff --git a/include/fdtdec.h b/include/fdtdec.h index b7e35cd87c55

Re: [U-Boot] [PATCH v2 15/15] ARM: tegra: Add NVIDIA Jetson Nano Developer Kit support

2019-03-20 Thread Thierry Reding
On Tue, Mar 19, 2019 at 11:18:39AM -0600, Stephen Warren wrote: > On 3/18/19 5:24 PM, Thierry Reding wrote: > > From: Thierry Reding > > > > The Jetson Nano Developer Kit is a Tegra X1 based development board. It > > is similar to Jetson TX1 but it is not pin c

Re: [U-Boot] [PATCH] p2371-2180: Build position independent binary

2019-03-20 Thread Thierry Reding
On Tue, Mar 19, 2019 at 11:05:43AM -0600, Stephen Warren wrote: > On 3/19/19 6:12 AM, Thierry Reding wrote: > > On Mon, Mar 18, 2019 at 12:31:32PM -0600, Stephen Warren wrote: > > > On 3/8/19 1:10 PM, Thierry Reding wrote: > > > > From: Thierry Reding > &

[U-Boot] [PATCH v2 15/15] ARM: tegra: Add NVIDIA Jetson Nano Developer Kit support

2019-03-18 Thread Thierry Reding
From: Thierry Reding The Jetson Nano Developer Kit is a Tegra X1 based development board. It is similar to Jetson TX1 but it is not pin compatible. It features 4 GB of LPDDR4, an SPI NOR flash for early boot firmware and an SD card slot used for storage. HDMI 2.0 or DP 1.2 are available

[U-Boot] [PATCH v2 13/15] ARM: tegra: Implement cboot_save_boot_params() in C

2019-03-18 Thread Thierry Reding
From: Thierry Reding This is easier to deal with and works just as well for this simple function. Signed-off-by: Thierry Reding --- arch/arm/mach-tegra/Makefile | 2 +- arch/arm/mach-tegra/cboot.c| 12 arch/arm/mach-tegra/cboot_ll.S | 20 3 files

[U-Boot] [PATCH v2 12/15] ARM: tegra: Unify Tegra186 builds

2019-03-18 Thread Thierry Reding
From: Thierry Reding Tegra186 build are currently dealt with in very special ways, which is because Tegra186 is fundamentally different in many respects. It is no longer necessary to do many of the low-level programming because early boot firmware will already have taken care

[U-Boot] [PATCH v2 09/15] ARM: tegra: Support TZ-only access to PMC

2019-03-18 Thread Thierry Reding
From: Thierry Reding Some devices may restrict access to the PMC to TrustZone software only. Non-TZ software can detect this and use SMC calls to the firmware that runs in the TrustZone to perform accesses to PMC registers. Note that this also fixes reset_cpu() and the enterrcm command

[U-Boot] [PATCH v2 10/15] ARM: tegra: Workaround UDC boot issues only if necessary

2019-03-18 Thread Thierry Reding
From: Thierry Reding Resetting the USB device controller on boot is only necessary if the SoC actually has a UDC controller and U-Boot enables support for it. All the Tegra boards support UDC via the ChipIdea UDC driver, so make the UDC on boot workaround depend on the ChipIdea UDC driver

[U-Boot] [PATCH v2 11/15] ARM: tegra: Restore DRAM bank count

2019-03-18 Thread Thierry Reding
From: Thierry Reding Commit 86cf1c82850f ("configs: Migrate CONFIG_NR_DRAM_BANKS") reduced the number of DRAM banks supported by U-Boot from 1026 to 8 on P2771-000 boards. However, as explained in commit a9819b9e33bd ("ARM: tegra: p2771-000: increase max DRAM bank count"), t

[U-Boot] [PATCH v2 14/15] ARM: tegra: Implement cboot_get_ethaddr()

2019-03-18 Thread Thierry Reding
From: Thierry Reding This function will attempt to look up an ethernet address in the DTB that was passed in from cboot. It does so by first trying to locate the primary ethernet device for the board (identified by the "ethernet" alias) and if found, reads the "local-mac-ad

[U-Boot] [PATCH v2 08/15] ARM: tegra: Allow boards to override boot target devices

2019-03-18 Thread Thierry Reding
From: Thierry Reding Boards may not support all the boot target devices in the default list for Tegra devices. Allow a board to override the list and default to the standard list only if the board hasn't specified one itself. Signed-off-by: Thierry Reding --- include/configs/tegra-common

[U-Boot] [PATCH v2 00/15] ARM: tegra: Add NVIDIA Jetson Nano Developer Kit support

2019-03-18 Thread Thierry Reding
From: Thierry Reding Hi, This set of patches move some code from the Tegra186 SoC specific directory to a common location so that it can be more easily shared. Since the differences between Tegra186 and earlier generations are now very small, the builds are unified to avoid duplication of code

[U-Boot] [PATCH v2 04/15] ARM: tegra: Guard memory controller code with a Kconfig symbol

2019-03-18 Thread Thierry Reding
From: Thierry Reding Memory controller code is not relevant on all Tegra SoC generations, so guard it with a Kconfig symbol that can be selected by the generations that need it. This is in preparation for unifying Tegra186 code with the code used on older generations. Signed-off-by: Thierry

[U-Boot] [PATCH v2 01/15] ARM: tegra: Use common header for PMU declarations

2019-03-18 Thread Thierry Reding
From: Thierry Reding There's no need to replicate the pmu.h header file for every Tegra SoC generation. Use a single header that is shared across generations. Signed-off-by: Thierry Reding --- .../include/asm/{arch-tegra20 => arch-tegra}/pmu.h | 6 +++--- arch/arm/include/asm/arch-tegra

[U-Boot] [PATCH v2 03/15] ARM: tegra: Guard GP pad control code with a Kconfig symbol

2019-03-18 Thread Thierry Reding
From: Thierry Reding The GP pad control code is not relevant on all Tegra SoC generations, so guard it with a Kconfig symbol that can be selected by the generations that need it. This is in preparation for unifying Tegra186 code with the code used on older generations. Signed-off-by: Thierry

[U-Boot] [PATCH v2 07/15] ARM: tegra: Fix save_boot_params() prototype

2019-03-18 Thread Thierry Reding
From: Thierry Reding The save_boot_params() function takes as its first four arguments the first four registers. On 32-bit ARM these are r0, r1, r2 and r3, all of which are 32 bits wide. However, on 64-bit ARM thene registers are x0, x1, x2 and x3, all of which are 64 bits wide. In order

[U-Boot] [PATCH v2 02/15] ARM: tegra: Guard clock code with a Kconfig symbol

2019-03-18 Thread Thierry Reding
From: Thierry Reding Clock code is not relevant on all Tegra SoC generations, so guard it with a Kconfig symbol that can be selected by the generations that need it. This is in preparation for unifying Tegra186 code with the code used on older generations. Signed-off-by: Thierry Reding

[U-Boot] [PATCH v2 05/15] ARM: tegra: Guard pin controller code with a Kconfig symbol

2019-03-18 Thread Thierry Reding
From: Thierry Reding Pin controller code is not relevant on all Tegra SoC generations, so guard it with a Kconfig symbol that can be selected by the generations that need it. This is in preparation for unifying Tegra186 code with the code used on older generations. Signed-off-by: Thierry

[U-Boot] [PATCH v2 06/15] ARM: tegra: Guard powergate code with a Kconfig symbol

2019-03-18 Thread Thierry Reding
From: Thierry Reding Powergate code is not relevant on all Tegra SoC generations, so guard it with a Kconfig symbol that can be selected by the generations that need it. This is in preparation for unifying Tegra186 code with the code used on older generations. Signed-off-by: Thierry Reding

Re: [U-Boot] [PATCH] p2371-2180: Build position independent binary

2019-03-19 Thread Thierry Reding
On Mon, Mar 18, 2019 at 12:31:32PM -0600, Stephen Warren wrote: > On 3/8/19 1:10 PM, Thierry Reding wrote: > > From: Thierry Reding > > > > In order to support chainloading of U-Boot by an earlier bootloader, > > make sure the binary is position independent, so that t

[U-Boot] [PATCH v2 03/11] fdtdec: Implement fdtdec_generate_phandle()

2019-03-12 Thread Thierry Reding
From: Thierry Reding This function generates a new, unused phandle by looking up the highest phandle value stored in a device tree and adding one. Signed-off-by: Thierry Reding --- Changes in v2: - rename to fdtdec_generate_phandle() include/fdtdec.h | 12 lib/fdtdec.c | 28

[U-Boot] [PATCH v2 04/11] fdtdec: Implement fdtdec_set_phandle()

2019-03-12 Thread Thierry Reding
From: Thierry Reding This function can be used to set a phandle for a given node. Signed-off-by: Thierry Reding --- Changes in v2: - don't emit deprecated linux,phandle property include/fdtdec.h | 11 +++ lib/fdtdec.c | 7 +++ 2 files changed, 18 insertions(+) diff --git

[U-Boot] [PATCH v2 10/11] fdtdec: test: Add carveout tests

2019-03-12 Thread Thierry Reding
From: Thierry Reding Implement carveout tests for 32-bit and 64-bit builds. Signed-off-by: Thierry Reding --- Changes in v2: - new patch lib/fdtdec_test.c | 152 ++ 1 file changed, 152 insertions(+) diff --git a/lib/fdtdec_test.c b/lib

[U-Boot] [PATCH v2 06/11] fdtdec: Implement carveout support functions

2019-03-12 Thread Thierry Reding
From: Thierry Reding The fdtdec_get_carveout() and fdtdec_set_carveout() function can be used to read a carveout from a given node or add a carveout to a given node using the standard device tree bindings (involving reserved-memory nodes and the memory-region property). Reviewed-by: Simon Glass

[U-Boot] [PATCH v2 09/11] fdtdec: test: Use compound statement macros

2019-03-12 Thread Thierry Reding
From: Thierry Reding This eliminates the need for intermediate helper functions and allow the macros to return a value so that it can be used subsequently. Signed-off-by: Thierry Reding --- Changes in v2: - new patch lib/fdtdec_test.c | 64 --- 1

[U-Boot] [PATCH v2 01/11] fdtdec: Add cpu_to_fdt_{addr, size}() macros

2019-03-12 Thread Thierry Reding
From: Thierry Reding These macros are useful for converting the endianness of variables of type fdt_addr_t and fdt_size_t. Reviewed-by: Simon Glass Signed-off-by: Thierry Reding --- Changes in v2: - add Reviewed-by from Simon include/fdtdec.h | 4 1 file changed, 4 insertions(+) diff

[U-Boot] [PATCH v2 02/11] fdtdec: Add fdt_{addr, size}_unpack() helpers

2019-03-12 Thread Thierry Reding
From: Thierry Reding These helpers can be used to unpack variables of type fdt_addr_t and fdt_size_t into a pair of 32-bit variables. This is useful in cases where such variables need to be written to properties (such as "reg") of a device tree node where they need to be split

[U-Boot] [PATCH v2 11/11] sandbox: Enable fdtdec tests

2019-03-12 Thread Thierry Reding
From: Thierry Reding Enable fdtdec tests on sandbox configurations so that they can be run to validate the fdtdec implementation. Signed-off-by: Thierry Reding --- Changes in v2: - new patch configs/sandbox64_defconfig | 1 + configs/sandbox_defconfig | 1 + 2 files changed, 2 insertions

[U-Boot] [PATCH v2 08/11] fdtdec: test: Fix build warning

2019-03-12 Thread Thierry Reding
From: Thierry Reding Hide the declaration of the "fd" variable When not building a DEBUG configuration, to avoid the variable being unused. Signed-off-by: Thierry Reding --- Changes in v2: - new patch lib/fdtdec_test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/fdtde

[U-Boot] [PATCH 2/3] sandbox: Use correct phys_{addr, size}_t for PHYS_64BIT=y

2019-03-12 Thread Thierry Reding
From: Thierry Reding If 64-bit physical addresses support is enabled, make sure the sandox defines the correct types for phys_addr_t and phys_size_t. Signed-off-by: Thierry Reding --- arch/sandbox/include/asm/types.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff

[U-Boot] [PATCH 3/3] sandbox: Properly print physical addresses

2019-03-12 Thread Thierry Reding
From: Thierry Reding Use the %pap printf specifier to print physical addresses. The physical address is passed by reference and hence avoids the need to play tricks with the preprocessor to use the correct specifier. Signed-off-by: Thierry Reding --- arch/sandbox/lib/pci_io.c | 2 +- 1 file

[U-Boot] [PATCH 1/3] vsprintf: Support phys_addr_t specifier unconditionally

2019-03-12 Thread Thierry Reding
From: Thierry Reding When phys_addr_t printf specifier support was first introduced in commit 1eebd14b7902 ("vsprintf: Add modifier for phys_addr_t"), it was enabled only if CONFIG_CMD_NET was selected. Since physical addresses are not unique to networking support it doesn't

[U-Boot] [PATCH v2 05/11] fdtdec: Implement fdtdec_add_reserved_memory()

2019-03-12 Thread Thierry Reding
From: Thierry Reding This function can be used to add subnodes in the /reserved-memory node. Reviewed-by: Simon Glass Signed-off-by: Thierry Reding --- Changes in v2: - split fdt_{addr,size}_unpack() helpers into separate patch - use name@x,y notation only if the upper cell is > 0 - use de

[U-Boot] [PATCH v2 07/11] fdtdec: Add Kconfig symbol for tests

2019-03-12 Thread Thierry Reding
From: Thierry Reding Runtime tests are provided as a test_fdtdec command implementation. Add a Kconfig symbol that allows this command to be built so that the tests can be used. Signed-off-by: Thierry Reding --- Changes in v2: - new patch lib/Kconfig | 4 1 file changed, 4 insertions

[U-Boot] [PATCH v3 14/19] ARM: tegra: Implement cboot_get_ethaddr()

2019-03-21 Thread Thierry Reding
From: Thierry Reding This function will attempt to look up an ethernet address in the DTB that was passed in from cboot. It does so by first trying to locate the primary ethernet device for the board (identified by the "ethernet" alias) and if found, reads the "local-mac-ad

[U-Boot] [PATCH v3 05/19] ARM: tegra: Guard pin controller code with a Kconfig symbol

2019-03-21 Thread Thierry Reding
From: Thierry Reding Pin controller code is not relevant on all Tegra SoC generations, so guard it with a Kconfig symbol that can be selected by the generations that need it. This is in preparation for unifying Tegra186 code with the code used on older generations. Signed-off-by: Thierry

[U-Boot] [PATCH v3 06/19] ARM: tegra: Guard powergate code with a Kconfig symbol

2019-03-21 Thread Thierry Reding
From: Thierry Reding Powergate code is not relevant on all Tegra SoC generations, so guard it with a Kconfig symbol that can be selected by the generations that need it. This is in preparation for unifying Tegra186 code with the code used on older generations. Signed-off-by: Thierry Reding

[U-Boot] [PATCH v3 18/19] lib: Implement strndup()

2019-03-21 Thread Thierry Reding
From: Thierry Reding Signed-off-by: Thierry Reding --- include/linux/string.h | 1 + lib/string.c | 23 +++ 2 files changed, 24 insertions(+) diff --git a/include/linux/string.h b/include/linux/string.h index 36066207392e..5d63be4ce5b0 100644 --- a/include/linux

[U-Boot] [PATCH v3 19/19] ARM: tegra: Import cbootargs value from cboot DTB

2019-03-21 Thread Thierry Reding
From: Thierry Reding Read the boot arguments passed by cboot via the /chosen/bootargs property and store it in the cbootargs environment variable. Signed-off-by: Thierry Reding --- arch/arm/mach-tegra/cboot.c | 47 + 1 file changed, 47 insertions(+) diff

[U-Boot] [PATCH v3 05/13] fdtdec: Implement fdtdec_add_reserved_memory()

2019-03-21 Thread Thierry Reding
From: Thierry Reding This function can be used to add subnodes in the /reserved-memory node. Reviewed-by: Simon Glass Signed-off-by: Thierry Reding --- Changes in v3: - use fdt_generate_phandle() instead of fdtdec_generate_phandle() - add device tree bindings for /reserved-memory - add

[U-Boot] [PATCH v3 06/13] fdtdec: Implement carveout support functions

2019-03-21 Thread Thierry Reding
From: Thierry Reding The fdtdec_get_carveout() and fdtdec_set_carveout() function can be used to read a carveout from a given node or add a carveout to a given node using the standard device tree bindings (involving reserved-memory nodes and the memory-region property). Reviewed-by: Simon Glass

[U-Boot] [PATCH v3 10/13] fdtdec: test: Add carveout tests

2019-03-21 Thread Thierry Reding
From: Thierry Reding Implement carveout tests for 32-bit and 64-bit builds. Signed-off-by: Thierry Reding --- Changes in v2: - new patch lib/fdtdec_test.c | 152 ++ 1 file changed, 152 insertions(+) diff --git a/lib/fdtdec_test.c b/lib

[U-Boot] [PATCH v3 04/13] fdtdec: Implement fdtdec_set_phandle()

2019-03-21 Thread Thierry Reding
From: Thierry Reding This function can be used to set a phandle for a given node. Signed-off-by: Thierry Reding --- Changes in v2: - don't emit deprecated linux,phandle property include/fdtdec.h | 11 +++ lib/fdtdec.c | 7 +++ 2 files changed, 18 insertions(+) diff --git

[U-Boot] [PATCH v3 01/19] ARM: tegra: Use common header for PMU declarations

2019-03-21 Thread Thierry Reding
From: Thierry Reding There's no need to replicate the pmu.h header file for every Tegra SoC generation. Use a single header that is shared across generations. Signed-off-by: Thierry Reding --- .../include/asm/{arch-tegra20 => arch-tegra}/pmu.h | 6 +++--- arch/arm/include/asm/arch-tegra

[U-Boot] [PATCH v3 00/19] ARM: tegra: Miscellaneous improvements

2019-03-21 Thread Thierry Reding
From: Thierry Reding The bulk of these changes are an effort to unify Tegra186 builds with builds of prior 64-bit Tegra generations. On top of that there are various improvements that allow data (such as the MAC address and boot arguments) to be passed through from early firmware to the kernel

[U-Boot] [PATCH v3 10/19] ARM: tegra: Workaround UDC boot issues only if necessary

2019-03-21 Thread Thierry Reding
From: Thierry Reding Resetting the USB device controller on boot is only necessary if the SoC actually has a UDC controller and U-Boot enables support for it. All the Tegra boards support UDC via the ChipIdea UDC driver, so make the UDC on boot workaround depend on the ChipIdea UDC driver

[U-Boot] [PATCH v3 07/19] ARM: tegra: Fix save_boot_params() prototype

2019-03-21 Thread Thierry Reding
From: Thierry Reding The save_boot_params() function takes as its first four arguments the first four registers. On 32-bit ARM these are r0, r1, r2 and r3, all of which are 32 bits wide. However, on 64-bit ARM thene registers are x0, x1, x2 and x3, all of which are 64 bits wide. In order

[U-Boot] [PATCH v3 03/13] fdtdec: Add fdt_{addr, size}_unpack() helpers

2019-03-21 Thread Thierry Reding
From: Thierry Reding These helpers can be used to unpack variables of type fdt_addr_t and fdt_size_t into a pair of 32-bit variables. This is useful in cases where such variables need to be written to properties (such as "reg") of a device tree node where they need to be split

[U-Boot] [PATCH v3 11/13] sandbox: Enable fdtdec tests

2019-03-21 Thread Thierry Reding
From: Thierry Reding Enable fdtdec tests on sandbox configurations so that they can be run to validate the fdtdec implementation. Signed-off-by: Thierry Reding --- Changes in v2: - new patch configs/sandbox64_defconfig | 1 + configs/sandbox_defconfig | 1 + 2 files changed, 2 insertions

[U-Boot] [PATCH v3 00/13] ARM: tegra: Add support for framebuffer carveouts

2019-03-21 Thread Thierry Reding
From: Thierry Reding The series adds a couple of helpers that allow passing framebuffer carveouts to the kernel on boot. This is required in order to reserve the memory region that the framebuffer resides in and that the display controller is scanning out from, so that it is not reused

[U-Boot] [PATCH 1/2] ARM: tegra: Fix mux type for disp1 and disp2 clocks on Tegra210

2019-03-21 Thread Thierry Reding
From: Thierry Reding On Tegra210 the parents for the disp1 and disp2 clocks are slightly different from earlier chips. Only pll_p, pll_d_out0, pll_d2_out0 and clk_m are valid parents (technically pll_d_out is as well, but U-Boot doesn't know anything about it). Fix up the type name and the mux

[U-Boot] [PATCH 2/2] ARM: tegra: Remove disp1 clock initialization on Tegra210

2019-03-21 Thread Thierry Reding
From: Thierry Reding pll_c is not a valid parent for the disp1 clock, so trying to set it will fail. Given that display is not used in U-Boot, remove the init table entry so that disp1 will keep its default parent (clk_m). Signed-off-by: Thierry Reding --- arch/arm/mach-tegra/tegra210/clock.c

[U-Boot] [PATCH v3 04/19] ARM: tegra: Guard memory controller code with a Kconfig symbol

2019-03-21 Thread Thierry Reding
From: Thierry Reding Memory controller code is not relevant on all Tegra SoC generations, so guard it with a Kconfig symbol that can be selected by the generations that need it. This is in preparation for unifying Tegra186 code with the code used on older generations. Signed-off-by: Thierry

[U-Boot] [PATCH v3 03/19] ARM: tegra: Guard GP pad control code with a Kconfig symbol

2019-03-21 Thread Thierry Reding
From: Thierry Reding The GP pad control code is not relevant on all Tegra SoC generations, so guard it with a Kconfig symbol that can be selected by the generations that need it. This is in preparation for unifying Tegra186 code with the code used on older generations. Signed-off-by: Thierry

[U-Boot] [PATCH v3 08/19] ARM: tegra: Allow boards to override boot target devices

2019-03-21 Thread Thierry Reding
From: Thierry Reding Boards may not support all the boot target devices in the default list for Tegra devices. Allow a board to override the list and default to the standard list only if the board hasn't specified one itself. Signed-off-by: Thierry Reding --- include/configs/tegra-common

[U-Boot] [PATCH v3 08/13] fdtdec: test: Fix build warning

2019-03-21 Thread Thierry Reding
From: Thierry Reding Hide the declaration of the "fd" variable When not building a DEBUG configuration, to avoid the variable being unused. Signed-off-by: Thierry Reding --- Changes in v2: - new patch lib/fdtdec_test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/fdtde

[U-Boot] [PATCH v3 13/13] p2771-0000: Add support for framebuffer carveouts

2019-03-21 Thread Thierry Reding
From: Thierry Reding If early firmware initialized the display hardware and the display controllers are scanning out a framebuffer (e.g. a splash screen), make sure to pass information about the memory location of that framebuffer to the kernel before booting to avoid the kernel from using

[U-Boot] [PATCH v3 12/13] p2371-2180: Add support for framebuffer carveouts

2019-03-21 Thread Thierry Reding
From: Thierry Reding If early firmware initialized the display hardware and the display controllers are scanning out a framebuffer (e.g. a splash screen), make sure to pass information about the memory location of that framebuffer to the kernel before booting to avoid the kernel from using

[U-Boot] [PATCH v3 11/19] ARM: tegra: Restore DRAM bank count

2019-03-21 Thread Thierry Reding
From: Thierry Reding Commit 86cf1c82850f ("configs: Migrate CONFIG_NR_DRAM_BANKS") reduced the number of DRAM banks supported by U-Boot from 1026 to 8 on P2771-000 boards. However, as explained in commit a9819b9e33bd ("ARM: tegra: p2771-000: increase max DRAM bank count"), t

[U-Boot] [PATCH v3 02/19] ARM: tegra: Guard clock code with a Kconfig symbol

2019-03-21 Thread Thierry Reding
From: Thierry Reding Clock code is not relevant on all Tegra SoC generations, so guard it with a Kconfig symbol that can be selected by the generations that need it. This is in preparation for unifying Tegra186 code with the code used on older generations. Signed-off-by: Thierry Reding

<    1   2   3   4   5   6   7   8   >