]> git.sur5r.net Git - u-boot/log
u-boot
7 years agodefconfigs: am335x_hs_evm: Sync HS and non-HS defconfigs
Andrew F. Davis [Fri, 7 Apr 2017 15:11:19 +0000 (10:11 -0500)]
defconfigs: am335x_hs_evm: Sync HS and non-HS defconfigs

Sync new additions to non-HS defconfig with HS defconfig. Also add SPL
NAND support, this was disabled before due to size constraints, enable
this now at the expense of the less used GPT partition support.

Signed-off-by: Andrew F. Davis <afd@ti.com>
7 years agospl: net: Add FIT image support over network boot
Andrew F. Davis [Fri, 7 Apr 2017 19:29:36 +0000 (14:29 -0500)]
spl: net: Add FIT image support over network boot

FIT support in the net boot case is much like the RAM boot case in that
we load our image to "load_addr" and pass a dummy read function into
"spl_load_simple_fit()". As the load address is no longer hard-coded to
the final execution address, legacy image loading will require load_addr
to be set correctly in the image header.

Signed-off-by: Andrew F. Davis <afd@ti.com>
7 years agodefconfig: k2g_hs_evm: Add k2g_hs_evm_defconfig
Andrew F. Davis [Fri, 7 Apr 2017 15:00:11 +0000 (10:00 -0500)]
defconfig: k2g_hs_evm: Add k2g_hs_evm_defconfig

TI K2G secure devices have to be built with TI_SECURE_DEVICE, FIT, and
FIT_IMAGE_POST_PROCESS enabled. Add a dedicated defconfig for this.

Signed-off-by: Andrew F. Davis <afd@ti.com>
7 years agodefconfig: k2hk_hs_evm: Add k2hk_hs_evm_defconfig
Andrew F. Davis [Fri, 7 Apr 2017 15:00:10 +0000 (10:00 -0500)]
defconfig: k2hk_hs_evm: Add k2hk_hs_evm_defconfig

TI K2HK secure devices have to be built with TI_SECURE_DEVICE, FIT, and
FIT_IMAGE_POST_PROCESS enabled. Add a dedicated defconfig for this.

Signed-off-by: Andrew F. Davis <afd@ti.com>
7 years agodefconfig: k2e_hs_evm: Add k2e_hs_evm_defconfig
Vitaly Andrianov [Fri, 7 Apr 2017 15:00:09 +0000 (10:00 -0500)]
defconfig: k2e_hs_evm: Add k2e_hs_evm_defconfig

TI K2E secure devices have to be built with TI_SECURE_DEVICE, FIT, and
FIT_IMAGE_POST_PROCESS enabled. Add a dedicated defconfig for this.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Madan Srinivas <madans@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoKconfig: Adds SYS_TEXT_BASE config option for Keystone2
Madan Srinivas [Fri, 7 Apr 2017 15:00:08 +0000 (10:00 -0500)]
Kconfig: Adds SYS_TEXT_BASE config option for Keystone2

This patch makes SYS_TEXT_BASE a config option for Keystone2
so that it can be used to load u-boot at different addresses
on secure and non-secure Keystone2 devices.

Signed-off-by: Madan Srinivas <madans@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agodoc: Updates info on using Keystone2 secure devices
Madan Srinivas [Fri, 7 Apr 2017 15:00:07 +0000 (10:00 -0500)]
doc: Updates info on using Keystone2 secure devices

Add a section describing the secure boot image used on
Keystone2 secure devices.

Signed-off-by: Madan Srinivas <madans@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agoARM: Keystone2: Build secure images for K2
Madan Srinivas [Fri, 7 Apr 2017 15:00:06 +0000 (10:00 -0500)]
ARM: Keystone2: Build secure images for K2

Adds an additional image type needed for supporting secure keystone
devices. The build generates u-boot_HS_MLO which can be used to boot
from all media on secure keystone devices.

Signed-off-by: Madan Srinivas <madans@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agoarm: mach-omap2: Add secure image name common to OMAP and keystone
Madan Srinivas [Fri, 7 Apr 2017 15:00:05 +0000 (10:00 -0500)]
arm: mach-omap2: Add secure image name common to OMAP and keystone

As K2 can directly boot U-Boot, add u-boot_HS_MLO as the secure image
name for secure K2 devices, for all boot modes other than SPI flash.

Signed-off-by: Madan Srinivas <madans@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agoarm: mach-omap2: Enable Kconfig support for K2 HS devices
Vitaly Andrianov [Fri, 7 Apr 2017 15:00:04 +0000 (10:00 -0500)]
arm: mach-omap2: Enable Kconfig support for K2 HS devices

Like the OMAP54xx, AM43xx, & AM33xx family SoCs, the keystone family
of SoCs also have high security enabled models. Allow K2E devices to
be built with HS Device Type Support.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Madan Srinivas <madans@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agoarm: mach-keystone: Implements FIT post-processing call for keystone SoCs
Vitaly Andrianov [Fri, 7 Apr 2017 15:00:03 +0000 (10:00 -0500)]
arm: mach-keystone: Implements FIT post-processing call for keystone SoCs

This commit implements the board_fit_image_post_process() function for
the keystone architecture. This function calls into the secure boot
monitor for secure authentication/decryption of the image. All needed
work is handled by the boot monitor and, depending on the keystone
platform, the security functions may be offloaded to other secure
processing elements in the SoC.

The boot monitor acts as the gateway to these secure functions and the
boot monitor for secure devices is available as part of the SECDEV
package for KS2. For more details refer doc/README.ti-secure

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Madan Srinivas <madans@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agoimage: Fixes build warning with CONFIG_FIT_IMAGE_POST_PROCESS
Madan Srinivas [Fri, 7 Apr 2017 15:00:02 +0000 (10:00 -0500)]
image: Fixes build warning with CONFIG_FIT_IMAGE_POST_PROCESS

The function 'board_fit_image_post_process' is defined only when the
config option CONFIG_FIT_IMAGE_POST_PROCESS is enabled. For secure
systems that do not use SPL but do use FIT kernel images, only
CONFIG_FIT_IMAGE_POST_PROCESS will be defined, which will result in an
implicit declaration of function 'board_fit_image_post_process' warning
while building u-boot. Fix this warning.

Signed-off-by: Madan Srinivas <madans@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agoti_armv7_common: env: Change FIT image name to match build name
Andrew F. Davis [Fri, 7 Apr 2017 14:55:20 +0000 (09:55 -0500)]
ti_armv7_common: env: Change FIT image name to match build name

The most common name for a FIT image containing a bootable kernel is
"fitImage", as our builds now use this name also, change this to the
default in our U-Boot environment.

Signed-off-by: Andrew F. Davis <afd@ti.com>
7 years agomtd: nand: am335x_spl_bch: Incorporate tWB delay in nand_command function
Cooper Jr., Franklin [Thu, 6 Apr 2017 20:54:14 +0000 (15:54 -0500)]
mtd: nand: am335x_spl_bch: Incorporate tWB delay in nand_command function

Various commands to NAND flash results in the NAND flash becoming busy.
For those commands the SoC should wait until the NAND indicates it is
no longer busy before sending further commands. However, there is a delay
between the time the SoC sends its last command and when the NAND flash
sets its Ready/Busy Pin. This delay (tWB) must be respected or the SoC may
falsely assume the flash is ready when in reality it just hasn't had enough
time to indicate that it is busy.

Properly delaying by tWB is already done for nand_command/nand_command_lp
in nand_base.c including the version of it in the Linux kernel. Therefore,
this patch brings the handling of tWB delay inline to nand_base.c

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
[trini: Reformat comments slightly]
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agodavinci: omapl138_lcdk: switch to using common mmc args
Sekhar Nori [Thu, 6 Apr 2017 09:22:57 +0000 (14:52 +0530)]
davinci: omapl138_lcdk: switch to using common mmc args

Now that we have common MMC/SD boot environment
variables that can be used across TI platforms,
switch OMAP-L138 LCDK to use them.

As a nice side-effect, we get support for using
uEnv.txt on this platform.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoARM: ti: consolidate mmc environment variables
Sekhar Nori [Thu, 6 Apr 2017 09:22:56 +0000 (14:52 +0530)]
ARM: ti: consolidate mmc environment variables

Introduce include/environment/ti/mmc.h that
consolidates environment variable definitions
for various TI boards that support MMC/SD.

This allows reuse of same environment variables
on non-ARMv7 TI platforms like OMAP-L138 for
example.

While at it, move DFU-related environment variable
includes to only non-SPL builds for AM335x and
AM437x since they are not really used for SPL
today.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agodavinci: omapl138_lcdk: use environment variables for memory addresses
Sekhar Nori [Thu, 6 Apr 2017 09:22:55 +0000 (14:52 +0530)]
davinci: omapl138_lcdk: use environment variables for memory addresses

Use environment variables for various memory addresses
used on OMAP-L138 LCDK board. This makes it easy to
customize the boot process.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agodavinci: omapl138_lcdk: enable some filesystem related commands
Sekhar Nori [Thu, 6 Apr 2017 09:22:54 +0000 (14:52 +0530)]
davinci: omapl138_lcdk: enable some filesystem related commands

Enable some generic filesystem commands as
well as disk partition related commands for
OMAP-L138 LCDK board.

These help in booting Linux from MMC/SD, for
example.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agodavinci: omapl138_lcdk: remove spiboot
Sekhar Nori [Thu, 6 Apr 2017 09:22:53 +0000 (14:52 +0530)]
davinci: omapl138_lcdk: remove spiboot

OMAP-L138 LCDK board does not have a SPI flash.
Remove spiboot related environment variable
definitions.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoti: clocks: Fix do_enable_clocks() to accept NULL pointers as input parameters
Lukasz Majewski [Mon, 27 Mar 2017 08:15:27 +0000 (10:15 +0200)]
ti: clocks: Fix do_enable_clocks() to accept NULL pointers as input parameters

Up till this commit passing NULL as input parameter was allowed, but not
handled properly.

When one passed NULL to one of this function parameters, the code was
executed causing data abort.

However, what is more interesting, the abort was not caught because of code
execution in HYP mode with masked CPSR A bit ("Imprecise Data Abort mask bit).
The TI's AM57xx SoC switch to HYP mode with A bit masked in lowlevel_init.S
due to SMC call. Such operation (by default) is performed in SoC ROM code.

The problem would pop up when one:
- Switch back to SVC mode after disabling LPAE support
- Somebody enables A bit (by executing cpsie a asm instruction)

and then the previously described exception would be caught.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoti: wdt: omap: Disable watchdog timer before performing initialization
Lukasz Majewski [Sun, 19 Feb 2017 22:24:38 +0000 (23:24 +0100)]
ti: wdt: omap: Disable watchdog timer before performing initialization

The OMAP WDT IP block requires to be stopped before any write to its
registers is performed.

This problem has been thoroughly described in Linux kernel:

"watchdog: omap: assert the counter being stopped before reprogramming:
SHA1: 530c11d432727c697629ad5f9d00ee8e2864d453

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoti: wdt: omap5: Define WDT_BASE for omap5+ SoC
Lukasz Majewski [Sun, 19 Feb 2017 22:24:37 +0000 (23:24 +0100)]
ti: wdt: omap5: Define WDT_BASE for omap5+ SoC

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoti: wdt: common: Make the wdt IP defines common for the TI platform
Lukasz Majewski [Sun, 19 Feb 2017 22:24:36 +0000 (23:24 +0100)]
ti: wdt: common: Make the wdt IP defines common for the TI platform

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoMerge branch 'master' of git://git.denx.de/u-boot-samsung
Tom Rini [Sat, 8 Apr 2017 14:20:26 +0000 (10:20 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-samsung

7 years agoMerge branch 'master' of git://git.denx.de/u-boot-sunxi
Tom Rini [Sat, 8 Apr 2017 13:28:02 +0000 (09:28 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sunxi

7 years agocommon/xyzModem.c: Do not use hard-coded address for debug buffer
Alexandru Gagniuc [Tue, 4 Apr 2017 17:42:31 +0000 (10:42 -0700)]
common/xyzModem.c: Do not use hard-coded address for debug buffer

Under the plethora of #ifdefs, the xyzModem code hid this pearl:
static char *zm_out = (char *) 0x00380000;
This was only enabled when DEBUG is defined, so it's probably why it
went unnoticed for so long. No idea what platform had memory at that
exact location, but the this approach is extremely hacky.
Use a static buffer instead.

Signed-off-by: Alexandru Gagniuc <alex.g@adaptrum.com>
7 years agocommon/xyzModem.c: unifdef (Remove useless #ifdefs)
Alexandru Gagniuc [Tue, 4 Apr 2017 17:42:30 +0000 (10:42 -0700)]
common/xyzModem.c: unifdef (Remove useless #ifdefs)

Signed-off-by: Alexandru Gagniuc <alex.g@adaptrum.com>
7 years agospl: Kconfig: SPL_MMC_SUPPORT depends on GENERIC_MMC
Alexandru Gagniuc [Tue, 4 Apr 2017 17:02:58 +0000 (10:02 -0700)]
spl: Kconfig: SPL_MMC_SUPPORT depends on GENERIC_MMC

spl_mmc.c calls mmc_initialize(). This symbol is provided in
drivers/mmc/mmc.c when CONFIG_GENERIC_MMC is enabled.
The sunxi Kconfig case is an oddball because it redefines
SPL_MMC_SUPPORT.

Signed-off-by: Alexandru Gagniuc <alex.g@adaptrum.com>
[trini: Update arch/arm/cpu/armv8/zynqmp/Kconfig]
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoarm: rmobile: Remove default value of Kconfig from defconfig
Nobuhiro Iwamatsu [Sat, 1 Apr 2017 23:17:30 +0000 (08:17 +0900)]
arm: rmobile: Remove default value of Kconfig from defconfig

This removes CONFIG_BOOTSTAGE_USER_COUNT, CONFIG_BOOTSTAGE_STASH_ADDR
and CONFIG_BOOTSTAGE_STASH_SIZE from defconfig following boards:

  - Alt
  - Gose
  - Koelsh
  - Lager
  - Porter
  - Silk
  - Stout
  - Blanche
  - Salvator-x

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agocommon, kconfig: Fix defaut value of BOOTSTAGE_STASH_SIZE
Nobuhiro Iwamatsu [Sat, 1 Apr 2017 22:48:12 +0000 (07:48 +0900)]
common, kconfig: Fix defaut value of BOOTSTAGE_STASH_SIZE

The default value of BOOTSTAGE_STASH_SIZE should be set to hexadecimal,
but an integer value is set. This fixes the BOOTSTAGE_STASH_SIZE number
from hexadecimal to integer.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agospl: armv7m: keep ARM v7M in thumb mode while jumping to entry point
Vikas Manocha [Fri, 31 Mar 2017 23:34:39 +0000 (16:34 -0700)]
spl: armv7m: keep ARM v7M in thumb mode while jumping to entry point

On ARM v7M, the processor will return to ARM mode when executing blx
instruction with bit 0 of the address == 0. Always set it to 1 to stay
in thumb mode.

Similar commit:
f99993c10882f7dc8ec35993d5febe59aac01e6a
Author: Matt Porter <mporter@konsulko.com>
Date:   Tue May 5 15:00:23 2015 -0400
common/cmd_boot: keep ARM v7M in thumb mode during do_go_exec()

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
7 years agoconfig: am335x_evm: detect BeagleBone Blue using BLA
robertcnelson@gmail.com [Thu, 30 Mar 2017 19:29:54 +0000 (14:29 -0500)]
config: am335x_evm: detect BeagleBone Blue using BLA

BeagleBone Blue is next grenation of boards from BeagleBoard.org, focusing
on robotics with a TI wl1835 wireless module for connectivity.

This board can be indentified by the BLAx value after A335BNLT (BBB)
in the at24 eeprom:
BLAx: [aa 55 33 ee 41 33 33 35  42 4e 4c 54 42 4c 41 30 |.U3.A335BNLTBLA2|]

http://beagleboard.org/blue
https://github.com/beagleboard/beaglebone-blue

firmware: https://github.com/beagleboard/beaglebone-black-wireless/tree/master/firmware
wl18xx mac address: /proc/device-tree/ocp/ethernet@4a100000/slave@4a100200/mac-address

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
CC: Tom Rini <trini@konsulko.com>
CC: Jason Kridner <jkridner@beagleboard.org>
CC: Will Newton <willn@resin.io>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoconfig: am335x_evm: detect Green Wireless using GW1
robertcnelson@gmail.com [Thu, 30 Mar 2017 19:29:53 +0000 (14:29 -0500)]
config: am335x_evm: detect Green Wireless using GW1

SeeedStudio BeagleBone Green Wireless (BBGW) is an expansion of the
SeeedStudio Green (BBG) with the Ethernet replaced by a TI wl1835
wireless module.

This board can be indentified by the GW1x value after A335BNLT (BBB)
in the at24 eeprom:
GW1x [aa 55 33 ee 41 33 33 35  42 4e 4c 54 47 57 31 41  |.U3.A335BNLTGW1A|]

http://beagleboard.org/green-wireless
http://wiki.seeed.cc/BeagleBone_Green_Wireless/

firmware: https://github.com/beagleboard/beaglebone-black-wireless/tree/master/firmware
wl18xx mac address: Stored in at24 eeprom at address 5-16:
hexdump -e '8/1 "%c"' /sys/bus/i2c/devices/0-0050/eeprom | cut -b 5-16

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
CC: Tom Rini <trini@konsulko.com>
CC: Jason Kridner <jkridner@beagleboard.org>
CC: Will Newton <willn@resin.io>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoconfig: am335x_evm: detect Black Wireless using BWA
robertcnelson@gmail.com [Thu, 30 Mar 2017 19:29:52 +0000 (14:29 -0500)]
config: am335x_evm: detect Black Wireless using BWA

BeagleBone Black Wireless is clone of the BeagleBone Black (BBB) with
the Ethernet replaced by a TI wl1835 wireless module.

This board can be indentified by the BWAx value after A335BNLT (BBB)
in the at24 eeprom:
BWAx [aa 55 33 ee 41 33 33 35  42 4e 4c 54 42 57 41 35  |.U3.A335BNLTBWA5|]

http://beagleboard.org/black-wireless
https://github.com/beagleboard/beaglebone-black-wireless

firmware: https://github.com/beagleboard/beaglebone-black-wireless/tree/master/firmware
wl18xx mac address: /proc/device-tree/ocp/ethernet@4a100000/slave@4a100200/mac-address

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
CC: Tom Rini <trini@konsulko.com>
CC: Jason Kridner <jkridner@beagleboard.org>
CC: Will Newton <willn@resin.io>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agostm32f7: enable instruction & data cache
Vikas Manocha [Mon, 27 Mar 2017 20:02:45 +0000 (13:02 -0700)]
stm32f7: enable instruction & data cache

It also enables commands for cache enable/disable/status.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
cc: Christophe KERELLO <christophe.kerello@st.com>

7 years agoarmv7m: add instruction & data cache support
Vikas Manocha [Mon, 27 Mar 2017 20:02:44 +0000 (13:02 -0700)]
armv7m: add instruction & data cache support

This patch adds armv7m instruction & data cache support.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
cc: Christophe KERELLO <christophe.kerello@st.com>

7 years agoRemove extra fdt_fixup_ethernet() call
Joakim Tjernlund [Thu, 23 Mar 2017 17:02:41 +0000 (18:02 +0100)]
Remove extra fdt_fixup_ethernet() call

ft_cpu_setup() already calls fdt_fixup_ethernet(), calling it
in image_setup_libfdt() is both redundant and breaks any modifications
done by ft_board_setup(). Restore the old behavior by removing
the call in image_setup_libfdt()

Fixes: 13d06981a982 ("image: Add device tree setup to image library")
Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
7 years agoboard: STiH410-B2260: enable caches
Patrice Chotard [Mon, 20 Mar 2017 14:21:36 +0000 (15:21 +0100)]
board: STiH410-B2260: enable caches

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
7 years agoti_armv7_common: env: Use args_mmc in FIT loading path
Andrew F. Davis [Fri, 10 Mar 2017 21:53:54 +0000 (15:53 -0600)]
ti_armv7_common: env: Use args_mmc in FIT loading path

The env command 'args_fit' does not define a root path, this forces us to
embed the rootfs into the FIT image. FIT images do not need to contain a
rootfs, when they do not the kernel will fall-back to the kernel argument
'root', if this is not defined the kernel will not boot. It is safe to
add this as when we do have the rootfs in FIT this argument is ignored.
As 'loadfit' is only called from the MMC boot path, use 'args_mmc' to
correctly populate 'bootargs'.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agoApparent conflict between CONFIG_BLK and CONFIG_API
fuz@fuz.su [Tue, 7 Mar 2017 21:53:17 +0000 (22:53 +0100)]
Apparent conflict between CONFIG_BLK and CONFIG_API

Good evening,

I am trying to port FreeBSD to the ASUS Tinker Board, a computer based
on the Rockchip 3288 SoC. FreeBSD's boot loader (named loader(8)) needs
CONFIG_API to be enabled, but trying to build an U-Boot from trunk with
both CONFIG_API and CONFIG_BLK (as required for Rockchip SoC's?) leads
to the following build failure:

$ CROSS_COMPILE=arm-none-eabi- gmake tinker-rk3288_defconfig all
...
  CC      api/api_storage.o
api/api_storage.c: In function 'dev_read_stor':
api/api_storage.c:334:9: error: 'struct blk_desc' has no member named 'block_read'
  if ((dd->block_read) == NULL) {
         ^~
api/api_storage.c:339:11: error: 'struct blk_desc' has no member named 'block_read'
  return dd->block_read(dd, start, len, buf);
           ^~
api/api_storage.c:340:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
gmake[2]: *** [scripts/Makefile.build:281: api/api_storage.o] Fehler 1
gmake[1]: *** [Makefile:1229: api] Fehler 2
gmake: *** [Makefile:460: __build_one_by_one] Error 2

I applied the following fix, but the product doesn't boot. Perhaps
that's not a property of the fix though:

Yours,
Robert Clausecker

7 years agoboard: ti: am57xx: enable input on mmc clock
Sekhar Nori [Wed, 8 Feb 2017 13:13:59 +0000 (18:43 +0530)]
board: ti: am57xx: enable input on mmc clock

As per the latest pinmux data available for AM572x EVM,
rev A3, input should be enabled on MMC clock lines for
MMC2/2/3 for stable operation.

Further, AM572x TRM, SPRUHZ6, Revised June 2016, in
section 18.4.6.1.1 "Pad Configuration Registers" states
that input should be enabled for MMC 2/3/4 clock lines.

Enable input on MMC1 and MMC3 clock to match the latest
pinmux data. Input is already enabled on MMC2 clock for
BeagleBoard x15. Further, input is already enabled on all
MMCx clocks for other AM57xx boards (AM572x and AM571x
IDK).

Tested with HS and UHS SD card on AM572x EVM Rev A3.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agoARM: keystone: Pass SPI MTD partition table via kernel command line
Vignesh R [Wed, 8 Mar 2017 08:28:17 +0000 (13:58 +0530)]
ARM: keystone: Pass SPI MTD partition table via kernel command line

SPI U-Boot image for K2 boards have now exceeded 512K partition
allocated to it and no longer fit the partitions defined in kernel DTS
file. Therefore, pass an updated MTD partition table from U-Boot as
kernel command line arguments to avoid kernel from accidentally
modifying boot loader image that has overflowed to next user partition.

To do is, introduce a common environment file for declaring SPI
partition so that each individual boards need not repeat the same.
Choose appropriate SPI bus from board config file and pass it as command
line argument to kernel.

Signed-off-by: Vignesh R <vigneshr@ti.com>
7 years agoARMv8: add GOT sections to the list of sections copied
Philipp Tomsich [Fri, 24 Mar 2017 18:08:55 +0000 (19:08 +0100)]
ARMv8: add GOT sections to the list of sections copied

Recent Linux distributions (e.g. Debian 9) include cross-compilers for
AArch64, but only for the aarch64-linux-gnu triplet only. It can thus
be expected that users will attempt to use the system cross-compiler
(instead of an aarch64-elf variant) to compile U-Boot for their ARMv8
target systems.

One key differences between an aarch64-linux-gnu and an aarch64-elf
compiler are the default settings regarding position-independent: with
the aarch64-linux-gnu compiler, the default will create and use the
global offset table.

This change-set adjusts the list of sections copied on ARMv8 to include
the GOT sections. With this added, the list matches the previous setup
for AArch32 closely.

Note that this is not an 'academic' issue, but was in fact encountered
by our QA during testing of the RK3399-Q7 BSP and resulted in an
early failure of the SPL stage during FDT setup.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoenv_mmc: Allow SPL to use any MMC device to load/save the environment
Jean-Jacques Hiblot [Wed, 1 Feb 2017 10:26:53 +0000 (11:26 +0100)]
env_mmc: Allow SPL to use any MMC device to load/save the environment

SPL has been restricted to use only dev 0 based on the assumption that only
one MMC device is registered. This is not always the case and many
platforms now register several devices as expected by the spl mmc boot code
For those platform SPL_ENV_SUPPORT is broken if dev is forced to 0.

A word of warning: this commit may break SPL_ENV_SUPPORT on platforms that
do not register the same MMC controllers in SPL and in u-boot (mostly iMX6
based platforms). Fortunately none of those activate SPL_ENV_SUPPORT in
their default configuration.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
7 years agosunxi: Add defconfig for Allwinner A23 EVB
Florent Jacquet [Thu, 16 Feb 2017 10:46:42 +0000 (11:46 +0100)]
sunxi: Add defconfig for Allwinner A23 EVB

This enables the support for the Allwinner A23 Evaluation Board (EVB),
that already had a device tree (from Linux) but no defconfig.

This board has an AXP223 PMIC, some NAND, Audio out and in plugs, an
accelerometer and light sensor, as well as a USB HSIC hub and a USB
OTG mini-USB connector. It also has a Wifi/BT chip.

Access to the other buses (LCD, MIPI DSI, LVDS, etc) can be done
through dedicated pin headers.

Signed-off-by: Florent Jacquet <florent.jacquet@free-electrons.com>
Cc: Jagan Teki <jagan@openedev.com>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agosunxi: Add default environment size
Maxime Ripard [Mon, 20 Mar 2017 14:57:22 +0000 (15:57 +0100)]
sunxi: Add default environment size

On boards that defines ENV_IS_NOWHERE, such as the NES classic, commit
19dbe7d1a3f7 ("common: Move environment choice to Kconfig") broke the build
because of a missing environment size.

Reintroduce a default environment size consistent with what we had before.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agocmd: nand: Make the NAND options default to NAND_SUNXI
Maxime Ripard [Fri, 3 Mar 2017 14:13:30 +0000 (15:13 +0100)]
cmd: nand: Make the NAND options default to NAND_SUNXI

If we depend on the ARCH_SUNXI configuration option, the boards that do not
have NAND support enabled (with the associated options) will not compile
anymore.

Depend on the NAND driver configuration option to make sure that is not the
case.

Reported-by: Chen-Yu Tsai <wens@csie.org>
Tested-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agocmd: ubifs: Add a dependency on CMD_UBI
Maxime Ripard [Fri, 3 Mar 2017 13:53:22 +0000 (14:53 +0100)]
cmd: ubifs: Add a dependency on CMD_UBI

CMD_UBIFS can't compile without CMD_UBI enabled. Make sure we can't end up
in that case.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Heiko Schocher <hs@denx.de>
7 years agosunxi: Add boards/sunxi and arch/arm/mach-sunxi to sunxi MAINTAINERS entry
Chen-Yu Tsai [Wed, 1 Mar 2017 06:03:34 +0000 (14:03 +0800)]
sunxi: Add boards/sunxi and arch/arm/mach-sunxi to sunxi MAINTAINERS entry

Recently some sunxi related code was moved to arch/arm/mach-sunxi, but
the MAINTAINERS entry was not updated to reflect this. Add this, and
the board level boards/sunxi directory to our entry.

While at it, also update its status, to reflect the current active
maintainership.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agoarm: sunxi: Add Sunchip CX-A99 initial support
Rask Ingemann Lambertsen [Sat, 25 Feb 2017 13:21:54 +0000 (14:21 +0100)]
arm: sunxi: Add Sunchip CX-A99 initial support

The Sunchip CX-A99 is a board used in some media players. It features:

An Allwinner A80 ARM SoC (4 * Cortex-A7 + 4 * Cortex-A15 cores)
2 GiB or 4 GiB DDR3 DRAM
AXP808 PMIC
16 GB or 32 GB eMMC
SDIO Wifi/Bluetooth/FM module
SD card slot
1 USB 3.0 connector
2 USB 2.0 connectors
SATA connector
UART connector (internally) for serial console
Ethernet connector (10/100/1000 Mbit/s)
HDMI connector
Composite video and analog audio connector
S/PDIF connector
IR remote control receiver

This patch adds a defconfig for the board. The DRAM settings are as found
in the vendor sys_config.fex file.

It has a preliminary device tree for use until a device tree is accepted
upstream, after which it can be replaced by the upstream version.

Signed-off-by: Rask Ingemann Lambertsen <rask@formelder.dk>
[squash commits, and edited new meanful commit message]
Signed-off-by: Jagan Teki <jagan@openedev.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agoARM: dts: sun9i: Add mmc1 pinmux setting
Chen-Yu Tsai [Sat, 25 Feb 2017 13:19:54 +0000 (14:19 +0100)]
ARM: dts: sun9i: Add mmc1 pinmux setting

commit 56b0730157f70dc23d6caff9e7ceb8b377b96b9f upstream.

On the A80, mmc1 is available on pingroup G. Designs mostly use this
to connect to an SDIO WiFi chip.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Rask Ingemann Lambertsen <rask@formelder.dk>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agosunxi: Add support for the CHIP Pro
Maxime Ripard [Mon, 27 Feb 2017 17:22:15 +0000 (18:22 +0100)]
sunxi: Add support for the CHIP Pro

The CHIP Pro is a SoM that features the GR8 SIP, an AXP209, a BT/WiFi chip
and a 512MiB SLC NAND.

This it's an SLC NAND, it doesn't suffer the same drawbacks than found on
the MLC NANDs, and we can enable it right away.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agosunxi: Sync GR8 DTS and AXP209 with the kernel
Maxime Ripard [Mon, 27 Feb 2017 17:22:14 +0000 (18:22 +0100)]
sunxi: Sync GR8 DTS and AXP209 with the kernel

Those DT will be part of 4.10, sync them so we can have our own config.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Jagan Teki <jagan@openedev.com>
7 years agoscripts: sunxi: Build an raw SPL image
Maxime Ripard [Mon, 27 Feb 2017 17:22:13 +0000 (18:22 +0100)]
scripts: sunxi: Build an raw SPL image

Introduce a new sunxi-spl-with-ecc.bin image with already the right header,
ECC, randomizer and padding for the BROM to be able to read it.

It needs to be flashed using a raw access to the NAND so that the
controller doesn't change a thing to it, since we already have all the
right parameters.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
7 years agonand: sunxi: Add options for the SPL NAND configuration
Maxime Ripard [Mon, 27 Feb 2017 17:22:12 +0000 (18:22 +0100)]
nand: sunxi: Add options for the SPL NAND configuration

The SPL image needs to be built with a different ECC configuration than the
U-Boot binary.

Add Kconfig options with defaults to provide a value that should work for
anyone, but is still configurable if needs be.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Scott Wood <oss@buserror.net>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agosunxi: Add the default mtdids and mtdparts to our env
Maxime Ripard [Mon, 27 Feb 2017 17:22:11 +0000 (18:22 +0100)]
sunxi: Add the default mtdids and mtdparts to our env

In order for the user to be able to see and modify them, add those
variables to the default environment.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agosunxi: Enable UBI and NAND support
Hans de Goede [Mon, 27 Feb 2017 17:22:10 +0000 (18:22 +0100)]
sunxi: Enable UBI and NAND support

Enable the NAND and UBI support in the configuration header so that we can
(finally) use it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Jagan Teki <jagan@openedev.com>
7 years agomtd: sunxi: Change U-Boot offset
Maxime Ripard [Mon, 27 Feb 2017 17:22:09 +0000 (18:22 +0100)]
mtd: sunxi: Change U-Boot offset

The default U-Boot offset for the Allwinner SoCs was set to 32kB.

This was probably to try to maintain some compatibility with the current
image that we build for the MMC where the U-Boot binary is also located at
a 32kB offset.

However, this causes a number of issues. The first one is that it prevents
us from using a backup SPL entirely, which is troublesome in case where the
first would be corrupt (especially on MLC which have a higher number of
bitflips).

We also cannot use the original MMC image on the NAND, because we need to
prepare the SPL image to include the ECCs and randomizer settings, which
reduces the interest of setting it at that particular offset.

It also prevents us from upgrading and flashing the U-Boot and SPLs
independantly, since it's very likely that it will fall in the same erase
block.

Since that default wasn't used by any board, change it for 8MB, which will
be in an erase block of its own, all the erase blocks being multiple of
two. The highest erase block size we encountered is 4MB, which means that
in this particular setup, the first and second erase blocks will be for the
SPL and its backup, and the third for U-Boot.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agomtd: sunxi: Select the U-Boot location config option
Maxime Ripard [Mon, 27 Feb 2017 17:22:08 +0000 (18:22 +0100)]
mtd: sunxi: Select the U-Boot location config option

We'll need that symbol so that the default offset are defined

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agocmd: nand: Expose optional suboptions in Kconfig
Boris Brezillon [Mon, 27 Feb 2017 17:22:07 +0000 (18:22 +0100)]
cmd: nand: Expose optional suboptions in Kconfig

Sometime we need to enable advanced suboptions of the nand command set.
Expose these suboptions in Kconfig.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agocmd: Expose a Kconfig option to enable UBIFS commands
Boris Brezillon [Mon, 27 Feb 2017 17:22:06 +0000 (18:22 +0100)]
cmd: Expose a Kconfig option to enable UBIFS commands

Create a new Kconfig entry to allow CMD_UBIFS selection from Kconfig and
add an hidden LZO option that can be selected by CMD_UBIFS.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Jagan Teki <jagan@openedev.com>
7 years agomtd: ubi: Select RBTREE option from MTD_UBI Kconfig entry
Boris Brezillon [Mon, 27 Feb 2017 17:22:05 +0000 (18:22 +0100)]
mtd: ubi: Select RBTREE option from MTD_UBI Kconfig entry

Expose the RBTREE feature through Kconfig and select this option from the
MTD_UBI option.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Jagan Teki <jagan@openedev.com>
[Rebased on master]
Signed-off-by: Jagan Teki <jagan@openedev.com>
7 years agocmd: Add Kconfig option for CMD_MTDPARTS and related options
Maxime Ripard [Mon, 27 Feb 2017 17:22:04 +0000 (18:22 +0100)]
cmd: Add Kconfig option for CMD_MTDPARTS and related options

CMD_MTDPARTS is something the user might or might not want to select, and
might depends on (or be selected by) other options too.

This is even truer for the MTDIDS_DEFAULT and MTDPARTS_DEFAULT options that
might change from one board to another, or from one user to the other,
depending on what it expects and what storage devices are available.

In order to ease that configuration, add those options to Kconfig.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agocommon: Move environment choice to Kconfig
Maxime Ripard [Mon, 27 Feb 2017 17:22:03 +0000 (18:22 +0100)]
common: Move environment choice to Kconfig

The environment location is something that might change per board
(depending on what storage options are availaible there) or depending on
the user choice (when we have several options).

Instead of hardcoding it in our configuration header, create a Kconfig
choice with the options we use for now, and the symbols that depend on it.

Once done, also remove the irrelevant sunxi defines.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agotools: sunxi: Add spl image builder
Maxime Ripard [Mon, 27 Feb 2017 17:22:02 +0000 (18:22 +0100)]
tools: sunxi: Add spl image builder

This program generates raw SPL images that can be flashed on the NAND with
the ECC and randomizer properly set up.

This has been copied (and tweaked to find the right headers) from the
sunxi-tools (https://github.com/linux-sunxi/sunxi-tools) upstream
repository, commit 1c3a6ca5.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agobch: Allow to build for the host
Maxime Ripard [Mon, 27 Feb 2017 17:22:01 +0000 (18:22 +0100)]
bch: Allow to build for the host

We will need the bch functions in the tool to generate the SPL images for
the Allwinner SoCs.

Do the needed adjustments so that we can use it on the host.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agonand: sunxi: Fix modulo by zero error
Maxime Ripard [Mon, 27 Feb 2017 17:22:00 +0000 (18:22 +0100)]
nand: sunxi: Fix modulo by zero error

When trying to autodetect the ECC and randomization configurations, the
driver starts with a randomization disabled and no seeds.

In this case, the number of seeds is obviously 0, and the randomize boolean
is set to false.

However, the logic that retrieves the seed for a given page offset will
blindly use the number of seeds, without testing if the randomization is
enabled, basically doing a modulo by 0.

As it turns out, the libgcc in the common toolchain returns 0 here, which
was our expected value in such a case, and why we would not detect it.
However, U-Boot's libgcc will for some reason return from the function
instead, resulting in an error to load the U-Boot binary in the SPL.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Scott Wood <oss@buserror.net>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agosunxi: add NanoPi NEO Air defconfig
Jelle van der Waa [Sun, 12 Feb 2017 15:21:40 +0000 (16:21 +0100)]
sunxi: add NanoPi NEO Air defconfig

Add support for the NanoPi NEO Air H3 board from friendlyarm.com . This
board contains WiFi, Bluetooth, 8GB eMMC storage and 512 MB DDR3 ram.

Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
[Rebase on master]
Signed-off-by: Jagan Teki <jagan@openedev.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agosun8i_emac: configure PHY reset GPIO via DM
Philipp Tomsich [Wed, 22 Feb 2017 18:46:41 +0000 (19:46 +0100)]
sun8i_emac: configure PHY reset GPIO via DM

This ports the support for configuring a GPIO for resetting the
Ethernet PHY (incl. such details as the reset polarity and
pulse-length) from the Designware driver.

X-AffectedPlatforms: A64-uQ7
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agoboard: samsung: trats2: remove the board_power_init() function
Jaehoon Chung [Mon, 3 Apr 2017 10:02:58 +0000 (19:02 +0900)]
board: samsung: trats2: remove the board_power_init() function

Remove the board_power_init() function.
It will be initialized with device-tree.
In future, it will be controlled with regulator API.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
7 years agoconfigs: trats2: enable the configuration relevant to PMIC
Jaehoon Chung [Mon, 3 Apr 2017 10:02:57 +0000 (19:02 +0900)]
configs: trats2: enable the configuration relevant to PMIC

Enable CONFIG_DM_I2C, CONFIG_DM_PMIC_MAX77686 and
CONFIG_SYS_I2C_S3C24X0.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
7 years agoboard: samsung: trats2: remove the unused functions
Jaehoon Chung [Mon, 3 Apr 2017 10:02:56 +0000 (19:02 +0900)]
board: samsung: trats2: remove the unused functions

Remove the unused functions.
Never call the get_soft_i2c_scl/sda_pin() aynwhere.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
7 years agoconfigs: trats2: enable CONFIG_DM_I2C_GPIO
Jaehoon Chung [Mon, 3 Apr 2017 10:02:55 +0000 (19:02 +0900)]
configs: trats2: enable CONFIG_DM_I2C_GPIO

Enable the CONFIG_DM_I2C_GPIO for using i2c-gpio.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
7 years agoboard: samsung: trats2: remove the board_i2c_init() function
Jaehoon Chung [Mon, 3 Apr 2017 10:02:54 +0000 (19:02 +0900)]
board: samsung: trats2: remove the board_i2c_init() function

Remove the board_i2c_init() function.
i2c should be initialized with device-tree file.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
7 years agoarm: dts: trats2: add the i2c-gpio nodes
Jaehoon Chung [Mon, 3 Apr 2017 10:02:53 +0000 (19:02 +0900)]
arm: dts: trats2: add the i2c-gpio nodes

Add the i2c-gpio nodes for fuelgauge and max77693.
There are i2c8 and i2c9.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
7 years agoRemove various unused interrupt related code
Tom Rini [Fri, 7 Apr 2017 00:42:18 +0000 (20:42 -0400)]
Remove various unused interrupt related code

With d53ecad92f06 some unused interrupt related code was removed.
However all of these options are currently unused.  Rather than migrate
some of these options to Kconfig we just remove the code in question.

The only related code changes here are that in some cases we use
CONFIG_STACKSIZE in non-IRQ related context.  In these cases we rename
and move the value local to the code in question.

Fixes: d53ecad92f06 ("Merge branch 'master' of git://git.denx.de/u-boot-sunxi")
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoMerge branch 'master' of git://git.denx.de/u-boot-sunxi
Tom Rini [Thu, 6 Apr 2017 16:28:03 +0000 (12:28 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sunxi

trini: Disable CONFIG_SPL_USE_ARCH_MEMSET on orangepi_2

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agodm: serial: Allow driver-model serial to be disabled for TPL
Simon Glass [Sun, 2 Apr 2017 15:50:32 +0000 (09:50 -0600)]
dm: serial: Allow driver-model serial to be disabled for TPL

Add separate enable/disable controls for driver-model serial. While this
is generally enabled in SPL it may not be in TPL, since serial output can
be obtained with the debug UART with minimal code size.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agodm: core: Allow driver model to be disabled for TPL
Simon Glass [Sun, 2 Apr 2017 15:50:31 +0000 (09:50 -0600)]
dm: core: Allow driver model to be disabled for TPL

Since TPL often needs to be very very small it may not make sense to
enable driver model. Add an option for this.

This changes brings the 'rock' board under the TPL limit with gcc 4.9.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoMakefile: Provide an option to select SPL or TPL
Simon Glass [Sun, 2 Apr 2017 15:50:30 +0000 (09:50 -0600)]
Makefile: Provide an option to select SPL or TPL

At present we have SPL_ which can be used in Makefiles to select between
normal and SPL CONFIGs like this:

    obj-$(CONFIG_$(SPL_)DM) += core/

When TPL is being built, SPL_ has the value 'SPL' which is generally a
good idea since they tend to follow each other. But in extreme situations
we may want to distinugish between SPL and TPL. For example we may not
want to enable CONFIG_DM with TPL.

Add a new SPL_TPL_ variable which is set to either empty (for U-Boot
proper), 'SPL' or 'TPL'. This may prove useful with TPL-specific options.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoboard_f: powerpc: Drop unused headers
Simon Glass [Fri, 31 Mar 2017 14:40:39 +0000 (08:40 -0600)]
board_f: powerpc: Drop unused headers

These includes don't seem to be needed now. Drop them. Reserve the
mp.h header for PowerPC for now.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoboard_f: Make relocation functions generic
Simon Glass [Fri, 31 Mar 2017 14:40:38 +0000 (08:40 -0600)]
board_f: Make relocation functions generic

This header file is used by three archs. It could be used by all of them
since relocation is a common function. Move it into a generic file.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoboard_f: Make init_helpers generic
Simon Glass [Fri, 31 Mar 2017 14:40:37 +0000 (08:40 -0600)]
board_f: Make init_helpers generic

This header file is used by two archs. It could be used by all of them
since it allows the cache to be on during relocation. Move it into a
generic file.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agopowerpc: Move setup_board_extra() into a PPC file
Simon Glass [Fri, 31 Mar 2017 14:40:36 +0000 (08:40 -0600)]
powerpc: Move setup_board_extra() into a PPC file

We don't need this PPC-specific function in generic code. Move it to
the powerpc directory.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
7 years agoboard_f: Move errno.h down to the bottom
Simon Glass [Fri, 31 Mar 2017 14:40:35 +0000 (08:40 -0600)]
board_f: Move errno.h down to the bottom

This is to keep the header file order consistent.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoboard_f: Drop unused headers
Simon Glass [Fri, 31 Mar 2017 14:40:34 +0000 (08:40 -0600)]
board_f: Drop unused headers

Drop headers which are not used or needed in this file. The compiler.h
header is included by common.h.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoMove dram_init_banksize() to a common header
Simon Glass [Fri, 31 Mar 2017 14:40:33 +0000 (08:40 -0600)]
Move dram_init_banksize() to a common header

This is an weak function present on all archs so we should have it in the
common header file. Remove it from arch-specific headers and add a
function comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoboard_f: Drop setup_dram_config() wrapper
Simon Glass [Fri, 31 Mar 2017 14:40:32 +0000 (08:40 -0600)]
board_f: Drop setup_dram_config() wrapper

By making dram_init_banksize() return an error code we can drop the
wrapper. Adjust this and clean up all implementations.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
7 years agoboard_f: Drop CONFIG_SPL_BUILD check
Simon Glass [Fri, 31 Mar 2017 14:40:31 +0000 (08:40 -0600)]
board_f: Drop CONFIG_SPL_BUILD check

This is never defined when building this file, so drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoboard_f: Put video memory reservation in one function
Simon Glass [Fri, 31 Mar 2017 14:40:30 +0000 (08:40 -0600)]
board_f: Put video memory reservation in one function

Move the ugly #ifdefs inside the reserve_video() function so we can
collect all this init into one place.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoboard_f: Move the extra #ifdef condition into reserve_mmu()
Simon Glass [Fri, 31 Mar 2017 14:40:29 +0000 (08:40 -0600)]
board_f: Move the extra #ifdef condition into reserve_mmu()

The arch-specific details of the cache being off are best handled inside
the reserve_mmu(). This cleans up the init sequence a little.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoboard_f: Use a single condition for reserve_logbuffer()
Simon Glass [Fri, 31 Mar 2017 14:40:28 +0000 (08:40 -0600)]
board_f: Use a single condition for reserve_logbuffer()

CONFIG_ALT_LB_ADDR is really a detail of how this logbuffer is allocated
rather than whether to do it at all. So move the #ifdef into the function.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoxtensa: Place relocated U-Boot in the normal place
Simon Glass [Fri, 31 Mar 2017 14:40:27 +0000 (08:40 -0600)]
xtensa: Place relocated U-Boot in the normal place

All archs put U-Boot at the bottom of the relocated region. Xtensa does
not, but perhaps not for any good reason. Adjust it to see if things
still work OK.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoboard_f: Drop return value from initdram()
Simon Glass [Fri, 31 Mar 2017 14:40:25 +0000 (08:40 -0600)]
board_f: Drop return value from initdram()

At present we cannot use this function as an init sequence call without a
wrapper, since it returns the RAM size. Adjust it to set the RAM size in
global_data instead, and return 0 on success.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
7 years agoboard_f: Drop board_type parameter from initdram()
Simon Glass [Fri, 31 Mar 2017 14:40:24 +0000 (08:40 -0600)]
board_f: Drop board_type parameter from initdram()

It looks like only cm5200 and tqm8xx use this feature, so we don't really
need it in generic code. Drop it and have the users access gd->board_type
directly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
7 years agoi2c: Drop CONFIG_SOFT_I2C_MULTI_BUS
Simon Glass [Tue, 28 Mar 2017 16:27:32 +0000 (10:27 -0600)]
i2c: Drop CONFIG_SOFT_I2C_MULTI_BUS

This is not used by any board. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Clean up board_f sequence a little
This series tries to remove #ifdefs from the board_f init sequence. It
gets as far as I2C and then we need to discuss whether we can start to
remove the old I2C framework.

I think that ideally each entry in the init sequence should be enabled by
at most one CONFIG, which is in Kconfig and is not arch-specific.
END
Acked-by: Lukasz Majewski <lukma@denx.de>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agoi2c: Drop unused i2c_soft...() functions
Simon Glass [Tue, 28 Mar 2017 16:27:31 +0000 (10:27 -0600)]
i2c: Drop unused i2c_soft...() functions

These are not used in U-Boot. Manual relocation fixup is used by blackfin
but that is being removed.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoboard_f: x86: Use checkcpu() for CPU init
Simon Glass [Tue, 28 Mar 2017 16:27:30 +0000 (10:27 -0600)]
board_f: x86: Use checkcpu() for CPU init

At present we misuse print_cpuinfo() do so CPU init on x86. This is done
because it is the next available call after the console is enabled. But
several arches use checkcpu() instead. Despite the horrible name (which
we can fix), it seems a better choice.

Adjust the various x86 CPU implementations to move their init code into
checkcpu() and use print_cpuinfo() only for printing CPU info.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
7 years agoboard_f: powerpc: Make prt_8260_rsr(), prt_8260_clks() private
Simon Glass [Tue, 28 Mar 2017 16:27:29 +0000 (10:27 -0600)]
board_f: powerpc: Make prt_8260_rsr(), prt_8260_clks() private

Move these two function calls into checkcpu(), which is called on this
arch immediately after these two.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
7 years agoboard_f: sandbox: Move sandbox_early_getopt_check() into misc_init_f()
Simon Glass [Tue, 28 Mar 2017 16:27:28 +0000 (10:27 -0600)]
board_f: sandbox: Move sandbox_early_getopt_check() into misc_init_f()

We don't need a special hook for sandbox as one of the later ones will do
just as well. We can print error messages about bad options after we
print the banner. In fact, it seems better.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>