platform/kernel/u-boot.git
7 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>
7 years agosamsung:board: init dram info based on memory node in fdt
Przemyslaw Marczak [Mon, 28 Jul 2014 15:43:23 +0000 (17:43 +0200)]
samsung:board: init dram info based on memory node in fdt

Change-Id: I3677f0ab0b4aed264de8af37e87b081f66a36b97
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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.

Changes for v2015.10-rc5:
- correct usage of removed typedef 'bmp_image_t'

Change-Id: I25a527b07b809b9105b6d4d8c29aa01e47224134
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
7 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>
7 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>
7 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>
7 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 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"

Changed for v2016.03:
- Relocated from common directory to cmd directory
- Renamed from cmd_poweroff to poweroff

Change-Id: Ia5fe73250e2ac29d0868b80bcd867bae2aa8d5be
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
7 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>
7 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>
7 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>
7 years agogadged: thor: add board signature check when download 'u-boot-mmc.bin'
Inha Song [Mon, 28 Oct 2013 06:52:53 +0000 (15:52 +0900)]
gadged: thor: add board signature check when download 'u-boot-mmc.bin'

This patch adds checking the special signature of downloaded U-Boot binary.
The new function check_board_signature() is called before do dfu_write()
in thor gadged code.

The board signature is checked for:
- the running U-Boot
- downloaded 'u-boot-mmc.bin'
at offset of binary start defined by:
- (CONFIG_SIGN_IMAGE_SIZE - HDR_SIZE)

The download can succeed when signatures are equal.

The default U-Boot image size defined by CONFIG_SIGN_IMAGE_SIZE is 1MB.

Other changes:
- print info about running/downloading U-Boot signature
- print info about wrong image signature/size
- don't allow downloading unsigned or signed wrong U-Boot image
- allow download any image if no signature found at running U-Boot

The first version added by:
Signed-off-by: Inha Song <ideal.song@samsung.com>
Upgrade:
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
7 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>
7 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

Changes for v2015.04-rc1:
- Replace <lcd.h> to <lcd_console.h>

Changes for v2015.10-rc5
- correct usage of removed typedef 'bmp_image_t'

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
7 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>
7 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>
7 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>
7 years agocommon: lcd: extend lcd api by function lcd_get_position_cursor()
Lukasz Majewski [Mon, 16 Feb 2015 16:40:25 +0000 (17:40 +0100)]
common: lcd: extend lcd api by function lcd_get_position_cursor()

Changes for v2015.04-rc1:
- Moving lcd console related code to lcd_console.c

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
7 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>
7 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>
7 years agoPrepare v2017.03 v2017.03
Tom Rini [Mon, 13 Mar 2017 17:54:16 +0000 (13:54 -0400)]
Prepare v2017.03

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoscripts/config_whitelist.txt: Regenerate
Tom Rini [Mon, 13 Mar 2017 17:50:17 +0000 (13:50 -0400)]
scripts/config_whitelist.txt: Regenerate

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoconfigs: Re-sync
Tom Rini [Mon, 13 Mar 2017 17:48:42 +0000 (13:48 -0400)]
configs: Re-sync

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoarm: omap-common: Fix typo in CONFIG_OMAP54XX guard
Matthijs van Duin [Tue, 7 Mar 2017 02:42:24 +0000 (03:42 +0100)]
arm: omap-common: Fix typo in CONFIG_OMAP54XX guard

Some initialization was unintentionally being skipped on omap5.

Fixes: f5af0827f276 ("arm: omap-common: Guard some parts of the code with CONFIG_OMAP44XX/OMAP54XX")
Signed-off-by: Matthijs van Duin <matthijsvanduin@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agotools: binman: change shebang from python into python2
Jörg Krause [Mon, 6 Mar 2017 20:07:11 +0000 (21:07 +0100)]
tools: binman: change shebang from python into python2

This tool does not work with Python 3. Change the shebang to make sure the
script is run by a Python 2 interpreter.

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
7 years agoarm: OMAP2+: nandecc: propagate error to command return status
Ladislav Michl [Mon, 6 Mar 2017 12:54:30 +0000 (13:54 +0100)]
arm: OMAP2+: nandecc: propagate error to command return status

Currently nandecc returns zero even if underlaying
omap_nand_switch_ecc function fails. Fix that by
propagating error returned to command return value.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoMerge branch 'pmic' of git://git.denx.de/u-boot-mmc
Tom Rini [Fri, 10 Mar 2017 00:52:57 +0000 (19:52 -0500)]
Merge branch 'pmic' of git://git.denx.de/u-boot-mmc

7 years agoARM: Migrate errata to Kconfig
Tom Rini [Tue, 7 Mar 2017 12:13:42 +0000 (07:13 -0500)]
ARM: Migrate errata to Kconfig

This moves all of the current ARM errata from various header files and in to
Kconfig.  This allows for a minor amount of cleanup as we had some instances
where both a general common header file was enabling errata as well as the
board config.  We now just select these once at the higher level in Kconfig

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoomap4: Migrate to using imply
Tom Rini [Fri, 3 Mar 2017 20:33:33 +0000 (15:33 -0500)]
omap4: Migrate to using imply

Move the default y options under arch/arm/mach-omap2/omap4/Kconfig to be
using imply instead in arch/arm/Kconfig

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoomap3: Migrate to using imply
Tom Rini [Fri, 3 Mar 2017 20:33:32 +0000 (15:33 -0500)]
omap3: Migrate to using imply

Move the default y options under arch/arm/mach-omap2/omap3/Kconfig to be
using imply instead in arch/arm/Kconfig

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoTI: Migrate board/ti/common/Kconfig to imply
Tom Rini [Fri, 3 Mar 2017 20:33:31 +0000 (15:33 -0500)]
TI: Migrate board/ti/common/Kconfig to imply

The option that we had set in board/ti/common/Kconfig as default y are
best done with imply under the appropriate main Kconfig option instead.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoam335x_evm: Switch to using imply keyword
Tom Rini [Fri, 3 Mar 2017 20:33:30 +0000 (15:33 -0500)]
am335x_evm: Switch to using imply keyword

These particular SPL options are part of what the ROM provides, but for
compatibility with how we have previously used them, move them to being
implied by the board being selected.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agokconfiglib.py: Kludge in 'imply' support
Tom Rini [Fri, 3 Mar 2017 20:33:29 +0000 (15:33 -0500)]
kconfiglib.py: Kludge in 'imply' support

Currently upstream does not yet understand the imply keyword.  For what
we use kconfiglib.py for today, this is OK.  We only need to be able to
evaluate in order to make boards.cfg and none of those choices will
depend on how imply evaluates out.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agodo_smhload: fix return code
Ryan Harkin [Thu, 2 Mar 2017 17:45:16 +0000 (17:45 +0000)]
do_smhload: fix return code

do_smhload was using a ulong to store the return value from
smh_load_file. That returns an int, where -1 indicates an error. As a
ulong will never be negative, smh_load_file errors were not detected and
so_smhload always returned zero.

Also, when errors were spotted, do_smhload was returning 1, rather than
the enumeration CMD_RET_FAILURE (which is also 1).

Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
7 years agoFreescale/NXP: Migrate CONFIG_FSL_CAAM to defconfigs
Tom Rini [Wed, 1 Mar 2017 21:51:58 +0000 (16:51 -0500)]
Freescale/NXP: Migrate CONFIG_FSL_CAAM to defconfigs

In some cases this is absolutely required, so select this for some secure
features.  This also requires migration of RSA_FREESCALE_EXP

Cc: Ruchika Gupta <ruchika.gupta@nxp.com>
Cc: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Cc: Naveen Burmi <NaveenBurmi@freescale.com>
Cc: Po Liu <po.liu@freescale.com>
Cc: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Cc: Priyanka Jain <Priyanka.Jain@freescale.com>
Cc: Sumit Garg <sumit.garg@nxp.com>
Cc: Shaohui Xie <Shaohui.Xie@freescale.com>
Cc: Chunhe Lan <Chunhe.Lan@freescale.com>
Cc: Feng Li <feng.li_2@nxp.com>
Cc: Alison Wang <alison.wang@freescale.com>
Cc: Mingkai Hu <Mingkai.Hu@freescale.com>
Cc: York Sun <york.sun@nxp.com>
Cc: Saksham Jain <saksham.jain@nxp.freescale.com>
Cc: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agotools: Remove CONFIG_SYS_TEXT_BASE in Makefile
Patrick Delaunay [Tue, 28 Feb 2017 18:29:11 +0000 (19:29 +0100)]
tools: Remove CONFIG_SYS_TEXT_BASE in Makefile

This define is not used in tools sources and can be removed
to avoid unnecessary link between tools and defconfig

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agokbuild: turn of dtc unit address warnings by default
Masahiro Yamada [Mon, 27 Feb 2017 06:24:45 +0000 (15:24 +0900)]
kbuild: turn of dtc unit address warnings by default

DTC 1.4.2 or later checks DT unit-address without reg property and
vice-versa, and generates lots of warnings.  Fixing DT files will
take for a while.  Until then, let's turn off the check unless
building with W=*.

Introduce a new helper dtc-option to check if the option is supported
in order to suppress warnings on older versions.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
7 years agosunxi: power: axp809.c: Fix aldo1-2 being disabled for mvolt != 0
Rask Ingemann Lambertsen [Wed, 18 Jan 2017 20:53:40 +0000 (21:53 +0100)]
sunxi: power: axp809.c: Fix aldo1-2 being disabled for mvolt != 0

The execution flow is currently like this for aldo_num == 1 or 2:

int axp_set_aldo(int aldo_num, unsigned int mvolt)
{
...
if (mvolt == 0)
return pmic_bus_clrbits(AXP809_OUTPUT_CTRL1,
AXP809_OUTPUT_CTRL1_ALDO1_EN << (aldo_num - 1));
...
return pmic_bus_clrbits(AXP809_OUTPUT_CTRL1,
  AXP809_OUTPUT_CTRL1_ALDO1_EN << (aldo_num - 1));
 }

I.e. aldo1 and aldo2 will always be disabled. This patch fixes it by
setting (rather than clearing) the enable bit when mvolt != 0.

Signed-off-by: Rask Ingemann Lambertsen <rask@formelder.dk>
Fixes: 795857df413a ("sunxi: power: add AXP809 support")

7 years agoMerge branch 'master' of git://git.denx.de/u-boot-video
Tom Rini [Wed, 8 Mar 2017 12:14:21 +0000 (07:14 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-video

7 years agoMerge branch 'master' of git://git.denx.de/u-boot-net
Tom Rini [Wed, 8 Mar 2017 12:14:18 +0000 (07:14 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-net

7 years agoomap3_logic: Move SPL Stack into SDRAM
Adam Ford [Wed, 8 Mar 2017 03:27:52 +0000 (21:27 -0600)]
omap3_logic: Move SPL Stack into SDRAM

A previous patch broke the board. This patch will add missing part
from the previous patch and also move the SPL Stack into SDRAM at
0x82000000.

Tested with GCC 4.8.2 and GCC 6.2

Fixes: 0959649dc6d9 ("omap3_logic: Switch to simple malloco in SPL")

Signed-off-by: Adam Ford <aford173@gmail.com>
Changes in V2:
  - Keep CONFIG_SPL_SYS_MALLOC_SIMPLE
  - Add CONFIG_SYS_MALLOC_F_LEN=0x2000 (8 MB)

7 years agovideo: cfb_console: fix 32-bit display on 64-bit architectures
Andre Przywara [Mon, 6 Mar 2017 01:13:38 +0000 (01:13 +0000)]
video: cfb_console: fix 32-bit display on 64-bit architectures

"unsigned long" is a lousy data type when it comes to match peripheral
hardware registers with a fixed size.
Just do the obvious and match a 32-bit display format with an "u32"
data type for casting.
This fixes the logo display on 64-bit architectures, which produced
a black line on the right side of the logo with non-black backgrounds.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
7 years agonet: zynq_gem: Fix masking of supported phydev features
Nathan Rossi [Sun, 5 Mar 2017 14:36:23 +0000 (00:36 +1000)]
net: zynq_gem: Fix masking of supported phydev features

When the zynq_gem driver initializes the phy it sets the supported
features that the phy can support and advertise. However instead of
masking the supported features such that it limits the available
features it sets the phy to have the exact supported features of the
zynq_gem. This is problematic as it will enable features that a phy does
not have or cannot advertise.

Specifically this appears as an issue when using a phy that is only
capable of 10/100, but the zynq_gem driver will override this and try to
enable and advertise 10/100/1000.

Reported-by: Arno Steffens <star@gmx.li>
Fixes: 80243528ef ("net: gem: Fix gem driver on 1Gbps LAN")
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Tested-by: Arno Steffens <star@gmx.li>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: macb: Fix ETH not found when clock not support
Wenyou Yang [Tue, 14 Feb 2017 08:24:40 +0000 (16:24 +0800)]
net: macb: Fix ETH not found when clock not support

For the boards such as smartweb on which the clock driver isn't
supported, the ethernet fail to be found when booting up with
the below log.
---8<---
Net:   No ethernet found.
--->8---

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Tested-by: Heiko Schocher <hs@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agoarmv8: spl: Call spl_relocate_stack_gd for ARMv8
Philipp Tomsich [Wed, 1 Mar 2017 20:04:15 +0000 (21:04 +0100)]
armv8: spl: Call spl_relocate_stack_gd for ARMv8

As part of the startup process for boards using the SPL, we need to
call spl_relocate_stack_gd. This is needed to set up malloc with its
DRAM buffer.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoarmv5te: make 'ret lr' produce iinterworking 'bx lr'
Albert ARIBAUD [Mon, 27 Feb 2017 19:19:07 +0000 (20:19 +0100)]
armv5te: make 'ret lr' produce iinterworking 'bx lr'

Current ARM assembler helper for the 'return to caller' pseudo-instruction
turns 'ret lr' into 'mov pc, lr' for ARMv5TE. This causes the core to remain
in its current ARM state even when the routine doing the 'ret' was called
from Thumb-1 state, triggering an undefined instruction exception.

This causes early run-time failures in all boards compiled using the Thumb-1
instruction set (for instance the Open-RD family).

ARMv5TE supports 'bx lr' which properly implements interworking and thus
correctly returns to Thumb-1 state from ARM state.

This change makes 'ret lr' turn into 'bx lr' for ARMv5TE.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
7 years agoPrepare v2017-rc3 v2017.03-rc3
Tom Rini [Mon, 27 Feb 2017 22:36:21 +0000 (17:36 -0500)]
Prepare v2017-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoarm: mach-omap2: Flush cache after FIT post-processing image
Andrew F. Davis [Wed, 22 Feb 2017 23:46:39 +0000 (17:46 -0600)]
arm: mach-omap2: Flush cache after FIT post-processing image

After we authenticate/decrypt an image we need to flush the caches
as they may still contain bits of the encrypted image. This will
cause failures if we attempt to jump to this image.

Reported-by: Yogesh Siraswar<yogeshs@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agodrivers/net/Kconfig: Correct use of apostrophe
Tom Rini [Mon, 20 Feb 2017 14:38:03 +0000 (09:38 -0500)]
drivers/net/Kconfig: Correct use of apostrophe

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-imx
Tom Rini [Mon, 27 Feb 2017 17:10:05 +0000 (12:10 -0500)]
Merge branch 'master' of git://denx.de/git/u-boot-imx

7 years agorockchip: video: fix 83500000 clock mistake in rockchip HDMI
Nickey Yang Nickey Yang [Mon, 27 Feb 2017 09:04:21 +0000 (17:04 +0800)]
rockchip: video: fix 83500000 clock mistake in rockchip HDMI

There is one "0" too many in 83500000 mpixelclock in rockchip_mpll_cfg[].
fix it.

Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
7 years agosplash: Prevent splash_load_fs from writing to 0x0
Jonathan Golder [Fri, 24 Feb 2017 16:46:10 +0000 (17:46 +0100)]
splash: Prevent splash_load_fs from writing to 0x0

Passing NULL to fs_read() for actread value results in hanging U-Boot
at least on our ARM plattform (TI AM335x). Since fs_read() and
following functions do not catch nullpointers, writing to 0x0 occurs.

Passing a local dummy var instead of NULL solves this issue.

Signed-off-by: Jonathan Golder <jonathan.golder@kurz-elektronik.de>
Cc: Anatolij Gustschin <agust@denx.de>
7 years agotravis-ci: Temporarily disable using a newer device tree compiler
Tom Rini [Sun, 26 Feb 2017 20:23:18 +0000 (15:23 -0500)]
travis-ci: Temporarily disable using a newer device tree compiler

For a long while dtc has warned about various constructs.  This is now
leading to log file size being exceeded in travis, and as the majority
of these errors need to be fixed in the kernel, switch to using the
stock device-tree-compiler package.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Sun, 26 Feb 2017 16:56:54 +0000 (11:56 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

7 years agousb: gadget: f_dfu: set serial number if serial# is valid
Felipe Balbi [Wed, 22 Feb 2017 09:22:38 +0000 (11:22 +0200)]
usb: gadget: f_dfu: set serial number if serial# is valid

With this patch, USB Command Verifier is happy with our DFU
implementation on Chapter 9 tests.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
7 years agousb: gadget: g_dnl: fix g_dnl_set_serialnumber()
Felipe Balbi [Wed, 22 Feb 2017 09:22:37 +0000 (11:22 +0200)]
usb: gadget: g_dnl: fix g_dnl_set_serialnumber()

instead of only copying if strlen(s) is less than 32 characters, let's
just copy at most 31 characters regardless of the size of
serial#. This will guarantee that we always have a serial number if
serial# environment variable is set to anything.

Note that without a proper serial number, USB Command Verifier fails
our test of Device Descriptor since we will claim to have a serial
number without really providing one when requested.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
7 years agousb: gadget: f_dfu: write req->actual bytes
Felipe Balbi [Fri, 10 Feb 2017 16:32:31 +0000 (19:32 +0300)]
usb: gadget: f_dfu: write req->actual bytes

If last packet is short, we shouldn't write req->length bytes to
non-volatile media, we should write only what's available to us, which
is held in req->actual.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
7 years agousb: gadget: dfu: add result for handle_getstatus()
Patrick Delaunay [Fri, 16 Dec 2016 17:41:32 +0000 (18:41 +0100)]
usb: gadget: dfu: add result for handle_getstatus()

harmonize result with other handle_XXX() functions: return int for size
remove the define RET_STAT_LEN : no more necessary

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>
7 years agousb: gadget: dfu: correct size for USB_REQ_DFU_GETSTATE result
Patrick Delaunay [Fri, 16 Dec 2016 17:41:31 +0000 (18:41 +0100)]
usb: gadget: dfu: correct size for USB_REQ_DFU_GETSTATE result

return the correct size for DFU_GETSTATE result (1 byte in DFU 1.1 spec)
to avoid issue in USB protocol and the variable "value" is propagated
to req->lenght as all the in the other request with answer
- DFU_GETSTATUS
- DFU_DNLOAD
- DFU_UPLOAD
Then the buffer is correctly treated in USB driver

NB: it was the only request witch directly change "req->actual"

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>
7 years agousb: gadget: dfu: add functional descriptor in descriptor set
Patrick Delaunay [Thu, 8 Dec 2016 17:10:49 +0000 (18:10 +0100)]
usb: gadget: dfu: add functional descriptor in descriptor set

The "DFU descriptor set" must contain the "DFU functional descriptor"
but it is missing today in U-Boot code
(cf: DFU spec 1.1, chapter 4.2 DFU Mode Descriptor Set)
This patch only allocate buffer and copy DFU functional descriptor
after interfaces.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>
7 years agousb: dwc3: gadget: Remove unused header inclusion
Vincent Tinelli [Tue, 14 Feb 2017 14:16:25 +0000 (17:16 +0300)]
usb: dwc3: gadget: Remove unused header inclusion

Remove sys_proto.h inclusion which is not used by the driver.

Signed-off-by: Vincent Tinelli <vincent.tinelli@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
7 years agoMerge branch 'master' of git://git.denx.de/u-boot-uniphier
Tom Rini [Thu, 23 Feb 2017 15:12:41 +0000 (10:12 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-uniphier

  - Fix regressions caused by the previous reworks
  - Add pin configuration support
  - Re-work SPL code
  - Update DRAM and PLL setup code
  - Enable needed configs, disable unneeded configs

7 years agoARM: uniphier: set up charge pump current for MPLL of LD11 SoC
Masahiro Yamada [Tue, 21 Feb 2017 14:00:35 +0000 (23:00 +0900)]
ARM: uniphier: set up charge pump current for MPLL of LD11 SoC

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: uniphier: add simple eMMC load APIs instead of ROM API
Masahiro Yamada [Mon, 20 Feb 2017 09:34:20 +0000 (18:34 +0900)]
ARM: uniphier: add simple eMMC load APIs instead of ROM API

Re-use of routines embedded in the Boot ROM requires a function
pointer table for each SoC.  This is not nice in terms of the
maintainability in a long run.

Implement simple eMMC load APIs that are commonly used for LD11,
LD20, and hopefully future SoCs.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: uniphier: enable CONFIG_CMD_CONFIG
Masahiro Yamada [Tue, 21 Feb 2017 06:09:11 +0000 (15:09 +0900)]
ARM: uniphier: enable CONFIG_CMD_CONFIG

This command is useful to see which config options are enabled on
the running U-Boot image.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: uniphier: enable CONFIG_CMD_GPT
Masahiro Yamada [Fri, 17 Feb 2017 07:17:55 +0000 (16:17 +0900)]
ARM: uniphier: enable CONFIG_CMD_GPT

Enable CONFIG_CMD_GPT, keeping CONFIG_SPL_EFI_PARTITION because the
SPL for UniPhier platform does not recognize any partitions.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: uniphier: disable CONFIG_SPL_DOS_PARTITION
Masahiro Yamada [Fri, 17 Feb 2017 07:17:39 +0000 (16:17 +0900)]
ARM: uniphier: disable CONFIG_SPL_DOS_PARTITION

The SPL for UniPhier platform does not recognize any partitions.
Do not compile unneeded features.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: uniphier: deassert RST_n of eMMC device for LD11/LD20
Masahiro Yamada [Fri, 17 Feb 2017 07:17:22 +0000 (16:17 +0900)]
ARM: uniphier: deassert RST_n of eMMC device for LD11/LD20

For LD11 and LD20 SoCs, the RST_n pin is asserted by default.  If
the EXT_CSD[162], bit[1:0] (RST_n_ENABLE) is fused, the eMMC device
would stay in the reset state until its RST_n pin is deasserted by
software.

Currently, this is cared by an ad-hoc way because the eMMC hardware
reset provider is not supported in U-Boot for now.  This code should
be re-written once the "mmc-pwrseq-emmc" binding is supported.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: uniphier: add DRAM PHY clock duty adjustment for LD20 SoC
Kotaro Hayashi [Tue, 14 Feb 2017 02:39:14 +0000 (11:39 +0900)]
ARM: uniphier: add DRAM PHY clock duty adjustment for LD20 SoC

If the DRAM clock duty does not meet the allowable tolerance,
it is marked in an efuse register.  If the register is fused,
the boot code should compensate for the DRAM clock duty error.

Signed-off-by: Kotaro Hayashi <hayashi.kotaro@socionext.com>
[masahiro: simplify code, add git-log]
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: uniphier: remove dram_nr_ch from board parameters
Masahiro Yamada [Thu, 16 Feb 2017 06:59:32 +0000 (15:59 +0900)]
ARM: uniphier: remove dram_nr_ch from board parameters

This parameter is redundant because we can know the number of
channels by checking if dram_ch[2].size is zero.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: uniphier: rework spl_boot_device() and related code
Masahiro Yamada [Mon, 13 Feb 2017 16:24:26 +0000 (01:24 +0900)]
ARM: uniphier: rework spl_boot_device() and related code

The current implementation has ugly switch statements here and there,
and duplicates similar code.  Rework it using table lookups for SoC
data and reduce code duplication.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: uniphier: move spl_boot_mode() to a separate file
Masahiro Yamada [Mon, 13 Feb 2017 16:24:25 +0000 (01:24 +0900)]
ARM: uniphier: move spl_boot_mode() to a separate file

The spl_boot_mode() is unrelated to the other code in this file.
Besides, this function is only called from common/spl/spl_mmc.c,
so it is reasonable to guard with CONFIG_SPL_MMC_SUPPORT.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: uniphier: move MMC code to a separate file
Masahiro Yamada [Mon, 13 Feb 2017 16:24:24 +0000 (01:24 +0900)]
ARM: uniphier: move MMC code to a separate file

Currently, arch/arm/mach-uniphier/boot-mode/boot-mode.c is messed up
with unrelated code; there is no reason why the "mmcsetn" command
must be placed in this file.

Split out the MMC code into arch/arm/mach-uniphier/mmc-first-dev.c.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: uniphier: disable CONFIG_MTD_NOR_FLASH
Masahiro Yamada [Mon, 13 Feb 2017 01:29:55 +0000 (10:29 +0900)]
ARM: uniphier: disable CONFIG_MTD_NOR_FLASH

This feature is seldom used these days on UniPhier boards.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: dts: uniphier: drop u-boot, dm-pre-reloc from system-bus pinctrl node
Masahiro Yamada [Sun, 12 Feb 2017 14:44:57 +0000 (23:44 +0900)]
ARM: dts: uniphier: drop u-boot, dm-pre-reloc from system-bus pinctrl node

Since commit 26b09c022ab6 ("ARM: uniphier: move SBC and Support Card
init code to U-Boot proper"), SPL does not need pin-mux settings for
the System Bus.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: uniphier: rename second stage loader name
Masahiro Yamada [Sun, 12 Feb 2017 09:21:16 +0000 (18:21 +0900)]
ARM: uniphier: rename second stage loader name

For the memory footprint reason, the Boot ROM can not load the ARM
Trusted Firmware BL1 directly when Trusted Board Boot is enabled.
The second stage loader is Socionext's own firmware, so rename it
for clarification.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agopinctrl: uniphier: support pin configuration
Masahiro Yamada [Sun, 12 Feb 2017 09:21:15 +0000 (18:21 +0900)]
pinctrl: uniphier: support pin configuration

Support the following DT properties:
  "bias-disable"
  "bias-pull-up"
  "bias-pull-down"
  "bias-pull-pin-default"
  "input-enable"
  "input-disable"

My main motivation is to support pull up/down biasing.  For Pro5 and
later SoCs, the pupdctrl register number is the same as the pinmux
number, so this feature can be supported without having big pin
tables.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: uniphier: enable generic EHCI driver for uniphier_v8_defconfig
Masahiro Yamada [Tue, 7 Feb 2017 12:25:13 +0000 (21:25 +0900)]
ARM: uniphier: enable generic EHCI driver for uniphier_v8_defconfig

The LD11 SoC is equipped with USB EHCI controllers.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: uniphier: remove DRAM base address from board parameters
Masahiro Yamada [Sun, 5 Feb 2017 01:52:12 +0000 (10:52 +0900)]
ARM: uniphier: remove DRAM base address from board parameters

The base address of each DRAM channel can be calculated from other
parameters, so does not need hard-coding.  What we need is the size
of each DRAM channel and DRAM_SPARSE flag to decide the start address
of DRAM channel 1.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: uniphier: update README.uniphier for latest build instruction
Masahiro Yamada [Mon, 30 Jan 2017 04:12:28 +0000 (13:12 +0900)]
ARM: uniphier: update README.uniphier for latest build instruction

Since commit c0efc3140e75 ("ARM: uniphier: change CONFIG_SPL_PAD_TO
to 128KB"), the u-boot.bin should be burned at the offset 0x20000.
I missed to update README.uniphier in that commit.  Now updating.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: uniphier: print Support Card info very late
Masahiro Yamada [Mon, 20 Feb 2017 08:32:19 +0000 (17:32 +0900)]
ARM: uniphier: print Support Card info very late

Since commit 26b09c022ab6 ("ARM: uniphier: move SBC and Support Card
init code to U-Boot proper"), the System Bus is initialized by
board_init().  The show_board_info() is called from board_init_f()
by default, so the revision register of the Micro Support Card may
not be accessed at this point.  Show its revision after the System
Bus is initialized.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: uniphier: skip memreserve of unused DRAM bank of LD20
Masahiro Yamada [Mon, 20 Feb 2017 08:13:32 +0000 (17:13 +0900)]
ARM: uniphier: skip memreserve of unused DRAM bank of LD20

Now the "for" loop here iterates on the detected memory banks.
It must skip unused DRAM banks.

Fixes: c995f3a3c526 ("ARM: uniphier: use gd->bd->bi_dram for memory reserve on LD20 SoC")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: uniphier: correct spelling of "invalid"
Masahiro Yamada [Mon, 20 Feb 2017 03:09:00 +0000 (12:09 +0900)]
ARM: uniphier: correct spelling of "invalid"

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: uniphier: skip MEMCONF ch2 parsing if CH2_DISABLE bit is set
Masahiro Yamada [Mon, 20 Feb 2017 03:10:05 +0000 (12:10 +0900)]
ARM: uniphier: skip MEMCONF ch2 parsing if CH2_DISABLE bit is set

If SG_MEMCONF_CH2_DISABLE bit is set, the DRAM channel 2 is unused.
The register settings for the ch2 should be ignored.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: uniphier: revive accidentally removed dcache_disable()
Masahiro Yamada [Mon, 20 Feb 2017 05:23:37 +0000 (14:23 +0900)]
ARM: uniphier: revive accidentally removed dcache_disable()

Commit a8e6300d483d ("ARM: uniphier: refactor spl_init_board()")
accidentally dropped dcache_disable() call.  Since then, the SPL of
LD11 and LD20 failed to load U-Boot proper.

Fixes: a8e6300d483d ("ARM: uniphier: refactor spl_init_board()")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agovideo: mxsfb: Fix reset hang when videomode variable is not present
Fabio Estevam [Wed, 22 Feb 2017 13:40:22 +0000 (10:40 -0300)]
video: mxsfb: Fix reset hang when videomode variable is not present

Currently the system hangs when the 'videomode' variable is not present
and a reset command is issued:

=> setenv videomode
=> saveenv
=> reset

(Board hangs)

lcdif_power_down() assumes that the LCDIF controller has been properly
configured and enabled, which may not be true.

To fix this issue check whether panel.frameAdrs has been initialized and
in case it has not been initialized, do not continue with the LCDIF
powerdown sequence.

Tested on a imx7dsabresd board.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Anatolij Gustschin <agust@denx.de>
7 years agoMerge git://git.denx.de/u-boot-x86
Tom Rini [Wed, 22 Feb 2017 15:27:37 +0000 (10:27 -0500)]
Merge git://git.denx.de/u-boot-x86

7 years agox86: Intel MID platforms has no microcode update
Andy Shevchenko [Fri, 17 Feb 2017 13:49:00 +0000 (16:49 +0300)]
x86: Intel MID platforms has no microcode update

There is no microcode update available for SoCs used on Intel MID
platforms.

Use conditional to bypass it.

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
7 years agox86: zImage: add Intel MID platforms support
Vincent Tinelli [Fri, 17 Feb 2017 13:48:59 +0000 (16:48 +0300)]
x86: zImage: add Intel MID platforms support

Intel MID platform boards have special treatment, such as boot parameter
setting.

Assign hardware_subarch accordingly if CONFIG_INTEL_MID is set.

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Vincent Tinelli <vincent.tinelli@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
7 years agox86: Introduce INTEL_MID quirk option
Andy Shevchenko [Fri, 17 Feb 2017 13:48:58 +0000 (16:48 +0300)]
x86: Introduce INTEL_MID quirk option

Intel Mobile Internet Device (MID) platforms have special treatment in
some cases, such as CPU enumeration or boot parameters configuration.

Besides that several drivers are specifically developed for the IP
blocks found on Intel MID platforms. Those drivers will be dependent to
this option.

Here we introduce specific quirk option for such cases.

It is supposed to be selected by Intel MID platform boards, for example,
Intel Edison.

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
7 years agox86: Force 32-bit jumps in interrupt handlers
J. Tang [Fri, 10 Feb 2017 02:54:13 +0000 (21:54 -0500)]
x86: Force 32-bit jumps in interrupt handlers

Depending upon the compiler used, IRQ entries could vary in sizes. With
GCC 5.x, the code generator will use short jumps for some IRQ entries
but near jumps for others. For example, GCC 5.4.0 generates the
following:

$ objdump -d interrupt.o
<snip>
00000207 <irq_18>:
207:   6a 12                   push   $0x12
209:   eb 85                   jmp    190 <irq_common_entry>

0000020b <irq_19>:
20b:   6a 13                   push   $0x13
20d:   eb 81                   jmp    190 <irq_common_entry>

0000020f <irq_20>:
20f:   6a 14                   push   $0x14
211:   e9 7a ff ff ff          jmp    190 <irq_common_entry>

00000216 <irq_21>:
216:   6a 15                   push   $0x15
218:   e9 73 ff ff ff          jmp    190 <irq_common_entry>

This causes a problem in cpu_init_interrupts(), because the IDT setup
assumed same sizes for all IRQ entries. GCC 4.x always generated 32-bit
jumps, so this previously was not a problem.

The fix is to force 32-bit near jumps for all entries within the
inline assembly. This works for GCC 5.x, and 4.x was already using
that form of jumping.

Signed-off-by: Jason Tang <tang@jtang.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
7 years agotqma6: [cosmetic] sanitize environment defines
Markus Niebel [Fri, 3 Feb 2017 15:14:03 +0000 (16:14 +0100)]
tqma6: [cosmetic] sanitize environment defines

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>