[U-Boot] [PATCH 12/12] x86: Document how to play with SeaBIOS

2016-02-27 Thread Bin Meng
Boting SeaBIOS is done via U-Boot's bootelf command. Document this. Signed-off-by: Bin Meng --- doc/README.x86 | 49 +++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/doc/README.x86 b/doc/README.x86 index

[U-Boot] [PATCH 11/12] x86: qemu: Enable ACPI table generation by default

2016-02-27 Thread Bin Meng
Now that ACPI is supported on QEMU, enable it. Signed-off-by: Bin Meng --- configs/qemu-x86_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/qemu-x86_defconfig b/configs/qemu-x86_defconfig index b0c935c..f0e6512 100644 --- a/configs/qemu-x86_defconfig

[U-Boot] [PATCH 10/12] x86: Support booting SeaBIOS

2016-02-27 Thread Bin Meng
SeaBIOS is an open source implementation of a 16-bit x86 BIOS. It can run in an emulator or natively on x86 hardware with the use of coreboot. With SeaBIOS's help, we can boot some OSes that require 16-bit BIOS services like Windows/DOS. As U-Boot, we have to manually create a table where SeaBIOS

[U-Boot] [PATCH 08/12] x86: Support writing configuration tables in high area

2016-02-27 Thread Bin Meng
For those secondary bootloaders like SeaBIOS who want to live in the F segment, which conflicts the configuration table address, now we allow write_tables() to write the configuration tables in high area (malloc'ed memory). Signed-off-by: Bin Meng --- arch/x86/lib/tables.c

[U-Boot] [PATCH 05/12] x86: Use a macro for ROM table alignment

2016-02-27 Thread Bin Meng
Define ROM_TABLE_ALIGN instead of using 1024 directly. Signed-off-by: Bin Meng --- arch/x86/include/asm/tables.h | 2 ++ arch/x86/lib/tables.c | 10 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/arch/x86/include/asm/tables.h

[U-Boot] [PATCH 07/12] x86: Simplify codes in write_tables()

2016-02-27 Thread Bin Meng
Given all table write routines have the same signature, we can use simplify the codes by using a function table. Signed-off-by: Bin Meng --- arch/x86/lib/tables.c | 61 --- 1 file changed, 34 insertions(+), 27 deletions(-)

[U-Boot] [PATCH 06/12] x86: Change write_acpi_tables() signature a little bit

2016-02-27 Thread Bin Meng
Change the parameter and return value of write_acpi_tables() to u32 to conform with other table write routines. Signed-off-by: Bin Meng --- arch/x86/cpu/qemu/fw_cfg.c| 5 ++--- arch/x86/include/asm/acpi_table.h | 2 +- arch/x86/lib/acpi_table.c | 4 ++-- 3

[U-Boot] [PATCH 09/12] x86: Implement functions for writing coreboot table

2016-02-27 Thread Bin Meng
To prepare generating coreboot table from U-Boot, implement functions to handle the writing. Signed-off-by: Bin Meng --- arch/x86/include/asm/coreboot_tables.h | 10 +++ arch/x86/lib/Makefile | 1 + arch/x86/lib/coreboot_table.c | 136

[U-Boot] [PATCH 03/12] x86: Clean up coreboot_tables.h

2016-02-27 Thread Bin Meng
Clean up this file a little bit: - Remove inclusion of - Use tab in the macro definition - Remove table definitions that are not needed Signed-off-by: Bin Meng --- arch/x86/include/asm/coreboot_tables.h | 153 + 1 file changed, 80

[U-Boot] [PATCH 02/12] x86: Move sysinfo related to sysinfo.h

2016-02-27 Thread Bin Meng
coreboot_tables.h should not include sysinfo related stuff. Move those to asm/arch-coreboot/sysinfo.h. Signed-off-by: Bin Meng --- arch/x86/include/asm/arch-coreboot/sysinfo.h | 2 ++ arch/x86/include/asm/coreboot_tables.h | 4 2 files changed, 2 insertions(+), 4

[U-Boot] [PATCH 04/12] x86: Change to use start/end address pair in write_tables()

2016-02-27 Thread Bin Meng
Add a new variable rom_table_start and pass it to ROM table write routines. This reads better than previous single rom_table_end. Signed-off-by: Bin Meng --- arch/x86/lib/tables.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git

[U-Boot] [PATCH 01/12] x86: Move asm/arch-coreboot/tables.h to a common place

2016-02-27 Thread Bin Meng
Move asm/arch-coreboot/tables.h to asm/coreboot_tables.h so that coreboot table definitions can be used by other x86 builds. Signed-off-by: Bin Meng --- arch/x86/cpu/coreboot/sdram.c | 1 - arch/x86/cpu/coreboot/tables.c

[U-Boot] [PATCH 00/12] x86: Support booting SeaBIOS

2016-02-27 Thread Bin Meng
This is the initial attempt to support booting SeaBIOS from U-Boot. This is tested: - On Intel Crown Bay board with a PCIe graphics card, booting SeaBIOS then chain-loading a GRUB on a USB drive, then Linux kernel finally. - On QEMU x86 target with U-Boot chain-loading SeaBIOS to install/boot a

Re: [U-Boot] [PULL] u-boot-usb/master

2016-02-27 Thread Tom Rini
On Fri, Feb 26, 2016 at 11:44:19PM +0100, Marek Vasut wrote: > On 02/25/2016 04:23 PM, Tom Rini wrote: > > On Wed, Feb 24, 2016 at 07:13:47PM +0100, Marek Vasut wrote: > > > >> The following changes since commit > >> 52dd704bf8eda7ca039cdb398ec0b6895c3ef939: > >> > >> Merge branch 'master' of

Re: [U-Boot] Pull request: u-boot-net.git master

2016-02-27 Thread Tom Rini
On Fri, Feb 26, 2016 at 01:42:14PM -0600, Joe Hershberger wrote: > The following changes since commit 24862c640ea50ac88be343161eb681bea5dbfeef: > > test/py: skip tests that require large CONFIG_SYS_MAXARGS > (2016-02-26 08:42:12 -0500) > > are available in the git repository at: > >

Re: [U-Boot] Please pull u-boot-dm

2016-02-27 Thread Tom Rini
On Fri, Feb 26, 2016 at 01:51:11PM -0700, Simon Glass wrote: > Hi Tom, > > Here is the series that fixes various tests. > > > The following changes since commit 24862c640ea50ac88be343161eb681bea5dbfeef: > > test/py: skip tests that require large CONFIG_SYS_MAXARGS > (2016-02-26 08:42:12

Re: [U-Boot] [PATCH] arm: dra7xx: Define Android partition table

2016-02-27 Thread Tom Rini
On Fri, Feb 26, 2016 at 09:37:52PM +0200, Semen Protsenko wrote: > From: Sam Protsenko > > "fastboot oem format" command reuses "gpt write" command, which in turn > requires correct partitions defined in $partitions variable. This patch > adds such definition of

Re: [U-Boot] [PATCH] arm: socfpga: Fix SR1500 env position

2016-02-27 Thread Marek Vasut
On 02/27/2016 10:25 AM, Stefan Roese wrote: > On 26.02.2016 19:20, Marek Vasut wrote: >> Move the inclusion of the common socfpga configuration file further >> down in the sr1500 configuration, so that the socfpga_common.h can >> check if environment is in SPI NOR and it's location is defined and

[U-Boot] [PATCH 3/4] sniper: Get rid of reset_misc

2016-02-27 Thread Paul Kocialkowski
There is no need to set the reboot mode to a particular value prior to reboot, since valid values will have been caught and cleared earlier. In addition, this breaks the reboot-bootloader fastboot call, by overriding the required value for fastboot. Signed-off-by: Paul Kocialkowski

[U-Boot] [PATCH 2/4] omap3: Use a define for reboot reason offset

2016-02-27 Thread Paul Kocialkowski
This introduces a define for the offset to the reboot reason, rather than hardcoding it. Signed-off-by: Paul Kocialkowski --- arch/arm/cpu/armv7/omap3/boot.c| 8 +--- arch/arm/include/asm/arch-omap3/omap.h | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-)

[U-Boot] [PATCH 4/4] sniper: Clear reboot mode garbage on cold reset

2016-02-27 Thread Paul Kocialkowski
Reboot mode garbage is found on cold reset and might be seen as valid on the next warm reset, thus it has to be cleared on cold reset. Signed-off-by: Paul Kocialkowski --- board/lge/sniper/sniper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[U-Boot] [PATCH 1/4] omap3: String-based reboot mode handling

2016-02-27 Thread Paul Kocialkowski
This switches reboot mode handling to a string-based interface, that allows more flexibility to set a common interface with the next generations of OMAP devices. Signed-off-by: Paul Kocialkowski --- arch/arm/cpu/armv7/omap3/boot.c| 14 ++

[U-Boot] [PATCH 0/4] omap and sniper reboot mode fixes and cleanups

2016-02-27 Thread Paul Kocialkowski
This series unifies the reboot mode interface between omap3 and omap4. It also fixes the reboot to bootloader feature in fastboot. It is to be applied on top of the previous series: Amazon Kindle Fire (first generation) codename kc1 support series. ___

[U-Boot] [PATCH 24/27] power: twl6030: Power off support

2016-02-27 Thread Paul Kocialkowski
This adds support for powering off (the omap SoC) from the twl6030. Signed-off-by: Paul Kocialkowski --- drivers/power/twl6030.c | 8 include/twl6030.h | 7 +++ 2 files changed, 15 insertions(+) diff --git a/drivers/power/twl6030.c b/drivers/power/twl6030.c

[U-Boot] [PATCH 23/27] power: twl6030: Remove ifdef around the code

2016-02-27 Thread Paul Kocialkowski
The TWL6030 power driver is only built when CONFIG_TWL6030_POWER is selected, thus there is no reason to wrap the code with ifdef. Signed-off-by: Paul Kocialkowski --- drivers/power/twl6030.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/power/twl6030.c

[U-Boot] [PATCH 25/27] input: TWL6030 input support for power button, USB and charger

2016-02-27 Thread Paul Kocialkowski
This adds support for detecting a few inputs exported by the TWL6030. Currently-supported inputs are the power button, USB and charger presence. Signed-off-by: Paul Kocialkowski --- drivers/input/Makefile | 1 + drivers/input/twl6030.c | 48

[U-Boot] [PATCH 26/27] kc1: Power off when the power on reason is not a valid one

2016-02-27 Thread Paul Kocialkowski
Some power on reasons are not desirable (e.g. too short press on the power button), battery plug. Thus, power off the device when one of those occurs. Signed-off-by: Paul Kocialkowski --- board/amazon/kc1/kc1.c | 16 include/configs/kc1.h | 6 ++ 2 files

[U-Boot] [PATCH 18/27] kc1: MUSB USB controller and fastboot USB gadget support

2016-02-27 Thread Paul Kocialkowski
This adds support for the MUSB USB dual-role controller in peripheral mode, with configuration options for the fastboot USB gadget. At this point, flashing the internal eMMC is support. Signed-off-by: Paul Kocialkowski --- board/amazon/kc1/kc1.c | 27

[U-Boot] [PATCH 17/27] usb: musb-new: omap2430: OMAP4 MUSB USB controller support

2016-02-27 Thread Paul Kocialkowski
This adds support for the OMAP4 MUSB USB controller, with a matching Linux compat definition, TWL6030 USB device setup and USBOTGHS register setup. Signed-off-by: Paul Kocialkowski --- drivers/usb/musb-new/linux-compat.h | 4 drivers/usb/musb-new/omap2430.c | 13

[U-Boot] [PATCH 20/27] omap4: Check warm reset for reboot mode validity

2016-02-27 Thread Paul Kocialkowski
Since the SAR registers are filled with garbage on cold reset, this checks for a warm reset to assert the validity of reboot mode. Signed-off-by: Paul Kocialkowski --- arch/arm/cpu/armv7/omap4/boot.c | 4 1 file changed, 4 insertions(+) diff --git

[U-Boot] [PATCH 22/27] kc1: Boot to bootloader (fastboot) on ID pin pull-up

2016-02-27 Thread Paul Kocialkowski
USB ID pin pull-up indicates factory (fastboot) cable detection. Signed-off-by: Paul Kocialkowski --- board/amazon/kc1/kc1.c | 9 + 1 file changed, 9 insertions(+) diff --git a/board/amazon/kc1/kc1.c b/board/amazon/kc1/kc1.c index d526695..9367b50 100644 ---

[U-Boot] [PATCH 16/27] power: twl6030: Clear VUSB_IN_PMID bit on USB device setup

2016-02-27 Thread Paul Kocialkowski
When booting from USB, the bootrom sets the VUSB_IN_PMID bit of the MISC2 register of the TWL6030. However, U-Boot sets the VUSB_IN_VSYS bit to enable VBUS input. As both bits are contradictory, enabling both disables the input, according to the TWL6030 TRM. Thus, we need to clear the

[U-Boot] [PATCH 15/27] power: twl6030: Configure VUSB voltage on USB device setup

2016-02-27 Thread Paul Kocialkowski
This explicitly sets VUSB voltage to 3.3V when enabling USB. Signed-off-by: Paul Kocialkowski --- drivers/power/twl6030.c | 4 include/twl6030.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/drivers/power/twl6030.c b/drivers/power/twl6030.c index

[U-Boot] [PATCH 21/27] kc1: OMAP4 reboot mode support

2016-02-27 Thread Paul Kocialkowski
This adds support for the omap4 reboot mode mechanism and exports the reboot mode via an environment variable, that is used in the boot command to make it possible to boot from the recovery partition or fastboot. Signed-off-by: Paul Kocialkowski --- board/amazon/kc1/kc1.c | 18

[U-Boot] [PATCH 13/27] omap-common: clocks-common: Setup USB DPLL when MUSB is in use

2016-02-27 Thread Paul Kocialkowski
On (at least) OMAP4, the USB DPLL is required to be setup for the internal PHY to work properly. The internal PHY is used by default with the MUSB USB OTG controller. Signed-off-by: Paul Kocialkowski --- arch/arm/cpu/armv7/omap-common/clocks-common.c | 6 -- 1 file

[U-Boot] [PATCH 14/27] omap4: Properly enable USB PHY clocks

2016-02-27 Thread Paul Kocialkowski
This correctly enables the USB PHY clocks, by enabling CM_ALWON_USBPHY_CLKCTRL and correctly setting CM_L3INIT_USBPHY_CLKCTRL's value. Signed-off-by: Paul Kocialkowski --- arch/arm/cpu/armv7/omap4/hw_data.c | 4 arch/arm/cpu/armv7/omap4/prcm-regs.c| 1 +

[U-Boot] [PATCH 12/27] Amazon Kindle Fire (first generation) codename kc1 support

2016-02-27 Thread Paul Kocialkowski
The Amazon Kindle Fire (first generation) codename kc1 is a tablet that was released by Amazon back in 2011. It is using an OMAP4430 SoC GP version, which allows running U-Boot and the U-Boot SPL from the ground up. Signed-off-by: Paul Kocialkowski ---

[U-Boot] [PATCH 08/27] omap-common: Rename set_muxconf_regs_essential to set_muxconf_regs

2016-02-27 Thread Paul Kocialkowski
There is no distinction between essential and non-essential mux configuration, so it doesn't make sense to have an "essential" prefix. Signed-off-by: Paul Kocialkowski --- arch/arm/cpu/armv7/omap-common/hwinit-common.c | 4 ++-- arch/arm/include/asm/arch-omap4/sys_proto.h|

[U-Boot] [PATCH 11/27] omap4: Move i2c clocks enable to enable_basic_clocks

2016-02-27 Thread Paul Kocialkowski
I2C is often enabled withing the U-Boot SPL, thus those clocks are required to be enabled early (especially when the bootrom doesn't enable them for us). Signed-off-by: Paul Kocialkowski --- arch/arm/cpu/armv7/omap4/hw_data.c | 8 1 file changed, 4 insertions(+), 4

[U-Boot] [PATCH 09/27] omap-common: Remove deprecated arch_cpu_init code

2016-02-27 Thread Paul Kocialkowski
save_omap_boot_params is called from spl_board_init in the SPL context. Thus, there is no reason to duplicate that call on arch_cpu_init. Signed-off-by: Paul Kocialkowski --- arch/arm/cpu/armv7/omap-common/hwinit-common.c | 13 - include/configs/ti_omap4_common.h

[U-Boot] [PATCH 10/27] omap4: Remove duplicate CM_L3INIT_USBPHY_CLKCTRL reference and whitespace

2016-02-27 Thread Paul Kocialkowski
This removes a duplicate reference to CM_L3INIT_USBPHY_CLKCTRLin enable_basic_uboot_clocks. Also, a doubled whitespace is removed. Signed-off-by: Paul Kocialkowski --- arch/arm/cpu/armv7/omap4/hw_data.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[U-Boot] [PATCH 05/27] omap4: Export elpidia sdram device details

2016-02-27 Thread Paul Kocialkowski
Individual boards might provide their own emif_get_device_details function and use elpidia device details in their own way, hence those have to be exported. This also wraps existing definitions with the proper ifdef logic. Signed-off-by: Paul Kocialkowski ---

[U-Boot] [PATCH 07/27] omap4: Export jedec sdram timings

2016-02-27 Thread Paul Kocialkowski
Individual boards might provide their own emif_get_device_timings function and use the jedec timings in their own way, hence those have to be exported. Signed-off-by: Paul Kocialkowski --- arch/arm/cpu/armv7/omap4/emif.c | 2 +-

[U-Boot] [PATCH 03/27] power: twl6030: Device-index-specific MMC power initialization

2016-02-27 Thread Paul Kocialkowski
Not every device has multiple MMC slots available, so it makes sense to enable only the required LDOs for the available slots. Generic code in omap_hsmmc will enable both VMMC and VAUX1, in doubt. Signed-off-by: Paul Kocialkowski --- drivers/mmc/omap_hsmmc.c | 4 ++--

[U-Boot] [PATCH 06/27] omap4: Export elpidia sdram timings

2016-02-27 Thread Paul Kocialkowski
Individual boards might provide their own emif_get_device_timings function and use the elpidia timings in their own way, hence those have to be exported. Signed-off-by: Paul Kocialkowski --- arch/arm/cpu/armv7/omap4/sdram_elpida.c | 2 +-

[U-Boot] [PATCH 04/27] omap_hsmmc: Board-specific TWL6030 MMC power initialization

2016-02-27 Thread Paul Kocialkowski
Boards using the TWL6030 regulator may not all use the LDOs the same way. Some might also not use MMC1 at all, so VMMC would't have to be enabled. This delegates TWL6030 MMC power initializations to board-specific functions, that may still call twl6030_power_mmc_init for the default behavior.

[U-Boot] [PATCH 0/27] Amazon Kindle Fire (first generation) codename kc1 support series

2016-02-27 Thread Paul Kocialkowski
This series adds support for the Amazon Kindle Fire (first generation) codename kc1, as described in the commit introducing board and config support. Support for this device requires a series of changes to both the omap4 and twl6030 code. It introduces some cleanups and new features for both.

[U-Boot] [PATCH 02/27] power: twl6030: Enable VAUX1 for eMMC power, depending on BOOT2 value

2016-02-27 Thread Paul Kocialkowski
This enables the VAUX1 supply, used for eMMC power in standard configurations. Its voltage is determined by the value of the BOOT2 pin of the TWL6030. Note that the TWL6030 might already have enabled this regulator at startup (depending on the value of the BOOT3 pin of the TWL6030), according to

[U-Boot] [PATCH 01/27] power: twl6030: Some more explicit registers and values definitions

2016-02-27 Thread Paul Kocialkowski
This makes the twl6030 mmc and usb-related power registers and values definitions more explicit and clear and adds prefixes to them. Signed-off-by: Paul Kocialkowski --- drivers/power/twl6030.c | 26 +++--- include/twl6030.h | 14 ++ 2

Re: [U-Boot] [PATCH 02/10] arm64: Make full va map code more dynamic

2016-02-27 Thread Alexander Graf
On 26.02.16 20:25, Stephen Warren wrote: > On 02/25/2016 09:36 AM, Alexander Graf wrote: >> >> >> On 24.02.16 19:14, Stephen Warren wrote: >>> On 02/24/2016 05:11 AM, Alexander Graf wrote: The idea to generate our pages tables from an array of memory ranges is very sound. However,

Re: [U-Boot] [PATCH] arm: socfpga: Fix SR1500 env position

2016-02-27 Thread Stefan Roese
On 26.02.2016 19:20, Marek Vasut wrote: Move the inclusion of the common socfpga configuration file further down in the sr1500 configuration, so that the socfpga_common.h can check if environment is in SPI NOR and it's location is defined and if it is not, define default location. This fixes