]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
8 years agoarmv8: ls1043aqds: add IFC fixup in case QSPI is enabled
Qianyu Gong [Thu, 21 Jul 2016 04:39:27 +0000 (12:39 +0800)]
armv8: ls1043aqds: add IFC fixup in case QSPI is enabled

QSPI and IFC are pin-multiplexed on LS1043AQDS board. If QSPI is
enabled, IFC would not be initialized correctly. So disable the IFC
node for Linux.

Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoarmv8/ls1043a: Add MTD partition scheme
Wenbin Song [Thu, 21 Jul 2016 10:55:16 +0000 (18:55 +0800)]
armv8/ls1043a: Add MTD partition scheme

Add and share the the MTD partition scheme with kernel by default
bootargs. And add the "mtdparts" env.

Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoARMv8/ls1046a: Cleanup the environment variables
Wenbin Song [Thu, 21 Jul 2016 10:31:23 +0000 (18:31 +0800)]
ARMv8/ls1046a: Cleanup the environment variables

Cleanup the variables: "kernel_addr","ramdisk_addr",
"ramdisk_size","console".

Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoarmv8: fsl-layerscape: mmu: Fix enabling MMU
York Sun [Fri, 22 Jul 2016 17:52:23 +0000 (10:52 -0700)]
armv8: fsl-layerscape: mmu: Fix enabling MMU

MMU bit in SCTLR needs to be set explicitly after tables are
created. It isn't an issue for EL3 becuase this bit is already
set by early MMU setup. But for other exception levels this
bit was not set.

Signed-off-by: York Sun <york.sun@nxp.com>
8 years agoARMv7: PSCI: ls102xa: move secure text section into OCRAM
Hongbo Zhang [Thu, 21 Jul 2016 10:09:39 +0000 (18:09 +0800)]
ARMv7: PSCI: ls102xa: move secure text section into OCRAM

LS1021 offers two secure OCRAM blocks for trustzone.
This patch moves all the secure text sections into the OCRAM.

Signed-off-by: Wang Dongsheng <dongsheng.wang@nxp.com>
Signed-off-by: Hongbo Zhang <hongbo.zhang@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoARMv7: PSCI: ls102xa: add more PSCI v1.0 functions implemention
Hongbo Zhang [Thu, 21 Jul 2016 10:09:38 +0000 (18:09 +0800)]
ARMv7: PSCI: ls102xa: add more PSCI v1.0 functions implemention

This patch implements PSCI functions for ls102xa SoC following PSCI v1.0,
they are as the list:
    psci_version,
    psci_features,
    psci_cpu_suspend,
    psci_affinity_info,
    psci_system_reset,
    psci_system_off.

Tested on LS1021aQDS, LS1021aTWR.

Signed-off-by: Wang Dongsheng <dongsheng.wang@nxp.com>
Signed-off-by: Hongbo Zhang <hongbo.zhang@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoARMv7: PSCI: ls102xa: check target CPU ID before further operations
Hongbo Zhang [Thu, 21 Jul 2016 10:09:37 +0000 (18:09 +0800)]
ARMv7: PSCI: ls102xa: check target CPU ID before further operations

The input parameter CPU ID needs to be validated before furher oprations such
as CPU_ON, this patch introduces the function to do this.

Signed-off-by: Wang Dongsheng <dongsheng.wang@nxp.com>
Signed-off-by: Hongbo Zhang <hongbo.zhang@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoARMv7: PSCI: add PSCI v1.0 functions skeleton
Hongbo Zhang [Thu, 21 Jul 2016 10:09:36 +0000 (18:09 +0800)]
ARMv7: PSCI: add PSCI v1.0 functions skeleton

This patch adds all the PSCI v1.0 functions in to the common framework, with
all the functions returning "not implemented" by default, as a common framework
all the dummy functions are added here, it is up to every platform developer to
decide which version of PSCI and which functions to implement.

Signed-off-by: Hongbo Zhang <hongbo.zhang@nxp.com>
Signed-off-by: Wang Dongsheng <dongsheng.wang@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agodrivers: net/fm: Add Fman support for LS1046A
Mingkai Hu [Tue, 5 Jul 2016 08:01:56 +0000 (16:01 +0800)]
drivers: net/fm: Add Fman support for LS1046A

The Fman module on LS1046A is similiar with that on LS1043A but
LS1046A has one more XFI (10GbE) interface.

Signed-off-by: Shaohui Xie <Shaohui.Xie@nxp.com>
Signed-off-by: Mingkai Hu <mingkai.hu@nxp.com>
Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoarmv8: fsl_lsch2: Add LS1046A SoC support
Mingkai Hu [Tue, 5 Jul 2016 08:01:55 +0000 (16:01 +0800)]
armv8: fsl_lsch2: Add LS1046A SoC support

The LS1046A processor is built on the QorIQ LS series architecture
combining four ARM A72 processor cores with DPAA 1.0 support.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Mihai Bantea <mihai.bantea@freescale.com>
Signed-off-by: Mingkai Hu <mingkai.hu@nxp.com>
Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoarmv8: fsl_lsch2: Add SerDes 2 support
Qianyu Gong [Tue, 5 Jul 2016 08:01:54 +0000 (16:01 +0800)]
armv8: fsl_lsch2: Add SerDes 2 support

New SoC LS1046A belongs to Freescale Chassis Generation 2 and
has two SerDes so we need to add this support in fsl_lsch2.
The SoC related SerDes 2 support will be added in SoC patch.

Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoarmv8: fsl-layerscape: Consolidate the LSCH2 common defines
Qianyu Gong [Tue, 5 Jul 2016 08:01:53 +0000 (16:01 +0800)]
armv8: fsl-layerscape: Consolidate the LSCH2 common defines

Both LS1012A and LS1043A belong to FSL_LSCH2 and share some common
configurations. So put the common define under FSL_LSCH2 to increase
readability.

Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoarmv8: fsl-layerscape: Add A72 core detection
Alison Wang [Tue, 5 Jul 2016 08:01:52 +0000 (16:01 +0800)]
armv8: fsl-layerscape: Add A72 core detection

Add support to detect Cortex-A72 core for printing it out.
The Initiator Version of A72 core should be 0x4.

Signed-off-by: Alison Wang <alison.wang@nxp.com>
Signed-off-by: Mingkai Hu <mingkai.hu@nxp.com>
Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoarmv8: ls1043aqds: Update MAINTAINERS
York Sun [Fri, 1 Jul 2016 14:40:40 +0000 (07:40 -0700)]
armv8: ls1043aqds: Update MAINTAINERS

Add ls1043aqds_lpuart_defconfig to file list.

Signed-off-by: York Sun <york.sun@nxp.com>
8 years agoarmv8: ls2080aqds: Update MAINTAINERS
York Sun [Fri, 1 Jul 2016 14:40:39 +0000 (07:40 -0700)]
armv8: ls2080aqds: Update MAINTAINERS

Add ls2080aqds_qspi_defconfig to file list.

Signed-off-by: York Sun <york.sun@nxp.com>
8 years agoarm: ls1021atwr: Add SD secure boot target
Sumit Garg [Tue, 14 Jun 2016 17:52:40 +0000 (13:52 -0400)]
arm: ls1021atwr: Add SD secure boot target

Add SD secure boot target for ls1021atwr.
Implement board specific spl_board_init() to setup CAAM stream ID and
corresponding stream ID in SMMU. Change the u-boot size defined by a
macro for copying the main U-Boot by SPL to also include the u-boot
Secure Boot header size as header is appended to u-boot image. So header
will also be copied from SD to DDR.

Reviewed-by: Aneesh Bansal <aneesh.bansal@nxp.com>
Signed-off-by: Sumit Garg <sumit.garg@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoSECURE_BOOT: Enable SD as a source for bootscript
Sumit Garg [Tue, 14 Jun 2016 17:52:39 +0000 (13:52 -0400)]
SECURE_BOOT: Enable SD as a source for bootscript

Add support for reading bootscript and bootscript header from SD. Also
renamed macros *_FLASH to *_DEVICE to represent SD alongwith NAND and
NOR flash.

Reviewed-by: Aneesh Bansal <aneesh.bansal@nxp.com>
Signed-off-by: Sumit Garg <sumit.garg@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoSECURE_BOOT: Enable chain of trust in SPL framework
Sumit Garg [Tue, 14 Jun 2016 17:52:38 +0000 (13:52 -0400)]
SECURE_BOOT: Enable chain of trust in SPL framework

Override jump_to_image_no_args function to include validation of
u-boot image using spl_validate_uboot before jumping to u-boot image.
Also define macros in SPL framework to enable crypto operations.

Reviewed-by: Aneesh Bansal <aneesh.bansal@nxp.com>
Signed-off-by: Sumit Garg <sumit.garg@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoDM: crypto/fsl: Enable rsa DM driver usage before relocation
Sumit Garg [Tue, 14 Jun 2016 17:52:37 +0000 (13:52 -0400)]
DM: crypto/fsl: Enable rsa DM driver usage before relocation

Enable rsa signature verification in SPL framework before relocation for
verification of main u-boot.

Reviewed-by: Aneesh Bansal <aneesh.bansal@nxp.com>
Signed-off-by: Sumit Garg <sumit.garg@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoinclude: usb: Rename USB controller base address mapping
Rajesh Bhagat [Tue, 7 Jun 2016 13:29:34 +0000 (18:59 +0530)]
include: usb: Rename USB controller base address mapping

Remove Soc specific defines and use generic chasis specific defines
for USB controller base address mapping.

Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoi2c: fsl: Fix driver initialization
mario.six@gdsys.cc [Mon, 23 May 2016 08:12:11 +0000 (10:12 +0200)]
i2c: fsl: Fix driver initialization

Due to a oversight in testing, the initialization of the recently
introduced Freescale I2C DM driver works only for 36 bit mode of e.g.
the MPC85XX SoCs (specifically, if the physical addresses are 64 bit
wide and the DT addresses 32 bit wide).

This patch corrects the initialization so that it will work in a more
general setting.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoARM: uniphier: add clock/reset settings for xHCI of ProXstream2
Masahiro Yamada [Fri, 22 Jul 2016 11:20:11 +0000 (20:20 +0900)]
ARM: uniphier: add clock/reset settings for xHCI of ProXstream2

Deassert resets and enable clock signals of xHCI blocks if the
corresponding CONFIG is enabled.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: add PH1-LD21 board data
Masahiro Yamada [Fri, 22 Jul 2016 04:38:33 +0000 (13:38 +0900)]
ARM: uniphier: add PH1-LD21 board data

This has the same silicon die as PH1-LD20, but includes DRAM chips
in its package.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: introduce flags to uniphier_board_data structure
Masahiro Yamada [Fri, 22 Jul 2016 04:38:32 +0000 (13:38 +0900)]
ARM: uniphier: introduce flags to uniphier_board_data structure

I need to add more board attributes, so the "flags" member will be
handier than separate boolean ones.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: rename outer-cache register macros
Masahiro Yamada [Fri, 22 Jul 2016 04:38:31 +0000 (13:38 +0900)]
ARM: uniphier: rename outer-cache register macros

Sync register macros with Linux code.  This will be helpful to
develop the counterpart of Linux.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: clear notification flag before L2 operation
Masahiro Yamada [Fri, 22 Jul 2016 04:38:30 +0000 (13:38 +0900)]
ARM: uniphier: clear notification flag before L2 operation

Clear the flag immediately before cache operation to not depend on
the previous state.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: use (devm_)ioremap() instead of map_sysmem()
Masahiro Yamada [Tue, 19 Jul 2016 12:56:13 +0000 (21:56 +0900)]
ARM: uniphier: use (devm_)ioremap() instead of map_sysmem()

This does not have much impact on behavior, but makes code look more
more like Linux.  The use of devm_ioremap() often helps to delete
.remove callbacks entirely.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: fix doubled tftpboot commands
Masahiro Yamada [Tue, 19 Jul 2016 02:36:53 +0000 (11:36 +0900)]
ARM: uniphier: fix doubled tftpboot commands

This downloads the same file twice for nothing.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: select CONFIG_ARMV8_SPIN_TABLE
Masahiro Yamada [Sat, 16 Jul 2016 16:38:21 +0000 (01:38 +0900)]
ARM: uniphier: select CONFIG_ARMV8_SPIN_TABLE

This is needed when booting Linux without ARM Trusted Firmware.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: dts: uniphier: renumber serial aliases for Gentil/Vodka boards
Masahiro Yamada [Wed, 6 Jul 2016 10:24:09 +0000 (19:24 +0900)]
ARM: dts: uniphier: renumber serial aliases for Gentil/Vodka boards

On these two boards, the serial0 is used for inter-chip connection,
so cannot be used for login console.  The serial2 is used instead
for them, but it is tedious to use because upper level deployment
projects must switch login console per board.

[ Linux commit: 2a4a2aadbaad9dffdb564a2895348f3d8e825416 ]

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
8 years agotest/py: vboot can be run only at Sandbox
Michal Simek [Mon, 18 Jul 2016 06:49:08 +0000 (08:49 +0200)]
test/py: vboot can be run only at Sandbox

Getting this error:
Zynq> sb load hostfs - 100
/home/monstr/data/disk/u-boot/build-zynq_zc706/test.fit
Unknown command 'sb' - try 'help'

because sb command is present only for Sandbox
obj-$(CONFIG_SANDBOX) += host.o

that's why mark this test to be run only at Sandbox

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agoarm: omap5: fix build dependency for secure devices
Andreas Dannenberg [Wed, 20 Jul 2016 18:55:59 +0000 (13:55 -0500)]
arm: omap5: fix build dependency for secure devices

Commit 17c2987 introduces an undesired dependency on CONFIG_SPL_LOAD_FIT
when building U-Boot for AM57xx and DRA7xx high-security (HS) devices that
causes the build to break when that option is not active. Fix this issue
by only building the u-boot_HS.img target when building U-Boot into an
actual FIT image.

Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoarm: am4x: fix build dependency for secure devices
Andreas Dannenberg [Wed, 20 Jul 2016 18:55:58 +0000 (13:55 -0500)]
arm: am4x: fix build dependency for secure devices

Commit e29878f introduces an undesired dependency on CONFIG_SPL_LOAD_FIT
when building U-Boot for AM43xx high-security (HS) devices that causes the
build to break when that option is not active. Fix this issue by only
building the u-boot_HS.img target when building U-Boot into an actual
FIT image.

Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agofixing typo error in README file. CPU15 -> CP15
yeongjun Kim [Wed, 20 Jul 2016 13:56:12 +0000 (22:56 +0900)]
fixing typo error in README file. CPU15 -> CP15

It looks typo error.
Not CPU15, CP15(CoProcessor15)

Signed-off-by: yeongjun Kim <iam.yeongjunkim@gmail.com>
8 years agospl: fit: Fix the number of bytes read in raw mode
Lokesh Vutla [Tue, 19 Jul 2016 09:26:14 +0000 (14:56 +0530)]
spl: fit: Fix the number of bytes read in raw mode

In raw mode a full sector is to be read even if image covers part of
a sector. Number of sectors are calculated as ROUND_UP(size)/sec_size by FIT
framework. This calculation assumes that image is at the 0th offset of a sector,
which is not true always in FIT case. So, include the image offset while
calculating number of sectors.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agorsa: Fix return value and masked error
mario.six@gdsys.cc [Tue, 19 Jul 2016 09:07:07 +0000 (11:07 +0200)]
rsa: Fix return value and masked error

When signing images, we repeatedly call fit_add_file_data() with
successively increasing size values to include the keys in the DTB.

Unfortunately, if large keys are used (such as 4096 bit RSA keys), this
process fails sometimes, and mkimage needs to be called repeatedly to
integrate the keys into the DTB.

This is because fit_add_file_data actually returns the wrong error
code, and the loop terminates prematurely, instead of trying again with
a larger size value.

This patch corrects the return value by fixing the return value of
fdt_add_bignum, fixes a case where an error is masked by a unconditional
setting of a return value variable, and also removes a error message,
which is misleading, since we actually allow the function to fail. A
(hopefully helpful) comment is also added to explain the lack of error
message.

This is probably related to 1152a05 ("tools: Correct error handling in
fit_image_process_hash()") and the corresponding error reported here:

https://www.mail-archive.com/u-boot@lists.denx.de/msg217417.html

Signed-off-by: Mario Six <mario.six@gdsys.cc>
8 years agotools: Fix return code of fit_image_process_sig()
mario.six@gdsys.cc [Tue, 19 Jul 2016 09:07:06 +0000 (11:07 +0200)]
tools: Fix return code of fit_image_process_sig()

When signing images, we repeatedly call fit_add_file_data() with
successively increasing size values to include the keys in the DTB.

Unfortunately, if large keys are used (such as 4096 bit RSA keys), this
process fails sometimes, and mkimage needs to be called repeatedly to
integrate the keys into the DTB.

This is because fit_add_file_data actually returns the wrong error
code, and the loop terminates prematurely, instead of trying again with
a larger size value.

This patch corrects the return value and also removes a error message,
which is misleading, since we actually allow the function to fail. A
(hopefully helpful) comment is also added to explain the lack of error
message.

This is probably related to 1152a05 ("tools: Correct error handling in
fit_image_process_hash()") and the corresponding error reported here:

https://www.mail-archive.com/u-boot@lists.denx.de/msg217417.html

Signed-off-by: Mario Six <mario.six@gdsys.cc>
8 years agotest/py: use absolute dts path in vboot test
Stephen Warren [Mon, 18 Jul 2016 16:07:25 +0000 (10:07 -0600)]
test/py: use absolute dts path in vboot test

Without this, the test fails if the test is run with a cwd other than the
root of the U-Boot source tree.

Fixes: 8729d582595d ("test: Convert the vboot test to test/py")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoarmv8: spl: Call board_init_r from crt0_64 in SPL
Jeremy Hunt [Mon, 18 Jul 2016 16:01:02 +0000 (12:01 -0400)]
armv8: spl: Call board_init_r from crt0_64 in SPL

As part of the startup process for boards using the SPL, the
meaning of board_init_f changed such that it should return normally
rather than calling board_init_r directly. (see
db910353a126d84fe8dff7a694ea792f50fcfb6a )
This was fixed in 32-bit arm, but broke when SPL was added to
64 bit arm. This fixes crt0_64 so that it calls board_init_r
during the SPL and removes the direct call from board_init_f
from the arm SPL example.

Signed-off-by: Jeremy Hunt <Jeremy.Hunt@DEShawResearch.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agoefi_loader: Add debug output for efi_add_memory_map()
Andreas Färber [Sun, 17 Jul 2016 04:57:11 +0000 (06:57 +0200)]
efi_loader: Add debug output for efi_add_memory_map()

Tracing the arguments has been helpful for pinpointing overflows.

Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Alexander Graf <agraf@suse.de>
8 years agotools/env: reuse fw_getenv in fw_printenv function
Andreas Fenkart [Sat, 16 Jul 2016 15:06:15 +0000 (17:06 +0200)]
tools/env: reuse fw_getenv in fw_printenv function

Try to avoid adhoc iteration of the environment. Reuse fw_getenv
to find the variables that should be printed. Only use open-coded
iteration when printing all variables.
For backwards compatibility, keep emitting a newline when
printing with value_only.

Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
8 years agotools/env: move envmatch further up in file to avoid forward declarations
Andreas Fenkart [Sat, 16 Jul 2016 15:06:14 +0000 (17:06 +0200)]
tools/env: move envmatch further up in file to avoid forward declarations

forward declaration not needed when re-ordered

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
8 years agotools/env: kernel-doc for fw_printenv, fw_getenv and fw_parse_script
Andreas Fenkart [Sat, 16 Jul 2016 15:06:13 +0000 (17:06 +0200)]
tools/env: kernel-doc for fw_printenv, fw_getenv and fw_parse_script

there are two groups of functions:
- application ready tools: fw_setenv/fw_getenv/fw_parse_script
these are used, when creating a single binary containing multiple
tools (busybox like)
- file access like: open/read/write/close
above functions are implemented on top of these. applications
can use those to modify several variables without creating a
temporary batch script file
tested with "./scripts/kernel-doc -html -v tools/env/fw_env.h"

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
8 years agogdsys: Drop print_fpga_state function
Tom Rini [Fri, 15 Jul 2016 19:51:40 +0000 (15:51 -0400)]
gdsys: Drop print_fpga_state function

On most platforms the print_fpga_state function is never called.  Only
on dlvision-10g do we, so in that case inline it.  Drop it from
everywhere else to avoid extra strings.

Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Reinhard Pfau <reinhard.pfau@gdsys.cc>
Acked-by: Dirk Eibach <dirk.eibach@gdsys.cc>
8 years agotools/env: allow negative offsets
Stefan Agner [Thu, 14 Jul 2016 00:14:38 +0000 (17:14 -0700)]
tools/env: allow negative offsets

A negative value for the offset is treated as a backwards offset for
from the end of the device/partition for block devices. This aligns
the behavior of the config file with the syntax of CONFIG_ENV_OFFSET
where the functionality has been introduced with
commit 5c088ee841f9 ("env_mmc: allow negative CONFIG_ENV_OFFSET").

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
8 years agotools/env: complete environment device config early
Stefan Agner [Thu, 14 Jul 2016 00:14:37 +0000 (17:14 -0700)]
tools/env: complete environment device config early

Currently flash_read completes a crucial part of the environment
device configuration, the device type (mtd_type). This is rather
confusing as flash_io calls flash_read conditionally, and one might
think flash_write, which also makes use of mtd_type, gets called
before flash_read. But since flash_io is always called with O_RDONLY
first, this is not actually the case in reality.

However, it is much cleaner to complete and verify the config early
in parse_config. This also prepares the code for further extension.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Andreas Fenkart
8 years agoiso: Fix part info command
Alexander Graf [Wed, 20 Jul 2016 23:31:56 +0000 (01:31 +0200)]
iso: Fix part info command

Partitions on the iso el torito partition table interpreter
only start from partition 1. So when printing out the tables,
let's also start counting at 1.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoigep00x0: Falcon mode
Ladislav Michl [Tue, 12 Jul 2016 18:28:34 +0000 (20:28 +0200)]
igep00x0: Falcon mode

Implement spl_start_uboot to let Falcon mode work.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
Acked-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
8 years agoigep00x0: generate default mtdparts according NAND chip used
Ladislav Michl [Tue, 12 Jul 2016 18:28:33 +0000 (20:28 +0200)]
igep00x0: generate default mtdparts according NAND chip used

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
8 years agoigep00x0: UBIize
Ladislav Michl [Tue, 12 Jul 2016 18:28:32 +0000 (20:28 +0200)]
igep00x0: UBIize

Convert IGEP board to use UBI volumes for U-Boot, its environment and
kernel. With exception of first four sectors read by SoC boot
ROM whole (One)NAND is UBI managed.
Also merge NAND and OneNAND defconfigs as now one binary can serve
both flashes.
As code is too big now, drop CONFIG_SPL_EXT_SUPPORT to make it fit.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
8 years agoigep00x0: runtime flash detection
Ladislav Michl [Tue, 12 Jul 2016 18:28:31 +0000 (20:28 +0200)]
igep00x0: runtime flash detection

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
8 years agoigep00x0: remove unused empty function omap_rev_string()
Ladislav Michl [Tue, 12 Jul 2016 18:28:30 +0000 (20:28 +0200)]
igep00x0: remove unused empty function omap_rev_string()

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
8 years agoigep00x0: remove useless setup_net_chip declaration
Ladislav Michl [Tue, 12 Jul 2016 18:28:29 +0000 (20:28 +0200)]
igep00x0: remove useless setup_net_chip declaration

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
8 years agoigep00x0: reorder lan9221 code to remove ifdefs
Ladislav Michl [Tue, 12 Jul 2016 18:28:28 +0000 (20:28 +0200)]
igep00x0: reorder lan9221 code to remove ifdefs

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
8 years agoigep00x0: move sysinfo into C file
Ladislav Michl [Tue, 12 Jul 2016 18:28:27 +0000 (20:28 +0200)]
igep00x0: move sysinfo into C file

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
8 years agocmd: mtdparts: support runtime generated mtdparts
Ladislav Michl [Tue, 12 Jul 2016 18:28:26 +0000 (20:28 +0200)]
cmd: mtdparts: support runtime generated mtdparts

Some CPUs contains boot ROM code capable reading first few blocks
(where SPL resides) of NAND flash and executing it. It is wise to
create separate partition here for SPL. As block size depends on
NAND chip used, we could either use worst case (biggest) partition
size or base its size on actual block size. This patch adds support
for the latter option.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
8 years agocmd: mtdparts: use defaults by default
Ladislav Michl [Tue, 12 Jul 2016 18:28:25 +0000 (20:28 +0200)]
cmd: mtdparts: use defaults by default

Boards which are defining default mtdparts often need them early
in boot process (to load environment from UBI volume, for example).
This is currently solved by adding mtdparts and mtdids variable
definitions also to default environment. With this change, default
partitions are used by default unless explicitely deleted or
redefined.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
8 years agocmd: mtdparts: consolidate mtdparts reading from env
Ladislav Michl [Tue, 12 Jul 2016 18:28:24 +0000 (20:28 +0200)]
cmd: mtdparts: consolidate mtdparts reading from env

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
8 years agocmd: mtdparts: fix null pointer dereference in parse_mtdparts
Ladislav Michl [Tue, 12 Jul 2016 18:28:23 +0000 (20:28 +0200)]
cmd: mtdparts: fix null pointer dereference in parse_mtdparts

In case there is no mtdparts variable in relocated environment,
NULL is assigned to p, which is later fed to strncpy.
Also function parameter mtdparts is completely ignored, so use it
in case mtdparts variable is not found in environment. This
parameter is checked not to be NULL in caller.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
8 years agocmd: mtdparts: fix mtdparts variable presence confusion in mtdparts_init
Ladislav Michl [Tue, 12 Jul 2016 18:28:22 +0000 (20:28 +0200)]
cmd: mtdparts: fix mtdparts variable presence confusion in mtdparts_init

A private buffer is used to read mtdparts variable from non-relocated
environment. A pointer to that buffer is returned unconditionally,
confusing later test for variable presence in the environment.
Fix it by returning NULL when getenv_f fails.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
8 years agomtd: OneNAND: initialize mtd->writebufsize to let UBI work
Ladislav Michl [Tue, 12 Jul 2016 18:28:21 +0000 (20:28 +0200)]
mtd: OneNAND: initialize mtd->writebufsize to let UBI work

io_init checks this value and fails with "bad write buffer size 0 for
2048 min. I/O unit"

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
8 years agomtd: OneNAND: allow board init function fail
Ladislav Michl [Tue, 12 Jul 2016 18:28:20 +0000 (20:28 +0200)]
mtd: OneNAND: allow board init function fail

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
8 years agomtd: OneNAND: add timeout to wait ready loops
Ladislav Michl [Tue, 12 Jul 2016 18:28:19 +0000 (20:28 +0200)]
mtd: OneNAND: add timeout to wait ready loops

Add timeout to onenand_wait ready loop as it hangs here indefinitely
when chip not present. Once there, do the same for onenand_bbt_wait
as well (note: recent Linux driver code does the same)

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
8 years agoarmv7: simplify identify_nand_chip
Ladislav Michl [Tue, 12 Jul 2016 18:28:18 +0000 (20:28 +0200)]
armv7: simplify identify_nand_chip

Use newly introduced function

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
8 years agoarmv7: armv7: introduce set_gpmc_cs0
Ladislav Michl [Tue, 12 Jul 2016 18:28:17 +0000 (20:28 +0200)]
armv7: armv7: introduce set_gpmc_cs0

Allow boards to runtime detect flash type.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
8 years agoarmv7: make gpmc_cfg const
Ladislav Michl [Tue, 12 Jul 2016 18:28:16 +0000 (20:28 +0200)]
armv7: make gpmc_cfg const

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
[trini: Adapt am33xx, duovero, omap_zoom1]
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoarmv7: add reset timeout to identify_nand_chip
Ladislav Michl [Tue, 12 Jul 2016 18:28:15 +0000 (20:28 +0200)]
armv7: add reset timeout to identify_nand_chip

identify_nand_chip hangs forever in loop when NAND is not present.
As IGEPv2 comes either with NAND or OneNAND flash, add reset timeout
to let function fail gracefully allowing caller to know NAND is
not present. On NAND equipped board, reset succeeds on first read,
so 1000 loops seems to be safe timeout.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
8 years agospl: zImage support in Falcon mode
Ladislav Michl [Tue, 12 Jul 2016 18:28:14 +0000 (20:28 +0200)]
spl: zImage support in Falcon mode

Other payload than uImage is currently considered to be raw U-Boot
image. Check also for zImage in Falcon mode.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
8 years agospl: support loading from UBI volumes
Ladislav Michl [Tue, 12 Jul 2016 18:28:13 +0000 (20:28 +0200)]
spl: support loading from UBI volumes

Add support for loading from UBI volumes on the top of NAND
and OneNAND.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
8 years agospl: Lightweight UBI and UBI fastmap support
Thomas Gleixner [Tue, 12 Jul 2016 18:28:12 +0000 (20:28 +0200)]
spl: Lightweight UBI and UBI fastmap support

Booting a payload out of NAND FLASH from the SPL is a crux today, as
it requires hard partioned FLASH. Not a brilliant idea with the
reliability of todays NAND FLASH chips.

The upstream UBI + UBI fastmap implementation which is about to
brought to u-boot is too heavy weight for SPLs as it provides way more
functionality than needed for a SPL and does not even fit into the
restricted SPL areas which are loaded from the SoC boot ROM.

So this provides a fast and lightweight implementation of UBI scanning
and UBI fastmap attach. The scan and logical to physical block mapping
code is developed from scratch, while the fastmap implementation is
lifted from the linux kernel source and stripped down to fit the SPL
needs.

The text foot print on the board which I used for development is:

6854 0 0 6854 1abd
drivers/mtd/ubispl/built-in.o

Attaching a NAND chip with 4096 physical eraseblocks (4 blocks are
reserved for the SPL) takes:

In full scan mode:      1172ms
In fastmap mode:          95ms

The code requires quite some storage. The largest and unknown part of
it is the number of fastmap blocks to read. Therefor the data
structure is not put into the BSS. The code requires a pointer to free
memory handed in which is initialized by the UBI attach code itself.

See doc/README.ubispl for further information on how to use it.

This shares the ubi-media.h and crc32 implementation of drivers/mtd/ubi
There is no way to share the fastmap code, as UBISPL only utilizes the
slightly modified functions ubi_attach_fastmap() and ubi_scan_fastmap()
from the original kernel ubi fastmap implementation.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Acked-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoonenand_spl_simple: Add a simple OneNAND read function
Ladislav Michl [Tue, 12 Jul 2016 18:28:11 +0000 (20:28 +0200)]
onenand_spl_simple: Add a simple OneNAND read function

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
8 years agonand_spl_simple: Add a simple NAND read function
Thomas Gleixner [Tue, 12 Jul 2016 18:28:10 +0000 (20:28 +0200)]
nand_spl_simple: Add a simple NAND read function

To support UBI in SPL we need a simple NAND read function. Add one to
nand_spl_simple and keep it as simple as it goes.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Acked-by: Scott Wood <oss@buserror.net>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
8 years agomtd: Sort subsystem directories aplhabeticaly in Makefile
Ladislav Michl [Tue, 12 Jul 2016 18:28:09 +0000 (20:28 +0200)]
mtd: Sort subsystem directories aplhabeticaly in Makefile

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
8 years agoi2c_eeprom: Add reading support
mario.six@gdsys.cc [Wed, 22 Jun 2016 13:14:16 +0000 (15:14 +0200)]
i2c_eeprom: Add reading support

This patch implements the reading functionality for the generic I2C
EEPROM driver, which was just a non-functional stub until now.

Since the page size will be of importance for the writing support, we
add suitable members to the private data structure to keep track of it.

Compatibility strings for a range of at24c* chips are added.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
8 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-microblaze
Tom Rini [Fri, 22 Jul 2016 13:22:26 +0000 (09:22 -0400)]
Merge branch 'master' of git://www.denx.de/git/u-boot-microblaze

8 years agozynq: defconfig: Remove unnecessary board specific config files
Siva Durga Prasad Paladugu [Tue, 19 Jul 2016 05:13:43 +0000 (10:43 +0530)]
zynq: defconfig: Remove unnecessary board specific config files

Remove unnecessary board specifc config files for
zynq boards(microzed, picozed, ZC770(all), zed) and point
to zynq common config file.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agozynq: config: Enable CONFIG_SYS_NO_FLASH through defconfig
Siva Durga Prasad Paladugu [Tue, 19 Jul 2016 05:13:42 +0000 (10:43 +0530)]
zynq: config: Enable CONFIG_SYS_NO_FLASH through defconfig

Enable config CONFIG_SYS_NO_FLASH through defconfig
for all zynq boards.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoKconfig: Move option CONFIG_SYS_NO_FLASH to Kconfig
Siva Durga Prasad Paladugu [Tue, 19 Jul 2016 05:12:22 +0000 (10:42 +0530)]
Kconfig: Move option CONFIG_SYS_NO_FLASH to Kconfig

Move config option CONFIG_SYS_NO_FLASH as Kconfig
option. All the boards which needs to enable this
option can be done through defconfigs

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agousb: zynq: Define config USB_STORAGE through defconfig
Siva Durga Prasad Paladugu [Fri, 22 Jul 2016 09:30:26 +0000 (15:00 +0530)]
usb: zynq: Define config USB_STORAGE through defconfig

Define config USB_STORAGE through defconfig for all
respective zynq boards

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agousb: Kconfig: Add Kconfigs entry USB_EHCI_ZYNQ
Siva Durga Prasad Paladugu [Fri, 22 Jul 2016 09:21:51 +0000 (14:51 +0530)]
usb: Kconfig: Add Kconfigs entry USB_EHCI_ZYNQ

Add Kconfig entry config option for USB_EHCI_ZYNQ
and update the same to enable for all zynq boards
which supports USB

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM64: zynqmp: Enable AHCI on EP platform
Alexander Graf [Wed, 20 Jul 2016 23:34:00 +0000 (01:34 +0200)]
ARM64: zynqmp: Enable AHCI on EP platform

The EP platform also has working AHCI emulation, so I see little reason
not to implement the plumbing for it that enables us to boot from AHCI.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agomicroblaze: Remove empty ifdef around caches
Michal Simek [Thu, 21 Jul 2016 11:47:52 +0000 (13:47 +0200)]
microblaze: Remove empty ifdef around caches

Code around was removed because of move to Kconfig.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agodm: clk: Remove simple version of clk_get_by_index/name()
Michal Simek [Thu, 14 Jul 2016 11:11:37 +0000 (13:11 +0200)]
dm: clk: Remove simple version of clk_get_by_index/name()

Simple version of clk_get_by_index() added by:
"dm: clk: Add a simple version of clk_get_by_index()"
(sha1: a4b10c088c4f6ef2e2bba33e8cfea369bcbbce44)
is only working for #clock-cells=<1> but not for
any other values. Fixed clocks is using #clock-cells=<0>
which requires full implementation.

Remove simplified versions of clk_get_by_index() and use full version.
Also remove empty clk_get_by_name() which is failing when it is called
which is useless.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
8 years agoARM64: zynqmp: Remove get_uart_clk()
Michal Simek [Thu, 14 Jul 2016 12:41:28 +0000 (14:41 +0200)]
ARM64: zynqmp: Remove get_uart_clk()

ZynqMP will use reading clock freq directly from DT.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoserial: zynq: Read information about clock from DT
Michal Simek [Thu, 14 Jul 2016 12:40:03 +0000 (14:40 +0200)]
serial: zynq: Read information about clock from DT

Read information about clock frequency from DT.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Moritz Fischer <moritz.fischer@ettus.com>
8 years agoARM64: zynqmp: Enable SPL for all zynqmp boards
Michal Simek [Fri, 15 Jul 2016 06:41:46 +0000 (08:41 +0200)]
ARM64: zynqmp: Enable SPL for all zynqmp boards

Compile SPL for all boards even psu_init.c/h files are not in the tree
yet. But this change enables covering SPL issues in mainline.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM64: zynqmp: Enable CLK and SPL_CLK by default
Michal Simek [Thu, 14 Jul 2016 13:07:54 +0000 (15:07 +0200)]
ARM64: zynqmp: Enable CLK and SPL_CLK by default

Serial driver starts to use clk framework that's why
enable it by default.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agospl: Fix compilation warnings for arm64
Michal Simek [Wed, 27 Apr 2016 14:07:20 +0000 (16:07 +0200)]
spl: Fix compilation warnings for arm64

Make code 64bit aware.

Warnings:
+../arch/arm/lib/spl.c: In function ‘jump_to_image_linux’:
+../arch/arm/lib/spl.c:63:3: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
+../common/spl/spl_fat.c: In function ‘spl_load_image_fat’:
+../common/spl/spl_fat.c:91:33: warning: cast to pointer from integer
of different size [-Wint-to-pointer-cast]

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agommc: sdhci: Disable internal clock enable bit
Siva Durga Prasad Paladugu [Thu, 25 Feb 2016 07:21:50 +0000 (12:51 +0530)]
mmc: sdhci: Disable internal clock enable bit

Disable internal clock by clearing the internal
clock enable bit. This bit needs to be cleared too
when we stop the SDCLK for changing the frequency
divisor. This bit should be set to zero when the
device is not using the Host controller.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoapi: Disable api_net when DM is used
Michal Simek [Mon, 6 Jun 2016 08:58:40 +0000 (10:58 +0200)]
api: Disable api_net when DM is used

When CONFIG_API is selected with DM_ETH this
error is present:
api/api_net.c: In function 'dev_enum_net':
api/api_net.c:61:35: warning: initialization from incompatible pointer
type
  struct eth_device *eth_current = eth_get_dev();
                                   ^
api/api_net.c:68:39: error: dereferencing pointer to incomplete type
  memcpy(di->di_net.hwaddr, eth_current->enetaddr, 6);
                                       ^
Disable api_net functions when ETH_DM is selected.

Signed-off-by: Chris Johns <chrisj@rtems.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM: zynq/zynqmp: Use the default CONFIG_BOOTDELAY=2
Michal Simek [Tue, 21 Jun 2016 12:39:11 +0000 (14:39 +0200)]
ARM: zynq/zynqmp: Use the default CONFIG_BOOTDELAY=2

Based on:
"ARM: uniphier: use the default CONFIG_BOOTDELAY=2"
(sha1: 7c8ef0feb97586d35b0296b48903daef8c06ab21)

"I do not insist on CONFIG_BOOTDELAY=3. The default value in Kconfig,
CONFIG_BOOTDELAY=2, is just fine for these boards."

Reported-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoMerge git://git.denx.de/u-boot-mpc85xx
Tom Rini [Fri, 22 Jul 2016 00:20:00 +0000 (20:20 -0400)]
Merge git://git.denx.de/u-boot-mpc85xx

8 years agoMerge branch 'master' of git://git.denx.de/u-boot-tegra
Tom Rini [Thu, 21 Jul 2016 22:54:58 +0000 (18:54 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-tegra

8 years agoRevert "stm32: Change USART port to USART6 for stm32f746 discovery board"
Tom Rini [Thu, 21 Jul 2016 19:38:13 +0000 (15:38 -0400)]
Revert "stm32: Change USART port to USART6 for stm32f746 discovery board"

Per Vikas' request, the problem this commit is supposed to be solving is
something he doesn't see and further this introduces additional hardware
requirements.

This reverts commit 4b2fd720a7b2f78c42d1565edf4c67f378c65440.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agopowerpc/85xx: Increase fdt address
Scott Wood [Tue, 19 Jul 2016 22:52:06 +0000 (17:52 -0500)]
powerpc/85xx: Increase fdt address

Loading the fdt at 0xc00000 fails if the uncompressed kernel image is
greater than 12 MiB, which is quite common with modern kernels and
multiplatform defconfigs.  Move fdtaddr to 0x1e00000 which is just under
the ramdiskaddr on most targets.

Signed-off-by: Scott Wood <oss@buserror.net>
Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Dirk Eibach <eibach@gdsys.de>
Cc: Andy Fleming <afleming@gmail.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agodoc: SPL: Add README for secure boot support
Sumit Garg [Thu, 14 Jul 2016 16:27:53 +0000 (12:27 -0400)]
doc: SPL: Add README for secure boot support

Adds information regarding SPL handling validation process of main u-boot
image on power/mpc85xx and arm/layerscape platforms.

Signed-off-by: Sumit Garg <sumit.garg@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agopowerpc/mpc85xx: T104x: Add nand secure boot target
Sumit Garg [Thu, 14 Jul 2016 16:27:52 +0000 (12:27 -0400)]
powerpc/mpc85xx: T104x: Add nand secure boot target

For mpc85xx SoCs, the core begins execution from address 0xFFFFFFFC.
In non-secure boot scenario from NAND, this address will map to CPC
configured as SRAM. But in case of secure boot, this default address
always maps to IBR (Internal Boot ROM).
The IBR code requires that the bootloader(U-boot) must lie in 0 to 3.5G
address space i.e. 0x0 - 0xDFFFFFFF.

For secure boot target from NAND, the text base for SPL is kept same as
non-secure boot target i.e. 0xFFFx_xxxx but the SPL U-boot binary will
be copied to CPC configured as SRAM with address in 0-3.5G(0xBFFC_0000)
As a the virtual and physical address of CPC would be different. The
virtual address 0xFFFx_xxxx needs to be mapped to physical address
0xBFFx_xxxx.

Create a new PBI file to configure CPC as SRAM with address 0xBFFC0000
and update DCFG SCRTACH1 register with location of Header required for
secure boot.

The changes are similar to
commit 467a40dfe35f48d830f01a72617207d03ca85b4d
    powerpc/mpc85xx: SECURE BOOT- NAND secure boot target for P3041

While P3041 has a 1MB CPC and does not require SPL. On T104x, CPC
is only 256K and thus SPL framework is used.
The changes are only applicable for SPL U-Boot running out of CPC SRAM
and not the next level U-Boot loaded on DDR.

Reviewed-by: Ruchika Gupta <ruchika.gupta@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Aneesh Bansal <aneesh.bansal@nxp.com>
Signed-off-by: Sumit Garg <sumit.garg@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agopowerpc/mpc85xx: SECURE BOOT- Enable chain of trust in SPL
Sumit Garg [Thu, 14 Jul 2016 16:27:51 +0000 (12:27 -0400)]
powerpc/mpc85xx: SECURE BOOT- Enable chain of trust in SPL

As part of Chain of Trust for Secure boot, the SPL U-Boot will validate
the next level U-boot image. Add a new function spl_validate_uboot to
perform the validation.

Enable hardware crypto operations in SPL using SEC block.
In case of Secure Boot, PAMU is not bypassed. For allowing SEC block
access to CPC configured as SRAM, configure PAMU.

Reviewed-by: Ruchika Gupta <ruchika.gupta@nxp.com>
Signed-off-by: Aneesh Bansal <aneesh.bansal@nxp.com>
Signed-off-by: Sumit Garg <sumit.garg@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agompc83xx: make it bootable with the latest kernel
Kevin Hao [Fri, 8 Jul 2016 03:25:15 +0000 (11:25 +0800)]
mpc83xx: make it bootable with the latest kernel

Due to the blow up of the latest kernel size, the default gnuzip
size (8M) seems too small. The yocto kernel size I built for
mpc8315erdb board is 5294393, and it can't be boot by using the
latest u-boot. So expand gnuzip buffer for all the mpc83xx boards
to fix this issue.

Robert P. J. Day also pointed that the kernel partition on the NAND
flash is also too small, fix it at the same time.

Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agompc83xx: fix the corruption of u-boot when saveenv
Kevin Hao [Fri, 8 Jul 2016 03:25:14 +0000 (11:25 +0800)]
mpc83xx: fix the corruption of u-boot when saveenv

Robert P. J. Day has pointed that the value of SYS_MONITOR_LEN in
MPC8315ERDB.h is smaller than the u-boot.bin. This will cause the
overlap between the code of u-boot and the environment variable.
So when executing saveenv, it will corrupt the code of u-boot and
causes the board not boot. Fix this for all the mpc83xx boards by
reserving a 512K area.

Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Reviewed-by: York Sun <york.sun@nxp.com>