u-boot.git
8 years agoMLK-12437-5 mx6ulevk: Update display to support panel selection
Ye Li [Tue, 23 Feb 2016 07:29:29 +0000 (15:29 +0800)]
MLK-12437-5 mx6ulevk: Update display to support panel selection

Change to panel environment for display at default. Align this feature to
v2015.04 uboot.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit ea93a34a3348f80462ea5b61a4ca2e9a1d267f4c)

8 years agoMLK-12437-4 mx6sxsabreauto: Update display to support panel selection
Ye Li [Tue, 23 Feb 2016 07:28:11 +0000 (15:28 +0800)]
MLK-12437-4 mx6sxsabreauto: Update display to support panel selection

Support two display panels, one for LVDS, another for parallel LCD. Align
the feature to v2015.04 uboot.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit d5f7833adf6236357cf3c139e14e46d718e20524)

8 years agoMLK-12437-3 mx6sxsabresd: Update display to support panel selection
Ye Li [Tue, 23 Feb 2016 07:25:12 +0000 (15:25 +0800)]
MLK-12437-3 mx6sxsabresd: Update display to support panel selection

Support two display panels, one for LVDS, another for parallel LCD. Align the
feature to the v2015.04 uboot.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit d7f54f22607ffcace6cda97984649a5ae4f65996)

8 years agoMLK-12437-2 Video: Update the common board_video_skip to support MXS LCD
Ye Li [Tue, 23 Feb 2016 07:19:39 +0000 (15:19 +0800)]
MLK-12437-2 Video: Update the common board_video_skip to support MXS LCD

Update the board_video_skip to use CONFIG_VIDEO_MXS for LCD display support.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit d6d0265b09e66c576ab4c01841166415f834a1ff)

8 years agoMLK-12437-1 mx6sx: Add support for LVDS display
Ye Li [Tue, 23 Feb 2016 07:12:17 +0000 (15:12 +0800)]
MLK-12437-1 mx6sx: Add support for LVDS display

The i.MX6SX uses a LVDS bridge to mux to the LCDIF interface. Implmement a
function for this muxing. So that on 6SX we can use a LVDS display.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 763658d9b497e44b7411581da592ef5b522e9cc9)

8 years agoENGR00315894-70 iMX6SX:Video Update MXS LCDIF driver
Ye.Li [Thu, 12 Jun 2014 09:10:32 +0000 (17:10 +0800)]
ENGR00315894-70 iMX6SX:Video Update MXS LCDIF driver

Add a new interface "mxs_lcd_panel_setup" to setup fb parameters and
specifies the LCDIF controller for multiple controllers of iMX6SX.
Pass fb parameters via "videomode" env remains work if the new interface
is not called before video initialization.

Modify LCDIF clock interface "mxs_set_lcdclk" to support multiple
LCDIF controllers on iMX6SX.

Signed-off-by: Ye.Li <B37916@freescale.com>
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit d7f49b9378547c3a57b96bcdb907fc44616beb3d)
(cherry picked from commit e1343191b9de227c582847e7eeb5ce9238be0754)

8 years agoMLK-12434-9: mx6: define CONFIG_BOARD_LATE_INIT
Peng Fan [Tue, 23 Feb 2016 06:22:05 +0000 (14:22 +0800)]
MLK-12434-9: mx6: define CONFIG_BOARD_LATE_INIT

Define CONFIG_BOARD_LATE_INIT for mx6qarm2/mx6slevk/mx6sxsabresd
to let mmcdev/mmcroot work as expected.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 86135fb7e55c3046ead899b83f58dd6048eda9e8)

8 years agoMLK-12434-8: mx7dsabresd: dynamic setting mmcdev and mmcroot
Peng Fan [Tue, 23 Feb 2016 04:52:27 +0000 (12:52 +0800)]
MLK-12434-8: mx7dsabresd: dynamic setting mmcdev and mmcroot

Dynamic setting mmcdev and mmcroot for mx7dsabresd.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 2fc0e6ccc90989375ac6355d4f33fd4ffaca9b3a)

8 years agoMLK-12434-7: mx6ulevk: dynamic setting mmcdev and mmcroot
Peng Fan [Tue, 23 Feb 2016 04:51:50 +0000 (12:51 +0800)]
MLK-12434-7: mx6ulevk: dynamic setting mmcdev and mmcroot

Dynamic setting mmcdev and mmcroot for mx6ul evk board.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 95cf514bb3c17014622bca26cbcbfda31cec861a)

8 years agoMLK-12434-6: mx6slevk: dynamic setting mmcdev and mmcroot
Peng Fan [Tue, 23 Feb 2016 04:50:49 +0000 (12:50 +0800)]
MLK-12434-6: mx6slevk: dynamic setting mmcdev and mmcroot

Dynamic setting mmcdev and mmcroot for mx6slevk.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 3308f3c48c644938c415ead23ed9acedc2fd7981)

8 years agoMLK-12434-5: mx6sxsabreauto: dynamic setting mmcdev and mmcroot
Peng Fan [Tue, 23 Feb 2016 04:49:37 +0000 (12:49 +0800)]
MLK-12434-5: mx6sxsabreauto: dynamic setting mmcdev and mmcroot

Dynamic setting mmcdev and mmcroot for mx6sxsabresd.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit ebb43ae292d43817202b71b25368516887f4686b)

8 years agoMLK-12434-4: mx6sxsabresd: dynamic setting mmcdev and mmcroot
Peng Fan [Tue, 23 Feb 2016 04:48:23 +0000 (12:48 +0800)]
MLK-12434-4: mx6sxsabresd: dynamic setting mmcdev and mmcroot

Dynamic setting mmcdev and mmcroot for mx6sxsabresd.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit fb53c90269ead4f72028fd9bcc764e4924921a30)

8 years agoMLK-12434-3: mx6sabre: dynamic setting mmcdev and mmcroot
Peng Fan [Tue, 23 Feb 2016 04:46:21 +0000 (12:46 +0800)]
MLK-12434-3: mx6sabre: dynamic setting mmcdev and mmcroot

Dynamic setting mmcdev and mmcroot for mx6sabresd and mx6qsabreauto.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 14040e07549a394500c11e815f31299e4fb0ac50)

8 years agoMLK-12434-2: mx6qarm2: dynamic setting mmcdev and mmcroot
Peng Fan [Tue, 23 Feb 2016 04:45:20 +0000 (12:45 +0800)]
MLK-12434-2: mx6qarm2: dynamic setting mmcdev and mmcroot

Dynamic setting mmcdev and mmcroot for mx6qarm2.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 54ea563dbe1804e426afbbf0710ffa815551d92b)

8 years agoMLK-12434-1: imx: dynamic setting mmcdev and mmcroot
Peng Fan [Tue, 23 Feb 2016 04:43:10 +0000 (12:43 +0800)]
MLK-12434-1: imx: dynamic setting mmcdev and mmcroot

Align to imx_v2015.04, dynamic setting mmcdev and mmcroot.
Then when boot linux, we can have correct "root=/dev/mmcblk[x]p2"

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit b46b99a901eb194e81fc4836ee2259ad8857f4d3)

8 years agoMLK-12425-4: mx6dlsabresd: support epdc
Peng Fan [Mon, 22 Feb 2016 07:53:59 +0000 (15:53 +0800)]
MLK-12425-4: mx6dlsabresd: support epdc

Support epdc for mx6dlsabresd board.
Introduce a new configuration file mx6dlsabresd_epdc_defconfig.
Add related settings.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 467974ffda4b874e16f0c84974c3d65d85f84f6a)

8 years agoMLK-12425-3: mx6slevk: support epdc
Peng Fan [Mon, 22 Feb 2016 07:37:03 +0000 (15:37 +0800)]
MLK-12425-3: mx6slevk: support epdc

Support epdc for mx6slevk board.
Introduce a new configuration file mx6slevk_epdc_defconfig.
Add related settings.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 8e4304c2ab95928fb6fbb24ba83115cf1cd1e6d2)

8 years agoMLK-12425-2: video: epdc: introduce epdc support
Peng Fan [Tue, 23 Feb 2016 02:14:34 +0000 (10:14 +0800)]
MLK-12425-2: video: epdc: introduce epdc support

Support EPDC.
E-Ink feature is supported by i.MX6DL/SL and i.MX7D.
For now this driver only supports i.MX6DL/SL, because the
i.MX7D EPDC driver needs pxp support which is not included
in U-Boot.

Support user defined logo file, if there is no logo file, it will
draw a black border around a white screen.

If need to enable EPDC, a waveform file is required to let all
work.

Since we need LCD_MONOCHROME mode for EPDC, we introduce LCD_MONOCHROME
support.

Please refer to Linux Reference Manual for how to flash WAVEFORM file.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Robby Cai <R63905@freescale.com>
Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit a7244f279cc3c3994bcd103f5e9a183b1075ae71)

8 years agoMLK-12425-1: mx6sl/ul: introudce more pinmux macros
Peng Fan [Mon, 22 Feb 2016 04:44:24 +0000 (12:44 +0800)]
MLK-12425-1: mx6sl/ul: introudce more pinmux macros

Introuduce more pinmux macros definitions.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 06893558f2cc042b683247989be5127a8027ebf2)

8 years agoMLK-11304 MX6 SabreSD: Disable HDMI detect
Peng Fan [Fri, 31 Jul 2015 05:19:24 +0000 (13:19 +0800)]
MLK-11304 MX6 SabreSD: Disable HDMI detect

As the HDMI splash screen feature is not well supported,
we should not set it to be the default display. In case,
users leave the 'panel' uboot environment variable empty
and connect the board with a HDMI monitor, the HDMI detect
funtion will work and enable the HDMI splash screen. So,
this patch disables HDMI detect function so that users
may only explicitly set the 'panel' variable to be 'HDMI'
to use HDMI splash screen.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit d482c54a9fbf458fdb2270cf990d8ec727823bb1)
(cherry picked from commit b484d36882c8db9ddb8262001cfef187a28051b2)

8 years agoMLK-11952 Video: IPU: Fix dereferencing NULL pointer problem
Ye.Li [Fri, 4 Dec 2015 07:17:07 +0000 (15:17 +0800)]
MLK-11952 Video: IPU: Fix dereferencing NULL pointer problem

By Coverity check,  the clk_set_rate function dereferences the clk pointer
without checking whether it is NULL. This may cause problem when clk is NULL.
Fix the problem by adding NULL check.

Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit ded2f2958d568411274eeecd265fcc1181638335)
(cherry picked from commit b58ac1502391d87470918ff8d172b2b8dc1e7a68)

8 years agoMLK-10747-2 video: ipu: Enable/disable LDB_DI clock when necessary
Liu Ying [Mon, 27 Apr 2015 10:07:47 +0000 (18:07 +0800)]
MLK-10747-2 video: ipu: Enable/disable LDB_DI clock when necessary

This patch adds enable/disable hooks support for ldb_di[0/1] clocks
and enables/disables them when necessary.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 615d4c51679a6c2ee0ed4c5e3922eec76646eef1)
(cherry picked from commit 152192507c3bbaba093783d7da32b88327705c63)

8 years agoMLK-10747-1 video: ipu: Build ldb_di clock relevant code only for MX6 and MX53
Liu Ying [Tue, 28 Apr 2015 06:20:44 +0000 (14:20 +0800)]
MLK-10747-1 video: ipu: Build ldb_di clock relevant code only for MX6 and MX53

The LDB is found in MX6 variants and MX53, so this patch makes the ldb_di clock
relevant code be built only for them.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 3e40c7466ae7d1d6ca74011bfe69ae059d412a3b)
(cherry picked from commit 0c47d4138fd2fe8aa864160e23428b2ef95f16ae)

8 years agoMLK-10774-2 HDMI: splash screen function enhancement
Peng Fan [Thu, 19 Mar 2015 02:10:07 +0000 (10:10 +0800)]
MLK-10774-2 HDMI: splash screen function enhancement

-Change HDMI video mode to VGA.
-Add pixel clock fraction part setting in IPU driver,
 fix video mode timing issue.
-Add overflow state clear workaround,
 fix kernel hang in HDMI driver issue.
-Correct IPU clock to 264MHz.

Signed-off-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 5028519b434d5dfbe53c48ac4b115ff8b69bbac7)
(cherry picked from commit 8dcbd43b971616fb67dc3b2af32e2d33f68ed0ce)

8 years agoMLK-12865 Nand: Fix BCH debug1 register access issue
Ye Li [Tue, 31 May 2016 08:32:00 +0000 (16:32 +0800)]
MLK-12865 Nand: Fix BCH debug1 register access issue

Should have "&" to access the register address, otherwise uboot will hang.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 0b65071afaae9d6a49fb7dda2902f5c8bcd678c2)

8 years agoMLK-12693-2 nand: mxs: correct bitflip for erased NAND page
Peng Fan [Sat, 7 May 2016 08:58:24 +0000 (16:58 +0800)]
MLK-12693-2 nand: mxs: correct bitflip for erased NAND page

This patch is a porting of
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?h=imx_4.1.15_1.0.0_ga&id=e4dacc44d22e9474ec456cb330df525cd805ea38
"
i.MX6QP and i.MX7D BCH module integrated a new feature to detect the
bitflip number for erased NAND page. So for these two platform, set the
erase threshold to gf/2 and if bitflip detected, GPMI driver will
correct the data to all 0xFF.

Also updated the imx6qp dts file to ditinguish the GPMI module for i.MX6Q
with the one for i.MX6QP.
"

In this patch, i.MX6UL is added and threshold changed to use ecc_strength.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 489929be0221bb7d4c46bb5bc6083650b78f73e0)
Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-12693-1 nand: mxs: fix the bitflips for erased page when uncorrectable error
Peng Fan [Fri, 6 May 2016 04:13:38 +0000 (12:13 +0800)]
MLK-12693-1 nand: mxs: fix the bitflips for erased page when uncorrectable error

This patch is porting from linux:
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?h=imx_4.1.15_1.0.0_ga&id=3d42fcece496224fde59f9343763fb2dfc5b0768

"
We may meet the bitflips in reading an erased page(contains all 0xFF),
this may causes the UBIFS corrupt, please see the log from Elie:

-----------------------------------------------------------------
[    3.831323] UBI warning: ubi_io_read: error -74 (ECC error) while reading 16384 bytes from PEB 443:245760, read only 16384 bytes, retry
[    3.845026] UBI warning: ubi_io_read: error -74 (ECC error) while reading 16384 bytes from PEB 443:245760, read only 16384 bytes, retry
[    3.858710] UBI warning: ubi_io_read: error -74 (ECC error) while reading 16384 bytes from PEB 443:245760, read only 16384 bytes, retry
[    3.872408] UBI error: ubi_io_read: error -74 (ECC error) while reading 16384 bytes from PEB 443:245760, read 16384 bytes
...
[    4.011529] UBIFS error (pid 36): ubifs_recover_leb: corrupt empty space LEB 27:237568, corruption starts at 9815
[    4.021897] UBIFS error (pid 36): ubifs_scanned_corruption: corruption at LEB 27:247383
[    4.030000] UBIFS error (pid 36): ubifs_scanned_corruption: first 6569 bytes from LEB 27:247383
-----------------------------------------------------------------

This patch does a check for the uncorrectable failure in the following steps:

   [0] set the threshold.
       The threshold is set based on the truth:
       "A single 0 bit will lead to gf_len(13 or 14) bits 0 after the BCH
        do the ECC."

        For the sake of safe, we will set the threshold with half the gf_len, and
        do not make it bigger the ECC strength.

   [1] count the bitflips of the current ECC chunk, assume it is N.

   [2] if the (N <= threshold) is true, we continue to read out the page with
       ECC disabled. and we count the bitflips again, assume it is N2.
       (We read out the whole page, not just a chunk, this makes the check
        more strictly, and make the code more simple.)

   [3] if the (N2 <= threshold) is true again, we can regard this is a erased
       page. This is because a real erased page is full of 0xFF(maybe also has
       several bitflips), while a page contains the 0xFF data will definitely
       has many bitflips in the ECC parity areas.

   [4] if the [3] fails, we can regard this is a page filled with the '0xFF'
       data.
"

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit ceb324a2914487aa517a6c70a06a20b5e3438fda)

8 years agoMLK-12603: mtd: gpmi: may use legacy bch geometry in u-boot
Han Xu [Mon, 28 Mar 2016 16:26:51 +0000 (11:26 -0500)]
MLK-12603: mtd: gpmi: may use legacy bch geometry in u-boot

provide one config "CONFIG_NAND_MXS_BCH_LEGACY_GEO" to keep using legacy
bch geometry.

NOTICE: the feature must be enabled/disabled in both u-boot and kernel.

Signed-off-by: Han Xu <han.xu@nxp.com>
(cherry picked from commit 0abc9c182c24f88522bd74fa1b53cd2fa3477184)
(cherry picked from commit 772af34b1216acc8e6a1a3faf43fef7c90b26a2f)
Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-12214 NAND:apbh_dma: Fix logically dead code issue
Ye.Li [Wed, 13 Jan 2016 02:06:59 +0000 (10:06 +0800)]
MLK-12214 NAND:apbh_dma: Fix logically dead code issue

The list_first_entry always assumes the list is not empty, it won't return NULL pointer when
the list is empty. So the "if (pdesc == NULL)" becomes a dead code. Fix the issue by calling
the list_empty before the list_first_entry.

(Coverity CID 29934)

Signed-off-by: Ye.Li <ye.li@nxp.com>
(cherry picked from commit ff3923f294cc2e15f436d7520b4042736b1b48a6)

8 years agoMLK-11718-2: mtd: nand: change the BCH layout setting for large oob NAND
Han Xu [Fri, 9 Oct 2015 18:29:41 +0000 (13:29 -0500)]
MLK-11718-2: mtd: nand: change the BCH layout setting for large oob NAND

The cod change updated the NAND driver BCH ECC layout algorithm to
support large oob size NAND chips(oob > 1024 bytes).

Current implementation requires each chunk size larger than oob size so
the bad block marker (BBM) can be guaranteed located in data chunk. The
ECC layout always using the unbalanced layout(Ecc for both meta and
Data0 chunk), but for the NAND chips with oob larger than 1k, the driver
cannot support because BCH doesn’t support GF 15 for 2K chunk.

The change keeps the data chunk no larger than 1k and adjust the ECC
strength or ECC layout to locate the BBM in data chunk. General idea for
large oob NAND chips is

1.Try all ECC strength from the minimum value required by NAND spec to
the maximum one that works, any ECC makes the BBM locate in data chunk
can be chosen.

2.If none of them works, using separate ECC for meta, which will add one
extra ecc with the same ECC strength as other data chunks. This extra
ECC can guarantee BBM located in data chunk, of course, we need to check
if oob can afford it.

Signed-off-by: Han Xu <b45815@freescale.com>
(cherry picked from commit 78f620a6d6ab44bd34e42f00abe4673db099ca73)

8 years agoENGR00315894-60 GPIO: Modify driver mxc_gpio to support RDC Semaphores
Ye.Li [Wed, 11 Jun 2014 08:21:29 +0000 (16:21 +0800)]
ENGR00315894-60 GPIO: Modify driver mxc_gpio to support RDC Semaphores

For GPIO group which shared by multiple masters, it may set in RDC
to shared and semaphore required. Before access the GPIO register,
the GPIO driver must get the RDC semaphore, and release the semaphore
after the GPIO register access.

When CONFIG_MXC_RDC is set, the features related to RDC semaphores
is enabled in mxc_gpio driver.

Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 84d63e2e2ce12f714e88baad8b2325684614a7c1)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Conflicts:
drivers/gpio/mxc_gpio.c

(cherry picked from commit c9943b9c8a78bb2c9886bfe582e82978387d8dee)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit faf94726cac8316c4342e19936f1e03ef283ace3)
(cherry picked from commit 6c0474fe0e4fc543c62b22c05c2702a881f56418)

8 years agoMLK-12416-10: mx6ul: Add comments for BEE
Peng Fan [Wed, 16 Mar 2016 06:08:07 +0000 (14:08 +0800)]
MLK-12416-10: mx6ul: Add comments for BEE

Add comments for enabling BEE.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit e5cc58b71e28b2bb3c66fbe8af373cff31eb3017)

8 years agoMLK-11528 imx: mx6ul check fuse before init bee
Peng Fan [Thu, 10 Sep 2015 06:40:01 +0000 (14:40 +0800)]
MLK-11528 imx: mx6ul check fuse before init bee

Need to check fuse bit 25 of bank 0 word 4 before initialize bee.
The bit: 0 means bee enabled, 1 means bee disabled.
If disabled, continuing initialize bee will cause system hang, so
need to check this bit before initialize bee.

Add macro to enable BEE in header file, default disabled.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit ef4cb7c53418e4e1dd7cfcb7c6974cfea77ef3c0)

8 years agoMLK-10958 imx: mx6ul support Bus Encryption Engine
Peng Fan [Mon, 25 May 2015 08:31:05 +0000 (16:31 +0800)]
MLK-10958 imx: mx6ul support Bus Encryption Engine

This patch is to support Bus Encryption Engine(BEE) for i.MX 6UL.
Supported feature:
1. SNVS key and soft key
2. CTR and ECB mode
3. Specify address region to bee.

Two commands are included:
bee init [key] [mode] [start] [end] - BEE block initial
    "Example: bee init 1 1 0x80000000 0x80010000\n"
bee test [region]
    "Example: bee test 1\n"

Mapping:
[0x10000000 - (0x10000000 + size - 1)] : [start - (start + size - 1)]
[0x30000000 - (0x30000000 + IRAM_SIZE - 1)] : [IRAM_BASE_ADDR -
(IRAM_BASE_ADDR + IRAM_SIZE - 1)]

Whatever start is, start - (start + size -1) will be fixed mapping to
0x10000000 - (0x10000000 + size - 1)

Since default AES region's protected size is SZ_512M, so
on mx6ul evk board, you can not simply run 'bee init', it will
overlap with uboot execution environment, you can use
'bee init 0 0 0x80000000 0x81000000'.

If want to use bee, Need to define CONFIG_CMD_BEE in board configuration
header file, since CONFIG_CMD_BEE default is not enabled.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 29b9bdbbdac9678dba9b7bc2d3662598e9c548a5)
(cherry picked from commit 6d45292ff7e7020a48842f033f8a337daabe4476)

8 years agoMLK-13335 mx6sl: Fix build break for all i.MX6SL boards
Ye Li [Thu, 13 Oct 2016 05:14:56 +0000 (13:14 +0800)]
MLK-13335 mx6sl: Fix build break for all i.MX6SL boards

Since the UART1 register base name is changed from UART1_IPS_BASE_ADDR
to UART1_BASE to align with other i.MX6 chips. Should update the board
configuration header file with the new name.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 18019b8f4b65d3261db6488e416eae66a6500316)

8 years agoMLK-12416-4: imx: mx6: update imx-regs.h
Peng Fan [Fri, 19 Feb 2016 07:18:06 +0000 (15:18 +0800)]
MLK-12416-4: imx: mx6: update imx-regs.h

Update imx-regs.h to align with 2016.03

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 9bbd54e44ae1f0868d3f0dd34975e76606b0a5e8)

8 years agoMLK-13440-5 fsl_usdhc: Remove the CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT
Ye Li [Tue, 8 Nov 2016 06:21:41 +0000 (14:21 +0800)]
MLK-13440-5 fsl_usdhc: Remove the CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT

Since we have added the "vs18_enable" parameter for fixed 1.8v I/O, remove
the CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT. This configuration can only work
with one MMC device. If more devices are supported, this will set 1.8v to
all controllers, so will cause problem to 3.3v devices.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit c1de6a58e44f4770b32a41e3689884abf7449e1b)

8 years agoMLK-13440-4 warp: Replace CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT by using vs18_enable...
Ye Li [Tue, 8 Nov 2016 06:17:22 +0000 (14:17 +0800)]
MLK-13440-4 warp: Replace CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT by using vs18_enable parameter

Change to use the new way to set the vs18_enable field to 1 for fixed 1.8v I/O eMMC.
Don't use CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT any longer.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit c1bf2d975be66597f8fc25c9eef0f02bda3c5050)

8 years agoMLK-13440-1: fsl_usdhc: Add configuration parameter for using fixed 1.8V I/O
Ye Li [Tue, 8 Nov 2016 02:32:58 +0000 (10:32 +0800)]
MLK-13440-1: fsl_usdhc: Add configuration parameter for using fixed 1.8V I/O

When using eMMC with 1.8V I/O, we have to set the VSELECT bit at this USDHC controller
setup and init. The CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT has problem that it will
apply to all USDHC controllers and it only set the 1.8V at init phase. So if user does not
select to the eMMC device, the voltage on the I/O pins are not correct.

This patch adds a parameter "vs18_enable" in fsl_esdhc_cfg structure and priv data, so each controller
can have different settings. The default value is 0 for 3.3V, which is compatible with current
codes. When setting this value to 1, at USDHC setup and init phase the driver will set the
VSELECT bit.

For DM driver, the vqmmc-supply property will be searched for current usdhc node. If the vqmmc-supply is
set to 1800000 uV, the vs18_enable in priv data will be set to 1.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit ebd872f491af27c38a0698d226222ea5093c563c)

8 years agoMLK-14423-2 gpio: 74x164: make oe-pins optional
Peng Fan [Mon, 6 Feb 2017 08:20:53 +0000 (16:20 +0800)]
MLK-14423-2 gpio: 74x164: make oe-pins optional

Make oe-pins optional because some boards have fixed it to enable.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14423-1 spi: kconfig: add soft spi Kconfig entry
Peng Fan [Mon, 6 Feb 2017 08:08:47 +0000 (16:08 +0800)]
MLK-14423-1 spi: kconfig: add soft spi Kconfig entry

Add the Kconfig entry for SOFT_SPI which uses gpio to simulate the
SPI signals. We use it for accessing 74x164 on some i.MX boards.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14422 imx7d: wdog: Overwrite the reset_cpu to turn off internal reset signal
Ye Li [Tue, 7 Feb 2017 14:48:01 +0000 (22:48 +0800)]
MLK-14422 imx7d: wdog: Overwrite the reset_cpu to turn off internal reset signal

Set wdog WCR register SRS bit to turn off internal reset signal WDOG_RESET_B_DEB
for mx7d. So that the warm reset is disabled.
The WDA is cleared to output WDOG_B immediately to reset the board.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-11035 imx: mx6 update thermal slope factors
Peng Fan [Thu, 21 May 2015 01:09:58 +0000 (09:09 +0800)]
MLK-11035 imx: mx6 update thermal slope factors

From temp sensor guys:
"
I confirmed the math with him(had do the accuracy study) today.
The new, final equation is:

Tmeas = (Nmeas - n1) / slope + t1 + offset

n1= fused room count
t1= 25
offset=3.580661
slope= 0.4148468 â€“ 0.0015423*n1
"

87723f903454aaf17336e0fe9098ea7911c19f3c update the thermal with not
accurate slope parameters. This patch fix it.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 0d4904f5929cecd66f0b60cf8ebdcb0e6a2f733e)

8 years agoMLK-10827 imx: mx6 update thermal driver according new equation
Peng Fan [Wed, 6 May 2015 06:39:46 +0000 (14:39 +0800)]
MLK-10827 imx: mx6 update thermal driver according new equation

From IC guys:
"
After a thorough accuracy study of the Temp sense circuit,
we found that with our current equation, an average part can
read 7 degrees lower than a known forced temperature.
We also found out that the standard variance was around 2C;
which is the tightest distribution that we could create.
We need to change the temp sense equation to center the average
part around the target temperature.

Old Equation:
Temp = Troom,cal â€“ slope*(Count measured â€“ Count room fuse)
Where
Troom,cal = 25C  and
Slope = 0.4297157 â€“ (0.0015974 * Count room fuse)

New Equation:
Temp = Troom,cal â€“ slope*(Count measured â€“ Count room fuse) +offset
Where
Troom,cal = 25C  and
Slope = 0.4445388 â€“ (0.0016549 * Count room fuse)
Offset = 3.580661
"

According the new equation, update the thermal driver.
c1 and c2 changed to u64 type and update comments.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 87723f903454aaf17336e0fe9098ea7911c19f3c)
(cherry picked from commit 3392203fc3ae2f0701461143094cfbb112f7bc04)

8 years agoMLK-14420-3 mx6qsabresd: Update mx6qsabresd to enable OF_CONTROL and DM drivers
Ye Li [Tue, 7 Feb 2017 13:33:57 +0000 (21:33 +0800)]
MLK-14420-3 mx6qsabresd: Update mx6qsabresd to enable OF_CONTROL and DM drivers

Modify and remove configurations conflicts with DM drivers from head file.
Enable DM drivers and OF_CONTROL in defconfig.
Also update the GPIO usage to call gpio_request before any gpio using, and
update power_init_board since the PMIC APIs are changed in Pfuze DM driver.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14420-2 DTS: add DTS file for imx6q sabresd board
Ye Li [Tue, 7 Feb 2017 13:18:19 +0000 (21:18 +0800)]
MLK-14420-2 DTS: add DTS file for imx6q sabresd board

Copy the dts and dtsi files from kernel to support imx6q sabresd board.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14420-1 DTS: Update imx6qdl relevant dts and clock definitions
Ye Li [Tue, 7 Feb 2017 13:00:04 +0000 (21:00 +0800)]
MLK-14420-1 DTS: Update imx6qdl relevant dts and clock definitions

Get the latest dtsi files and clock.h for imx6qdl from kernel

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14421 imx: Add pfuze pmic common init for DM pmic driver
Ye Li [Tue, 24 Jan 2017 08:19:21 +0000 (16:19 +0800)]
MLK-14421 imx: Add pfuze pmic common init for DM pmic driver

Since the DM pmic driver has changed the driver API, add a new file
pfuze_dm.c for common pfuze100 init.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoPrepare 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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

8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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")

8 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

8 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

8 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)

8 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>
8 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>
8 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>
8 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>
8 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>
8 years agoPrepare v2017-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>
8 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>
8 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>
8 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

8 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>
8 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>
8 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>
8 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

8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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

8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>