platform/kernel/u-boot.git
9 years agotizen.h: env: checkboard: get partition numbers from variables accepted/tizen_3.0.2014.q3_common tizen_3.0.2014.q3_common accepted/tizen/common/20141006.142441 accepted/tizen/ivi/20141023.065941 submit/tizen/20141006.103610 submit/tizen_next/20141006.103319 tizen_3.0.2014.q3_common_release
Przemyslaw Marczak [Wed, 1 Oct 2014 14:34:58 +0000 (16:34 +0200)]
tizen.h: env: checkboard: get partition numbers from variables

Change-Id: I9296eadd6faf97d88cc611276e47c252d6e00417
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agoodroid: fix g2d sclk rate
Joonyoung Shim [Wed, 1 Oct 2014 12:27:35 +0000 (21:27 +0900)]
odroid: fix g2d sclk rate

G2D core should be provided 200MHz clock rate.

Change-Id: If06eb7d4433d302767f04e7c8b487cdcd32321a4
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
9 years agoexynos4-dt: get dfu system settings from environment
Przemyslaw Marczak [Tue, 30 Sep 2014 15:53:10 +0000 (17:53 +0200)]
exynos4-dt: get dfu system settings from environment

Change-Id: I7f6197e9197595121f2b90d577e3cb723262e3c9
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agotizen: add dfu system setting to default env
Przemyslaw Marczak [Tue, 30 Sep 2014 15:50:07 +0000 (17:50 +0200)]
tizen: add dfu system setting to default env

Change-Id: I80a5aa0389191b1caedff0d488dc61f0731d94d9
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agoodroid: clock: set aclk_cores to 200MHz
Przemyslaw Marczak [Tue, 23 Sep 2014 10:21:47 +0000 (12:21 +0200)]
odroid: clock: set aclk_cores to 200MHz

Change-Id: Ie9924d67a8dfc8fb65e6645611d727397d8e1c69
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agoexynos4-dt: clock: set aclk_cores to 200MHz
Przemyslaw Marczak [Tue, 23 Sep 2014 10:21:29 +0000 (12:21 +0200)]
exynos4-dt: clock: set aclk_cores to 200MHz

Change-Id: I2cb7a7f60b6153a44b3e34cb1d6a91ef38dc5afd
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agoRevert "odroid: set MPLL clock to 880MHz"
Przemyslaw Marczak [Wed, 1 Oct 2014 14:19:02 +0000 (16:19 +0200)]
Revert "odroid: set MPLL clock to 880MHz"

This reverts commit b09200639d4c052e2bdf0df6fe843b7a8bcf01cc.

9 years agotrats,trats2,odroid,tizen: add default dfu device environment
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
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
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
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_defconfig support
Przemyslaw Marczak [Thu, 31 Jul 2014 14:31:55 +0000 (16:31 +0200)]
packaging: u-boot.spec: add tizen_defconfig support

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

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_defconfig
Przemyslaw Marczak [Tue, 8 Jul 2014 11:48:16 +0000 (13:48 +0200)]
tizen: add tizen_defconfig

Change-Id: I52603d206b90616f1ea8dc4ff926c4f2541964da
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 agosamsung:misc: set_board_info: set a proper $partitions at boot
Przemyslaw Marczak [Tue, 23 Sep 2014 08:55:15 +0000 (10:55 +0200)]
samsung:misc: set_board_info: set a proper $partitions at boot

This change adds setting the environment variable: "partitions"
which is required to restore the partition table on the Trats2.

At this moment we are using MSDOS partition table on the Odroid
board, so for this board the above variable contains only a message.

Now the u-boot LCD menu in Trats2 is fully functional and the option:
(PWR+VOLUP) -> GPT restore - works well

Change-Id: I571466b7392a6775e0afe408c66be1dcc17d9ab8
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agosamsung:board: dram_init(): alloc memory to store fdt dram info
Przemyslaw Marczak [Thu, 18 Sep 2014 14:20:29 +0000 (16:20 +0200)]
samsung:board: dram_init(): alloc memory to store fdt dram info

For CONFIG_OF_MULTI the dram_init() function gets memory information
from the device tree blob by the call to fdtdec_decode_memory().
The same is done second time in dram_init_banksize() - this was the
simplest because board info structure is not initialized at dram_init()
stage.

This change uses malloc and gd->priv pointer to store the memory banks
parameters and next uses it in dram_init_banksize().

Thanks to this change, the boot time decreases, because, the function
fdtdec_decode_memory() is called only once.

Change-Id: I8f357c6a641d4440f32d2fe24d7e1e2dc5bc4a3d
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agosamsung:board: check board type before init exynos fb
Przemyslaw Marczak [Thu, 18 Sep 2014 11:17:57 +0000 (13:17 +0200)]
samsung:board: check board type before init exynos fb

For CONFIG_OF_MULTI some boards doesn't use frame buffer,
so the board type is now checked before the fb configuration.

Change-Id: Ide9ba4893b89ccc84ea84482324dd39ed8fbd48c
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agosamsung:board: don't call set_board_type() for CONFIG_OF_MULTI
Przemyslaw Marczak [Thu, 18 Sep 2014 11:02:19 +0000 (13:02 +0200)]
samsung:board: don't call set_board_type() for CONFIG_OF_MULTI

For this config the set_board_type() is called much more earlier
- in the function setup_fdt(), so the second call in the board file
is unneeded.

Change-Id: I71037c593d00f7bde95a0880787e64d0d09ff173
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agou-boot:global data: add new field 'void *priv' for CONFIG_OF_MULTI
Przemyslaw Marczak [Thu, 18 Sep 2014 14:15:13 +0000 (16:15 +0200)]
u-boot:global data: add new field 'void *priv' for CONFIG_OF_MULTI

This field is required for storing detected platform info
before the relocation or "bd_t" initialization.

Change-Id: Idbe987252079e5bf863adbec4fd5fc5edc2d8829
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agothor: check board type before display for CONFIG_OF_MULTI.
Przemyslaw Marczak [Thu, 18 Sep 2014 13:27:59 +0000 (15:27 +0200)]
thor: check board type before display for CONFIG_OF_MULTI.

For multi platform binary, it is required to check
the board type because not every board supports display.

Change-Id: Ia4153d58f48846a0bec6e9dc90ea17d87d5da096
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 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 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 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 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 agoRevert "ARM: SPL: do not set gd again"
Tom Rini [Tue, 16 Sep 2014 15:08:46 +0000 (11:08 -0400)]
Revert "ARM: SPL: do not set gd again"

At the high level, the problem is that we set gd multiple times (and
still do, even after the commit we're reverting).  We set important
parts of gd to the copy which is not above stack but rather in the data
section.  For the release, we're going to revert this change and for the
next release we shall correct things to only, really, set gd once to an
appropriate location and ensure that comments about it are correct too.

This reverts commit f0c3a6c4ad09210d5d4aeafe87685ee75e5683d6.

Acked-by: Albert Aribaud <albert.u.boot@aribaud.net>
Signed-off-by: Tom Rini <trini@ti.com>
9 years agokconfig: armv8: move CONFIG_ARM64 to Kconfig
Masahiro Yamada [Sat, 13 Sep 2014 18:01:51 +0000 (03:01 +0900)]
kconfig: armv8: move CONFIG_ARM64 to Kconfig

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agovexpress64: kconfig: consolidate CONFIG_TARGET_VEXPRESS_AEMV8A_SEMI
Masahiro Yamada [Sat, 13 Sep 2014 18:01:50 +0000 (03:01 +0900)]
vexpress64: kconfig: consolidate CONFIG_TARGET_VEXPRESS_AEMV8A_SEMI

We do not have to distinguish CONFIG_TARGET_VEXPRESS_AEMV8A_SEMI
from CONFIG_TARGET_VEXPRESS_AEMV8A.  Rename the former to the latter.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Steve Rae <srae@broadcom.com>
Cc: David Feng <fenghua@phytium.com.cn>
9 years agonet: dns: fix for DNS queries sent to the wrong MAC address
Gerhard Sittig [Fri, 12 Sep 2014 06:48:15 +0000 (08:48 +0200)]
net: dns: fix for DNS queries sent to the wrong MAC address

When a DNS query is sent out, the ethernet packet can get directed to
the MAC address of a server that was communicated to before.  This is
wrong when the previously stored MAC address corresponds to a different
server's IP address, i.e. when the IP address of the previous and the
current communication are different.

The error can get reproduced by running a sequence of e.g. a TFTP
download and a DNS query, where the TFTP and DNS servers reside on
individual machines.

The fix is to clear the server's MAC address that might be left from a
previous operation, and to fetch the peer's MAC address in a new ARP
lookup, before the DNS query is sent.  This is the approach taken in
other network services, like 8e52533d1095 ("net: tftpsrv: Get correct
client MAC address").

Reported-by: Dirk Zimoch <dirk.zimoch@psi.ch>
Signed-off-by: Gerhard Sittig <gsi@denx.de>
9 years agokconfig: add sanity checks for SPL configuration
Masahiro Yamada [Wed, 10 Sep 2014 09:13:10 +0000 (18:13 +0900)]
kconfig: add sanity checks for SPL configuration

For the SPL configuration, "make <dir>/<target>" is used.
Here,
  <dir> is either "spl" or "tpl"
  <target> is one of "config", "menuconfig", "xconfig", etc.

This commit adds two checks:

[1] If <dir> is given an unsupported subimage, the configuration
    should error out like this:

  $ make qpl/menuconfig
  ***
  *** "make qpl/menuconfig" is not supported.
  ***

[2] Make sure that "CONFIG_SPL" is enabled in the ".config" before
    running "make spl/menuconfig.  Otherwise, the SPL image
    is not built at all.  Having "spl/.config" makes no sense.
    In such a case, the configuration should exit with a message:

  $ make spl/menuconfig
  ***
  *** Create ".config" with "CONFIG_SPL" enabled
  *** before "make spl/menuconfig".
  ***

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Suggested-by: Simon Glass <sjg@chromium.org>
9 years agonet: usb: Add SMSC copyright to smsc95xx driver
Simon Glass [Mon, 8 Sep 2014 19:44:14 +0000 (13:44 -0600)]
net: usb: Add SMSC copyright to smsc95xx driver

This driver was upstreamed without an SMSC copyright, even thought it seems
that SMSC was the original author.

See the kernel version for a code comparison:

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2f7ca802bdae2ca41022618391c70c2876d92190

It's not clear who actually moved this code, or whether the kernel was the
original source, or somewhere else, but it probably should still have the
SMSC copyright.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agomtdcore: Fix a build error with CONFIG_CMD_MTDPARTS_SPREAD
maxin.john@enea.com [Mon, 8 Sep 2014 17:04:16 +0000 (19:04 +0200)]
mtdcore: Fix a build error with CONFIG_CMD_MTDPARTS_SPREAD

This patch fixes the build error for CONFIG_CMD_MTDPARTS_SPREAD

Signed-off-by: Maxin B. John <maxin.john@enea.com>
9 years agomtd: nand: davinci_nand: update write_page function for keystone RBL
Khoronzhuk, Ivan [Sat, 6 Sep 2014 19:17:07 +0000 (22:17 +0300)]
mtd: nand: davinci_nand: update write_page function for keystone RBL

After mtd was synced with Linux 3.14
(ff94bc40af3481d47546595ba73c136de6af6929)
the number of parameters for write_page function of nand_chip was
changed. The additional two var were needed for subpage write.
As keystone has no supbage write they are not needed. So correct
only function definition by upgrading it's parameter list.
That helps to get ritd of compilation warning.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
9 years agogeneric_board: do not set gd->fdt_blob unless CONFIG_OF_CONTROL=y
Masahiro Yamada [Sat, 6 Sep 2014 14:39:00 +0000 (23:39 +0900)]
generic_board: do not set gd->fdt_blob unless CONFIG_OF_CONTROL=y

gd->fdt_blob is used for FDT control of U-Boot.
If CONFIG_OF_CONTROL is not defined, it is useless.

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 agokbuild: standalone: simplify clean-files
Masahiro Yamada [Thu, 4 Sep 2014 16:56:52 +0000 (01:56 +0900)]
kbuild: standalone: simplify clean-files

Files added $(extra-) are removed by "make clean".
Besides, wildcard "*.srec *.bin" is simpler.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoscripts/Makefile.clean: clean also $(extra-m) and $(extra-)
Masahiro Yamada [Thu, 4 Sep 2014 16:56:51 +0000 (01:56 +0900)]
scripts/Makefile.clean: clean also $(extra-m) and $(extra-)

This commit is a backport from Linux Kernel,
commit 9d5db8949f1ecf4019785b04d8986835d3c0e99e,
written by me.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agokconfig: show an error message when defconfig is not found
Masahiro Yamada [Thu, 4 Sep 2014 13:16:15 +0000 (22:16 +0900)]
kconfig: show an error message when defconfig is not found

When a non-existing defconfig is specified,
display an easy-to-understand message
(fake the error message on Linux Kernel):

  $ make foo_defconfig
  ***
  *** Can't find default configuration "confis/foo_defconfig"!
  ***

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
9 years agocommon: fix include guards for CONFIG_MP
Gabriel Huau [Wed, 3 Sep 2014 20:57:54 +0000 (13:57 -0700)]
common: fix include guards for CONFIG_MP

This was breaking the build for some boards:
MPC8536DS MPC8536DS_36BIT MPC8536DS_SDCARD MPC8536DS_SPIFLASH qemu-ppce500

Include only these features for some PPC boards if the configuration for MultiProcessor
is enabled.

Signed-off-by: Gabriel Huau <contact@huau-gabriel.fr>
Cc: Tom Rini <trini@ti.com>
Cc: York Sun <yorksun@freescale.com>
Acked-by: York Sun <yorksun@freescale.com>
9 years agokconfig: fix a bug of "make config"
Masahiro Yamada [Wed, 3 Sep 2014 20:41:34 +0000 (05:41 +0900)]
kconfig: fix a bug of "make config"

Since 3ff291f371fa9858426774f3732924bacb61ed1c
(kconfig: convert Kconfig helper script into a shell script),
"make config" is not working because of a missing '$' before '(Q)'.

Besides, "make config" should be invoked via scripts/multiconfig.sh
to avoid a warning message:
Kconfig:11:warning: environment variable KCONFIG_OBJDIR undefined

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agokconfig: fix savedefconfig to handle TPL correctly
Masahiro Yamada [Wed, 3 Sep 2014 20:41:33 +0000 (05:41 +0900)]
kconfig: fix savedefconfig to handle TPL correctly

Since 3ff291f371fa9858426774f3732924bacb61ed1c
(kconfig: convert Kconfig helper script into a shell script),
"make savedefconfig" of TPL boards has not been working.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.o.rg
Acked-by: Simon Glass <sjg@chromium.org>
9 years agokconfig: fix whitespace handling bug of savedefconfig
Masahiro Yamada [Wed, 3 Sep 2014 20:41:32 +0000 (05:41 +0900)]
kconfig: fix whitespace handling bug of savedefconfig

Commit 3ff291f371fa9858426774f3732924bacb61ed1c
(kconfig: convert Kconfig helper script into a shell script)
introduced another regression.

Shell usually handles whitespaces as separators,
so "make saveconfig" outputs

  # CONFIG_FOO is not set

into:

  #
  CONFIG_FOO
  is
  not
  set

Whitespaces should not be treated as separators here.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agokconfig: fix savedefconfig to output empty defconfig
Masahiro Yamada [Wed, 3 Sep 2014 20:41:31 +0000 (05:41 +0900)]
kconfig: fix savedefconfig to output empty defconfig

Commit 3ff291f371fa9858426774f3732924bacb61ed1c
(kconfig: convert Kconfig helper script into a shell script)
introduced a minor regression.

make alldefconfig; make savedefconfig
should create an empty 'defconfig'.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agostandalone: use GCC_VERSION defined in compiler-gcc.h
Masahiro Yamada [Wed, 3 Sep 2014 17:40:59 +0000 (02:40 +0900)]
standalone: use GCC_VERSION defined in compiler-gcc.h

Now GCC_VERSION is defined in include/linux/compiler-gcc.h
(with a little different definition).
Use it and delete the one in examples/standlone/stub.c.

This should work on Clang too because __GNUC__, __GNUC_MINOR__,
__GNUC_PATCHLEVEL__ are also defined on Clang.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Jeroen Hofstee <jeroen@myspectrum.nl>
9 years agocompiler*.h: sync include/linux/compiler*.h with Linux 3.16
Masahiro Yamada [Wed, 3 Sep 2014 17:40:58 +0000 (02:40 +0900)]
compiler*.h: sync include/linux/compiler*.h with Linux 3.16

Copy them from Linux v3.16 tag.
My main motivation of this commit is to add compiler-clang.h.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Jeroen Hofstee <jeroen@myspectrum.nl>
9 years agoimplement the Android sparse image format
Steve Rae [Wed, 3 Sep 2014 17:05:54 +0000 (10:05 -0700)]
implement the Android sparse image format

update to provide usable implementation to U-Boot

Signed-off-by: Steve Rae <srae@broadcom.com>
9 years agocleanup code which handles the Android sparse image format
Steve Rae [Wed, 3 Sep 2014 17:05:53 +0000 (10:05 -0700)]
cleanup code which handles the Android sparse image format

- port dprintf() to debug()
- update formatting

Signed-off-by: Steve Rae <srae@broadcom.com>
9 years agoupdate code which handles Android sparse image format
Steve Rae [Wed, 3 Sep 2014 17:05:52 +0000 (10:05 -0700)]
update code which handles Android sparse image format

- remove unnecessary functions

Signed-off-by: Steve Rae <srae@broadcom.com>
9 years agoadd code to handle Android sparse image format
Steve Rae [Wed, 3 Sep 2014 17:05:51 +0000 (10:05 -0700)]
add code to handle Android sparse image format

Add original file (pristine) from :
  https://www.codeaurora.org/cgit/quic/la/kernel/lk/plain/app/aboot/aboot.c?h=master
[3b5092d20bd15a7a2879c13e9f64acc48d04af2d]

Signed-off-by: Steve Rae <srae@broadcom.com>
9 years agocmd_mem: add static to internally used functions
Masahiro Yamada [Wed, 3 Sep 2014 15:38:26 +0000 (00:38 +0900)]
cmd_mem: add static to internally used functions

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agokgdb: Remove first_entry for kgdb
Peng Fan [Mon, 1 Sep 2014 13:48:07 +0000 (21:48 +0800)]
kgdb: Remove first_entry for kgdb

There are two ways to run into handle_exception, run command 'kgdb' and
encounter a breakpoint which triggers exception handling.

The origin source code only saves regs when first run command 'kgdb'.
Take the following for example, When run 'kgdb', regs is saved to entry_regs.
When run 'bootz', regs is not saved. However, if we set a breakpoint, then
continue. When breakpoint is reached, run `quit`, and Now return to the
instruction which follows kgdb, but not bootz.This may cause errors. So,
save regs for each handle_exception call to return to the correct place.
Example:
Target      |    Host
=>kgdb      |    (gdb)b bootz
            |    (gdb)c
=>bootz     |
            |    (gdb)Here stop because of breakpoint
            |    (gdb)q

Signed-off-by: Peng Fan <van.freenix@gmail.com>
9 years agotools/genboardscfg.py: improve performance more with Kconfiglib
Masahiro Yamada [Mon, 1 Sep 2014 10:57:38 +0000 (19:57 +0900)]
tools/genboardscfg.py: improve performance more with Kconfiglib

The idea of using Kconfiglib was given by Tom Rini.
It allows us to scan lots of defconfigs very quickly.
This commit also uses multiprocessing for further acceleration.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Suggested-by: Tom Rini <trini@ti.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agotools: Import Kconfiglib
Masahiro Yamada [Mon, 1 Sep 2014 10:57:37 +0000 (19:57 +0900)]
tools: Import Kconfiglib

Kconfiglib is the flexible Python Kconfig parser and library
created by Ulf Magnusson.
(https://github.com/ulfalizer/Kconfiglib)

This commit imports kconfiglib.py from
commit ce84c22e58fa59cb93679d4ead03c3cd1387965e,
with ISC SPDX-License-Identifier.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Cc: Ulf Magnusson <ulfalizer@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
9 years agoSPDX: Add ISC SPDX-License-Identifier
Masahiro Yamada [Mon, 1 Sep 2014 10:57:36 +0000 (19:57 +0900)]
SPDX: Add ISC SPDX-License-Identifier

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Wolfgang Denk <wd@denx.de>
9 years agokbuild: force to define __UBOOT__ in all the C sources
Masahiro Yamada [Sun, 31 Aug 2014 06:16:53 +0000 (15:16 +0900)]
kbuild: force to define __UBOOT__ in all the C sources

U-Boot has imported various source files from other projects,
mostly Linux.

Something like

  #ifdef __UBOOT__
    [ modification for U-Boot ]
  #else
    [ original code ]
  #endif

is an often used strategy for clarification of adjusted parts,
that is, easier re-sync in future.

Instead of defining __UBOOT__ in each source file,
passing it from the top Makefile would be easier.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
9 years agortl8169: Defer network packet processing
Thierry Reding [Thu, 28 Aug 2014 10:38:03 +0000 (12:38 +0200)]
rtl8169: Defer network packet processing

When network protocol errors occur (such as a file not being found on a
TFTP server), the processing done by the NetReceive() function will end
up calling the driver's .halt() implementation. However, after that the
device no longer has access to the memory buffers and will cause errors
such as this in the rtl_recv() function when trying to hand descriptors
back to the device:

pci_hose_bus_to_phys: invalid physical address

This can be fixed by deferring processing of network packets until the
descriptors have been handed back. That way rtl_halt() tearing down
network buffers is not going to prevent access to the buffers.

Reported-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agoopenrisc: Fix a few type cast related warnings
Vasili Galka [Tue, 26 Aug 2014 10:46:17 +0000 (13:46 +0300)]
openrisc: Fix a few type cast related warnings

Use size_t type for positive offsets instead of the loff_t type. The
later is defined as long long, which is larger than the pointer type
on OpenRISC architecture and therefore the following warning was
generated:

"warning: cast to pointer from integer of different size"

Signed-off-by: Vasili Galka <vvv444@gmail.com>
9 years agoFix a few printf argument verification warnings
Vasili Galka [Tue, 26 Aug 2014 10:45:48 +0000 (13:45 +0300)]
Fix a few printf argument verification warnings

The parameters of size_t type shall be formatted using "%zu" and not
using "%d".

Precision argument for the "%.*s" parameters shall be of int type.

Signed-off-by: Vasili Galka <vvv444@gmail.com>
9 years agocosmetic: README.scrapyard: add NIOS2 boards
Masahiro Yamada [Mon, 25 Aug 2014 01:37:49 +0000 (10:37 +0900)]
cosmetic: README.scrapyard: add NIOS2 boards

Commit 70fbc461 removed obsolete PCI5441 and PK1C20 boards.
This commit adds them to README.scrapyard and also fills
some commit IDs and dates for removed boards.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Thomas Chou <thomas@wytron.com.tw>
9 years agokconfig: remove redundant "string" type in arch and board Kconfigs
Masahiro Yamada [Sat, 13 Sep 2014 18:01:49 +0000 (03:01 +0900)]
kconfig: remove redundant "string" type in arch and board Kconfigs

Now the types of CONFIG_SYS_{ARCH, CPU, SOC, VENDOR, BOARD, CONFIG_NAME}
are specified in arch/Kconfig.

We can delete the ones in arch and board Kconfig files.

This commit can be easily reproduced by the following command:

find . -name Kconfig -a ! -path ./arch/Kconfig | xargs sed -i -e '
/config[[:space:]]SYS_\(ARCH\|CPU\|SOC\|\VENDOR\|BOARD\|CONFIG_NAME\)/ {
    N
    s/\n[[:space:]]*string//
}
'

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agokconfig: add CONFIG_SYS_{ARCH, CPU, ...} type def to arch/Kconfig
Masahiro Yamada [Sat, 13 Sep 2014 18:01:48 +0000 (03:01 +0900)]
kconfig: add CONFIG_SYS_{ARCH, CPU, ...} type def to arch/Kconfig

This commit adds the type definitions (+ help messages) of
CONFIG_SYS_{ARCH, CPU, SOC, VENDOR, BOARD, CONFIG_NAME} to arch/Kconfig,
which would save lots of type defs for taget boards.
(See also the next commit.)

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-dm
Tom Rini [Sat, 13 Sep 2014 20:32:52 +0000 (16:32 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-dm

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Fri, 12 Sep 2014 15:27:46 +0000 (11:27 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

9 years agoarm: Fix _start for CONFIG_SYS_DV_NOR_BOOT_CFG
Benoît Thébaudeau [Wed, 3 Sep 2014 21:32:34 +0000 (23:32 +0200)]
arm: Fix _start for CONFIG_SYS_DV_NOR_BOOT_CFG

The boards using CONFIG_SYS_DV_NOR_BOOT_CFG (i.e. calimain,
da850evm_direct_nor and enbw_cmc) had the _start symbol defined after
the CONFIG_SYS_DV_NOR_BOOT_CFG word rather than before it in
arch/arm/lib/vectors.S. Because of that, if by lack of luck
'gd->mon_len = (ulong)&__bss_end - (ulong)_start' (see setup_mon_len())
was a multiple of 4 kiB (see reserve_uboot()), then the last BSS word
overlapped the first word of the following reserved RAM area (or went
beyond the top of RAM without such an area) after relocation because
__image_copy_start did not match _start (see relocate_code()).

This was broken by commit 41623c9 'arm: move exception handling out of
start.S files', which defined _start twice (before and after the
CONFIG_SYS_DV_NOR_BOOT_CFG word), then by commit 0a26e1d 'arm: fix a
double-definition error of _start symbol', which kept the definition of
the _start symbol after the CONFIG_SYS_DV_NOR_BOOT_CFG word. This new
commit fixes this issue by restoring the original behavior, i.e. by
defining the _start symbol before the CONFIG_SYS_DV_NOR_BOOT_CFG word.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Manfred Rudigier <manfred.rudigier@omicron.at>
Cc: Christian Riesch <christian.riesch@omicron.at>
Cc: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Cc: Heiko Schocher <hs@denx.de>
9 years agoarm: Make reset position-independent
Benoît Thébaudeau [Wed, 3 Sep 2014 21:32:33 +0000 (23:32 +0200)]
arm: Make reset position-independent

Some boards, like mx31pdk and tx25, require the beginning of the SPL
code to be position-independent. For these two boards, this is because
they use the i.MX external NAND boot, which starts by executing the
first NAND Flash page from the NFC page buffer. The SPL then needs to
copy itself to its actual link address in order to free the NFC page
buffer and use it to load the non-SPL image from Flash before running
it. This means that the SPL runtime address differs from its link
address between the reset and the initial copy performed by
board_init_f(), so this part of the SPL binary must be
position-independent.

This requirement was broken by commit 41623c9 'arm: move exception
handling out of start.S files', which used an absolute address to branch
to the reset routine. This new commit restores the original behavior,
which just performed a relative branch. This fixes the boot of mx31pdk
and tx25.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
Reported-by: Helmut Raiger <helmut.raiger@hale.at>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Magnus Lilja <lilja.magnus@gmail.com>
Cc: John Rigby <jcrigby@gmail.com>
Tested-by: Magnus Lilja <lilja.magnus@gmail.com>
9 years agoREADME.clang: build command with clang
Jeroen Hofstee [Wed, 10 Sep 2014 18:08:52 +0000 (20:08 +0200)]
README.clang: build command with clang

Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>