Re: [U-Boot] [PATCH v2 2/4] ARM: armv7: guard memory reserve for PSCI with #ifdef CONFIG_ARMV7_PSCI

2016-09-25 Thread Masahiro Yamada
Hi Jon, 2016-09-23 14:34 GMT+09:00 Jon Masters : > On 09/23/2016 01:09 AM, Jon Masters wrote: >> On 08/30/2016 03:22 AM, Masahiro Yamada wrote: >>> If CONFIG_ARMV7_NONSEC is enabled, the linker script requires >>> CONFIG_ARMV7_PSCI_NR_CPUS regardless of CONFIG_ARMV7_PSCI. >>>

[U-Boot] [RFC PATCH] ARM: create .secure_stack section only for PSCI

2016-09-25 Thread Masahiro Yamada
Jon Master reports that QEMU refuses to load a U-Boot image built with CONFIG_ARMV7_NONSEC, but without CONFIG_ARMV7_PSCI since commit 5a3aae68c74e ("ARM: armv7: guard memory reserve for PSCI with #ifdef CONFIG_ARMV7_PSCI"). It looks like only PSCI that needs the Secure stack, so move the #ifdef

Re: [U-Boot] [PATCH] getting ubifs to run

2016-09-25 Thread Heiko Schocher
Hello Travis, Am 26.09.2016 um 06:43 schrieb Travis Waters: Thanks for the response. I went ahead and used the current patch as-is, which allowed me to build. I haven't yet verified whether the result is functional, though. (We are probably a couple weeks out from having our FLASH driver in

Re: [U-Boot] Curses from u-boot

2016-09-25 Thread Heiko Schocher
Hello Daniel, Am 21.09.2016 um 15:25 schrieb Daniel.: Hi everybody, I was wondering what would be the difficult to run some curses based menu from u-boot. I've been search for curses porting and found this: http://frank.harvard.edu/~coldwell/ncurses/hackguide.html. The big problem here is that

Re: [U-Boot] [PATCH] getting ubifs to run

2016-09-25 Thread Heiko Schocher
Hello Travis, Am 21.09.2016 um 22:05 schrieb Travis Waters: Hello, I am working to enable UBIFS for use on the sparc platform and I am running into the same linking trouble flagged in this thread: uboot/fs/ubifs/lpt_commit.c:1232: undefined reference to `dbg_chk_lpt_free_spc'

[U-Boot] [PATCH v4 6/6] configs: am57xx_evm_defconfig: Enable PALMAS options

2016-09-25 Thread Keerthy
Enable palmas PMIC config options. Signed-off-by: Keerthy Reviewed-by: Tom Rini --- configs/am57xx_evm_defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configs/am57xx_evm_defconfig b/configs/am57xx_evm_defconfig index 27ea472..6c60d9b

[U-Boot] [PATCH v4 4/6] power: regulator: palmas: Add regulator support

2016-09-25 Thread Keerthy
The driver provides regulator set/get voltage enable/disable functions for palmas family of PMICs. Signed-off-by: Keerthy Reviewed-by: Simon Glass Reviewed-by: Tom Rini --- drivers/power/regulator/Kconfig| 8 +

[U-Boot] [PATCH v4 3/6] power: pmic: Palmas: Add the base pmic support

2016-09-25 Thread Keerthy
Add support to bind the regulators/child nodes with the pmic. Signed-off-by: Keerthy Reviewed-by: Simon Glass Reviewed-by: Tom Rini --- drivers/power/pmic/Kconfig | 7 + drivers/power/pmic/Makefile | 1 +

[U-Boot] [PATCH v4 5/6] configs: dra7xx_evm_defconfig: Enable PALMAS options

2016-09-25 Thread Keerthy
Enable palmas PMIC config options. Signed-off-by: Keerthy Reviewed-by: Tom Rini --- configs/dra7xx_evm_defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig index 64df490..16798b5

[U-Boot] [PATCH v4 2/6] power: regulator: Add ctrl_reg and volt_reg fields for pmic

2016-09-25 Thread Keerthy
The ctrl reg contains bit fields to enable and disable regulators, and volt_reg has the bit fields to configure the voltage values. The registers are frequently accessed hence make them part of dm_regulator_uclass_platdata structure. Signed-off-by: Keerthy Reviewed-by: Tom Rini

[U-Boot] [PATCH v4 1/6] dm: i2c: Add u8 read/write i2c functions

2016-09-25 Thread Keerthy
Add u8 i2c read/write hooks. Signed-off-by: Keerthy Reviewed-by: Tom Rini --- drivers/i2c/i2c-uclass.c | 10 ++ include/i2c.h| 24 2 files changed, 34 insertions(+) diff --git a/drivers/i2c/i2c-uclass.c

[U-Boot] [PATCH v4 0/6] power: pmic: Add support for Palmas family of PMICs

2016-09-25 Thread Keerthy
The series adds support for Palmas family of PMICs. Implements functions to configure regulators. Enable/Disable Get/Set voltages of regulators. Supports TPS659038, TPS65917, Palmas. Tested on TPS659038, TPS65917 using DRA7XX-EVM and AM57XX-EVM. Changes in v4: Added Reviewed-by and a minor

Re: [U-Boot] [PATCH 27/82] x86: i2c: Fix cast of address to 32-bit value

2016-09-25 Thread Heiko Schocher
Hello Simon, Am 26.09.2016 um 05:33 schrieb Simon Glass: This gives a build warning on 64-bit x86. Fix it. Signed-off-by: Simon Glass --- drivers/i2c/intel_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Acked-by: Heiko Schocher bye,

[U-Boot] [PATCH] ARM: uniphier: do not setup pins for System Bus on NAND boot mode

2016-09-25 Thread Masahiro Yamada
For LD11 and LD20 SoCs, the System Bus and NAND are multiplexed in the same I/O pins. When booting from a NAND device, pin-mux for the System Bus must not be set-up because they are exclusive with each other. Signed-off-by: Masahiro Yamada ---

[U-Boot] [PATCH 0/5] Refactor makefiles for u-boot.cfg rules

2016-09-25 Thread Masahiro Yamada
The Makefiles are getting cluttered for u-boot.cfg. I do not think that we should make effort for u-boot.cfg because it is almost the same as include/autoconf.mk.tmp I was consindering this series as a replacement for Stephen Warren's fixes, but I was late. Anyway, I do not like code

[U-Boot] [PATCH 4/5] kbuild: generate u-boot.cfg as a byproduct of include/autoconf.mk

2016-09-25 Thread Masahiro Yamada
Our build system still parses ad-hoc CONFIG options in header files and generates include/autoconf.mk so that Makefiles can reference them. This gimmick was introduced in the pre-Kconfig days and will be kept until Kconfig migration is completed. The include/autoconf.mk is generated like

[U-Boot] [PATCH 5/5] check-config: allow to complete build even with ad-hoc CONFIG options

2016-09-25 Thread Masahiro Yamada
Currently, the check-config.sh terminates the build when unknown ad-hoc options are detected. I think it is too much because we may want to patch config headers locally in a build/deployment project. So, let's relax check-config.sh to just warn even if it detects options that are not in the

[U-Boot] [PATCH 1/5] check-config: fix wrong comment about how to build whitelist

2016-09-25 Thread Masahiro Yamada
The command suggested in this comment block is wrong; it would not rip off CONFIG options that had already been converted to Kconfig. Instead, we should use the scripts/build-whitelist.sh tool. Signed-off-by: Masahiro Yamada --- scripts/check-config.sh | 9

[U-Boot] [PATCH 2/5] kbuild: move no_new_adhoc_configs_check to "all" target command

2016-09-25 Thread Masahiro Yamada
I am going to move the build rule of u-boot.cfg. Before that, no_new_adhoc_configs_check must be tweaked to not depend on it. The ad-hoc option check can be done at the end of build, along with other checks. Signed-off-by: Masahiro Yamada --- Makefile | 14

[U-Boot] [PATCH 3/5] kbuild: make dependencies in scripts/Makefile.autoconf more readable

2016-09-25 Thread Masahiro Yamada
I do not remember why I wrote the code like this, but let's make it a bit more readable. Signed-off-by: Masahiro Yamada --- scripts/Makefile.autoconf | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/scripts/Makefile.autoconf

[U-Boot] [PATCH 50/82] x86: Add an SPL implementation

2016-09-25 Thread Simon Glass
SPL needs to set up the machine ready for loading 64-bit U-Boot and jumping to it. Call the existing init routines in order to accomplish this. Signed-off-by: Simon Glass --- arch/x86/include/asm/spl.h | 8 +++ arch/x86/lib/Makefile | 3 + arch/x86/lib/spl.c

[U-Boot] [PATCH 48/82] x86: Add support for 64-bit relocation

2016-09-25 Thread Simon Glass
Add a 64-bit relocation function. SPL loads U-Boot into RAM at a fixed address and runs it. U-Boot then relocates itself to the top of RAM using this relocation function. Signed-off-by: Simon Glass --- arch/x86/lib/relocate.c | 45

[U-Boot] [PATCH 51/82] x86: Move the i386 code into its own directory

2016-09-25 Thread Simon Glass
Much of the cpu and interrupt code cannot be compiled on 64-bit x86. Move it into its own directory and build it only in 32-bit mode. Signed-off-by: Simon Glass --- arch/x86/cpu/Makefile | 6 +- arch/x86/cpu/cpu.c |

[U-Boot] [PATCH 59/82] x86: Drop flag_is_changable() on x86_64

2016-09-25 Thread Simon Glass
This doesn't build at present and is not used in a 64-bit build. Disable it for now. Signed-off-by: Simon Glass --- arch/x86/include/asm/cpu.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/include/asm/cpu.h b/arch/x86/include/asm/cpu.h index

[U-Boot] [PATCH 39/82] x86: Kconfig: Add location options for 16/32-bit init

2016-09-25 Thread Simon Glass
At present all 16/32-bit init is controlled by CONFIG_X86_RESET_VECTOR. If this is enabled, then U-Boot is the 'first' boot loader and handles execution from the reset vector through to U-Boot's command prompt. If it is not enabled then U-Boot starts at the 32-bit entry and skips most of its init,

[U-Boot] [PATCH 76/82] x86: Add a dummy setjmp implementation for x86_64

2016-09-25 Thread Simon Glass
We don't have the code for this yet. Add a dummy version for now, so that EFI builds correctly. Signed-off-by: Simon Glass --- arch/x86/cpu/x86_64/Makefile | 2 +- arch/x86/cpu/x86_64/setjmp.c | 20 2 files changed, 21 insertions(+), 1 deletion(-)

[U-Boot] [PATCH 36/82] x86: lib: Fix types and casts for 64-bit compilation

2016-09-25 Thread Simon Glass
Fix various compiler warnings in the x86 library code. Signed-off-by: Simon Glass --- arch/x86/lib/bios.c | 4 ++-- arch/x86/lib/pinctrl_ich6.c | 2 +- arch/x86/lib/pirq_routing.c | 4 ++-- arch/x86/lib/sfi.c | 4 ++-- arch/x86/lib/zimage.c | 2 +- 5

[U-Boot] [PATCH 62/82] x86: ivybridge: Only do graphics init in 32-bit mode

2016-09-25 Thread Simon Glass
It's not clear how we would handle graphics init in 64-bit mode. Probably we would need to change back to 32-bit or 16-bit to run the graphics ROM. For now, disable it in 64-bit mode. Signed-off-by: Simon Glass --- arch/x86/cpu/ivybridge/Makefile | 2 +-

[U-Boot] [PATCH 64/82] x86: ivybridge: Provide a dummy SDRAM init for 64-bit

2016-09-25 Thread Simon Glass
We don't support SDRAM init in 64-bit mode since it is essentially impossible to get into that mode before SDRAM set up. Provide dummy functions for now. At some point we will need to pass the SDRAM parameters through from SPL. Signed-off-by: Simon Glass ---

[U-Boot] [PATCH 49/82] x86: Tidy up use of size_t in relocation

2016-09-25 Thread Simon Glass
Addresses should not be cast to size_t. Use uintptr_t instead. Signed-off-by: Simon Glass --- arch/x86/lib/relocate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/lib/relocate.c b/arch/x86/lib/relocate.c index bac2fb6..ad47c7e 100644 ---

[U-Boot] [PATCH 63/82] x86: ivybridge: Skipt SATA init in SPL

2016-09-25 Thread Simon Glass
This doesn't work at present. Disable it for now. Signed-off-by: Simon Glass --- arch/x86/cpu/ivybridge/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/cpu/ivybridge/Makefile b/arch/x86/cpu/ivybridge/Makefile index 96185d2..8bebcf8 100644 ---

[U-Boot] [PATCH 61/82] x86: Mention the MRC region in the README

2016-09-25 Thread Simon Glass
This is left out of the example memory map. Add it to avoid confusion. Signed-off-by: Simon Glass --- doc/README.x86 | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/README.x86 b/doc/README.x86 index 9d3129a..44b7388 100644 --- a/doc/README.x86 +++ b/doc/README.x86 @@

[U-Boot] [PATCH 54/82] x86: Fix up CONFIG_X86_64 check

2016-09-25 Thread Simon Glass
When SPL and U-Boot proper have different settings for this flag, we need to use the correct one. Fix this up in the interrupt code. Signed-off-by: Simon Glass --- arch/x86/cpu/i386/interrupt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[U-Boot] [PATCH 67/82] x86: Don't build cpu files which are not supported on 64-bit

2016-09-25 Thread Simon Glass
Some files cannot be built with 64-bit and mostly don't make sense in that context. Disable them. Signed-off-by: Simon Glass --- arch/x86/cpu/Makefile | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/x86/cpu/Makefile b/arch/x86/cpu/Makefile

[U-Boot] [PATCH 60/82] x86: Fix up type sizes for 64-bit

2016-09-25 Thread Simon Glass
Adjust types as needed to support 64-bit compilation. Signed-off-by: Simon Glass --- arch/x86/include/asm/posix_types.h | 5 + arch/x86/include/asm/types.h | 5 + 2 files changed, 10 insertions(+) diff --git a/arch/x86/include/asm/posix_types.h

[U-Boot] [PATCH 58/82] x86: Fix up byteorder.h for x86_64

2016-09-25 Thread Simon Glass
Remove the very old x86 code and add support for 64-bit. Signed-off-by: Simon Glass --- arch/x86/include/asm/byteorder.h | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/x86/include/asm/byteorder.h b/arch/x86/include/asm/byteorder.h

[U-Boot] [PATCH 78/82] x86: link: Add SPL declarations to the binman image

2016-09-25 Thread Simon Glass
When building for 64-bit we need to put an SPL binary into the image. Update the binman image description to reflect this. Signed-off-by: Simon Glass --- arch/x86/dts/binman.dtsi | 19 +++ 1 file changed, 19 insertions(+) diff --git

[U-Boot] [PATCH 79/82] x86: link: Set up device tree for SPL

2016-09-25 Thread Simon Glass
Add the correct pre-relocation tag so that the required device tree nodes are present in the SPL device tree. On x86 it doesn't make a lot of sense to have a separate SPL device tree. Since everything is in the same ROM we might as well just use the main device tree in both SPL and U-Boot proper.

[U-Boot] [PATCH 82/82] x86: link: Switch to 64-bit U-Boot

2016-09-25 Thread Simon Glass
Change link to use 64-bit U-Boot. This is not fully functional but is it a start. Missing features: - SDRAM sizing - Booting linux - EFI support - SCSI device init (and others) Signed-off-by: Simon Glass --- configs/chromebook_link_defconfig | 1 + 1 file changed, 1

[U-Boot] [PATCH 81/82] x86: Update compile/link flags to support 64-bit U-Boot

2016-09-25 Thread Simon Glass
Update config.mk settings to support both 32-bit and 64-bit U-Boot. Signed-off-by: Simon Glass --- arch/x86/config.mk | 30 -- arch/x86/cpu/config.mk | 2 -- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/arch/x86/config.mk

[U-Boot] [PATCH 80/82] x86: link: Add build options for SPL

2016-09-25 Thread Simon Glass
If SPL is used we want to use the generic SPL framework and boot from SPI via a board-specific means. Add these options to the board config file. Signed-off-by: Simon Glass --- configs/chromebook_link_defconfig | 21 - include/configs/chromebook_link.h |

[U-Boot] [PATCH 74/82] x86: Move call64 to the i386 directory

2016-09-25 Thread Simon Glass
This code is only used in 32-bit mode. Move it so that it does not get built with 64-bit U-Boot. Signed-off-by: Simon Glass --- arch/x86/cpu/Makefile| 2 +- arch/x86/cpu/i386/Makefile | 1 + arch/x86/cpu/{ => i386}/call64.S | 0 3 files changed, 2

[U-Boot] [PATCH 77/82] x86: link: Add a text base for 64-bit U-Boot

2016-09-25 Thread Simon Glass
Set up the 64-bit U-Boot text base if building for that target. Signed-off-by: Simon Glass --- board/google/chromebook_link/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/board/google/chromebook_link/Kconfig

[U-Boot] [PATCH 69/82] x86: Drop interrupt support in 64-bit mode

2016-09-25 Thread Simon Glass
This is not currently supported, so drop the code. Signed-off-by: Simon Glass --- arch/x86/lib/interrupts.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/x86/lib/interrupts.c b/arch/x86/lib/interrupts.c index dd08402..d3ae6d9 100644 ---

[U-Boot] [PATCH 75/82] x86: Move setjmp to the i386 directory

2016-09-25 Thread Simon Glass
This code is only used in 32-bit mode. Move it so that it does not get built with 64-bit U-Boot. Signed-off-by: Simon Glass --- arch/x86/cpu/Makefile| 3 --- arch/x86/cpu/i386/Makefile | 1 + arch/x86/cpu/{ => i386}/setjmp.S | 0 3 files changed, 1

[U-Boot] [PATCH 73/82] x86: Change irq_already_routed to a local variable

2016-09-25 Thread Simon Glass
This avoids using BSS before SDRAM is set up in SPL. Signed-off-by: Simon Glass --- arch/x86/lib/pirq_routing.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/x86/lib/pirq_routing.c b/arch/x86/lib/pirq_routing.c index c98526d..5df3cab

[U-Boot] [PATCH 71/82] x86: Move pirq_routing_table to global_data

2016-09-25 Thread Simon Glass
To avoid using BSS in SPL before SDRAM is set up, move this field to global_data. Signed-off-by: Simon Glass --- arch/x86/cpu/irq.c | 12 +--- arch/x86/include/asm/global_data.h | 1 + 2 files changed, 6 insertions(+), 7 deletions(-) diff --git

[U-Boot] [PATCH 68/82] x86: Don't try to boot Linux from SPL

2016-09-25 Thread Simon Glass
Booting into linux from 64-bit U-Boot is not yet supported. Avoid bringing in the bootm code until it is implemented. Of course 32-bit U-Boot still supported booting into both 32- and 64-bit kernels. Signed-off-by: Simon Glass --- arch/x86/lib/Makefile | 4 1 file

[U-Boot] [PATCH 72/82] x86: Move turbo_state to global_data

2016-09-25 Thread Simon Glass
To avoid using BSS in SPL before SDRAM is set up, move this field to global_data. Signed-off-by: Simon Glass --- arch/x86/cpu/turbo.c | 8 arch/x86/include/asm/global_data.h | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git

[U-Boot] [PATCH 70/82] x86: Support jumping from SPL to U-Boot

2016-09-25 Thread Simon Glass
Add a rough function to handle jumping from 32-bit SPL to 64-bit U-Boot. This still needs work to clean it up. Signed-off-by: Simon Glass --- arch/x86/cpu/call64.S | 3 +++ arch/x86/cpu/i386/cpu.c| 65 ++

[U-Boot] [PATCH 65/82] x86: Don't try to run the VGA BIOS in 64-bit mode

2016-09-25 Thread Simon Glass
This is not supported, so disable it for now. Signed-off-by: Simon Glass --- arch/x86/lib/Makefile | 2 ++ drivers/pci/pci_rom.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile index 1fa7f90..ad3200a 100644

[U-Boot] [PATCH 66/82] x86: Don't build call64 and setjmp on 64-bit

2016-09-25 Thread Simon Glass
These are currently not supported. Calling 64-bit code from 64-bit U-Boot is much simpler, so this code is not needed. setjmp() is not yet implemented for 64-bit. Signed-off-by: Simon Glass --- arch/x86/cpu/Makefile | 6 +- arch/x86/lib/bootm.c | 2 ++ 2 files changed,

[U-Boot] [PATCH 57/82] x86: Add SPL build rules for start-up code

2016-09-25 Thread Simon Glass
When SPL is used we need to build the 16-bit start-up code. Add Makefile rules to handle this. Signed-off-by: Simon Glass --- scripts/Makefile.spl | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index

[U-Boot] [PATCH 37/82] x86: mrccache: Fix error handling in mrccache_get_region()

2016-09-25 Thread Simon Glass
This should return normal errors, not device-tree errors. Fix it. Signed-off-by: Simon Glass --- arch/x86/lib/mrccache.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/x86/lib/mrccache.c b/arch/x86/lib/mrccache.c index 67bace4..eca88ac

[U-Boot] [PATCH 56/82] x86: Add a link script for SPL

2016-09-25 Thread Simon Glass
If SPL is used it is always build in 32-bit mode. Add a link script to handle the correct placement of the sections. Signed-off-by: Simon Glass --- arch/x86/cpu/u-boot-spl.lds | 74 + 1 file changed, 74 insertions(+) create mode

[U-Boot] [PATCH 45/82] x86: board_r: Set the global data pointer after relocation

2016-09-25 Thread Simon Glass
Since 'gd' is just a normal variable on 64-bit x86, it is relocated by the time we get to board_init_r(). The old 'gd' variable is passed in as parameter to board_init_r(), presumably for this situation. Assign it on 64-bit x86 so that gd points to the correct data. Options to improve this: -

[U-Boot] [PATCH 26/82] x86: ivybridge: Declare global data where it is used

2016-09-25 Thread Simon Glass
Some files are missing this declaration. Add it to avoid build errors when we actually need the declaration. Signed-off-by: Simon Glass --- arch/x86/cpu/ivybridge/bd82x6x.c | 2 ++ arch/x86/cpu/ivybridge/gma.c | 2 ++ arch/x86/cpu/ivybridge/lpc.c | 2 ++

[U-Boot] [PATCH 55/82] x86: Add a link script for 64-bit x86

2016-09-25 Thread Simon Glass
This needs a different image format from 32-bit x86, so add a new link script. Signed-off-by: Simon Glass --- arch/x86/cpu/config.mk | 6 arch/x86/cpu/u-boot-64.lds | 76 ++ 2 files changed, 82 insertions(+) create mode

[U-Boot] [PATCH 47/82] x86: Refactor relocation to prepare for 64-bit

2016-09-25 Thread Simon Glass
Move the core relocation code into a separate function so that the checking code can be used for 64-bit relocation also. Signed-off-by: Simon Glass --- arch/x86/lib/relocate.c | 57 - 1 file changed, 33 insertions(+), 24

[U-Boot] [PATCH 46/82] x86: Do relocation before clearing BSS

2016-09-25 Thread Simon Glass
The BSS region may overlap with relocations. If we clear BSS we will overwrite the start of the relocation area. This doesn't matter when running from SPI flash, since it is read-only. But when relocating 64-bit U-Boot from one place in RAM to another, relocation will fail because some of its

[U-Boot] [PATCH 53/82] x86: Support global_data on x86_64

2016-09-25 Thread Simon Glass
At present this is just an ordinary variable. We may consider making it a fixed register in the future. Signed-off-by: Simon Glass --- arch/x86/cpu/x86_64/cpu.c | 13 + arch/x86/include/asm/global_data.h | 6 +- 2 files changed, 18 insertions(+), 1

[U-Boot] [PATCH 14/82] spl: Allow timer drivers to be used in SPL

2016-09-25 Thread Simon Glass
Add a new Kconfig option to allow timer drivers to be used in SPL. Signed-off-by: Simon Glass --- common/spl/Kconfig | 9 + drivers/Makefile | 1 + 2 files changed, 10 insertions(+) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 6e0637a..260387c 100644

[U-Boot] [PATCH 52/82] x86: Add cpu code for x86_64

2016-09-25 Thread Simon Glass
There is not much needed at present, but set up a separate directory to put this code as it grows. Signed-off-by: Simon Glass --- arch/x86/cpu/Makefile| 4 +++- arch/x86/cpu/x86_64/Makefile | 6 ++ arch/x86/cpu/x86_64/cpu.c| 35

[U-Boot] [PATCH 43/82] x86: Add 64-bit start-up code

2016-09-25 Thread Simon Glass
Add code to start up U-Boot in 64-bit mode. It is fairly simple since we are running from RAM and SPL has done the low-level init. Signed-off-by: Simon Glass --- arch/x86/Makefile | 5 + arch/x86/cpu/Makefile | 4 arch/x86/cpu/start64.S | 39

[U-Boot] [PATCH 41/82] x86: Use X86_32BIT_INIT instead of X86_RESET_VECTOR

2016-09-25 Thread Simon Glass
Use this new option to control the location of 32-bit init. This will allow us to place this in SPL if needed. Signed-off-by: Simon Glass --- arch/x86/cpu/intel_common/Makefile | 10 ++ arch/x86/lib/init_helpers.c| 2 +- 2 files changed, 7 insertions(+), 5

[U-Boot] [PATCH 18/82] usb: pci: Fix cast for 64-bit compilation

2016-09-25 Thread Simon Glass
Fix a cast that causes warnings on 64-bit machines. Signed-off-by: Simon Glass --- drivers/usb/host/ehci-pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index 6fc2479..f20fc33 100644 ---

[U-Boot] [PATCH 42/82] x86: ivybridge: Allow 32-bit init to move to SPL

2016-09-25 Thread Simon Glass
Update the Makefile so that some 32-bit init can be built into SPL rather than U-Boot proper. Signed-off-by: Simon Glass --- arch/x86/cpu/ivybridge/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/cpu/ivybridge/Makefile

[U-Boot] [PATCH 40/82] x86: Use X86_16BIT_INIT instead of X86_RESET_VECTOR

2016-09-25 Thread Simon Glass
Use this new option to control the location of 16-bit init. This will allow us to place this in SPL if needed. Signed-off-by: Simon Glass --- Makefile| 7 --- arch/x86/Makefile | 6 ++ arch/x86/cpu/Makefile | 2 +- arch/x86/cpu/u-boot.lds | 2

[U-Boot] [PATCH 28/82] x86: Don't export interrupt handlers with x86_64

2016-09-25 Thread Simon Glass
We don't have a way of adjusting these at present so it is best to refuse to export these functions. This can be implemented later if the API is required. Signed-off-by: Simon Glass --- include/_exports.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[U-Boot] [PATCH 33/82] x86: dts: Mark serial as needed before relocation

2016-09-25 Thread Simon Glass
We almost always need the serial port before relocation, so mark it as such. This will ensure that it appears in the device tree for SPL, if used. Signed-off-by: Simon Glass --- arch/x86/dts/serial.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git

[U-Boot] [PATCH 38/82] x86: Add Kconfig options to build 64-bit U-Boot

2016-09-25 Thread Simon Glass
Add a new CONFIG_X86_64 option which will eventually cause U-Boot to be built as a 64-bit application, with SPL doing the 16/32-bit init. Signed-off-by: Simon Glass --- arch/x86/Kconfig | 46 ++ 1 file changed, 46 insertions(+)

[U-Boot] [PATCH 44/82] x86: board_f: Update init sequence for 64-bit startup

2016-09-25 Thread Simon Glass
Adjust the code so that 64-bit startup works. Since we don't need to do CAR changes in U-Boot proper anymore (they are done in SPL) we can simplify the flow and return normally from board_init_f(). Signed-off-by: Simon Glass --- common/board_f.c | 12 1 file

[U-Boot] [PATCH 30/82] x86: ivybridge: Fix types for 64-bit compilation

2016-09-25 Thread Simon Glass
Fix a few types that causes warnings on 64-bit machines. Signed-off-by: Simon Glass --- arch/x86/cpu/ivybridge/gma.c | 2 +- arch/x86/cpu/ivybridge/sata.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/cpu/ivybridge/gma.c

[U-Boot] [PATCH 17/82] tpm: Tidy up use of size_t

2016-09-25 Thread Simon Glass
We should consistently use %z with size_t, and avoid passing a uint32_t as a size_t value. Fix these issues to avoid warnings on 64-bit machines. Signed-off-by: Simon Glass --- drivers/tpm/tpm_tis_lpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[U-Boot] [PATCH 11/82] spl: Allow CPU drivers to be used in SPL

2016-09-25 Thread Simon Glass
Add a new Kconfig option to allow CPU drivers to be used in SPL. Signed-off-by: Simon Glass --- common/spl/Kconfig | 10 ++ drivers/Makefile | 1 + 2 files changed, 11 insertions(+) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 84670b1..3c33c9e

[U-Boot] [PATCH 31/82] x86: ivybridge: Fix PCH power setup

2016-09-25 Thread Simon Glass
At present pch_power_options() has the arguments to writel() around the wrong way. Fix this and update it to compile on 64-bit machines. Signed-off-by: Simon Glass --- arch/x86/cpu/ivybridge/lpc.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[U-Boot] [PATCH 29/82] x86: ivybridge: Add more debugging for failures

2016-09-25 Thread Simon Glass
Add various debug() messages in places where errors occur. This aids with debugging. Signed-off-by: Simon Glass --- arch/x86/cpu/ivybridge/cpu.c | 4 +++- arch/x86/cpu/ivybridge/sdram.c | 36 +++- 2 files changed, 30 insertions(+), 10

[U-Boot] [PATCH 34/82] x86: fsp: Fix cast for 64-bit compilation

2016-09-25 Thread Simon Glass
Fix a cast in get_next_hob() that causes warnings on 64-bit machines. Signed-off-by: Simon Glass --- arch/x86/include/asm/fsp/fsp_hob.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/fsp/fsp_hob.h

[U-Boot] [PATCH 35/82] x86: Drop unused init_helper functions

2016-09-25 Thread Simon Glass
Drop init_bd_struct_r() which is no-longer used. Also drop the declaration for init_func_spi() since this is now handled by generic board init. Signed-off-by: Simon Glass --- arch/x86/include/asm/init_helpers.h | 2 -- arch/x86/lib/init_helpers.c | 10 -- 2

[U-Boot] [PATCH 27/82] x86: i2c: Fix cast of address to 32-bit value

2016-09-25 Thread Simon Glass
This gives a build warning on 64-bit x86. Fix it. Signed-off-by: Simon Glass --- drivers/i2c/intel_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/intel_i2c.c b/drivers/i2c/intel_i2c.c index a0182dc..550a728 100644 ---

[U-Boot] [PATCH 12/82] spl: Allow PCI drivers to be used in SPL

2016-09-25 Thread Simon Glass
Add a new Kconfig option to allow PCI drivers to be used in SPL. Signed-off-by: Simon Glass --- common/spl/Kconfig | 9 + drivers/Makefile | 1 + 2 files changed, 10 insertions(+) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 3c33c9e..0c83ff1 100644

[U-Boot] [PATCH 13/82] spl: Allow RTC drivers to be used in SPL

2016-09-25 Thread Simon Glass
Add a new Kconfig option to allow RTC drivers to be used in SPL. Signed-off-by: Simon Glass --- common/spl/Kconfig | 10 ++ drivers/Makefile | 1 + 2 files changed, 11 insertions(+) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 0c83ff1..6e0637a

[U-Boot] [PATCH 32/82] x86: ivybridge: Tidy up enable_clock_gating() for 64-bit

2016-09-25 Thread Simon Glass
Fix the hex case and remove unused brackets. Use -0U instead of ~0UL to allow compilation on 64-bit machines. Signed-off-by: Simon Glass --- arch/x86/cpu/ivybridge/lpc.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/cpu/ivybridge/lpc.c

[U-Boot] [PATCH 25/82] x86: Add basic support for U-Boot as a 64-bit EFI application

2016-09-25 Thread Simon Glass
Add a link script and relocation code for building 64-bit EFI applications. This can be used for the EFI stub. Signed-off-by: Simon Glass --- arch/x86/cpu/efi/elf_x86_64_efi.lds | 3 ++ arch/x86/lib/reloc_x86_64.c | 90 + 2 files

[U-Boot] [PATCH 22/82] x86: Correct address casts in interrupt code

2016-09-25 Thread Simon Glass
We should cast an address to unsigned long, not u32. Signed-off-by: Simon Glass --- arch/x86/cpu/interrupts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/cpu/interrupts.c b/arch/x86/cpu/interrupts.c index 46babe0..5f6cdd3 100644 ---

[U-Boot] [PATCH 23/82] x86: Use unsigned long for address in table generation

2016-09-25 Thread Simon Glass
We should use unsigned long rather than u32 for addresses. Update this so that the table-generation code builds correctly on 64-bit machines. Signed-off-by: Simon Glass --- arch/x86/cpu/irq.c| 2 +- arch/x86/include/asm/acpi_table.h | 2 +-

[U-Boot] [PATCH 16/82] spl: Don't create a BSS padding when it is separate

2016-09-25 Thread Simon Glass
When BSS does not immediate follow the SPL image we don't need padding before the device tree. Remove it in this case. Signed-off-by: Simon Glass --- scripts/Makefile.spl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/Makefile.spl

[U-Boot] [PATCH 20/82] x86: Allow interrupts to be disabled in 64-bit mode

2016-09-25 Thread Simon Glass
Update the code to support both 32-bit and 64-bit modes. Signed-off-by: Simon Glass --- arch/x86/cpu/interrupts.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/x86/cpu/interrupts.c b/arch/x86/cpu/interrupts.c index dd2819a..46babe0 100644 ---

[U-Boot] [PATCH 21/82] x86: Correct address casts in cpu code

2016-09-25 Thread Simon Glass
We should cast an address to unsigned long, not u32. Signed-off-by: Simon Glass --- arch/x86/cpu/cpu.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c index 269043d..7c1d6de 100644 ---

[U-Boot] [PATCH 19/82] video: Use ulong for video frame buffer address

2016-09-25 Thread Simon Glass
Change this type from int to ulong to avoid warnings on 64-bit machines. Signed-off-by: Simon Glass --- include/video_fb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/video_fb.h b/include/video_fb.h index b008853..4a4fd5f 100644 ---

[U-Boot] [PATCH 24/82] WIP: x86: Update mpspec to build on 64-bit machines

2016-09-25 Thread Simon Glass
At present this uses u32 to store an address. We should use unsigned long and avoid special types in function return values and parameters unless necessary. This makes the code more portable. I believe Alex Graf has a patch to correct all of these, so this is just a WIP patch. Signed-off-by:

[U-Boot] [PATCH 10/82] spl: Makefile: Define SPL_ earlier

2016-09-25 Thread Simon Glass
This Makefile variable can be used in the architecture's main Makefile but at present it is not set up until later. Set it just before this Makefile is included. Signed-off-by: Simon Glass --- scripts/Makefile.spl | 6 ++ 1 file changed, 6 insertions(+) diff --git

[U-Boot] [PATCH 15/82] spl: Allow PCH drivers to be used in SPL

2016-09-25 Thread Simon Glass
Add an option for building Platorm Controller Hub drivers in SPL. Signed-off-by: Simon Glass --- common/spl/Kconfig | 9 + drivers/Makefile | 1 + 2 files changed, 10 insertions(+) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 260387c..64459e5 100644

[U-Boot] [PATCH 05/82] console: Don't enable CONFIG-CONSOLE_MUX, etc. in SPL

2016-09-25 Thread Simon Glass
CONFIG_CONSOLE_MUX and CONFIG_SYS_CONSOLE_IS_IN_ENV are not applicable for SPL. Update the console code to use CONFIG_IS_ENABLED(), so that these options will be inactive in SPL. Signed-off-by: Simon Glass --- common/console.c | 30 +++--- 1 file

[U-Boot] [PATCH 08/82] rtc: Use CONFIG_X86 instead of __I386__

2016-09-25 Thread Simon Glass
For 64-bit x86, __I386__ should perhaps not be defined. It is not clear from the definition, but let's use CONFIG_X86 to be sure. Signed-off-by: Simon Glass --- drivers/rtc/mc146818.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/mc146818.c

[U-Boot] [PATCH 09/82] spl: spi: Add a debug message if loading fails

2016-09-25 Thread Simon Glass
This currently fails silently. Add a debug message to aid debugging. Signed-off-by: Simon Glass --- common/spl/spl_spi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c index a3caafb..3f400eb 100644 ---

[U-Boot] [PATCH 06/82] elf: Add the Elf64_Rela type

2016-09-25 Thread Simon Glass
Add this so that we can support 64-bit relocation on x86. Signed-off-by: Simon Glass --- include/elf.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/elf.h b/include/elf.h index a35e085..bcc5eb7 100644 --- a/include/elf.h +++ b/include/elf.h @@ -394,6

[U-Boot] [PATCH 02/82] Add _image_binary_end section declaration

2016-09-25 Thread Simon Glass
This is used in some link scripts, so add a declaration for it. Signed-off-by: Simon Glass --- include/asm-generic/sections.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h index 54ccac9..daf021b 100644 ---

[U-Boot] [PATCH 03/82] bios_emulator: Fix cast for 64-bit compilation

2016-09-25 Thread Simon Glass
Fix a cast that causes warnings on 64-bit machines. Signed-off-by: Simon Glass --- drivers/bios_emulator/atibios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bios_emulator/atibios.c b/drivers/bios_emulator/atibios.c index 7717246..2d5b5dc

[U-Boot] [PATCH 04/82] board_f: Drop the extra fdtdec_prepare_fdt()

2016-09-25 Thread Simon Glass
This is already called earlier, from fdtdec_setup(), so drop this unnecessary call from the init sequence. Signed-off-by: Simon Glass --- common/board_f.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index 2c88595..e3179a1 100644

  1   2   >