platform/kernel/u-boot.git
9 years agotrats,trats2,odroid,tizen: add default dfu device environment 54/25654/1 accepted/tizen/common/20140811.164624 submit/tizen/20140811.130757
Przemyslaw Marczak [Wed, 11 Jun 2014 10:04:11 +0000 (12:04 +0200)]
trats,trats2,odroid,tizen: add default dfu device environment

This change allows using DFU and THOR commands without
passing command line arguments.

Change-Id: I4fecafa6cf20fcd76fa6c3526a9f297f71f20fae
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agothor:cmd: get the default command arguments from environment 53/25653/1
Przemyslaw Marczak [Thu, 12 Jun 2014 08:20:59 +0000 (10:20 +0200)]
thor:cmd: get the default command arguments from environment

This change adds support to getting the default DFU cmd line
arguments from the environment.

DFU and THOR uses the same command line arguments,
so the DFU command environment setup can be used also with THOR.

Change-Id: I2e0984c909147c13191f6d6646d094c9f02c392a
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agodfu:cmd: get the default command arguments from environment 52/25652/1
Przemyslaw Marczak [Thu, 7 Aug 2014 11:03:25 +0000 (13:03 +0200)]
dfu:cmd: get the default command arguments from environment

This change adds support to store the default DFU cmd line
arguments in the environment.

This is useful for users who usually use the same arguments
for dfu command and do the upgrade frequently.

DFU command use cases:
- dfu <usb ctrl> <if> <dev> [<list>] - use command line args
- dfu [<list>] - take the default command line args from env
And for both - optional list the initialized DFU entities.

To use the default dfu device configuration user should define:
- $dfu_usb_con - e.g. "0"
- $dfu_interface - e.g. "mmc"
- $dfu_device - e.g. "0"

Change-Id: I1c87677c0384a5f5a808ab9b7845d6da6f9ec980
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agodfu: mmc: support to get partition information by name accepted/tizen/common/20140807.102412 submit/tizen/20140807.020216
Joonyoung Shim [Wed, 6 Aug 2014 02:48:30 +0000 (11:48 +0900)]
dfu: mmc: support to get partition information by name

The partitions can have partition name like label. If partition name is
exist, first get partition information by name than by partition number,
so we can ignore hardcoding dependency of partition number.

Change-Id: Ibfb2521438ce366959814c2a87085e9f384de588
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
9 years agopackaging: change version to 2014.07
Chanho Park [Mon, 4 Aug 2014 11:45:07 +0000 (20:45 +0900)]
packaging: change version to 2014.07

Change-Id: Ie0bbfb1db426e83f1caa8f3a04a176e9f20e3bde
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
9 years agopackaging: u-boot.spec: add tizen_config support
Przemyslaw Marczak [Thu, 31 Jul 2014 14:31:55 +0000 (16:31 +0200)]
packaging: u-boot.spec: add tizen_config support

Change-Id: Ia1d4404449d8f8324d815bce3a1575b235315f03
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agotool:mkimage_signed: add tizen_config support
Przemyslaw Marczak [Thu, 31 Jul 2014 14:26:45 +0000 (16:26 +0200)]
tool:mkimage_signed: add tizen_config support

Change-Id: Ib5a29c8366a68e96ebe35db7878ef587e7471b06
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agotools:mkimage_multidtb: cat multi-plat bin with multiple dtbs
Przemyslaw Marczak [Thu, 31 Jul 2014 14:28:17 +0000 (16:28 +0200)]
tools:mkimage_multidtb: cat multi-plat bin with multiple dtbs

This script concatenates proper dtb files into
one multi.dtb with 4B padding after the u-boot-multi.bin.

Output: u-boot-mmc.bin:
| u-boot-multi.bin  | dtb 1 (4B padding) | dtb 2 (4b padding) | dtb x ...

Change-Id: I9b308fc58707917b89c3f59e65b414d02f5e8efb
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agotizen: add tizen_config
Przemyslaw Marczak [Tue, 8 Jul 2014 11:48:16 +0000 (13:48 +0200)]
tizen: add tizen_config

Change-Id: I4e8449788694af32a3c8df3f727a4c01e0a4915d
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agotizen: add Exynos4 common file
Przemyslaw Marczak [Tue, 8 Jul 2014 11:51:14 +0000 (13:51 +0200)]
tizen: add Exynos4 common file

Change-Id: Id637b89fa044a6b4bfc1eb05e887b4804a72d645
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agoexynos_fb.c: lcd_ctrl_init(): check board before init lcd
Przemyslaw Marczak [Tue, 29 Jul 2014 12:38:04 +0000 (14:38 +0200)]
exynos_fb.c: lcd_ctrl_init(): check board before init lcd

Change-Id: Ie8219913e8501fc2180d5d96f19844d3e08a6326
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agoexynos4-dt.h: enable generic file system commands
Przemyslaw Marczak [Tue, 29 Jul 2014 12:35:53 +0000 (14:35 +0200)]
exynos4-dt.h: enable generic file system commands

Change-Id: Ibfd834403381d18f27825a19807517ad06097146
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agosamsung:misc.h: add CONFIG_OF_MULTI functions declarations
Przemyslaw Marczak [Tue, 29 Jul 2014 12:34:58 +0000 (14:34 +0200)]
samsung:misc.h: add CONFIG_OF_MULTI functions declarations

Change-Id: Id2ffd28d380cfce69420418995fdb388c31e6b6c
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agosamsung:board: run lcd menu only on trats2 for CONFIG_OF_MULTI
Przemyslaw Marczak [Tue, 29 Jul 2014 12:32:03 +0000 (14:32 +0200)]
samsung:board: run lcd menu only on trats2 for CONFIG_OF_MULTI

Change-Id: I02baeb60125f695e30c138b7311910731f5d9f40
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agosamsung:board: init dram info based on memory node in fdt
Przemyslaw Marczak [Mon, 28 Jul 2014 18:18:54 +0000 (20:18 +0200)]
samsung:board: init dram info based on memory node in fdt

Change-Id: I3677f0ab0b4aed264de8af37e87b081f66a36b97
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agosamsung:board:board_init: use CONFIG_SYS_SDRAM_BASE
Przemyslaw Marczak [Mon, 28 Jul 2014 15:43:23 +0000 (17:43 +0200)]
samsung:board:board_init: use CONFIG_SYS_SDRAM_BASE

Change-Id: I0e974580f4fa725f9a9e824591be57cb573a02b8
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agosamsung:misc: add call to get_board_name() for CONFIG_OF_MULTI
Przemyslaw Marczak [Wed, 30 Jul 2014 12:17:54 +0000 (14:17 +0200)]
samsung:misc: add call to get_board_name() for CONFIG_OF_MULTI

Change-Id: I236f5d23122f02ef759d7e79354a9af788627968
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agofdtdec: add function: fdtdec_decode_memory()
Przemyslaw Marczak [Mon, 28 Jul 2014 09:16:47 +0000 (11:16 +0200)]
fdtdec: add function: fdtdec_decode_memory()

This function can be used for decode memory node from device tree file.
Currently supports decoding of a single memory node with a multiple ranges
specified by the reg property with size of address and size cells specified
in a root node.

Function parameters:
- blob: ptr to device tree
- start: ptr to banks start address array
- size: ptr to banks size array
- max_banks: max number of banks to fill

Two of args: start or size can be NULL e.g. if only each bank size is needed.

Sample use case:
memory {
device_type = "memory";
reg = <0x40000000 ... 0x10000000 ...
       0x50000000 ... 0x10000000 ...
       ...        ... ...        ...>;
      };

Change-Id: I2f3defb89cf62d81377fb7882dbbae79b4472af2
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agofdt_support: remove type static in fdt_read_prop()
Przemyslaw Marczak [Mon, 28 Jul 2014 09:00:34 +0000 (11:00 +0200)]
fdt_support: remove type static in fdt_read_prop()

Change-Id: Iaff9eff27dba6fc6f13d031a96f310361648acfd
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agoarch:arm:dts: odroid/trats2: add memory device type
Przemyslaw Marczak [Wed, 23 Jul 2014 09:41:41 +0000 (11:41 +0200)]
arch:arm:dts: odroid/trats2: add memory device type

Change-Id: I80c42c8c390ccba1e748671b7f85d5b71371bbe9
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agocommon:board_f:setup_fdt: set fdt addr by get_board_fdt() for CONFIG_OF_MULTI
Przemyslaw Marczak [Tue, 8 Jul 2014 10:47:25 +0000 (12:47 +0200)]
common:board_f:setup_fdt: set fdt addr by get_board_fdt() for CONFIG_OF_MULTI

Change-Id: I47039ce703c6bd8be18dc932ca67936f1ca5946b
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agoodroid: add odroid_config
Przemyslaw Marczak [Mon, 9 Jun 2014 18:14:41 +0000 (20:14 +0200)]
odroid: add odroid_config

This config is valid for two devices:
- Odroid X2,
- Odroid U3.

Change-Id: I5387de3e83dc9c5783a78df5da996ad53c5e6de5
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Tom Rini <trini@ti.com>
---
Changes v2:
- odroid config: add CONFIG_DFU_ALT_BOOTLOADER
- odroid config: change name of CONFIG_DFU_BOOT_ALT_* to CONFIG_DFU_ALT_BOOT_*

Changes v3:
- odroid.h: update CONFIG_DFU_ALT_BOOT_** with required bootloader binaries
- odroid.h: add multi image support (CONFIG_FIT)
- odroid.h: add "autoboot" script for multi boot options
- odroid.h: change env name: dfu_alt_info -> dfu_alt_system
- odroid.h: update config name: CONFIG_SET_DFU_ALT_INFO
- odroid.h: reduce boot delay to 0 seconds
- update: doc/README.odroid

Changes v5:
- odroid.h: default environment cleanup
- odroid.h: remove unused definitions
- odroid.h: dfu_alt_system update
- odroid.h: define CONFIG_SET_DFU_ALT_BUF_LEN to 1k
- odroid.h: add init ramdisk support
- update: doc/README.odroid

Changes v6:
- odroid.h: fix ramdisk load issue

9 years agoodroid: add odroid U3/X2 device tree description
Przemyslaw Marczak [Tue, 27 May 2014 08:36:47 +0000 (10:36 +0200)]
odroid: add odroid U3/X2 device tree description

This is a standard description for Odroid boards.

Change-Id: Ia839377f14f95f3bb85ca8e2112bab0005b491ed
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Tom Rini <trini@ti.com>
9 years agoodroid: add board file for Odroid X2/U3 based on Samsung Exynos4412
Przemyslaw Marczak [Tue, 20 May 2014 11:01:46 +0000 (13:01 +0200)]
odroid: add board file for Odroid X2/U3 based on Samsung Exynos4412

This board file supports standard features of Odroid X2 and U3 boards:
- Exynos4412 core clock set to 1000MHz and MPLL peripherial clock set to 800MHz,
- MAX77686 power regulator,
- USB PHY,
- enable XCL205 - power for board peripherials
- check board type: U3 or X2.
- enable Odroid U3 FAN cooler

Change-Id: I002ad448bae4439905e7e53116726224c45b7d68
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Tom Rini <trini@ti.com>
---
Changes v2:
- enable fan on odroid U3

Changes v3:
- odroid.c: clean up board name related code
- odroid.c: remove static from set_board_type()
- odroid.c: add implementation of functions: get_dfu_alt_*
- odroid.c: include misc.h

Changes v4:
- odroid.c: dfu_get_alt_boot: add call get_boot_mode()

Changes v5:
- odroid.c: set_board_type: change mdelay to sdelay, define XCL205 GPIO config
- odroid.c: board_gpio_init(): fix OTG for Odroid U3+
- odroid.c: reserve the last 1 MB of dram for secure firmware
- odroid.c: board_clock_init(): code cleanup
- odroid.c: get_dfu_alt_boot(): remove setenv()
- odroid.c: remove get_board_name() function definition
- odroid.c: add enum ODROID_TYPES

9 years agosamsung: misc: use board specific functions to set env board info
Przemyslaw Marczak [Fri, 6 Jun 2014 10:40:27 +0000 (12:40 +0200)]
samsung: misc: use board specific functions to set env board info

This change adds setup of environmental board info using
get_board_name() and get_board_type() functions for config
CONFIG_BOARD_TYPES.

This is useful in case of running many boards with just one config.

Change-Id: I75bb4c0bccc7d27f9f4254b223000a4ff4dadd73
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Piotr Wilczek <p.wilczek@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
---
Changes v2:
- set_board_info: move the bdtype pointer to avoid unused pointer
  compilation warning

Changes v3:
- samsung: misc: change get_board_type_fdt() to get_board_type()
- samsung: misc: set env $boardname using get_board_* functions
  for CONFIG_BOARD_TYPES
- update commit msg

Changes v5:
- misc.c: set_bard_info(): remove a call to get_board_name()

9 years agosamsung: board: enable support of multiple board types
Przemyslaw Marczak [Fri, 6 Jun 2014 10:42:41 +0000 (12:42 +0200)]
samsung: board: enable support of multiple board types

This change adds declaration of functions:
- set_board_type() - called at board_early_init_f()
- get_board_type() - called at checkboard()

For supporting multiple board types in a one config - it is welcome
to display the current board model. This is what get_board_type()
should return.

Change-Id: I43d797e1fcad10674a0f83e7123cfee3381d5a82
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Piotr Wilczek <p.wilczek@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
---
Changes v3:
- change the commit order
- include/samsung/misc.h: add new functions declaration
- update a commit message

Changes v4:
- checkboard(): remove redundant variable

Changes v5:
- board.c: move call to set_board_type() into board_early_init_f()
- misc.h: remove get_board_name() function declaration

9 years agoarm:reset: call the reset_misc() before the cpu reset
Przemyslaw Marczak [Tue, 3 Jun 2014 12:05:45 +0000 (14:05 +0200)]
arm:reset: call the reset_misc() before the cpu reset

On an Odroid U3 board, the SOC is unable to reset the eMMC card
in the DWMMC mode by the cpu software reset. Manual reset of the card
by switching proper gpio pin - fixes this issue.

Such solution needs to add a call to pre reset function.
This is done by the reset_misc() function, which is called before reset_cpu().
The function reset_misc() is a weak function.

Change-Id: I16d619eafcc54b7b57c81e46b6bd49934d0ce943
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Changes v4:
- arch/arm/reset: fix weak function attribute to proper style

9 years agosamsung:board: misc_init_r: call set_dfu_alt_info()
Przemyslaw Marczak [Thu, 26 Jun 2014 08:32:03 +0000 (10:32 +0200)]
samsung:board: misc_init_r: call set_dfu_alt_info()

This change enable automatic setting of dfu alt info
on every boot. This is useful in case of booting one
u-boot binary from multiple media.

Change-Id: Id1bfd0a676ff8a4db5a514a25ddf15fc4680812c
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agosamsung: misc: add function for setting $dfu_alt_info
Przemyslaw Marczak [Mon, 9 Jun 2014 10:29:00 +0000 (12:29 +0200)]
samsung: misc: add function for setting $dfu_alt_info

This change introduces new common function:
- set_dfu_alt_info() - put dfu system and bootloader setting
                       into $dfu_alt_info.
functions declaration:
- char *get_dfu_alt_system(void)
- char *get_dfu_alt_boot(void)
- void set_dfu_alt_info(void)
and new config:
- CONFIG_SET_DFU_ALT_INFO

This function can be used for auto setting dfu configuration on boot.
Such feature is useful for multi board support by one u-boot binary.
Each board should define two functions:
- get_dfu_alt_system()
- get_dfu_alt_boot()

Change-Id: I21cb6b5a5f535dbb10b021c92637f1f4537ecd1b
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Piotr Wilczek <p.wilczek@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
---
Changes v2:
- change config names:
  CONFIG_SET_DFU_BOOT_ALT to CONFIG_DFU_ALT_BOOTLOADER and
  CONFIG_DFU_BOOT_ALT_* to CONFIG_DFU_ALT_BOOT_*
- change function name: set_dfu_boot_alt() to set_dfu_alt_boot()
- remove superfluous ifdefs

Changes v3:
- set $dfu_alt_info at every boot
- new config: CONFIG_SET_DFU_ALT_INFO
- update commit msg

Changes v4:
- set_dfu_alt_info(): add checking the pointer returned by malloc

Changes v5:
- set_dfu_alt_info(): remove malloc and declare cache aligned buffer
- set_dfu_alt_info(): introduce CONFIG_SET_DFU_ALT_BUF_LEN

9 years agoboard:samsung: check the boot device and init the right mmc driver.
Przemyslaw Marczak [Mon, 23 Jun 2014 11:13:40 +0000 (13:13 +0200)]
board:samsung: check the boot device and init the right mmc driver.

It is possible to boot device using a micro SD or eMMC slots.
In this situation, boot device should be registered as a block
device 0 in the MMC framework, because CONFIG_SYS_MMC_ENV_DEV
is usually set to "0" in the most config cases.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Change-Id: I39c654005138824c8acdfe4458f5f45294c902fe
---
Changes V3:
- separate two changes into two commits

Changes V4:
- board.c: add functions: init_mmc() and init_dwmmc()
- board_mmc_init(): call get_boot_mode()

Changes V5:
- none

Changes V6:
- update boot mode name

9 years agoarch:exynos: boot mode: add get_boot_mode(), code cleanup
Przemyslaw Marczak [Tue, 1 Jul 2014 11:30:54 +0000 (13:30 +0200)]
arch:exynos: boot mode: add get_boot_mode(), code cleanup

This patch introduces code clean-up for exynos boot mode check.
It includes:
- removal of typedef: boot_mode
- move the boot mode enum to arch-exynos/power.h
- add bootmode for sequence: eMMC 4.4 ch4 / SD ch2
- add new function: get_boot_mode() for OM[5:1] pin check
- update spl boot code

Change-Id: I08395daa57bb5df0c83a859202b7493de0c8242b
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Changes v5:
- exynos: boot mode: add missing bootmode (1st:EMMC 4.4 / 2nd:SD ch2)

Changes v6:
- none

changes v7:
- change boot mode name: BOOT_MODE_MMC to BOOT_MODE_SD

9 years agoexynos: pinmux: fix the gpio names for exynos4x12 mmc
Przemyslaw Marczak [Tue, 27 May 2014 13:26:14 +0000 (15:26 +0200)]
exynos: pinmux: fix the gpio names for exynos4x12 mmc

This change fixes the bad gpio configuration for the exynos dwmmc.

Change-Id: I1b2a64c83e0eaeea6d1d8ab38c59a83eec6eb1bd
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Beomho Seo <beomho.seo@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
9 years agosamsung: misc: fix soc revision setting in the set_board_info()
Przemyslaw Marczak [Fri, 6 Jun 2014 10:53:53 +0000 (12:53 +0200)]
samsung: misc: fix soc revision setting in the set_board_info()

The byte order of soc revision was inverted, now it is fixed.

Change-Id: I04cc62004d3a1696fa70d365cc787bf02a4cda49
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Piotr Wilczek <p.wilczek@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
9 years agof_thor: add missing ifdef for lcd menu
Przemyslaw Marczak [Fri, 13 Jun 2014 16:43:10 +0000 (18:43 +0200)]
f_thor: add missing ifdef for lcd menu

Change-Id: I13d0981ea07dcacdaef40aa0297db054694468ca
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agosamsung: misc: menu: new option: battery charge level
Przemyslaw Marczak [Mon, 7 Apr 2014 15:21:13 +0000 (17:21 +0200)]
samsung: misc: menu: new option: battery charge level

This change adds new option to lcd menu which allows
check battery state. In case if battery level is greater
than boot level threshold (20%), battery screen is not
displayed. So this menu option is useful in such situations.

Change-Id: I13e7e57516766fea787855b914d2884343cc33a5
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agotrats2: enable command battery of interactive charger
Przemyslaw Marczak [Tue, 25 Mar 2014 11:32:22 +0000 (12:32 +0100)]
trats2: enable command battery of interactive charger

This change adds two features on trats2 device:
- show battery charge level by displaying battery screen
- manually start interactive charger if needed

Usage:
command: "battery"
options: "state" or "charge"

Change-Id: Ie000edfc2fb6f2938ddf1e17611fdc5045169830
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agotrats2: add support to interactive charger
Przemyslaw Marczak [Mon, 24 Mar 2014 09:40:12 +0000 (10:40 +0100)]
trats2: add support to interactive charger

This commit adds support to interactive charger api which means an
implementation of listed functions:
- charger_enable()  - enable the charger.Charger can be enabled
      automatically if the device power on state
      is triggered by USB cable connection.

- charger_type()    - this function returns device type connected
      to usb port of device. For charger api matters
      only positive value.

- battery_present() - check if battery is connected (DETBAT pin)

- battery_state()   - check battery charge level. Returns percent value.

- low_power_mode()  - switch SOC into low power mode which covers:
      - disable cores: 1, 2, 3,
      - disable SOC unused power domains,
      - decrease CPU clock to 200 MHz

After low_power_mode() function call, device should be restarted,
which is implemented in interactive charger.

Change-Id: I7e664fab29c45c2d29dc57a2faa887d88530d8f3
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agosamsung: misc: new command: battery and config CONFIG_CMD_BATTERY
Przemyslaw Marczak [Tue, 25 Mar 2014 11:27:05 +0000 (12:27 +0100)]
samsung: misc: new command: battery and config CONFIG_CMD_BATTERY

This feature allows to enable interactive charger by command line
or use interactive charger for display battery charge level.

Usage:
- battery [<state>] [<charge>]

Option "state" will display battery screen for 2 seconds.
Option "charge" will start interactive charger mode.

Interactive charger mode can be stopped by:
- pressing CTRL+C keys combination,
or device reset by:
- pressing PWR key for 5 seconds (only if SOC > 20% - one grey bar),
- pressing PWR key for 10 seconds, which is PMIC reset.

Change-Id: I622830198f6cba4f0fa30798b02aa003c55332bb
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agosamsung: misc: new feature: common interactive charger
Przemyslaw Marczak [Fri, 21 Mar 2014 15:15:50 +0000 (16:15 +0100)]
samsung: misc: new feature: common interactive charger

This change adds common interactive charger feature with
display support.

New config: CONFIG_INTERACTIVE_CHARGER

New functions:
- battery() - which takes one of commands parameter:
    BOOT_CHECK: check battery present, low power mode;
check battery charge level, draw battery screen
    STATE:      display battery screen with current state of charge
this is for command line use
    CHARGE:     start interactive charger for every battery charge level
this is also for command line use

- interactive_charger() - loop function for charge the battery and do:
  - update of battery screen,
  - update charge animation,
  - check for exit condition (if charge level >= 20%)
  - clear screen after 10 seconds animation
  - draw battery on clean screen if any key pressed

There are few constants defined for this feature:
- CHARGE_TRESHOLD_BOOT:         20 (20 percent of charge)
- CHARGE_DISPLAY_TIMEOUT_SEC:   10 (time for animation display)
- CONNECT_CHARGER_TIMEOUT_SEC:  5 (time for connect charger animation)
- CHARGE_PWR_KEY_RESET_TIMEOUT: 3 (time for PWR key press to reset device)

Battery charge level cases:
 - 0-20 % - don't allow to boot and then:
    - enable charger if connected and start charge animation
      or if no charger:
    - display 5 sec charger animation and turn off the device

- > 20 %  - don't display battery screen and boot device

Charge mode can be break by keys VOLUP + VOLDOWN. If charge level > 20%
then device can be enabled by pressing PWR key for a time defined in
CHARGE_PWR_KEY_RESET_TIMEOUT.

Change-Id: I15066a4b86c89f1f0124b072a0aeb7246b29b279
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agolib: tizen: add battery interactive charger screens
Przemyslaw Marczak [Mon, 24 Mar 2014 14:26:10 +0000 (15:26 +0100)]
lib: tizen: add battery interactive charger screens

New images:
- battery frame: 200x380px, 16bpp,
  batery level area in frame: 170x300px
- battery bar: 160x50px, 16bpp, grey and red,
  (for 5 bars in battery frame with 8px interelement gap)
- charge screen; charge screen clean images: 128x120px, 16bpp
- charge screen indicator; vertical and horizontal
  indicator clean images: 8x8px, 16bpp

Library functions:

For battery screen:
- draw_battery_screen()   - draw empty battery frame
- draw_battery_state()    - fill battery frame with charge bars
                            to a given percent
For charge animation:
- draw_charge_screen()    - draw a small phone connected to a cable
                            (under the battery)
- clean_charge_screen()   - cleans above screen
- draw_charge_animation() - display an animation with
                            a point running on a cable
                            (on a charge screen)

For low battery state and no charger connected:
- draw_connect_charger_animation() - draw and clean charge
                                     screen respectively

Library is ready to use gzipped images
but this commit adds only bmp images.

Change-Id: I25a527b07b809b9105b6d4d8c29aa01e47224134
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agotrats2: add implementation of board_poweroff() and CONFIG_CMD_POWEROFF
Przemyslaw Marczak [Fri, 21 Mar 2014 10:48:54 +0000 (11:48 +0100)]
trats2: add implementation of board_poweroff() and CONFIG_CMD_POWEROFF

This change adds implementation of function board_poweroff() which
turns off the device off by setting PSHOLD gpio to low state which
is a power off signal for main PMIC.

Change-Id: Iae97fb81d7e7e243079ac18d03f4fd917c50b62e
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agoarch:arch:exynos: add exynos ps hold control output setting
Przemyslaw Marczak [Wed, 23 Apr 2014 12:57:19 +0000 (14:57 +0200)]
arch:arch:exynos: add exynos ps hold control output setting

Change-Id: I4ee074278c55198030aa5092f36e61e3c6efc487
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agoarch:arm:exynos: clock.h define clock registers setting macros
Przemyslaw Marczak [Wed, 9 Apr 2014 13:14:33 +0000 (15:14 +0200)]
arch:arm:exynos: clock.h define clock registers setting macros

Those macros are useful for easy setting clocks.

Change-Id: Ie167af1023fbbc8abb5dfbc6816b84721d2bcd0f
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agoarch:arm:exynos: power.h define exynos4x12 power subsystem structure
Przemyslaw Marczak [Wed, 26 Mar 2014 15:00:54 +0000 (16:00 +0100)]
arch:arm:exynos: power.h define exynos4x12 power subsystem structure

Change-Id: Icf6cb80529f3fb5511e440f572e0870359e6e37c
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agocommon: add command power off - to switch off the device by command
Przemyslaw Marczak [Mon, 9 Jun 2014 06:25:09 +0000 (08:25 +0200)]
common: add command power off - to switch off the device by command

This change introduces new config:
- CONFIG_CMD_POWEROFF - which enables common/cmd_poweroff.c

This requires implementation of function board_poweroff() which
is yet declared in include/common.h

Implementation of board_poweroff() should:
1.a. turn off the device
     or
1.b. print info to user about turn off ability
2.   never back to caller

Usage is simple: "power off"

Change-Id: Ia5fe73250e2ac29d0868b80bcd867bae2aa8d5be
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agopackaging: Adding .spec file for u-boot project
Chanho Park [Fri, 10 Jan 2014 01:48:52 +0000 (10:48 +0900)]
packaging: Adding .spec file for u-boot project

Change-Id: I5dd90f728a9f0f951afda5634f2509cbb3eccc95
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Jacek Pielaszkiewicz <j.pielaszkie@samsung.com>
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
9 years agotools: dtc: Add source to build the dtc compiler
Lukasz Majewski [Tue, 25 Mar 2014 16:33:34 +0000 (17:33 +0100)]
tools: dtc: Add source to build the dtc compiler

Newest u-boot (v2014.04) requires device tree compiler (DTC) version
at least 1.4.

Change-Id: Ie62778e3391cbf3b586221839cf53362c5f8cdff
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
9 years agotrats/trats2: enable bootloader signature
Inha Song [Fri, 21 Feb 2014 17:55:15 +0000 (18:55 +0100)]
trats/trats2: enable bootloader signature

Enable of this config will now require making binary signature.
From now, manually build sequence should looks like this:
 CROSS_COMPILE=...
 make mrproper
 make trats2_config
 make
 ./tools/mkimage_signed.sh u-boot-dtb.bin trats2_config

The output signed binary is: u-boot-mmc.bin

Change-Id: I9a2c86d2f24a050ff3738adb9dbd7d5914ff16d8
Signed-off-by: Inha Song <ideal.song@samsung.com>
9 years agoboard:samsung: add u-boot-mmc.bin sign check to thor
Inha Song [Mon, 28 Oct 2013 06:52:53 +0000 (15:52 +0900)]
board:samsung: add u-boot-mmc.bin sign check to thor

Changes:
- add call to check_board_signature() before do dfu_write in thor downlaoder

new files:
- board/samsung/common/sig_header.c
- include/samsung/sighdr.h

Signed-off-by: Inha Song <ideal.song@samsung.com>
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agotools: add script: mkimage_signed.sh for sign u-boot binary
Przemyslaw Marczak [Thu, 10 Apr 2014 13:03:40 +0000 (15:03 +0200)]
tools: add script: mkimage_signed.sh for sign u-boot binary

This script appends given binary image by signature header.
Script takes two arguments:
- @arg1: binary name
- @arg2: config name

Script usage:
./mkimage_signed.sh binary.img config_name
e.g.:
./mkimage_signed.sh u-boot-dtb.bin trats2_config

Sign header is stored on last 512 bytes of input binary.
Maximum imput binary size is 1MB - 512 Bytes = 1048064 Bytes.

The maximum size is limited by first bootloader (s-boot).
Now it is configured to load exactly 2048 blocks (1MB).
Current u-boot-dtb.bin size for trats2 is less than 600 KBytes,
so the size limit should not be an issue.

Change-Id: Ia7472be693df8d4135312971d963d27f2ea20f0f
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agolib: tizen: thor screen update
Przemyslaw Marczak [Wed, 2 Apr 2014 14:13:59 +0000 (16:13 +0200)]
lib: tizen: thor screen update

Now cable connection message is displayed on thor screen.
When cable is connected then only unneeded lcd console lines are overwritten.

Main changes:
- add new function: draw_thor_connected()
- update function draw_thor_screen()
- usb: gadget: thor:
  - move call to draw_thor_screen(),
  - add call to draw_thor_connected()

other change:
- remove draw_thor_init_screen() function

Change-Id: Ifc33f63eeb4822551fc78af1c6dd2a03044cab7e
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agocommon: lcd: extend lcd api by function lcd_get_position_cursor()
Przemyslaw Marczak [Wed, 2 Apr 2014 13:21:06 +0000 (15:21 +0200)]
common: lcd: extend lcd api by function lcd_get_position_cursor()

This commit change the name of function lcd_position_cursor()
to lcd_set_position_cursor() and adds its complementary function
lcd_get_position_cursor().
This change is useful e.g. when user wants overwrite some lines,
words or even just a letter on lcd console screen.

Other changes:
- update previous lcd_position_cursor() calls

Change-Id: I4a102c236f2d2d5c238e9790382e4b9454e3c361
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Vadim Bendebury <vbendeb@chromium.org>
Cc: Simon Glass <sjg@chromium.org>
9 years agousb: thor: add screen support
Inha Song [Fri, 11 Oct 2013 08:50:24 +0000 (17:50 +0900)]
usb: thor: add screen support

cmd_thordown.c:
- add libtizen header
- change error handling for thor init
- add call to draw_thor_fail_screen() on error

f_thor.c:
- thor_init(): return -EINTR on ctrl+c or if power key was pressed 3 times
- thor_rx_data(): return -EINTR when pressed ctrl+c on data receiving
- add display simple info screen before cable is not connected
- add display download screen when connection is established
- update download progress bar if data receiving

Change-Id: Ia89ef48c6c2faa5eda5dda5c5b3951e675eec03b
Signed-off-by: Inha Song <ideal.song@samsung.com>
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agosamsung: misc: check_keys(), key_pressed() - remove type static.
Przemyslaw Marczak [Mon, 10 Feb 2014 15:28:30 +0000 (16:28 +0100)]
samsung: misc: check_keys(), key_pressed() - remove type static.

This patch removes type "static" from those functions declaration.

Change-Id: I2244ca3568b73251401e5102f26cc113ea69c1a4
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agolibtizen: add download logo and download progress bar
Przemyslaw Marczak [Fri, 7 Feb 2014 14:03:41 +0000 (15:03 +0100)]
libtizen: add download logo and download progress bar

Added features:
- add screen with exit info if no cable is connected
- download logo with progress bar after after THOR init
- downlaod failure screen on error
- PIT version, U-boot version on download screen
- function for update progess bar when downloading is going on

Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Inha Song <ideal.song@samsung.com>
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agoTrats: Setup: CLK_GATE_BLOCK - enable all clocks
Przemyslaw Marczak [Wed, 26 Feb 2014 08:17:45 +0000 (09:17 +0100)]
Trats: Setup: CLK_GATE_BLOCK - enable all clocks

This change allows boot kernel 3.10 on trats

Change-Id: Ic7f1672d9300a32fed9fa6d8f6fc30f118326a83
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agovideo:lcd:s6e8ax0: increase screen gamma.
Hyungwon Hwang [Fri, 15 Nov 2013 07:10:42 +0000 (16:10 +0900)]
video:lcd:s6e8ax0: increase screen gamma.

Change gamma table to increase the brightness of s6e8ax0 panel.

Change-Id: I6b21022fb90bbb14160c0426a776d73c9590345b
Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
9 years agoTrats/Trats2: Update Tizen partitions layout
Przemyslaw Marczak [Fri, 21 Feb 2014 15:36:27 +0000 (16:36 +0100)]
Trats/Trats2: Update Tizen partitions layout

Change-Id: Ia229bdd6a04762e6c1b71509933d5d7723b9ebcb
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agoconfig: exynos4: Reduce bootdelay from 3 to 1 second
Lukasz Majewski [Mon, 9 Jun 2014 07:15:57 +0000 (09:15 +0200)]
config: exynos4: Reduce bootdelay from 3 to 1 second

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
9 years agoboards.cfg : Add maintainers entries for SOCFPGA
Dinh Nguyen [Thu, 24 Jul 2014 11:45:24 +0000 (06:45 -0500)]
boards.cfg : Add maintainers entries for SOCFPGA

Add back the maintainers entries for Altera's SOCFPGA platform.

Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
Signed-off-by: Chin Liang See <clsee@altera.com>
9 years agocosmetic: boards.cfg: fix some maintainers fields
Masahiro Yamada [Tue, 22 Jul 2014 03:58:30 +0000 (12:58 +0900)]
cosmetic: boards.cfg: fix some maintainers fields

Add a whitespace between the name and the email address.

When switching to Kconfig, the first version of MAINTAINERS files
will be generated based on the boards.cfg file.

So, the maintainers field should be corrected even if it is a really
minor fix.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agobuildman: make sure to invoke GNU Make
Masahiro Yamada [Tue, 22 Jul 2014 02:19:09 +0000 (11:19 +0900)]
buildman: make sure to invoke GNU Make

Since the command name 'make' may not be GNU Make on some platforms
such as FreeBSD, buildman should call scripts/show-gnu-make to get
the command name for GNU MAKE (and error out if it is not found).

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Jeroen Hofstee <jeroen@myspectrum.nl>
9 years agoMAKEALL: make sure to invoke GNU Make
Masahiro Yamada [Tue, 22 Jul 2014 02:19:08 +0000 (11:19 +0900)]
MAKEALL: make sure to invoke GNU Make

Since the command name 'make' may not be GNU Make on some platforms
such as FreeBSD, MAKEALL should call scripts/show-gnu-make to get
the command name for GNU MAKE (and error out if it is not found).

The GNU Make should be searched after parsing options because we want
to allow "MAKEALL -h" even if GNU Make is missing on the system.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoscripts: add scripts/show-gnu-make to get GNU Make command name
Masahiro Yamada [Tue, 22 Jul 2014 02:19:07 +0000 (11:19 +0900)]
scripts: add scripts/show-gnu-make to get GNU Make command name

U-Boot is expected to be built on various platforms.

We should keep in mind that the command 'make' is not always GNU Make,
while all the makefiles are written for GNU Make.

For example, on Linux, people generally do:

  make <board>_config; make

But FreeBSD folks do

  gmake <board>_config; gmake

(The command 'make' on FreeBSD is BSD Make, not GNU Make)

It is not a good idea to hard-code the command name 'make'
in MAKEALL or buildman.

They should call this helper script and get the command name
for GNU Make.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Tue, 29 Jul 2014 13:41:35 +0000 (09:41 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

9 years agoMerge git://www.denx.de/git/u-boot-ppc4xx
Tom Rini [Mon, 28 Jul 2014 21:48:48 +0000 (17:48 -0400)]
Merge git://www.denx.de/git/u-boot-ppc4xx

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Tom Rini [Mon, 28 Jul 2014 18:54:29 +0000 (14:54 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx

9 years agoARM: HYP/non-sec: remove MIDR check to validate CBAR
Marc Zyngier [Sat, 12 Jul 2014 13:24:08 +0000 (14:24 +0100)]
ARM: HYP/non-sec: remove MIDR check to validate CBAR

Having a form of whitelist to check if we know of a CPU core
and and obtain CBAR is a bit silly.

It doesn't scale (how about A12, A17, as well as other I don't know
about?), and is actually a property of the SoC, not the core.

So either it works and everybody is happy, or it doesn't and
the u-boot port to this SoC is providing the real address via
a configuration option.

The result of the above is that this code doesn't need to exist,
is thus forcefully removed.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: HYP/non-sec/PSCI: emit DT nodes
Marc Zyngier [Sat, 12 Jul 2014 13:24:07 +0000 (14:24 +0100)]
ARM: HYP/non-sec/PSCI: emit DT nodes

Generate the PSCI node in the device tree.

Also add a reserve section for the "secure" code that lives in
in normal RAM, so that the kernel knows it'd better not trip on
it.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: convert arch_fixup_memory_node to a generic FDT fixup function
Ma Haijun [Sat, 12 Jul 2014 13:24:06 +0000 (14:24 +0100)]
ARM: convert arch_fixup_memory_node to a generic FDT fixup function

Some architecture needs extra device tree setup. Instead of adding
yet another hook, convert arch_fixup_memory_node to be a generic
FDT fixup function.

[maz: collapsed 3 patches into one, rewrote commit message]

Signed-off-by: Ma Haijun <mahaijuns@gmail.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: HYP/non-sec: add the option for a second-stage monitor
Marc Zyngier [Sat, 12 Jul 2014 13:24:05 +0000 (14:24 +0100)]
ARM: HYP/non-sec: add the option for a second-stage monitor

Allow the switch to a second stage secure monitor just before
switching to non-secure.

This allows a resident piece of firmware to be active once the
kernel has been entered (the u-boot monitor is dead anyway,
its pages being reused).

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: HYP/non-sec: add generic ARMv7 PSCI code
Marc Zyngier [Sat, 12 Jul 2014 13:24:04 +0000 (14:24 +0100)]
ARM: HYP/non-sec: add generic ARMv7 PSCI code

Implement core support for PSCI. As this is generic code, it doesn't
implement anything really useful (all the functions are returning
Not Implemented).

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: HYP/non-sec: allow relocation to secure RAM
Marc Zyngier [Sat, 12 Jul 2014 13:24:03 +0000 (14:24 +0100)]
ARM: HYP/non-sec: allow relocation to secure RAM

The current non-sec switching code suffers from one major issue:
it cannot run in secure RAM, as a large part of u-boot still needs
to be run while we're switched to non-secure.

This patch reworks the whole HYP/non-secure strategy by:
- making sure the secure code is the *last* thing u-boot executes
  before entering the payload
- performing an exception return from secure mode directly into
  the payload
- allowing the code to be dynamically relocated to secure RAM
  before switching to non-secure.

This involves quite a bit of horrible code, specially as u-boot
relocation is quite primitive.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: HYP/non-sec: add separate section for secure code
Marc Zyngier [Sat, 12 Jul 2014 13:24:02 +0000 (14:24 +0100)]
ARM: HYP/non-sec: add separate section for secure code

In anticipation of refactoring the HYP/non-secure code to run
from secure RAM, add a new linker section that will contain that
code.

Nothing is using it just yet.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: add missing HYP mode constant
Marc Zyngier [Sat, 12 Jul 2014 13:24:01 +0000 (14:24 +0100)]
ARM: add missing HYP mode constant

In order to be able to use the various mode constants (far more
readable than random hex values), add the missing HYP and A
values.

Also update arm/lib/interrupts.c to display HYP instead of an
unknown value.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: non-sec: reset CNTVOFF to zero
Marc Zyngier [Sat, 12 Jul 2014 13:24:00 +0000 (14:24 +0100)]
ARM: non-sec: reset CNTVOFF to zero

Before switching to non-secure, make sure that CNTVOFF is set
to zero on all CPUs. Otherwise, kernel running in non-secure
without HYP enabled (hence using virtual timers) may observe
timers that are not synchronized, effectively seeing time
going backward...

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: HYP/non-sec: add a barrier after setting SCR.NS==1
Marc Zyngier [Sat, 12 Jul 2014 13:23:59 +0000 (14:23 +0100)]
ARM: HYP/non-sec: add a barrier after setting SCR.NS==1

A CP15 instruction execution can be reordered, requiring an
isb to be sure it is executed in program order.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: HYP/non-sec: move switch to non-sec to the last boot phase
Marc Zyngier [Sat, 12 Jul 2014 13:23:58 +0000 (14:23 +0100)]
ARM: HYP/non-sec: move switch to non-sec to the last boot phase

Having the switch to non-secure in the "prep" phase is causing
all kind of troubles, as that stage can be called multiple times.

Instead, move the switch to non-secure to the last possible phase,
when there is no turning back anymore.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoMerge branch 'u-boot-ti/master' into 'u-boot-arm/master'
Albert ARIBAUD [Mon, 28 Jul 2014 10:26:21 +0000 (12:26 +0200)]
Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'

9 years agoMerge branch 'u-boot-sh/rmobile' into 'u-boot-arm/master'
Albert ARIBAUD [Mon, 28 Jul 2014 08:54:54 +0000 (10:54 +0200)]
Merge branch 'u-boot-sh/rmobile' into 'u-boot-arm/master'

9 years agoMerge branch 'u-boot-sunxi/master' into 'u-boot-arm/master'
Albert ARIBAUD [Mon, 28 Jul 2014 08:12:45 +0000 (10:12 +0200)]
Merge branch 'u-boot-sunxi/master' into 'u-boot-arm/master'

9 years agopatman: make "No recipient" checking more tolerant
Masahiro Yamada [Fri, 18 Jul 2014 05:23:20 +0000 (14:23 +0900)]
patman: make "No recipient" checking more tolerant

If Series-to tag is missing, Patman exits with a message
"No recipient".

This is just annoying for those who had already added
sendemail.to configuration.

I guess many developers have

  [sendemail]
          to = u-boot@lists.denx.de

in their .git/config because the 'To: u-boot@lists.denx.de' field
should always be added when sending patches.

That seems more reasonable rather than adding
'Series-to: u-boot@lists.denx.de' to every patch series.

Patman should exit only when both Series-to tag and sendemail.to
configuration are mising.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agobuildman: Support in-tree builds
Simon Glass [Mon, 14 Jul 2014 23:51:03 +0000 (17:51 -0600)]
buildman: Support in-tree builds

At present buildman always builds out-of-tree, that is it uses a separate
output directory from the source directory. Normally this is what you want,
but it is important that in-tree builds work also. Some Makefile changes may
break this.

Add a -i option to tell buildman to use in-tree builds, so that it is easy
to test this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agobuildman: Add -C option to force a reconfigure for each commit
Simon Glass [Mon, 14 Jul 2014 23:51:02 +0000 (17:51 -0600)]
buildman: Add -C option to force a reconfigure for each commit

Normally buildman wil try to configure U-Boot for a particular board on the
first commit that it builds in a series. Subsequent commits are built
without reconfiguring which normally works. Where it doesn't, buildman
automatically reconfigures and retries.

To fully emulate the way MAKEALL works, we should have an option to disable
this optimisation.

Add a -C option to cause buildman to always reconfigure on each commit.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoMerge branch 'u-boot-microblaze/zynq' into 'u-boot-arm/master'
Albert ARIBAUD [Sat, 26 Jul 2014 12:08:36 +0000 (14:08 +0200)]
Merge branch 'u-boot-microblaze/zynq' into 'u-boot-arm/master'

9 years agoARM: omap: move board specific NAND configs out from ti_armv7_common.h
pekon gupta [Fri, 18 Jul 2014 12:29:42 +0000 (17:59 +0530)]
ARM: omap: move board specific NAND configs out from ti_armv7_common.h

This patch moves some board specific NAND configs:
- FROM: generic config file 'ti_armv7_common.h'
- TO:   individual board config files using these configs.
So that each board can independently set the value as per its design.

Following configs are affected in this patch:
  CONFIG_SYS_NAND_U_BOOT_OFFS: <refer doc/README.nand>
  CONFIG_CMD_SPL_NAND_OFS: <refer doc/README.falcon>
  CONFIG_SYS_NAND_SPL_KERNEL_OFFS: <refer doc/README.falcon>
  CONFIG_CMD_SPL_WRITE_SIZE: <refer doc/README.falcon>

This patch also updates documentation for few of above NAND configs.

Signed-off-by: Pekon Gupta <pekon@ti.com>
9 years agoARM: omap: clean redundant PISMO_xx macros used in OMAP3
pekon gupta [Fri, 18 Jul 2014 12:29:41 +0000 (17:59 +0530)]
ARM: omap: clean redundant PISMO_xx macros used in OMAP3

PISMO_xx macros were used to define 'Platform Independent Storage MOdule'
related GPMC configurations. This patch
- Replaces these OMAP3 specific macros with generic CONFIG_xx macros as provided
  by current u-boot infrastructure.
- Removes unused redundant macros, which are no longer required after
  merging of common platform code in following commit
      commit a0a37183bd75e74608bc78c8d0e2a34454f95a91
      ARM: omap: merge GPMC initialization code for all platform

+-----------------+-----------------------------------------------------------+
| Macro           | Reason for removal                                        |
+-----------------+-----------------------------------------------------------+
| PISMO1_NOR_BASE | duplicate of CONFIG_SYS_FLASH_BASE                        |
+-----------------+-----------------------------------------------------------+
| PISMO1_NAND_BASE| duplicate of CONFIG_SYS_NAND_BASE                         |
+-----------------+-----------------------------------------------------------+
| PISMO1_ONEN_BASE| duplicate of CONFIG_SYS_ONENAND_BASE                      |
+-----------------+-----------------------------------------------------------+
| PISMO1_NAND_SIZE| GPMC accesses NAND device via I/O mapped registers so     |
|                 | configuring GPMC chip-select for smallest allowable       |
|                 | segment (GPMC_SIZE_16M) is enough.                        |
+-----------------+-----------------------------------------------------------+
| PISMO1_ONEN_SIZE| OneNAND uses a fixed GPMC chip-select address-space of    |
|                 | 128MB (GPMC_SIZE_128M)                                    |
+-----------------+-----------------------------------------------------------+
+-----------------+-----------------------------------------------------------+
| PISMO1_NOR      |  Unused Macros                                            |
| PISMO1_NAND     |                                                           |
| PISMO2_CS0      |                                                           |
| PISMO2_CS1      |                                                           |
| PISMO1_ONENAND  |                                                           |
| PISMO2_NAND_CS0 |                                                           |
| PISMO2_NAND_CS1 |                                                           |
| PISMO1_NOR_BASE |                                                           |
| PISMO1_NAND_BASE|                                                           |
| PISMO2_CS0_BASE |                                                           |
+-----------------+-----------------------------------------------------------+

Signed-off-by: Pekon Gupta <pekon@ti.com>
9 years agoARM: omap: fix GPMC address-map size for NAND and NOR devices
pekon gupta [Fri, 18 Jul 2014 12:29:40 +0000 (17:59 +0530)]
ARM: omap: fix GPMC address-map size for NAND and NOR devices

Fixes commit a0a37183bd75e74608bc78c8d0e2a34454f95a91
    ARM: omap: merge GPMC initialization code for all platform

1) NAND device are not directly memory-mapped to CPU address-space, they are
 indirectly accessed via following GPMC registers:
 - GPMC_NAND_COMMAND_x
 - GPMC_NAND_ADDRESS_x
 - GPMC_NAND_DATA_x
 Therefore from CPU's point of view, NAND address-map can be limited to just
 above register addresses. But GPMC chip-select address-map can be configured
 in granularity of 16MB only.
 So this patch uses GPMC_SIZE_16M for all NAND devices.

2) NOR device are directly memory-mapped to CPU address-space, so its
 address-map size depends on actual addressable region in NOR FLASH device.
 So this patch uses CONFIG_SYS_FLASH_SIZE to derive GPMC chip-select address-map
 size configuration.

Signed-off-by: Pekon Gupta <pekon@ti.com>
9 years agoARM: OMAP: Fix handling of errata i727
Rajendra Nayak [Fri, 18 Jul 2014 05:48:48 +0000 (11:18 +0530)]
ARM: OMAP: Fix handling of errata i727

The errata is applicable on all OMAP4 (4430 and 4460/4470) and OMAP5
ES 1.0 devices. The current revision check erroneously implements this
on all DRA7 varients and with DRA722 device (which has only 1 EMIF instance)
infact causes an asynchronous abort and ends up masking it in CPSR,
only to be uncovered once the kernel switches to userspace.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Sricharan R <r.sricharan@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
9 years agoboard: k2e-evm: add board support
Hao Zhang [Tue, 15 Jul 2014 21:59:27 +0000 (00:59 +0300)]
board: k2e-evm: add board support

This patch adds Keystone2 k2e_evm evaluation board support.

Signed-off-by: Hao Zhang <hzhang@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
9 years agoARM: keystone2: spl: add K2E SoC support
Khoronzhuk, Ivan [Tue, 15 Jul 2014 21:59:26 +0000 (00:59 +0300)]
ARM: keystone2: spl: add K2E SoC support

Keystone2 K2E SoC has slightly different spl pll settings then
K2HK, so correct this.

Acked-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
9 years agokeystone2: use CONFIG_SOC_KEYSTONE in common places
Khoronzhuk, Ivan [Tue, 15 Jul 2014 21:59:25 +0000 (00:59 +0300)]
keystone2: use CONFIG_SOC_KEYSTONE in common places

Use CONFIG_SOC_KEYSTONE in common places instead of defining
a lot of "if def .. || if def " for different Keystone2 SoC types.

Acked-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
9 years agoARM: keystone2: add MSMC cache coherency support for K2E SOC
Hao Zhang [Tue, 15 Jul 2014 21:59:24 +0000 (00:59 +0300)]
ARM: keystone2: add MSMC cache coherency support for K2E SOC

This patch adds Keystone2 K2E SOC specific code to support
MSMC cache coherency. Also create header file for msmc to hold
its API.

Acked-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hao Zhang <hzhang@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
9 years agoARM: keystone2: clock: add K2E clock support
Hao Zhang [Tue, 15 Jul 2014 21:59:23 +0000 (00:59 +0300)]
ARM: keystone2: clock: add K2E clock support

This patch adds clock definitions and commands to support Keystone2
K2E SOC.

Signed-off-by: Hao Zhang <hzhang@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
9 years agoARM: keystone2: add K2E SoC hardware definitions
Hao Zhang [Tue, 15 Jul 2014 21:59:22 +0000 (00:59 +0300)]
ARM: keystone2: add K2E SoC hardware definitions

This patch adds hardware definitions specific to Keystone II
K2E device. It has a lot common definitions with k2hk SoC, so
move them to common hardware.h. This is preparation patch for
adding K2E SoC support.

Acked-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hao Zhang <hzhang@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
9 years agokeystone: ddr3: move K2HK DDR3 configuration to a common file
Hao Zhang [Wed, 9 Jul 2014 20:44:49 +0000 (23:44 +0300)]
keystone: ddr3: move K2HK DDR3 configuration to a common file

It's convenient to hold configurations for DDR3 PHY and EMIF in
separate common place. This patch moves K2HK DDR3 PHY and EMIF
configuration data with different rates and memory size to a common
ddr3_cfg.c file.

Acked-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hao Zhang <hzhang@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
9 years agoconfigs: k2hk_evm: config: add common EVM configuration header
Hao Zhang [Wed, 9 Jul 2014 20:44:48 +0000 (23:44 +0300)]
configs: k2hk_evm: config: add common EVM configuration header

This patch adds a common config header file for all the Keystone II
EVM platforms. It combines a lot of general definitions in one file.
The common header included in the EVM should be specific configuration
header.

Acked-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hao Zhang <hzhang@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
9 years agoARM: keystone: clock: move K2HK SoC dependent code in separate file
Khoronzhuk, Ivan [Wed, 9 Jul 2014 20:44:47 +0000 (23:44 +0300)]
ARM: keystone: clock: move K2HK SoC dependent code in separate file

This patch in general spit SoC type clock dependent code and general
clock code. Before adding keystone II Edison k2e SoC which has
slightly different dpll set, move k2hk dependent clock code to
separate clock-k2hk.c file.

Acked-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
9 years agoARM: keystone2: move K2HK board files to common KS2 board directory
Hao Zhang [Wed, 9 Jul 2014 20:44:46 +0000 (23:44 +0300)]
ARM: keystone2: move K2HK board files to common KS2 board directory

This patch moves K2HK board directory to a common Keystone II board
directory. The Board related common functions are moved to a common
keystone board file.

Acked-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hao Zhang <hzhang@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
9 years agokeystone2: add env option to do unitrd dt fixup
Murali Karicheri [Wed, 9 Jul 2014 20:44:45 +0000 (23:44 +0300)]
keystone2: add env option to do unitrd dt fixup

With latest v3.13 kernel, unitrd dt fixup is not needed. However for
older kernel versions such as v3.8/v3.10, it is needed. So to work
with both, add a u-boot env variable that can be set to do dt fixup
for older kernels.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>