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

2019-04-16 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

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

2019-04-16 Thread Thierry Reding
On Mon, Apr 15, 2019 at 09:24:00PM +, Joe Hershberger wrote: > On Mon, Apr 15, 2019 at 4:11 AM Thierry Reding > wrote: > > > > From: Thierry Reding > > > > In order for the device to use the proper MAC address, which can have > > been configured in the e

Re: [U-Boot] [PATCH 1/3] dm: core: Add dev_read_bytes()

2019-04-16 Thread Thierry Reding
On Mon, Apr 15, 2019 at 09:21:45PM +, Joe Hershberger wrote: > On Mon, Apr 15, 2019 at 4:11 AM Thierry Reding > wrote: > > > > From: Thierry Reding > > > > This function can be used to read a binary property into a buffer. One > > example where this is

[U-Boot] [PATCH v5 25/27] ARM: tegra: Rename pcie-controller to pcie

2019-04-15 Thread Thierry Reding
From: Thierry Reding Recent versions of DTC have checks for PCI host bridge device tree nodes that are named something other than "pci" or "pcie". Fix all occurrences of such nodes for Tegra boards to avoid potential warnings from DTC. Signed-off-by: Thierry Reding --- a

[U-Boot] [PATCH v5 26/27] ARM: tegra: Mark built-in Ethernet as default on Jetson TX2

2019-04-15 Thread Thierry Reding
From: Thierry Reding Add an "ethernet" alias that points to the default network interface, which is the built-in EQoS on Jetson TX2. Signed-off-by: Thierry Reding --- arch/arm/dts/tegra186-p2771-.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/dts/tegra186-

[U-Boot] [PATCH v5 16/27] ARM: tegra: Unify Tegra186 builds

2019-04-15 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 v5 13/27] ARM: tegra: Support TZ-only access to PMC

2019-04-15 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 v5 21/27] p2371-2180: Pass Ethernet MAC to the kernel

2019-04-15 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 v5 24/27] p2771-0000: Add support for framebuffer carveouts

2019-04-15 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 v5 22/27] p2771-0000: Pass Ethernet MAC to the kernel

2019-04-15 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 v5 14/27] ARM: tegra: Workaround UDC boot issues only if necessary

2019-04-15 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 v5 18/27] ARM: tegra: Implement cboot_get_ethaddr()

2019-04-15 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 default Ethernet device for the board (identified by the "ethernet" alias) and if found, reads the "local-mac-ad

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

2019-04-15 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 v5 12/27] ARM: tegra: Allow boards to override boot target devices

2019-04-15 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 v5 19/27] ARM: tegra: Import cbootargs value from cboot DTB

2019-04-15 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 v5 07/27] ARM: tegra: Guard GP pad control code with a Kconfig symbol

2019-04-15 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 v5 09/27] ARM: tegra: Guard pin controller code with a Kconfig symbol

2019-04-15 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 v5 23/27] p2371-2180: Add support for framebuffer carveouts

2019-04-15 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 v5 08/27] ARM: tegra: Guard memory controller code with a Kconfig symbol

2019-04-15 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 v5 11/27] ARM: tegra: Fix save_boot_params() prototype

2019-04-15 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 v5 17/27] ARM: tegra: Implement cboot_save_boot_params() in C

2019-04-15 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 v5 15/27] ARM: tegra: Restore DRAM bank count

2019-04-15 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 v5 20/27] ARM: tegra: Enable position independent build for 64-bit

2019-04-15 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 v5 10/27] ARM: tegra: Guard powergate code with a Kconfig symbol

2019-04-15 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 v5 05/27] ARM: tegra: Use common header for PMU declarations

2019-04-15 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 v5 03/27] ARM: tegra: Fix mux type for disp1 and disp2 clocks on Tegra210

2019-04-15 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 v5 04/27] ARM: tegra: Remove disp1 clock initialization on Tegra210

2019-04-15 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 v5 06/27] ARM: tegra: Guard clock code with a Kconfig symbol

2019-04-15 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 v5 01/27] fdtdec: Add fdtdec_set_ethernet_mac_address()

2019-04-15 Thread Thierry Reding
From: Thierry Reding This function can be used to set the local MAC address for the default Ethernet interface in its device tree node. The default interface is identified by the "ethernet" alias. One case where this is useful is for devices that store their MAC address in a custo

[U-Boot] [PATCH v5 02/27] lib: Implement strndup()

2019-04-15 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 v5 00/27] ARM: tegra: Miscalleneous improvements

2019-04-15 Thread Thierry Reding
From: Thierry Reding Hi Tom, Stephen, this in the fifth installment of this series of miscellaneous improvements for Tegra support. The main changes since the last version are: - Add two patches from the "framebuffer carveout" series since Simon has already picked up

[U-Boot] [PATCH 1/3] dm: core: Add dev_read_bytes()

2019-04-15 Thread Thierry Reding
From: Thierry Reding This function can be used to read a binary property into a buffer. One example where this is needed is to read a MAC address from device tree. Signed-off-by: Thierry Reding --- drivers/core/of_access.c | 21 + drivers/core/ofnode.c| 13

[U-Boot] [PATCH 3/3] net: eth-uclass: Support device tree MAC addresses

2019-04-15 Thread Thierry Reding
From: Thierry Reding Add the standard Ethernet device tree bindings (imported from v5.0 of the Linux kernel) and implement support for reading the MAC address for Ethernet devices in the Ethernet uclass. If the "mac-address" property exists, the MAC address will be p

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

2019-04-15 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

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

2019-04-15 Thread Thierry Reding
On Thu, Apr 11, 2019 at 08:12:03PM -0600, Simon Glass wrote: > Hi Thierry, > > On Fri, 22 Mar 2019 at 01:53, Simon Glass wrote: > > > > On Fri, 22 Mar 2019 at 02:10, Thierry Reding > > wrote: > > > > > > From: Thierry Reding > > > &g

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

2019-04-15 Thread Thierry Reding
On Fri, Apr 12, 2019 at 03:45:53PM -0600, Simon Glass wrote: > Hi Thierry, > > On Fri, 22 Mar 2019 at 02:31, Thierry Reding wrote: > > > > On Fri, Mar 22, 2019 at 03:53:00PM +0800, Simon Glass wrote: > > > Hi Thierry, > > > > > > On Fri, 22

[U-Boot] [PATCH 2/2] fdtdec: Remove fdt_{addr,size}_unpack()

2019-04-15 Thread Thierry Reding
From: Thierry Reding U-Boot already defines the {upper,lower}_32_bits() macros that have the same purpose. Use the existing macros instead of defining new APIs. Signed-off-by: Thierry Reding --- include/fdtdec.h | 24 lib/fdtdec.c | 8 ++-- lib

[U-Boot] [PATCH 1/2] fdtdec: Use fdt_setprop_u32() for fdtdec_set_phandle()

2019-04-15 Thread Thierry Reding
From: Thierry Reding The fdt_setprop_u32() function does everything that we need, so we really only use the function as a convenience wrapper, in which case it can simply be a static inline function. Signed-off-by: Thierry Reding --- include/fdtdec.h | 5 - lib/fdtdec.c | 7 --- 2

[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 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 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 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 13/19] ARM: tegra: Implement cboot_save_boot_params() in C

2019-04-04 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 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

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

2019-04-04 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 v4 05/19] ARM: tegra: Guard pin controller code with a Kconfig symbol

2019-04-04 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 v4 08/19] ARM: tegra: Allow boards to override boot target devices

2019-04-04 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 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 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 03/19] ARM: tegra: Guard GP pad control code with a Kconfig symbol

2019-04-04 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 v4 04/19] ARM: tegra: Guard memory controller code with a Kconfig symbol

2019-04-04 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 v4 02/19] ARM: tegra: Guard clock code with a Kconfig symbol

2019-04-04 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 v4 00/19] ARM: tegra: Miscellaneous improvements

2019-04-04 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 v4 01/19] ARM: tegra: Use common header for PMU declarations

2019-04-04 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

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 ("

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

2019-03-26 Thread Thierry Reding
R_CPUS=256 to nr_cpu_ids=1. > > > [0.00] Tasks RCU enabled. > > > [0.00] rcu: RCU calculated value of scheduler-enlistment delay > > > is 10 jiffies. > > > [0.00] rcu: Adjusting geometry for rcu_fanout_leaf=16, > > > nr_cpu_ids

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

2019-03-26 Thread Thierry Reding
are name: NVIDIA P2771--500 (DT) > [0.00] Call trace: > [0.00] dump_backtrace+0x0/0x128 > [0.00] show_stack+0x24/0x30 > [0.00] dump_stack+0xa8/0xcc > [0.00] panic+0x12c/0x2dc > [0.00] time_init+0x34/0x4c > [0.00] star

Re: [U-Boot] [PATCH v3 01/13] libfdt: Add phandle generation helper

2019-03-25 Thread Thierry Reding
On Fri, Mar 22, 2019 at 03:52:59PM +0800, Simon Glass wrote: > On Fri, 22 Mar 2019 at 02:10, Thierry Reding wrote: > > > > From: Thierry Reding > > > > The new fdt_generate_phandle() function can be used to generate a new, > > unused phandle given a specific dev

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

2019-03-22 Thread Thierry Reding
On Fri, Mar 22, 2019 at 03:53:07PM +0800, Simon Glass wrote: > Hi Thierry, > > On Fri, 22 Mar 2019 at 02:10, Thierry Reding wrote: > > > > From: Thierry Reding > > > > Implement carveout tests for 32-bit and 64-bit builds. > > > > Signed-off-

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

2019-03-22 Thread Thierry Reding
On Fri, Mar 22, 2019 at 03:53:01PM +0800, Simon Glass wrote: > Hi Thierry, > > On Fri, 22 Mar 2019 at 02:10, Thierry Reding wrote: > > > > From: Thierry Reding > > > > This function can be used to set a phandle for a given node. > > > > Signed-off-

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

2019-03-22 Thread Thierry Reding
On Fri, Mar 22, 2019 at 03:53:00PM +0800, Simon Glass wrote: > Hi Thierry, > > On Fri, 22 Mar 2019 at 02:10, Thierry Reding wrote: > > > > From: Thierry Reding > > > > These helpers can be used to unpack variables of type fdt_addr_t and > > fdt

[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 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 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 02/13] fdtdec: Add cpu_to_fdt_{addr, size}() macros

2019-03-21 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 v3 07/13] fdtdec: Add Kconfig symbol for tests

2019-03-21 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 09/13] fdtdec: test: Use compound statement macros

2019-03-21 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 v3 01/13] libfdt: Add phandle generation helper

2019-03-21 Thread Thierry Reding
From: Thierry Reding The new fdt_generate_phandle() function can be used to generate a new, unused phandle given a specific device tree blob. The implementation is somewhat naive in that it simply walks the entire device tree to find the highest phandle value and then returns a phandle value one

[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 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 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 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 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 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 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 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 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 12/19] ARM: tegra: Unify Tegra186 builds

2019-03-21 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 v3 16/19] p2371-2180: Pass Ethernet MAC to the kernel

2019-03-21 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 v3 15/19] ARM: tegra: Enable position independent build for 64-bit

2019-03-21 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 v3 17/19] p2771-0000: Pass Ethernet MAC to the kernel

2019-03-21 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 v3 13/19] ARM: tegra: Implement cboot_save_boot_params() in C

2019-03-21 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 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

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

2019-03-21 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 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 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 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 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 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 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 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 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

<    1   2   3   4   5   6   7   8   >