Re: [U-Boot] [PATCH] malloc: handle free() before gd is set

2016-03-06 Thread Hans de Goede
Hi, On 04-03-16 18:38, Stephen Warren wrote: On 03/04/2016 01:45 AM, Hans de Goede wrote: Hi, On 04-03-16 09:19, Stephen Warren wrote: On at least Ubuntu Xenial, free() can be called before main(). In this case, U-Boot won't have set gd, so dereferencing it will crash. Check whether gd is set

Re: [U-Boot] [PATCH] MIPS: fix mips_cache fallback without __builtin_mips_cache

2016-03-06 Thread Daniel Schwierzeck
Am 05.03.2016 um 04:15 schrieb Matthias Schiffer: > The "R" constraint supplies the address of an variable in a register. Use > "r" instead and adjust asm to supply the content of addr in a register > instead. > > Fixes: 2b8bcc5a ("MIPS: avoid .set ISA for cache operations") > Signed-off-by: Mat

Re: [U-Boot] [PATCH] MIPS: fix mips_cache fallback without __builtin_mips_cache

2016-03-06 Thread Daniel Schwierzeck
Am 06.03.2016 um 20:53 schrieb Matthias Schiffer: > On 03/06/2016 08:38 PM, Daniel Schwierzeck wrote: >> >> >> Am 05.03.2016 um 04:15 schrieb Matthias Schiffer: >>> The "R" constraint supplies the address of an variable in a register. Use >>> "r" instead and adjust asm to supply the content of ad

Re: [U-Boot] [PATCH] MIPS: fix mips_cache fallback without __builtin_mips_cache

2016-03-06 Thread Matthias Schiffer
On 03/06/2016 08:38 PM, Daniel Schwierzeck wrote: > > > Am 05.03.2016 um 04:15 schrieb Matthias Schiffer: >> The "R" constraint supplies the address of an variable in a register. Use >> "r" instead and adjust asm to supply the content of addr in a register >> instead. >> >> Fixes: 2b8bcc5a ("MIPS

[U-Boot] [PATCH 00/69] x86: Add support for samus

2016-03-06 Thread Simon Glass
This series adds support for samus, the Chromebook Pixel 2015. Since it is only the second board added that does not use an FSP, there is quite a bit of refactoring involved to avoid code duplication. Samus uses roughly the same binary blobs as link, except now there is one more called the referen

[U-Boot] [PATCH 07/69] gpio: Add a function to obtain a GPIO vector value

2016-03-06 Thread Simon Glass
We can use GPIOs as binary digits for reading 'strapping' values. Each GPIO is assigned a single bit and can be set high or low on the circuit board. We already have a legacy function for reading these values. Add one that supports driver model. Signed-off-by: Simon Glass --- drivers/gpio/gpio-

[U-Boot] [PATCH 02/69] arm: Add a 64-bit division routine to the private library

2016-03-06 Thread Simon Glass
This is missing, with causes lldiv() to fail on boards with use the private libgcc. Add the missing routine. Code is available for using the CLZ instruction but it is not enabled at present. Signed-off-by: Simon Glass --- arch/arm/lib/Makefile| 3 +- arch/arm/lib/_uldivmod.S | 245 ++

[U-Boot] [PATCH 01/69] dm: timer: Correct timer init ordering after relocation

2016-03-06 Thread Simon Glass
Commit 1057e6c broke use of the timer with driver model. If the timer is used before relocation, then it becomes broken after relocation. This prevents some x86 boards from booting. Fix it. Fixes: 1057e6c (timer: Set up the real timer after driver model is available) Signed-off-by: Simon Glass -

[U-Boot] [PATCH 05/69] video: Allow simple-panel to be used without regulators

2016-03-06 Thread Simon Glass
At present simple-panel requires regulator support and will not build without it. But some panels do not have a power supply, or at least not one that can be controlled. Update the implementation to cope with this. Signed-off-by: Simon Glass --- drivers/video/simple_panel.c | 18 ++-

[U-Boot] [PATCH 03/69] dhry: Correct dhrystone calculation for fast machines

2016-03-06 Thread Simon Glass
At present samus reports about 5600 DMIPS. With the default iteration count this is OK, but if 10 million runs are performed it overflows. Fix it. Signed-off-by: Simon Glass --- lib/dhry/cmd_dhry.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/dhry/cmd_dhry.c b

[U-Boot] [PATCH 04/69] syscon: Avoid returning a device on failure

2016-03-06 Thread Simon Glass
If the device cannot be probed, syscon_get_by_driver_data() will still return a useful value in its devp parameter. Ensure that it returns NULL instead. Signed-off-by: Simon Glass --- drivers/core/syscon-uclass.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/core/syscon-uclass.c b

[U-Boot] [PATCH 06/69] cpu: Add support for microcode version and CPU ID

2016-03-06 Thread Simon Glass
Some CPUs use microcode and each core can have a different version of microcode loaded. Also some CPUs support the concept of an integer ID used for identification purposes. Add support for these in the CPU uclass. Signed-off-by: Simon Glass --- cmd/cpu.c | 7 +++ include/cpu.h | 5

[U-Boot] [PATCH 26/69] x86: Move common PCH code into a common place

2016-03-06 Thread Simon Glass
The SATA indexed register write functions are common to several Intel PCHs. Move this into a common location. Signed-off-by: Simon Glass --- arch/x86/cpu/intel_common/Makefile| 1 + arch/x86/cpu/intel_common/pch_common.c| 25 ++ arch/x86/cpu/ivybridge/cpu.c

[U-Boot] [PATCH 41/69] x86: ivybridge: Show microcode version for each code

2016-03-06 Thread Simon Glass
Enable the microcode feature so that the microcode version is shown with the 'cpu detail' command. Signed-off-by: Simon Glass --- arch/x86/cpu/ivybridge/model_206ax.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/cpu/ivybridge/model_206ax.c b/arch/x86/cpu/ivybr

[U-Boot] [PATCH 16/69] x86: Move cache-as-RAM code into a common location

2016-03-06 Thread Simon Glass
This cache-as-RAM (CAR) code is common to several Intel chips. Create a new intel_common directory and move it in there. Signed-off-by: Simon Glass --- arch/x86/cpu/Makefile | 1 + arch/x86/cpu/intel_common/Makefile | 7 +++ arch/x86/cpu/{ivybridge => in

[U-Boot] [PATCH 18/69] x86: Create a common header for Intel register access

2016-03-06 Thread Simon Glass
There are several blocks of registers that are accessed from all over the code on Intel CPUs. These don't currently have their own driver and it is not clear whether having a driver makes sense. An example is the Memory Controller Hub (MCH). We map it to a known location on some Intel chips (mostl

[U-Boot] [PATCH 14/69] x86: cpu: Make the vendor table const

2016-03-06 Thread Simon Glass
This does not need to be modified at run-time, so make it const. Signed-off-by: Simon Glass --- arch/x86/cpu/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c index 6c3a748..8800e09 100644 --- a/arch/x86/cpu/cpu.c +++ b/arch/x86/cp

[U-Boot] [PATCH 25/69] x86: ivybridge: Drop sandybridge_early_init()

2016-03-06 Thread Simon Glass
This function was removed in the previous clean-up. Drop it from the header file also. Signed-off-by: Simon Glass --- arch/x86/include/asm/arch-ivybridge/sandybridge.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/include/asm/arch-ivybridge/sandybridge.h b/arch/x86/include/asm/

[U-Boot] [PATCH 08/69] gpio: Use const where possible

2016-03-06 Thread Simon Glass
Some functions do not change the struct gpio_desc parameter. Update these to use const so this is clear. Signed-off-by: Simon Glass --- drivers/gpio/gpio-uclass.c | 10 +- include/asm-generic/gpio.h | 10 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/driver

[U-Boot] [PATCH 09/69] pci: Add functions to update PCI configuration registers

2016-03-06 Thread Simon Glass
It is common to read a config register value, clear and set some bits, then write back the updated value. Add functions to do this in one step, for convenience. Signed-off-by: Simon Glass --- drivers/pci/pci-uclass.c | 57 include/pci.h

[U-Boot] [PATCH 12/69] malloc_simple: Add a little more debugging

2016-03-06 Thread Simon Glass
Output the pointer returned by each call to malloc(). This can be useful when debugging memory problems. Signed-off-by: Simon Glass --- common/malloc_simple.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/common/malloc_simple.c b/common/malloc_simple.c index 479a1e4

[U-Boot] [PATCH 15/69] x86: cpu: Add functions to return the family and stepping

2016-03-06 Thread Simon Glass
These two identifiers can be useful for drivers which need to adjust their behaviour depending on the CPU family or stepping (revision). Signed-off-by: Simon Glass --- arch/x86/cpu/cpu.c | 10 ++ arch/x86/include/asm/cpu.h | 14 ++ 2 files changed, 24 insertions(+)

[U-Boot] [PATCH 42/69] x86: Add comments to the SIPI vector

2016-03-06 Thread Simon Glass
The Intel SIPI (start-up inter-processor interrupt) vector is the entry point for each secondary CPU (also called an AP - applications processor). The assembler and C code are linked, so add comments to indicate this. Signed-off-by: Simon Glass --- arch/x86/cpu/sipi_vector.S | 1 + arch/x86/in

[U-Boot] [PATCH 10/69] pci: Correct a few comments and nits

2016-03-06 Thread Simon Glass
Two comments are missing a parameter and there is an extra blank line. Also two of the region access macros are misnamed. Correct these problems. Signed-off-by: Simon Glass --- drivers/pci/pci-uclass.c | 1 - include/pci.h| 6 -- 2 files changed, 4 insertions(+), 3 deletions(-)

[U-Boot] [PATCH 20/69] x86: Move common LPC code to its own place

2016-03-06 Thread Simon Glass
Some of the LPC code is common to several Intel LPC devices. Move it into a common location. Signed-off-by: Simon Glass --- arch/x86/cpu/intel_common/Makefile| 1 + arch/x86/cpu/intel_common/lpc_common.c| 102 ++ arch/x86/cpu/ivybridge/bd82x6x.c

[U-Boot] [PATCH 11/69] input: i8042: Make sure the keyboard is enabled

2016-03-06 Thread Simon Glass
Add one more step into the init sequence. This fixes the keyboard on samus, which otherwise does not work. Signed-off-by: Simon Glass --- drivers/input/i8042.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/input/i8042.c b/drivers/input/i8042.c index 661d7fd..12f8934 100644 -

[U-Boot] [PATCH 44/69] x86: link: Add pin configuration to the device tree

2016-03-06 Thread Simon Glass
At present pin configuration on link does not use the standard mechanism, but some rather ugly custom code. As a first step to resolving this, add the pin configuration to the device tree. Four of the GPIOs must be available before relocation (for SDRAM pin strapping). Signed-off-by: Simon Glass

[U-Boot] [PATCH 13/69] x86: Allow use of serial soon after relocation

2016-03-06 Thread Simon Glass
At present on x86 machines with use cache-as-RAM, the memory goes away just before board_init_r() is called. This means that serial drivers are no-longer unavailable, until initr_dm() it called, etc. Any attempt to use printf() within this period will cause a hang. To fix this, mark the serial de

[U-Boot] [PATCH 17/69] x86: Move microcode code to a common location

2016-03-06 Thread Simon Glass
This code is used on several Intel CPUs. Move it into a common location. Signed-off-by: Simon Glass --- arch/x86/cpu/intel_common/Makefile | 3 +++ arch/x86/cpu/intel_common/car.S| 2 +- arch/x86/cpu/{ivybridge => intel_common}/microcode_intel

[U-Boot] [PATCH 46/69] x86: gpio: Allow the pinctrl driver to set up the pin config

2016-03-06 Thread Simon Glass
Rather than setting up the pin configuration in the GPIO driver, use the new pinctrl driver to do it. Signed-off-by: Simon Glass --- configs/bayleybay_defconfig | 2 + configs/cougarcanyon2_defconfig | 2 + configs/crownbay_defconfig | 2 + configs/galileo_defconfig | 2 +

[U-Boot] [PATCH 32/69] x86: ivybridge: Convert to use the common SDRAM code

2016-03-06 Thread Simon Glass
Adjust the existing implementation to use the new common SDRAM init code. Signed-off-by: Simon Glass --- arch/x86/cpu/ivybridge/sdram.c | 394 + 1 file changed, 83 insertions(+), 311 deletions(-) diff --git a/arch/x86/cpu/ivybridge/sdram.c b/arch/x86/cpu

[U-Boot] [PATCH 43/69] x86: Update microcode for secondary CPUs

2016-03-06 Thread Simon Glass
Each CPU needs to have its microcode loaded. Add support for this so that all CPUs will have the same version. Signed-off-by: Simon Glass --- arch/x86/cpu/cpu.c | 1 + arch/x86/cpu/intel_common/car.S | 2 ++ arch/x86/cpu/mp_init.c | 6 -- arch/x86/include/asm/microc

[U-Boot] [PATCH 45/69] x86: Add an ICH6 pin configuration driver

2016-03-06 Thread Simon Glass
Add a driver which sets up the pin configuration on x86 devices with an ICH6 (or later) Platform Controller Hub. The driver is not in the pinctrl uclass due to some oddities of the way x86 devices work: - The GPIO controller is not present in I/O space until it is set up - This is done by writing

[U-Boot] [PATCH 37/69] x86: Allow I/O functions to use pointers

2016-03-06 Thread Simon Glass
It is common with memory-mapped I/O to use the address of a structure member to access memory, as in: struct some_regs { u32 ctrl; u32 data; } struct some_regs *regs = (struct some_regs *)BASE_ADDRESS; writel(1, ®->ctrl); writel(2, ®->data); This does not currently wo

[U-Boot] [PATCH 53/69] x86: broadwell: Add a pinctrl driver

2016-03-06 Thread Simon Glass
GPIO pins need to be set up on start-up. Add a driver to provide this, configured from the device tree. The binding is slightly different from the existing ICH6 binding, since that is quite verbose. The new binding should be just as extensible. Signed-off-by: Simon Glass --- arch/x86/cpu/broad

[U-Boot] [PATCH 38/69] x86: Move common MRC Kconfig options to the common file

2016-03-06 Thread Simon Glass
At present the MRC options are private to ivybridge. Other Intel CPUs also use these settings. Move them to a common place. Signed-off-by: Simon Glass --- arch/x86/Kconfig | 39 +++ arch/x86/cpu/ivybridge/Kconfig | 27 +--

[U-Boot] [PATCH 66/69] x86: Update README for new developments

2016-03-06 Thread Simon Glass
Update a few points which have become out-of-date. Signed-off-by: Simon Glass --- doc/README.x86 | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/doc/README.x86 b/doc/README.x86 index a3f45c7..b87fec4 100644 --- a/doc/README.x86 +++ b/doc/README.x86 @@ -20,8

[U-Boot] [PATCH 61/69] x86: broadwell: Add support for high-speed I/O lane with ME

2016-03-06 Thread Simon Glass
Provide a way to determine the HSIO (high-speed I/O) version supported by the Intel Management Engine (ME) implementation on the platform. Signed-off-by: Simon Glass --- arch/x86/cpu/broadwell/Makefile | 1 + arch/x86/cpu/broadwell/me.c | 57 + 2 fil

[U-Boot] [PATCH 58/69] x86: broadwell: Add power-control support

2016-03-06 Thread Simon Glass
Broadwell requires quite a bit of power-management setup. Add code to set this up correctly. Signed-off-by: Simon Glass --- arch/x86/cpu/broadwell/Makefile | 1 + arch/x86/cpu/broadwell/power_state.c | 89 + arch/x86/include/asm/arch-broadwell/pm.h | 129

[U-Boot] [PATCH 60/69] x86: broadwell: Add a GPIO driver

2016-03-06 Thread Simon Glass
Add a GPIO driver for the GPIO peripheral found on broadwell devices. Signed-off-by: Simon Glass --- drivers/gpio/Kconfig| 9 ++ drivers/gpio/Makefile | 1 + drivers/gpio/intel_broadwell_gpio.c | 198 3 files changed, 208 in

Re: [U-Boot] [PATCH V5] ARM: Various: Future-proof serial platdata

2016-03-06 Thread Simon Glass
On 2 March 2016 at 04:38, Adam Ford wrote: > A few boards still use ns16550_platdata structures, but assume the structure > is going to be in a specific order. By explicitly naming each entry, > this should also help 'future-proof' in the event the structure changes. > > Tested on the Logic PD Tor

Re: [U-Boot] [PATCH] serial: pl01x: Add support for devices with the rate pre-configured.

2016-03-06 Thread Simon Glass
Hi Stephen, On 5 March 2016 at 23:26, Stephen Warren wrote: > > On 02/05/2016 09:19 PM, Stephen Warren wrote: >> >> On 02/05/2016 02:43 PM, Eric Anholt wrote: >>> >>> For Raspberry Pi, we had the input clock rate to the pl011 fixed in >>> the rpi.c file, but it may be changed by firmware due to u

Re: [U-Boot] [PATCH] sandbox: Fix building with LLVM

2016-03-06 Thread Simon Glass
On 5 March 2016 at 12:07, Tom Rini wrote: > - The macro __BIGGEST_ALIGNMENT__ is gcc-specific. If it is not defined > we'll just assume 16. This is correct for at least the common cases > and LLVM does not provide an equivalent macro. > - When linking U-Boot we're passing -T to the linker, a

Re: [U-Boot] [PATCH] rockchip: make configure_emmc() empty for Firefly-RK3288

2016-03-06 Thread Simon Glass
On 5 March 2016 at 06:32, FUKAUMI Naoki wrote: > on v2016.03-rc3, size of SPL image compiled by gcc 5.3.0 is too large for > Firefly-RK3288. (it's fine for Rock2) > > $ gcc --version > gcc (Ubuntu/Linaro 5.3.0-3ubuntu1~14.04) 5.3.0 20151204 > Copyright (C) 2015 Free Software Foundation, Inc. > Thi

Re: [U-Boot] [PATCH V2 2/2] malloc: remove !gd handling

2016-03-06 Thread Simon Glass
On 5 March 2016 at 10:30, Stephen Warren wrote: > Following the previous patch, malloc() is never called before gd is set, > so we can remove the special-case check for this condition. > > This reverts commit 854d2b9753e4 "dlmalloc: ensure gd is set for early > alloc". > > Cc: Rabin Vincent > Sig

Re: [U-Boot] [PATCH] dm: core: make simple-bus compatible to simple-mfd

2016-03-06 Thread Simon Glass
On 29 February 2016 at 19:51, Masahiro Yamada wrote: > > Simple MFD devices can bind children without special bus configuration. > Like Linux, let's handle "simple-mfd" in the same way as "simple-bus". > > Signed-off-by: Masahiro Yamada > --- > > drivers/core/simple-bus.c | 1 + > 1 file changed

Re: [U-Boot] [PATCH V2 1/2] malloc: use hidden visibility

2016-03-06 Thread Simon Glass
On 5 March 2016 at 10:30, Stephen Warren wrote: > When running sandbox, the following phases occur, each with different > malloc implementations or behaviors: > > 1) Dynamic linker execution, using the dynamic linker's own malloc() > implementation. This is fully functional. > > 2) After U-Boot's

Re: [U-Boot] [PATCH v6 2/2] common: image-fit: Fix load and entry addresses in FIT image

2016-03-06 Thread Simon Glass
On 29 February 2016 at 16:48, York Sun wrote: > FIT image supports more than 32 bits in addresses by using #address-cell > field. Fixing 64-bit support by using this field. > > Signed-off-by: York Sun > > --- > > Changes in v6: > Revert back to use original "ulong" instead of "phys_addr_t" >

Re: [U-Boot] [PATCH 1/3] drivers: block: Kconfig: set default n to CONFIG_DISK

2016-03-06 Thread Simon Glass
Hi Mugunthan, On 2 March 2016 at 22:06, Mugunthan V N wrote: > When a platform is converted to support DM and when its scsi > driver is not converted to support DM, there is a build break as > multiple definition of scsi_init(). So select CONFIG_DISK only > when the platform supports CONFIG_DISK.

Re: [U-Boot] [PATCH v6 1/2] common: image-fit: Use a common function to get address

2016-03-06 Thread Simon Glass
On 29 February 2016 at 16:48, York Sun wrote: > FIT image supports load address and entry address. Getting these > addresses can use a common function. > > Signed-off-by: York Sun > > --- > > Changes in v6: > Drop patches which convert ulong to phys_addr_t > Revert to use original ulong > > C

Re: [U-Boot] [PATCH] rockchip: rk3288: correct sdram setting

2016-03-06 Thread Simon Glass
Hi Chris, On 29 February 2016 at 19:29, Chris Zhong wrote: > Hi Simon > > > On 03/01/2016 10:04 AM, Simon Glass wrote: >> >> Hi Chris, >> >> On 29 February 2016 at 05:16, Chris Zhong wrote: >>> >>> The DMC driver in v3.14 kernel[0] get the ddr setting from PMU_SYS_REG2, >>> and it expects uboot

Re: [U-Boot] buildman for sandbox

2016-03-06 Thread Simon Glass
Hi Joe, On 7 May 2015 at 03:17, Joe Hershberger wrote: > Hi Simon, > > Is there a way to make buildman compile sandbox with a non-system tool > chain? I've tried creating an alias from sandbox to i386 and removing > the "root" entry. It then simply claims not to have a sandbox tool > chain. > > T

Re: [U-Boot] How do I tell buildman to use a /specific/ toolchain?

2016-03-06 Thread Simon Glass
Hi Stephen, On 4 October 2015 at 19:19, Stephen Warren wrote: > On 10/04/2015 10:38 AM, Simon Glass wrote: >> Hi Stephen, >> >> On 3 October 2015 at 20:20, Stephen Warren wrote: >>> On 10/03/2015 08:30 AM, Simon Glass wrote: Hi Stephen, On 2 October 2015 at 00:27, Stephen Warren

[U-Boot] [PATCH 39/69] x86: Tidy up mp_init to reduce duplication

2016-03-06 Thread Simon Glass
The timeout step is always 50us. By updating apic_wait_timeout() to print the debug messages we can simplify the code. Also tidy up a few messages and comments while we are here. Signed-off-by: Simon Glass --- arch/x86/cpu/mp_init.c | 79 +- 1 fil

[U-Boot] [PATCH 23/69] x86: Rename PORT_RESET to IO_PORT_RESET

2016-03-06 Thread Simon Glass
This same name is used in USB. Add a prefix to distinguish it. Signed-off-by: Simon Glass --- arch/x86/cpu/cpu.c | 4 ++-- arch/x86/cpu/intel_common/cpu_common.c | 4 ++-- arch/x86/include/asm/processor.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff -

[U-Boot] [PATCH 35/69] x86: Correct duplicate POST values

2016-03-06 Thread Simon Glass
Two power-on-self-test values are the same. Fix this. Signed-off-by: Simon Glass --- arch/x86/include/asm/post.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/post.h b/arch/x86/include/asm/post.h index f49ce99..6b774bd 100644 --- a/arch/x86/include

Re: [U-Boot] Weird error message on buildman

2016-03-06 Thread Simon Glass
Hi Masahiro, On 23 February 2015 at 06:42, Simon Glass wrote: > Hi Masahiro, > > On 23 February 2015 at 05:52, Masahiro Yamada > wrote: >> Hi Simon, >> >> >> When I try to run Buildman against a branch named "test", >> it fails with a weird error message. >> >> >> >> $ git branch >> * master >>

[U-Boot] [PATCH 30/69] x86: gpio: Correct GPIO setup ordering

2016-03-06 Thread Simon Glass
The Intel GPIO driver can set up the GPIO pin mapping when the first GPIO is probed. However, it assumes that the first GPIO to be probed is in the first GPIO bank. If this is not the case then the init will write to the wrong registers. Fix this. Also add a note that this code is deprecated. We s

[U-Boot] [PATCH 62/69] x86: Support a chained-boot development flow

2016-03-06 Thread Simon Glass
Sometimes it is useful to jump into U-Boot directly from coreboot or UEFI without any 16-bit init. This can help during development by allowing U-Boot to avoid doing all the init required by the platform. In this case we cannot rely on the GDT settings. U-Boot will hang or crash if these are wrong

[U-Boot] [PATCH 59/69] x86: broadwell: Add support for SDRAM setup

2016-03-06 Thread Simon Glass
Broadwell uses a binary blob called the memory reference code (MRC) to start up its SDRAM. This is similar to ivybridge so we can mostly use common code for running this blob. Signed-off-by: Simon Glass --- arch/x86/cpu/broadwell/Makefile| 1 + arch/x86/cpu/broadwell/sdram.c

[U-Boot] [PATCH 33/69] x86: dts: Drop memory SPD compatible string

2016-03-06 Thread Simon Glass
This is not needed now that the memory controller driver has the SPD data in its own node. Signed-off-by: Simon Glass --- arch/x86/dts/chromebook_link.dts | 1 - include/fdtdec.h | 1 - lib/fdtdec.c | 1 - 3 files changed, 3 deletions(-) diff --git a/arch/x8

[U-Boot] [PATCH 24/69] x86: Move Intel Management Engine code to a common place

2016-03-06 Thread Simon Glass
Some of the Intel ME code is common to several Intel CPUs. Move it into a common location. Add a header file for report_platform.c also. Signed-off-by: Simon Glass --- arch/x86/cpu/intel_common/Makefile | 2 + .../cpu/{ivybridge => intel_common}/me_status.c| 20 +- .../{i

[U-Boot] [PATCH 64/69] x86: Add a default address for reference code

2016-03-06 Thread Simon Glass
Add an address which can be used for loading and running the reference code when needed. Signed-off-by: Simon Glass --- include/configs/x86-chromebook.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/x86-chromebook.h b/include/configs/x86-chromebook.h index c575dab..057d4

[U-Boot] [PATCH 69/69] x86: Add support for the samus chromebook

2016-03-06 Thread Simon Glass
This adds basic support for chromebook_samus. This is the 2015 Pixel and is based on an Intel broadwell platform. Supported so far are: - Serial - SPI flash - SDRAM init (with MRC cache) - SATA - Video (on the internal LCD panel) - Keyboard Various less-visible drivers are provided to make the ab

[U-Boot] [PATCH 19/69] x86: Add the root-complex block to common intel registers

2016-03-06 Thread Simon Glass
This is similar to MCH in that it is used in various drivers. Add it to the common header. Signed-off-by: Simon Glass --- arch/x86/cpu/ivybridge/bd82x6x.c | 1 + arch/x86/cpu/ivybridge/lpc.c | 6 -- arch/x86/include/asm/arch-ivybridge/pch.h | 5 - arch/x86/include/

[U-Boot] [PATCH 54/69] x86: broadwell: Add a SATA driver

2016-03-06 Thread Simon Glass
Add a SATA driver for broadwell. This supports connecting an SSD and the usual U-Boot commands to read and write data. Signed-off-by: Simon Glass --- arch/x86/cpu/broadwell/Makefile | 1 + arch/x86/cpu/broadwell/sata.c | 269 2 files changed, 270 ins

[U-Boot] [PATCH 48/69] x86: Add support for running Intel reference code

2016-03-06 Thread Simon Glass
Intel has invented yet another binary blob which firmware is required to run. This is run after SDRAM is ready. It is linked to load at a particular address, typically 0, but is a relocatable ELF so can be moved if required. Add support for this in the build system. The file should be placed in th

[U-Boot] [PATCH 68/69] x86: Fix a header nit in x86-chromebook.h

2016-03-06 Thread Simon Glass
There is an extra line in the comment in the header. Remove it. Signed-off-by: Simon Glass --- include/configs/x86-chromebook.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/configs/x86-chromebook.h b/include/configs/x86-chromebook.h index ae969b9..c94096a 100644 --- a/include/conf

[U-Boot] [PATCH 36/69] x86: Add macros to clear and set I/O bits

2016-03-06 Thread Simon Glass
The clrsetbits_...() macros are useful for working with memory mapped I/O. But they do not work with I/O space, as used on x86 machines. Add some macros to provide similar features for I/O. Signed-off-by: Simon Glass --- arch/x86/include/asm/io.h | 22 ++ 1 file changed, 22

[U-Boot] [PATCH 27/69] x86: link: Add required GPIO properties

2016-03-06 Thread Simon Glass
In order to use GPIO phandles we need to add some GPIO properties as specified by the GPIO bindings. Add these for link. Signed-off-by: Simon Glass --- arch/x86/dts/chromebook_link.dts | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/arch/x86/dts/chromebook_link.

[U-Boot] [PATCH 28/69] x86: dts: link: Move SPD info into the memory controller

2016-03-06 Thread Simon Glass
The SDRAM SPD (Serial Presence Detect) information should be contained with the SDRAM controller. This makes it easier for the controller to access it and removes the need for a separate compatible string. As a first step, move the information. Signed-off-by: Simon Glass --- arch/x86/dts/chrom

[U-Boot] [PATCH 50/69] x86: Add basic support for broadwell

2016-03-06 Thread Simon Glass
This adds the broadwell architecture, with the CPU driver and some useful header files. Signed-off-by: Simon Glass --- arch/x86/Kconfig| 1 + arch/x86/cpu/Makefile | 1 + arch/x86/cpu/broadwell/Kconfig | 30 ++ arch/x86/cpu/bro

[U-Boot] [PATCH 29/69] x86: dts: link: Add board ID GPIOs

2016-03-06 Thread Simon Glass
At present the board ID GPIOs are hard-coded. Move them to the device tree so that we can use general SDRAM init code. Signed-off-by: Simon Glass --- arch/x86/dts/chromebook_link.dts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/dts/chromebook_link.dts b/arch/x86/dts/chromebook

[U-Boot] [PATCH 21/69] x86: Add some more common MSR indexes

2016-03-06 Thread Simon Glass
Many of the model-specific indexes are common to several Intel CPUs. Add some more common ones, and remove them from the ivybridge-specific header file. Signed-off-by: Simon Glass --- arch/x86/cpu/ivybridge/model_206ax.c | 5 +-- arch/x86/include/asm/arch-ivybridge/model_206ax.h |

[U-Boot] [PATCH 57/69] x86: broadwell: Add reference code support

2016-03-06 Thread Simon Glass
Broadwell needs a special binary blob to set up the PCH. Add code to run this on start-up. Signed-off-by: Simon Glass --- arch/x86/cpu/broadwell/Makefile | 1 + arch/x86/cpu/broadwell/refcode.c | 108 +++ 2 files changed, 109 insertions(+) create mode 100

[U-Boot] [PATCH 65/69] x86: Use white on black for the console on chromebooks

2016-03-06 Thread Simon Glass
This is a little easier on the eyes, particularly when the backlight is set to maximum. Signed-off-by: Simon Glass --- include/configs/x86-chromebook.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/x86-chromebook.h b/include/configs/x86-chromebook.h index 057d4be..ae969b

[U-Boot] [PATCH 3/8] buildman: patman: Fix -H when installed as a symlink

2016-03-06 Thread Simon Glass
It is convenient to install symlinks to buildman and patman in the search patch, such as /usr/local/bin. But when this is done, the -H option fails to work because it looks in the directory containing the symlink instead of its target. Fix this. Signed-off-by: Simon Glass --- tools/buildman/con

[U-Boot] [PATCH 1/8] fdtgrep: Improve error handling with invalid device tree

2016-03-06 Thread Simon Glass
This tool requires that the aliases node be the first node in the tree. But when it is not, it does not handle things gracefully. In fact it crashes. Fix this, and add a more helpful error message. Signed-off-by: Simon Glass Reported-by: Masahiro Yamada --- tools/fdtgrep.c | 14 ++

[U-Boot] [PATCH 4/8] buildman: Fix up a few code inconsistencies in toolchain.py

2016-03-06 Thread Simon Glass
Normally we use a single quote for strings unless there is a reason not to (such as an embedded single quote). Fix a few counter-examples in this file. Also add a missing function-argument comment. Signed-off-by: Simon Glass --- tools/buildman/toolchain.py | 11 ++- 1 file changed, 6 in

[U-Boot] [PATCH 2/8] patman: Add a missing space in GetMetaDataForList()

2016-03-06 Thread Simon Glass
Fix this nit to keep the code consistent. Signed-off-by: Simon Glass --- tools/patman/patchstream.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py index 6d3c41f..27d031e 100644 --- a/tools/patman/patchstream.py +++

[U-Boot] [PATCH 5/8] buildman: Allow branch names which conflict with directories

2016-03-06 Thread Simon Glass
At present if you try to use buildman with the branch 'test' it will complain that it is unsure whether you mean the branch or the directory. This is a feature of the 'git log' command that buildman uses. Fix it by resolving the ambiguity. Signed-off-by: Simon Glass --- tools/patman/gitutil.py

[U-Boot] [PATCH 6/8] buildman: Allow the toolchain priority to be specified

2016-03-06 Thread Simon Glass
At present the priority of a toolchain is calculated from its filename based on hard-coded rules. Allow it to be specified by the caller. We will use this in a later patch. Also display the priority and provide a message when it is overriden by another toolchain of higher priority. Signed-off-by:

[U-Boot] [PATCH 7/8] buildman: Allow the toolchain architecture to be specified

2016-03-06 Thread Simon Glass
At present the architecture is deduced from the toolchain filename. Allow it to be specified by the caller. Signed-off-by: Simon Glass --- tools/buildman/toolchain.py | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/tools/buildman/toolchain.py b/tools/build

[U-Boot] [PATCH 8/8] buildman: Add a way to specific a full toolchain prefix

2016-03-06 Thread Simon Glass
At present buildman allows you to specify the directory containing the toolchain, but not the actual toolchain prefix. If there are multiple toolchains in a single directory, this can be inconvenient. Add a new 'toolchain-prefix' setting to the settings file, which allows the full prefix (or path

[U-Boot] [PATCH 22/69] x86: Move common CPU code to its own place

2016-03-06 Thread Simon Glass
Some of the Intel CPU code is common to several Intel CPUs. Move it into a common location along with required declarations. Signed-off-by: Simon Glass --- arch/x86/cpu/intel_common/Makefile| 1 + arch/x86/cpu/intel_common/cpu_common.c| 111 ++ arch/x86

[U-Boot] [PATCH 55/69] x86: broadwell: Add a northbridge driver

2016-03-06 Thread Simon Glass
Add a driver for the broadwell northbridge. This sets up the location of several blocks of registers. Signed-off-by: Simon Glass --- arch/x86/cpu/broadwell/Makefile | 1 + arch/x86/cpu/broadwell/northbridge.c | 59 2 files changed, 60 insertions(+) cr

[U-Boot] [PATCH 34/69] x86: Add a script to aid code conversion from coreboot

2016-03-06 Thread Simon Glass
It is useful to automate the process of converting code from coreboot a little. Add a sed script which performs some common transformations. Signed-off-by: Simon Glass --- doc/README.x86 | 9 + scripts/coreboot.sed | 17 + 2 files changed, 26 insertions(+) create

[U-Boot] [PATCH 52/69] x86: broadwell: Add a PCH driver

2016-03-06 Thread Simon Glass
Add a driver for the broadwell low-power platform controller hub. Signed-off-by: Simon Glass --- arch/x86/cpu/broadwell/Makefile | 2 + arch/x86/cpu/broadwell/iobp.c | 144 arch/x86/cpu/broadwell/pch.c | 540 ++ arch/x86/

[U-Boot] [PATCH 67/69] x86: Add a function to set the IOAPIC ID

2016-03-06 Thread Simon Glass
Add a function to set the ID in the IOAPIC. Signed-off-by: Simon Glass --- arch/x86/cpu/ioapic.c | 16 arch/x86/include/asm/ioapic.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/arch/x86/cpu/ioapic.c b/arch/x86/cpu/ioapic.c index 112a9c6..d15e86c 100644 ---

[U-Boot] [PATCH 49/69] x86: dts: Update the pinctrl binding a little

2016-03-06 Thread Simon Glass
Make a few minor updates to make the meaning clearer. Signed-off-by: Simon Glass --- doc/device-tree-bindings/gpio/intel,x86-pinctrl.txt | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/doc/device-tree-bindings/gpio/intel,x86-pinctrl.txt b/doc/device-

[U-Boot] [PATCH 63/69] x86: broadwell: Add video support

2016-03-06 Thread Simon Glass
Add a video driver for Intel's broadwell integrated graphics controller. This uses a binary blob for most init, with the driver just performing a few basic tasks. This driver supports VESA as the mode-setting mechanism. Since most boards don't support driver model yet with VESA, a special case is

[U-Boot] [PATCH 31/69] x86: Add common SDRAM-init code

2016-03-06 Thread Simon Glass
The code to call the memory reference code is common to several Intel CPUs. Add common code for performing this init. Intel calls this 'Pre-EFI-Init' (PEI), where EFI stands for Extensible Firmware Interface. Signed-off-by: Simon Glass --- arch/x86/cpu/intel_common/Makefile | 1 + arch/

[U-Boot] [PATCH 56/69] x86: broadwell: Add an LPC driver

2016-03-06 Thread Simon Glass
Add a driver for the broadwell LPC (low-pin-count peripheral). This mostly uses common code. Signed-off-by: Simon Glass --- arch/x86/cpu/broadwell/Makefile | 1 + arch/x86/cpu/broadwell/lpc.c | 77 +++ arch/x86/include/asm/arch-broadwell/lpc.h

[U-Boot] [PATCH 40/69] x86: Record the CPU details when starting each core

2016-03-06 Thread Simon Glass
As each core starts up, record its microcode version and CPU ID so these can be presented with the 'cpu detail' command. Signed-off-by: Simon Glass --- arch/x86/cpu/intel_common/microcode_intel.c | 2 +- arch/x86/cpu/mp_init.c | 5 + arch/x86/include/asm/microcode.h

[U-Boot] [PATCH 47/69] x86: Drop all the old pin configuration code

2016-03-06 Thread Simon Glass
We don't need this anymore - we can use device tree and the new pinconfig driver instead. Signed-off-by: Simon Glass --- arch/x86/include/asm/gpio.h | 141 -- board/coreboot/coreboot/coreboot.c| 5 -- board/efi/efi-x86/efi.c

Re: [U-Boot] [PATCH 1/8] fdtgrep: Improve error handling with invalid device tree

2016-03-06 Thread Masahiro Yamada
Hi Simon, 2016-03-07 11:45 GMT+09:00 Simon Glass : > This tool requires that the aliases node be the first node in the tree. But > when it is not, it does not handle things gracefully. In fact it crashes. > > Fix this, and add a more helpful error message. > > Signed-off-by: Simon Glass > Report

[U-Boot] [PATCH 51/69] x86: broadwell: Add a few microcode files

2016-03-06 Thread Simon Glass
Add two microcode files for broadwell. Signed-off-by: Simon Glass --- arch/x86/dts/microcode/m7240651_001c.dtsi | 1328 + arch/x86/dts/microcode/mc0306d4_0018.dtsi | 944 ++ 2 files changed, 2272 insertions(+) create mode 100644 arch/x86/dts/mic

Re: [U-Boot] [PATCH] rockchip: rk3288: correct sdram setting

2016-03-06 Thread Chris Zhong
Hi Simon On 2016年03月07日 10:39, Simon Glass wrote: Hi Chris, On 29 February 2016 at 19:29, Chris Zhong wrote: Hi Simon On 03/01/2016 10:04 AM, Simon Glass wrote: Hi Chris, On 29 February 2016 at 05:16, Chris Zhong wrote: The DMC driver in v3.14 kernel[0] get the ddr setting from PMU_SYS_

Re: [U-Boot] [PATCH 1/8] fdtgrep: Improve error handling with invalid device tree

2016-03-06 Thread Simon Glass
Hi Masahiro, On 6 March 2016 at 20:07, Masahiro Yamada wrote: > Hi Simon, > > > 2016-03-07 11:45 GMT+09:00 Simon Glass : >> This tool requires that the aliases node be the first node in the tree. But >> when it is not, it does not handle things gracefully. In fact it crashes. >> >> Fix this, and

Re: [U-Boot] [PATCH 09/12] armv8: ls2080aqds: Enable QSPI boot support

2016-03-06 Thread Yao Yuan
On 03/04/2016 12:49 AM, York Sun wrote: > On 03/02/2016 06:30 PM, Yao Yuan wrote: > > On 03/03/2016 12:52 AM, York Sun wrote: > >> On 03/02/2016 02:41 AM, Yuan Yao wrote: > >>> From: Yuan Yao > >>> > >>> This patch adds QSPI boot support for LS2080AQDS board. > >>> The QSPI boot image need to be p

  1   2   >