platform/kernel/u-boot.git
7 years agopackaging: remove profile and target macro usage 73/97473/2
Seung-Woo Kim [Mon, 14 Nov 2016 08:40:17 +0000 (17:40 +0900)]
packaging: remove profile and target macro usage

For OBS build, build environment will be unfified, so profile macro
or target macro are not valid anymore, so this patch removes the
macros.

Change-Id: If1555b3b7582372e5ca9070825a5f537d34d89c2
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
7 years agopackaging: squash patches from upstream to HEAD~10 28/97428/1
Seung-Woo Kim [Mon, 14 Nov 2016 07:05:05 +0000 (16:05 +0900)]
packaging: squash patches from upstream to HEAD~10

This patch fixes to squash patches from upstream to HEAD - 10
patches into only one patch. This can reduce too many patch files
in source package.

Change-Id: Ie7bc3ef1ca8fb4406d74f9b7dcffdcdef26b8ca5
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
8 years agousb: xhci: Limit transfer length of a single TD 90/96090/1 accepted/tizen/common/20161114.171454 accepted/tizen/ivi/20161114.074010 accepted/tizen/mobile/20161114.073915 accepted/tizen/tv/20161114.073933 accepted/tizen/wearable/20161114.073950 submit/tizen/20161114.022710
Dongwoo Lee [Mon, 7 Nov 2016 05:34:15 +0000 (14:34 +0900)]
usb: xhci: Limit transfer length of a single TD

This is workaround solution for timed out error and babble error while
transfering data exceeding 0x3F01FF bytes on xhci host. Actually, this
size equals to value that the maximum number of TRBs per TD times the
maximum size of transfer buffer on TRB. Thus, huge transfer request is
splitted in order to limit the size of data in a single TD.

Even though the single I/O request is splitted into multiple requests,
the transfer speed has affected insignificantly: 22.6 --> 22.3 MiB/s.

Change-Id: I85a17910587b70807f075dd40634a0da817cea2f
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
8 years agocmd: usbdown: pass through for nonexistent files 60/94060/1
Seung-Woo Kim [Thu, 27 Oct 2016 02:38:56 +0000 (11:38 +0900)]
cmd: usbdown: pass through for nonexistent files

After changing error value of update command with the commit f388818
("cmd: usbdown: fix return value for cmd funtions"), the usbdown
command stopped if there is nonexistent file. So this patch makes
usbdown command pass through for nonexistent files.

Change-Id: If1c53c1fca7879b2ed95a2298463eb7498f7b169
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
8 years agocmd: usbdown: fix return value for cmd funtions 95/93195/1
Seung-Woo Kim [Fri, 21 Oct 2016 02:28:42 +0000 (11:28 +0900)]
cmd: usbdown: fix return value for cmd funtions

The return value for cmd functions should not be errno, so this
patch fixes to use proper return value for cmd functions.

Change-Id: I9584ed2e12b81d7807e4fc0b41dbf714462acd1c
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
8 years agocmd: usbdown: mark an internal function as static 94/93194/1
Seung-Woo Kim [Fri, 21 Oct 2016 02:18:36 +0000 (11:18 +0900)]
cmd: usbdown: mark an internal function as static

This patch just marks an internal function as static.

Change-Id: Ie15c90ab078244b255099ea46af8d7ab5590eb8a
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
8 years agocmd: usbdown: support the checking signature feature 57/93057/2
Jaehoon Chung [Thu, 20 Oct 2016 06:55:11 +0000 (15:55 +0900)]
cmd: usbdown: support the checking signature feature

Added the checking signature feature for preventing to flash wrong
image.
This funcionality does the same behavior with thor.

Change-Id: I2645cd8e506ea412be39186952a0860fe64bdaf3
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
8 years agoTPL: TM2: config: add download gpio condition 73/91373/1
Seung-Woo Kim [Fri, 7 Oct 2016 07:28:39 +0000 (16:28 +0900)]
TPL: TM2: config: add download gpio condition

In specific TM2, gpio value is different from 0x1 or 0x81 at bootup
time. So this patch add download gpio condition with 0x41.

Change-Id: I4772cf8019aca1c047c7e2c0debbd2a1024036ff
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
8 years agocmd: usbdown: support the usbdown from usb storage to mmc 23/87623/2
Jaehoon Chung [Tue, 16 Aug 2016 07:17:06 +0000 (16:17 +0900)]
cmd: usbdown: support the usbdown from usb storage to mmc

This command is to support the download mode from usb storage to mmc
block device. XU4 didn't support the thor download, so this solution
might be replaced to thor download.

* How to use this command
1. Assume that  Block number of eMMC block device is "0"
2. If you want to flash the rootfs.img,
$update 0:0 mmc rootfs.img
- 0:0 -> usb block 0 devices and partitioin 0
  if you just enter "0" instead of "0:0", that check the
  partition 1 by default.
- mmc -> interface to flash the image
- rootfs.img -> filename to flash (directory is "/" by default.)
  If you want to use the directory, can use likes "/tizen/rootfs.img".
  (There is rootfs.img under "tizen" directory.)
3. Use "update all" command
$usbdown all
- directory is "/updateTizen/ by default.
*Recommendation
- Use "usbdown all"

Change-Id: I267c9b871741e9e1f6aef29965f1f846e19864f1
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
8 years agoTPL: TM2: config: fix MAX77843 MUIC to recognize USB path for specific adc 50/84950/1
Seung-Woo Kim [Tue, 23 Aug 2016 03:40:42 +0000 (12:40 +0900)]
TPL: TM2: config: fix MAX77843 MUIC to recognize USB path for specific adc

With some usb cable with the specific adc, TM2 target in download
mode is not recognized from host usb. So this patch fixes to set
detect register of MAX77843 MUIC to set proper path for the cable.

Change-Id: Ib9c5a2eef68c85dba92dd458807effec11382a09
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
8 years agopackaging: exclude build for non proper obs project 81/82681/1 accepted/tizen_3.0.m2_mobile accepted/tizen_3.0.m2_tv accepted/tizen_3.0.m2_wearable accepted/tizen_3.0_common accepted/tizen_3.0_ivi accepted/tizen_3.0_mobile accepted/tizen_3.0_tv accepted/tizen_3.0_wearable tizen_3.0 tizen_3.0.m2 tizen_3.0_tv accepted/tizen/3.0.m2/mobile/20170105.023941 accepted/tizen/3.0.m2/tv/20170105.024223 accepted/tizen/3.0.m2/wearable/20170105.024525 accepted/tizen/3.0/common/20161114.110359 accepted/tizen/3.0/ivi/20161011.065200 accepted/tizen/3.0/mobile/20161015.034425 accepted/tizen/3.0/tv/20161016.010051 accepted/tizen/3.0/wearable/20161015.084455 accepted/tizen/common/20160810.161716 accepted/tizen/ivi/20160810.082337 accepted/tizen/mobile/20160810.082232 accepted/tizen/tv/20160810.082259 accepted/tizen/wearable/20160810.082323 submit/tizen/20160810.050017 submit/tizen_3.0.m2/20170104.093752 submit/tizen_3.0_common/20161104.104000 submit/tizen_3.0_ivi/20161010.000007 submit/tizen_3.0_mobile/20161015.000007 submit/tizen_3.0_tv/20161015.000006 submit/tizen_3.0_wearable/20161015.000006
Seung-Woo Kim [Fri, 5 Aug 2016 05:46:28 +0000 (14:46 +0900)]
packaging: exclude build for non proper obs project

For both exynos4412 and exynos5 u-boots are not used by non-ARM /
AARCH64 projects, wearable projects, or TM1 target project. So,
this patch exclude build from not required obs project.

Change-Id: I594cf3b8528b61f6ee1366d8429e466d7282a197
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
8 years agoARM: exynos: dts: add the reboot-mode nodes for tizen boards 84/81384/2
Jaehoon Chung [Tue, 26 Jul 2016 01:44:34 +0000 (10:44 +0900)]
ARM: exynos: dts: add the reboot-mode nodes for tizen boards

Odroid-U3/XU3 and Trats2 boards supports the reboot-mode with inform
register.
In case of Odroid, it uses the INFORM2 register for reboot-mode.
But it uses the INFORM3 register for reboot-mode on trats2 board.
(To ensure the backward compatible for older kernel.)

Change-Id: Ic1b51d675a65086dd113c0d3920f4bd67df167bc
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
8 years agosamsung: board: support the checking reboot mode 81/81381/2
Jaehoon Chung [Mon, 25 Jul 2016 12:07:26 +0000 (21:07 +0900)]
samsung: board: support the checking reboot mode

Support the checking reboot mode.
If there is no compatible or inform-num, then this function will not
do nothing.

Change-Id: Iefe5891919adb2ca224ecb4bfd2a441a0e2efd02
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
8 years agosamsung: misc: support to check reboot mode with inform register 80/81380/2
Jaehoon Chung [Mon, 25 Jul 2016 12:04:15 +0000 (21:04 +0900)]
samsung: misc: support to check reboot mode with inform register

To support the reboot mode, add the check_reboot_mode() function.
This function is checking which reboot mode is with INFORM register.
"inform-num" can get from device-tree with "samsung,reboot-mode"
compatible.

Change-Id: Ib3e201a6ab17afbc163376b139b1a9977fbf7fb6
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
8 years agoARM: exynos: power: add the functions for controlling INFORM register 79/81379/2
Jaehoon Chung [Mon, 25 Jul 2016 11:34:35 +0000 (20:34 +0900)]
ARM: exynos: power: add the functions for controlling INFORM register

To control the INFORM register, add the some functions.
There are INFORM0~3 in exynos5, and there are INFORM0~7 in Exynos4.

Change-Id: I43d9ed09c97e91af2f0aecfb80266b66e0493e0d
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
8 years agoTPL: TM2: image: Add workaround text to show exact download mode
Seung-Woo Kim [Fri, 8 Jul 2016 11:24:51 +0000 (20:24 +0900)]
TPL: TM2: image: Add workaround text to show exact download mode

This patch adds workaround THOR MODE text to download logo.

The fixed png file is converted with following command:
   convert download.png download.bgra

Change-Id: I70c866f7309dc9f9c6d96dac44bce6e0ea16dd77
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
8 years agoTPL: TM2: config: add ess base address to bootargs
Seung-Woo Kim [Sat, 2 Jul 2016 08:21:47 +0000 (17:21 +0900)]
TPL: TM2: config: add ess base address to bootargs

The ess base address parameter, ess_setup in bootargs is used from
exynos-ss in kernel. So this patch adds ess_setup with specific
address to bootargs.

Change-Id: I7b5a3d621a485dfbe15a58bf5f2b201edb1bf2e5
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
8 years agoTPL: TM2: set MAX77843 MUIC to USB path before entering download mode
Marek Szyprowski [Wed, 15 Jun 2016 08:08:27 +0000 (10:08 +0200)]
TPL: TM2: set MAX77843 MUIC to USB path before entering download mode

Use simple soft i2c gpio bit-bang based controller to enable MUIC register
write.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I4087fe304d49bd4b88657e6bb4f0bd438e92d6d3

8 years agoTPL: TM2: enter download mode if INFORM3 equals 0x12345670 + 0x1
Marek Szyprowski [Wed, 15 Jun 2016 10:32:55 +0000 (12:32 +0200)]
TPL: TM2: enter download mode if INFORM3 equals 0x12345670 + 0x1

Use the same special value for INFORM3 (0x12345670) as previous release
of sboot bootloader. This change allows to enter download mode with
"reboot -f download" command from Linux userspace.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I07caa93fdc8fd80f367a96ffdc87781e42809732

8 years agoTPL: TM2: config: force autoboot
Marek Szyprowski [Wed, 15 Jun 2016 08:18:48 +0000 (10:18 +0200)]
TPL: TM2: config: force autoboot

This effectively disables command prompt.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: If4ca47bb90c2d63feef00a3d21a5a7b76b2ffb2c

8 years agoTPL: TM2: config: disable UMS feature (not really needed)
Marek Szyprowski [Wed, 18 May 2016 13:03:36 +0000 (15:03 +0200)]
TPL: TM2: config: disable UMS feature (not really needed)

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I04033bd52baeb89e9c7bbf6664d0ccf9f6958dba

8 years agopackaging: u-boot: build only u-boot-tools for arm64
Jaehoon Chung [Thu, 19 May 2016 05:07:55 +0000 (14:07 +0900)]
packaging: u-boot: build only u-boot-tools for arm64

To use u-boot-tools for arm64, modified the spec file.
It should build only u-boot-tools for arm64 architecture with
"tools-only" argument.

Change-Id: I75afb7f12bc2d176d36451d5902b44f4d25ce3e8
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
8 years agoTPL: TM2: config: samsung: Samsung TM2 config file
Lukasz Majewski [Thu, 12 May 2016 11:29:49 +0000 (13:29 +0200)]
TPL: TM2: config: samsung: Samsung TM2 config file

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
8 years agoTPL: TM2: image: Support for displaying image when download mode has been enabled
Lukasz Majewski [Thu, 12 May 2016 11:26:52 +0000 (13:26 +0200)]
TPL: TM2: image: Support for displaying image when download mode has been enabled

This hacks relies on sboot to configure display path (decon, dsi, mic,
panel). It only decompress appended image to framebuffer at 0x67000000 and
triggers decon update.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
8 years agoTPL: TM2: f_thor: Allow to download 4GB images
Lukasz Majewski [Thu, 12 May 2016 11:25:43 +0000 (13:25 +0200)]
TPL: TM2: f_thor: Allow to download 4GB images

This commit fixes 2GB file size limit for thor downloader.

The application on host side sends the downloaded file size as 32-bit
unsigned value. But the thor implementation on U-Boot side interpreted
this as signed value. This caused an error for files with size greater
than 2GB.

This commit fixes the data types in code, which allows to send file
of size 4GB.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
[m.szyprowski: ported from tizen.org and fixed 64bit issues]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
8 years agoTPL: TM2: dfu: Add support for in-partition offset in dfu_alt_info specifiers
Lukasz Majewski [Thu, 12 May 2016 11:21:39 +0000 (13:21 +0200)]
TPL: TM2: dfu: Add support for in-partition offset in dfu_alt_info specifiers

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
8 years agoTPL: TM2: usb3: Use usb3 drd phy configuration from Linux kernel
Lukasz Majewski [Thu, 12 May 2016 11:20:56 +0000 (13:20 +0200)]
TPL: TM2: usb3: Use usb3 drd phy configuration from Linux kernel

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
8 years agoTPL: TM2: usb3: Configure usb3 drd phy clocks
Lukasz Majewski [Thu, 12 May 2016 11:19:17 +0000 (13:19 +0200)]
TPL: TM2: usb3: Configure usb3 drd phy clocks

Proper values have been dumped from Linux kernel.
For initial TPL support it is sufficient to add them as
hardcoded one.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
8 years agoTPL: TM2: Extend cpu.h header file to support DWC3 USB controller
Lukasz Majewski [Thu, 12 May 2016 11:17:35 +0000 (13:17 +0200)]
TPL: TM2: Extend cpu.h header file to support DWC3 USB controller

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
8 years agoTPL: TM2: usb3: Provide board specific code to support DWC3 controller
Lukasz Majewski [Thu, 12 May 2016 11:17:03 +0000 (13:17 +0200)]
TPL: TM2: usb3: Provide board specific code to support DWC3 controller

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
8 years agoTPL: TM2: dwmmc: Use CONFIG_TPL_TM2 flag to avoid unnecessary configuration
Lukasz Majewski [Thu, 12 May 2016 11:13:50 +0000 (13:13 +0200)]
TPL: TM2: dwmmc: Use CONFIG_TPL_TM2 flag to avoid unnecessary configuration

Some parts of exynos generic dwmmc code has been disabled by using
CONFIG_TPL_TM2 flag.

It has been done intentionally to avoid board reconfiguration.
The board has already been configured by S-boot bootloader.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
8 years agoTPL: TM2: mmc: dwmmc: Provide support for 64 bit idma operation
Lukasz Majewski [Thu, 12 May 2016 11:10:11 +0000 (13:10 +0200)]
TPL: TM2: mmc: dwmmc: Provide support for 64 bit idma operation

Some Exynos7 platforms (e.g. Espresso 7420, Samsung TM2 5433) use 64bit
version of dwmmc driver.

This patch allows using both 32 bit and 64 bit versions.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
8 years agoTPL: TM2: dwmmc: samsung: Add code to detect if dwmmc driver requires 64bit support
Lukasz Majewski [Thu, 12 May 2016 11:02:19 +0000 (13:02 +0200)]
TPL: TM2: dwmmc: samsung: Add code to detect if dwmmc driver requires 64bit support

Add to generic dwmmc driver code to check if this IP block require 64bit version
of idma.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
8 years agoTPL: TM2: kconfig: defconfig: Adding TM2 tm2_defconfig file
Lukasz Majewski [Thu, 12 May 2016 11:00:28 +0000 (13:00 +0200)]
TPL: TM2: kconfig: defconfig: Adding TM2 tm2_defconfig file

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
8 years agoTPL: TM2: dts: Support for Samsung TM2 device tree
Lukasz Majewski [Thu, 12 May 2016 10:55:16 +0000 (12:55 +0200)]
TPL: TM2: dts: Support for Samsung TM2 device tree

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
8 years agoTPL: TM2: clock: exynos: Add clock stubs for TM2 target
Lukasz Majewski [Thu, 12 May 2016 10:52:03 +0000 (12:52 +0200)]
TPL: TM2: clock: exynos: Add clock stubs for TM2 target

Those stubs are protected by CONFIG_TPL_TM2

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
8 years agoTPL: TM2: timer: Support for PMW timer (PWM4)
Lukasz Majewski [Thu, 12 May 2016 10:50:03 +0000 (12:50 +0200)]
TPL: TM2: timer: Support for PMW timer (PWM4)

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
8 years agoTPL: TM2: serial: Support for s5p_serial on TM2 board
Lukasz Majewski [Thu, 12 May 2016 10:45:42 +0000 (12:45 +0200)]
TPL: TM2: serial: Support for s5p_serial on TM2 board

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
8 years agoTPL: TM2: Add Samsung TM2 board file
Lukasz Majewski [Thu, 12 May 2016 10:40:41 +0000 (12:40 +0200)]
TPL: TM2: Add Samsung TM2 board file

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
8 years agoTPL: TM2: kconfig: Initial kconfig support for Samsung Exynos5433 TM2 board
Lukasz Majewski [Thu, 12 May 2016 10:38:22 +0000 (12:38 +0200)]
TPL: TM2: kconfig: Initial kconfig support for Samsung Exynos5433 TM2 board

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
8 years agoTPL: TM2: FIX: SYMLINKS: missing symlinks
Lukasz Majewski [Fri, 6 May 2016 13:41:19 +0000 (15:41 +0200)]
TPL: TM2: FIX: SYMLINKS: missing symlinks

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
8 years agoTPL: TM2: FIX: cmd: itest: add support for .q size specifier
Marek Szyprowski [Wed, 2 Mar 2016 10:12:29 +0000 (11:12 +0100)]
TPL: TM2: FIX: cmd: itest: add support for .q size specifier

Workaround to add support for proper long/quad (32/64bits) memory access.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
8 years agogadget: f_thor: properly enable 3rd endpoint defined by this protocol
Marek Szyprowski [Thu, 14 Apr 2016 13:02:36 +0000 (15:02 +0200)]
gadget: f_thor: properly enable 3rd endpoint defined by this protocol

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
8 years agousb: dwc3: Change addr and length declaration to long at dwc3_flush_cache() function
Lukasz Majewski [Tue, 10 May 2016 09:10:37 +0000 (11:10 +0200)]
usb: dwc3: Change addr and length declaration to long at dwc3_flush_cache() function

In the dwc3 driver, calls of dwc3_flush_cache() pass addr and length as
longs. Unfortunately, this function converts long on 64 bit machines
to 32 bit int.

This causes "Synchronous Abort" exceptions on 64 bit machines.

To alleviate this problem we accept long arguments to dwc3_flush_cache()
and then explicitly covert them to unsigned types required by
flush_dcache_range().

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
8 years agoARM: asm: types: Introduce DMA_ADDR_T_64BIT
Lokesh Vutla [Thu, 24 Mar 2016 10:32:00 +0000 (16:02 +0530)]
ARM: asm: types: Introduce DMA_ADDR_T_64BIT

dma_addr_t holds any valid DMA address. If the DMA API only uses 32-bit
addresses, dma_addr_t need only be 32 bits wide.  Bus addresses, e.g., PCI BARs,
may be wider than 32 bits, but drivers do memory-mapped I/O to ioremapped
kernel virtual addresses, so they don't care about the size of the actual
bus addresses.
Also 32 bit ARM systems with LPAE enabled can use 64bit address space, but
DMA still use 32bit address like in case of DRA7 and Keystone platforms.

This is inspired from the Linux kernel types implementation[1]

[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/linux/types.h#n142

Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoarm64: Only allow dcache disabled in SPL builds
Alexander Graf [Fri, 4 Mar 2016 00:09:55 +0000 (01:09 +0100)]
arm64: Only allow dcache disabled in SPL builds

Now that we have an easy way to describe memory regions and enable the MMU,
there really shouldn't be anything holding people back from running with
caches enabled on AArch64. To make sure people catch early if they're missing
on the caching fun, give them a compile error.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoarm64: Remove non-full-va map code
Alexander Graf [Fri, 4 Mar 2016 00:09:54 +0000 (01:09 +0100)]
arm64: Remove non-full-va map code

By now the code to only have a single page table level with 64k page
size and 42 bit address space is no longer used by any board in tree,
so we can safely remove it.

To clean up code, move the layerscape mmu code to the new defines,
removing redundant field definitions.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agohikey: Add MMU tables
Alexander Graf [Fri, 4 Mar 2016 00:09:53 +0000 (01:09 +0100)]
hikey: Add MMU tables

The hikey runs with dcache disabled today. There really should be no reason
not to use caches on AArch64, so let's add MMU definitions and enable the
dcache.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agodwmmc: Increase retry timeout
Alexander Graf [Fri, 4 Mar 2016 00:09:52 +0000 (01:09 +0100)]
dwmmc: Increase retry timeout

When enable dcache on HiKey, we're running into MMC command timeouts
because our retry loop is now faster than the eMMC (or an external SD
card) can answer.

Increase the retry count to the same as the timeout value for status
reports.

The real fix is obviously to not base this whole thing on a cycle counter
but on real wall time, but that would be slightly more intrusive.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agovexpress64: Add MMU tables
Alexander Graf [Fri, 4 Mar 2016 00:09:51 +0000 (01:09 +0100)]
vexpress64: Add MMU tables

There's no good excuse for running with caches disabled on AArch64,
so let's just move the vexpress64 target to enable the MMU and run
with caches on.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agotegra: Replace home grown mmu code with generic table approach
Alexander Graf [Fri, 4 Mar 2016 00:09:50 +0000 (01:09 +0100)]
tegra: Replace home grown mmu code with generic table approach

Now that we have nice table driven page table creating code that gives
us everything we need, move to that.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agozymqmp: Replace home grown mmu code with generic table approach
Alexander Graf [Fri, 4 Mar 2016 00:09:49 +0000 (01:09 +0100)]
zymqmp: Replace home grown mmu code with generic table approach

Now that we have nice table driven page table creating code that gives
us everything we need, move to that.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agothunderx: Move mmu table into board file
Alexander Graf [Fri, 4 Mar 2016 00:09:48 +0000 (01:09 +0100)]
thunderx: Move mmu table into board file

The MMU range table can vary depending on things we may only find
out at runtime. While the very simple ThunderX variant does not
change, other boards will, so move the definition from a static
entry in a header file to the board file.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoarm64: Make full va map code more dynamic
Alexander Graf [Fri, 4 Mar 2016 00:09:47 +0000 (01:09 +0100)]
arm64: Make full va map code more dynamic

The idea to generate our pages tables from an array of memory ranges
is very sound. However, instead of hard coding the code to create up
to 2 levels of 64k granule page tables, we really should just create
normal 4k page tables that allow us to set caching attributes on 2M
or 4k level later on.

So this patch moves the full_va mapping code to 4k page size and
makes it fully flexible to dynamically create as many levels as
necessary for a map (including dynamic 1G/2M pages). It also adds
support to dynamically split a large map into smaller ones when
some code wants to set dcache attributes.

With all this in place, there is very little reason to create your
own page tables in board specific files.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoarm64: Disable TTBR1 maps in EL1
Alexander Graf [Fri, 4 Mar 2016 00:09:46 +0000 (01:09 +0100)]
arm64: Disable TTBR1 maps in EL1

When running in EL1, AArch64 knows two page table maps. One with addresses
that start with all zeros (TTBR0) and one with addresses that start with all
ones (TTBR1).

In U-Boot we don't care about the high up maps, so just disable them to ensure
we don't walk an invalid page table by accident.

Reported-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agothunderx: Calculate TCR dynamically
Alexander Graf [Fri, 4 Mar 2016 00:09:45 +0000 (01:09 +0100)]
thunderx: Calculate TCR dynamically

Based on the memory map we can determine a lot of hard coded fields of
TCR, like the maximum VA and max PA we want to support. Calculate those
dynamically to reduce the chance for pit falls.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoconfigs: odroid_xu3: disable the configuration for fixing MFC 40/67340/1 accepted/tizen/common/20160427.054028 accepted/tizen/ivi/20160427.080419 accepted/tizen/mobile/20160427.080433 accepted/tizen/tv/20160427.080409 accepted/tizen/wearable/20160427.080430 submit/tizen/20160427.035435
Jaehoon Chung [Tue, 26 Apr 2016 09:58:56 +0000 (18:58 +0900)]
configs: odroid_xu3: disable the configuration for fixing MFC

Disable the EXYNOS5422_MFC_CPLL_FIX configuration.
(Before disabled this, some board should be stuck.)

In future, it needs to find the main problem and solution.

Change-Id: If679cc49732caf6d6d6f3b4fe8f3e13938d6fd2e
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
8 years agopackaging: change the Version information to 2016.03 accepted/tizen/ivi/20160425.094023 accepted/tizen/mobile/20160425.094010 accepted/tizen/tv/20160425.093953 accepted/tizen/wearable/20160425.094017 submit/tizen/20160425.072005
Jaehoon Chung [Thu, 21 Apr 2016 10:38:38 +0000 (19:38 +0900)]
packaging: change the Version information to 2016.03

Change the Version information to 2016.03.
(Rebased on v2016.03.)

Change-Id: Ifc4c9af40c0df714b6307f00acc5c8f77412acee
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
8 years agopackaging: u-boot: change from u-boot.bin to u-boot-nodtb.bin for multi-dtb
Jaehoon Chung [Thu, 21 Apr 2016 09:53:34 +0000 (18:53 +0900)]
packaging: u-boot: change from u-boot.bin to u-boot-nodtb.bin for multi-dtb

Changed inptut file for multi-dtb.
(Use u-boot-nodtb.bin instead of u-boot.bin)

commit ad1ecd20 "fdt: Build a u-Boot binary without device tree"

Since applied it, u-boot.bin is included dt file by default.
(If OF_CONTROL is enabled..)

Change-Id: Id93d81ec6327e571da684a630f254c244bfecaf2
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
8 years agoodroid xu3/xu4: add bootclone and ubootupgrade environment scripts
Przemyslaw Marczak [Fri, 4 Dec 2015 15:21:02 +0000 (16:21 +0100)]
odroid xu3/xu4: add bootclone and ubootupgrade environment scripts

Script ubootupgrade:
This script allows updating U-Boot from file u-boot-mmc.bin
existing on boot partition, e.g. with SD card reader.

This is useful for XU4, when U-Boot upgrade is needed,
then it can be delivered with 'boot.img' as regular file
and upgraded by running:
run ubootupgrade

Script bootclone:
This script allows cloning bootloader firmware including:
- bl1, bl2, U-Boot ,and TZSW
from bootable SD card to clean eMMC card using XU3/XU4 board.

This is useful, when user have SD card reader only and wants prepare
a bootable eMMC card.

The script expects that SD is bootable and can be run as follows:
run bootclone

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agoexynos4-dt: update regulators opmode settings
Przemyslaw Marczak [Fri, 4 Dec 2015 13:21:00 +0000 (14:21 +0100)]
exynos4-dt: update regulators opmode settings

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agopmic: max77686: adjust operation mode names to match documentation
Przemyslaw Marczak [Fri, 7 Aug 2015 10:01:07 +0000 (12:01 +0200)]
pmic: max77686: adjust operation mode names to match documentation

The MAX77686 PMIC's operation modes defined in the header were
quite misleading, because in the defined STANDBY mode, the output
were off, instead of staying in low power mode.

This commit correct this issue, and now the operation modes
are consistent with the PMIC's documentation.

Rename results:
- MAX77686_LDO_MODE_STANDBY     -> MAX77686_LDO_MODE_ON_AUTO_OFF
- MAX77686_LDO_MODE_STANDBY_LPM -> MAX77686_LDO_MODE_ON_AUTO_LPM
- MAX77686_BUCK_MODE_STANDBY    -> MAX77686_BUCK_MODE_ON_AUTO_OFF

For both modes, the output state is controlled by PMIC's PWRREQ
external signal used by SoC. In normal operation mode, when PWRREQ
signal is HIGH, the output is ON, amd for LOW signal, the output
is OFF or LPM (Low Power Mode).

As a result, this commit updates the Trats2 regulator settings.

Change-Id: Ibcb86e0c1ed50530930fbabab88bc374eedc4161
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agoTMP: odroid-xu3::add checkboard to use the same DTB for XU3/XU3L
Przemyslaw Marczak [Wed, 2 Dec 2015 12:42:12 +0000 (13:42 +0100)]
TMP: odroid-xu3::add checkboard to use the same DTB for XU3/XU3L

This U-Boot detects Odroid board's version (XU3/XU3L)
to load proper fdtfile based on this info.

But until tizen boot image doesn't include the FDT for XU3Lite,
the same file must be used for XU3 and XU3L.

This commit adds environment script 'checkboard', to set fdtfile name.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agobootstage: enable bootstage timing report to fdt
Przemyslaw Marczak [Wed, 2 Dec 2015 10:48:56 +0000 (11:48 +0100)]
bootstage: enable bootstage timing report to fdt

This commit enables boot stage time reporting for U-Boot
and appends it to device-tree, which can be seen in Linux.
The report is created as 'bootstage' fdt node with child
for each stage, like:
- main_loop (U-Boot prompt)
- start_kernel

fdt:
bootstage {
44 {
name = "start_kernel";
mark = <>;
};
...
};

This can be checked in linux with 'cat /proc/device-tree/bootstage/id/name'.

Note: The id's are not constant for each boot stage name. For safety
use in linux, it's better to find the proper one by it's name.

This feature is enabled for configs:
- odroid-xu3
- odroid-u3
- tizen

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agoOdroid-xu3: set default bootcmd to autoboot
Przemyslaw Marczak [Thu, 19 Nov 2015 14:45:27 +0000 (15:45 +0100)]
Odroid-xu3: set default bootcmd to autoboot

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agof_thor: allow to download 4GB images
Przemyslaw Marczak [Tue, 10 Nov 2015 11:29:18 +0000 (12:29 +0100)]
f_thor: allow to download 4GB images

This commit fixes 2GB file size limit for thor downloader.

The application on host side sends the downloaded file size as 32-bit
unsigned value. But the thor implementation on U-Boot side interpreted
this as signed value. This caused an error for files with size greater
than 2GB.

This commit fixes the data types in code, which allows to send file
of size 4GB.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agoOdroidXU3: add workaround for MFC crash issue
Marek Szyprowski [Thu, 17 Sep 2015 10:53:16 +0000 (12:53 +0200)]
OdroidXU3: add workaround for MFC crash issue

Most versions of MFC v8 firmware suffer from various hang and crash
issues. Most of those issues has been fixed in updated MFC v8 firmware
available for Exynos 5433, however using it on Odroid XU3 sometimes
causes random crashes. In our experiments it turned out that such
firmware works stable after increasing the MFC sclk rate from default
333MHz to 480MHz. This has been achieved by setting ACLK333 clock
divider to 1 (from 2) and setting CPLL rate to 480MHz (from 666MHz).

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Id38d914fddea7fa8fe7144e25cc47948184f9579

8 years agotools:mkimage_multidtb: Align less than PAD size
Inha Song [Wed, 5 Aug 2015 05:05:03 +0000 (14:05 +0900)]
tools:mkimage_multidtb: Align less than PAD size

This patch fix align error in mkimage_multidtb tools.
if DTB size is aigned to $PAD, $PAD_CNT should be zero not $PAD.

Change-Id: I2bf8343dae9b2bb71a70abf1df61bd215c2996f8
Signed-off-by: Inha Song <ideal.song@samsung.com>
8 years agoOdroid-XU3: Add missing default mmcbootdev environment
Inha Song [Wed, 24 Jun 2015 01:56:00 +0000 (10:56 +0900)]
Odroid-XU3: Add missing default mmcbootdev environment

This patch add missing default "mmcbootdev" environment in Odroid-XU3
board configs.

Change-Id: If10c9650d1efef6246287d13690ec84ed1be4438
Signed-off-by: Inha Song <ideal.song@samsung.com>
8 years agopackaging: u-boot-xu3.spec: modify the source file prefix name
Jaehoon Chung [Tue, 26 May 2015 09:50:54 +0000 (18:50 +0900)]
packaging: u-boot-xu3.spec: modify the source file prefix name

Modify the source file prefix name from u-boot-xu3 to u-boot.
When built with u-boot.spec and u-boot-xu3.spec, it needs to take same source
file.

Change-Id: I0f0d8fd5973b4e9cfc6337d9b9431598bedaa891
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
8 years agopackaging: fix %setup top directory name to match repo name
Inha Song [Tue, 26 May 2015 10:34:28 +0000 (19:34 +0900)]
packaging: fix %setup top directory name to match repo name

This pach fix %setup top directory name to match repo name.

Change-Id: I12ad129f9092bf111f6deb900d1b5cdb9cf4ccdb
Signed-off-by: Inha Song <ideal.song@samsung.com>
8 years agopackaging: fix minifest and temp directory name for odroid xu3
Inha Song [Tue, 26 May 2015 05:26:03 +0000 (14:26 +0900)]
packaging: fix minifest and temp directory name for odroid xu3

This pach fix mainifest name to u_boot_xu3 from u_boot and also
fix temporary name for gbs to u-boot-xu3.

Change-Id: I307186ea75e1cb4ce4a588694aa081d318051158
Signed-off-by: Inha Song <ideal.song@samsung.com>
8 years agoAdd dtc to u-boot-tools
Maciej Wereski [Thu, 19 Mar 2015 10:39:59 +0000 (11:39 +0100)]
Add dtc to u-boot-tools

Without dtc mkimage fails.

Change-Id: If66e67881a616dddcda88004ffe073795e010433
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
8 years agoOdroid-XU3: Change root partition name to rootfs
Inha Song [Thu, 21 May 2015 02:04:46 +0000 (11:04 +0900)]
Odroid-XU3: Change root partition name to rootfs

This patch root partition name to rootfs from platform.
The root partition name is changed to rootfs from platform since Tizen 3.0.

Change-Id: I111fd510e097b9354a7d5214b551ceb809069e24
Signed-off-by: Inha Song <ideal.song@samsung.com>
8 years agopackaging: Add change spec for odroid-xu3 u-boot build
Inha Song [Tue, 17 Mar 2015 07:36:57 +0000 (16:36 +0900)]
packaging: Add change spec for odroid-xu3 u-boot build

This patch Add spec file for odroid-xu3 u-boot build by GBS.

Signed-off-by: Inha Song <ideal.song@samsung.com>
8 years agotool: mkimage_signed: Add odroid-xu3_defconfig support
Inha Song [Thu, 26 Feb 2015 01:08:21 +0000 (10:08 +0900)]
tool: mkimage_signed: Add odroid-xu3_defconfig support

This patch add odroid-xu3_defconfig for Odroid XU3 board.

Signed-off-by: Inha Song <ideal.song@samsung.com>
8 years agoexynos: common: increase malloc len to 128MiB
Przemyslaw Marczak [Tue, 17 Mar 2015 09:44:57 +0000 (10:44 +0100)]
exynos: common: increase malloc len to 128MiB

This change is required for thor command.
When malloc pool is increased, then thor doesn't
fail when allocates the data buffer few times.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agoexynos4: dtsi: add include of gpio bindings
Przemyslaw Marczak [Tue, 27 Jan 2015 15:12:53 +0000 (16:12 +0100)]
exynos4: dtsi: add include of gpio bindings

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agoOdroid-XU3: adjust to support Tizen requirements
Joonyoung Shim [Fri, 16 Jan 2015 07:59:04 +0000 (16:59 +0900)]
Odroid-XU3: adjust to support Tizen requirements

This patch includes changes required to boot Tizen,
by varoius authors:

arm: exynos5420: Adding support for board_usb_{init|cleanup}() functions
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
samsung: common: board: call dwc3_uboot_exit() for boards with DWC3
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
config: Odroid-XU3: Support DFU download
Signed-off-by: Inha Song <ideal.song@samsung.com>
smdk5420: Add dfu_alt_info settings interface for support DFU download
Signed-off-by: Inha Song <ideal.song@samsung.com>
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
config: Odroid-XU3: Enable dwc3 usb gadget
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
config: Odroid-XU3: Add default dfu device environment
Signed-off-by: Inha Song <ideal.song@samsung.com>
usb: config: odroid XU3: Enable UMS (Mass Storage) gadget
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Odroid-XU3: Enable check board signature when download bootloader
Signed-off-by: Inha Song <ideal.song@samsung.com>
odroid-xu3: config: add platform autoboot command
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Odroid-XU3: Set rootfs device number to 0
Signed-off-by: Inha Song <ideal.song@samsung.com>
8 years agosamsung: board: dram_init: return error if no mem
Przemyslaw Marczak [Fri, 28 Nov 2014 13:34:59 +0000 (14:34 +0100)]
samsung: board: dram_init: return error if no mem

Change-Id: Ic1bcce5bc90a38b751f32bef23cae79e24d5a443
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 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>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
8 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>
8 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>
8 years agotizen: add tizen_defconfig
Przemyslaw Marczak [Tue, 8 Jul 2014 11:48:16 +0000 (13:48 +0200)]
tizen: add tizen_defconfig

Changes for v2015.10-rc5
- tizen.h: remove CONFIG_SYS_PROMPT
- tizen_defconfig: enable missing configs

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Inha Song <ideal.song@samsung.com>
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agotizen: add Exynos4 common file
Przemyslaw Marczak [Tue, 8 Jul 2014 11:51:14 +0000 (13:51 +0200)]
tizen: add Exynos4 common file

Changes for v2015.10-rc5:
- exynos4-dt.c: add missing control of MAX77693 regulators
  for Trats2 in function s5pc210_phy_control()

Changed for v2016.03:
- Replaced from s3c_udc to dwc2_udc

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inha Song <ideal.song@samsung.com>
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
8 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>
8 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>
8 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>
8 years agosamsung: misc_init_r: insert call to platform_setup()
Przemyslaw Marczak [Thu, 13 Nov 2014 10:40:02 +0000 (11:40 +0100)]
samsung: misc_init_r: insert call to platform_setup()

This change adds call of platform_setup() to check or set active
platform configuration.

Another change is setup environment variable: ${platname},
from board name in set_board_info().

Change-Id: I355736bf40f8fa3697ce0b4546f7702d2e54a0f9
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agosamsung: misc: add new feature for configure partitions layout at boot.
Przemyslaw Marczak [Wed, 5 Nov 2014 20:09:07 +0000 (21:09 +0100)]
samsung: misc: add new feature for configure partitions layout at boot.

This feature requires some platform configuration data
in the environment, which is:
-${platname}_setup_N_name       - name of this setup
-${platname}_setup_N_partitions - GPT partitions or NULL if MBR
-${platname}_setup_N_alt_system - dfu_alt_info with system entities
-${platname}_setup_N_bootpart   - boot partition number for this setup
-${platname}_setup_N_rootpart   - root partition number for this setup

And for at least one setup it requires:
-${platname}_setup_cnt    - number of ${platname} configs
-${platname}_setup_chosen - chosen plaform config
-${platname}_setup_active - active platform config (autoset)

Two environment variables are used to switch/check active setup:
-${platname}_setup_chosen - can be changed manually
-${platname}_setup_active - should be the same as chosen

If chosen setup is not set, then will be automatically set on boot
by setting proper env:
- $partitions                 := ${platname}_setup_N_partitions
- $dfu_alt_system_${platname} := ${platname}_setup_N_alt_system
- $mmcbootpart                := ${platname}_setup_N_bootpart
- $mmcrootpart                := ${platname}_setup_N_rootpart
- ${platname}_setup_active    := ${platname}_setup_chosen

If ${partitions} are:
- set, then gpt write is called
- unset, e.g. when using MBR - then partition table is unchanged

Config:
- CONFIG_PLATFORM_SETUP

Changed for v2016.03:
- Replaced from vsnprintf to vsprintf

Change-Id: Ib9f90415b92ec1d67a9bf6b84e7ab5d5deea8a7d
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agotizen: add new gpt version and add gpt version headers
Inha Song [Thu, 6 Nov 2014 02:37:36 +0000 (11:37 +0900)]
tizen: add new gpt version and add gpt version headers

This patch adds new gpt version and moves gpt data into
separated headers.
In order to be able to gpt version switch, make gpt_vxx.h
files that has the partition information.

- include/samsung/gpt_v08.h
- include/samsung/gpt_v13.h

Change-Id: I33870a54703a07468f17b0f0d7cf43e563409e65
Signed-off-by: Inha Song <ideal.song@samsung.com>
tizen: config: enable platform command and platform setup

This patch enables "platform" command and adds multiple
platform setups to tizen environment.
At this stage - there are available three setups:
- trats2 pit v8
- trats2 pit v13 - chosen
- odroidu3 Tizen v2.x - chosen
- odroidu3 Tizen v3.0 - chosen

The chosen setup - is the default for each platform,
and is set as an active after first boot.
This should be changed manually if another setup is required.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
samsung: gpt: fix CSA partition name
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
8 years agosamsung: define autoboot command in external header
Przemyslaw Marczak [Fri, 15 May 2015 14:26:15 +0000 (16:26 +0200)]
samsung: define autoboot command in external header

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