aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-07-12tools/kwbimage: fix v1 header verificationBaruch Siach
The verify_header callback in kwbimage.c only verifies v0 headers checksum. Running 'mkimage -l' on a v1 image gives the following misleading output: GP Header: Size ae000000 LoadAddr 34160600 Implement support for v1 headers. For that, factor out the header checksum code to a separate main_hdr_checksum_ok() routine. This routine relies on the fact that the checksum field offset is the same in both v0 and v1 headers. With this patch applied 'mkimage -l' correctly identifies the image: Image Type: MVEBU Boot from sdio Image Image version:1 Data Size: 398904 Bytes = 389.55 KiB = 0.38 MiB Load Address: 007fffc0 Entry Point: 00800000 Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Stefan Roese <sr@denx.de>
2017-07-12tools/kwbimage.h: make offset marks style consistentBaruch Siach
The offset marking in kwbimage.h is inconsistent. main_hdr_v0 uses decimals, main_hdr_v1 uses hex without '0x' prefix, secure_hdr_v1 uses hex with '0x' prefix. Make all offset marks hex with '0x' prefix. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Stefan Roese <sr@denx.de>
2017-07-12tools/kwbimage: update the list of SoCs using v1 headerBaruch Siach
Armada 38x also uses image header v1. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Stefan Roese <sr@denx.de>
2017-07-12arm64: mvebu: use single defconfig for Armada8K development boardsIgal Liberman
Currently, Marvell Armada8k development board use 3 different defconfigs: mvebu_db-88f7040-nand_defconfig mvebu_db-88f7040_defconfig mvebu_db-88f8040_defconfig Having 3 different defconfigs makes maintenance difficult. This patch removes the defconfigs mentioned above and introduce a new defconfig which represents the Armada8k family. NOTE: In order not to break automatic tools compilation, a default device-tree is set in the defconfig (armada-8040-db). However, when compiling u-boot, the user MUST explicitly export the DEVICE_TREE for the requested board because using A80x0 device-tree on A70x0 might break the device. For more information, refer to "doc/README.marvell" (intoduced in this patch). Change-Id: I98515b6306498358f3722ecf7ac4c87f236ebbd8 Signed-off-by: Igal Liberman <igall@marvell.com> Signed-off-by: Stefan Roese <sr@denx.de>
2017-07-12marvell: armada385: Add the Turris Omnia boardMarek Behún
The Turris Omnia is a open-source router created by CZ.NIC. The code is based on the Marvell/db-88f6820-gp by Stefan Roese with modifications from Tomas Hlavacek in the CZ.NIC turris-omnia-uboot repository, which can be found at https://gitlab.labs.nic.cz/turris/turris-omnia-uboot By default, the Turris Omnia uses btrfs as the main and only filesystem, and also loads kernel and device tree from this filesystem. Since U-Boot does not yet support btrfs, you should not flash your Turris Omnia board with this unless you know what you are doing. Signed-off-by: Tomas Hlavacek <tomas.hlavacek@nic.cz> Signed-off-by: Marek Behun <marek.behun@nic.cz> create mode 100644 board/CZ.NIC/turris_omnia/Makefile create mode 100644 board/CZ.NIC/turris_omnia/kwbimage.cfg create mode 100644 board/CZ.NIC/turris_omnia/turris_omnia.c create mode 100644 configs/turris_omnia_defconfig create mode 100644 include/configs/turris_omnia.h Signed-off-by: Stefan Roese <sr@denx.de>
2017-07-12drivers/misc: Add basic support for ATSHA204A Crypto moduleMarek Behún
This module can be found on the Turris Omnia board connected via the I2C interface. Among some cryptographic functions, the chip has a 512 bit One Time Programmable memory, 88 byte configuration memory and 512 byte general purpose memory. The Turris Omnia stores serial number and device MAC address in the OTP memory. This commit adds basic support for reading the EEPROM and also exposes the chips Random Number Generator. The driver is based on code by Josh Datko, Cryptotronix, jbd@cryptotronix.com and also Tomas Hlavacek, CZ.NIC, tomas.hlavacek@nic.cz Signed-off-by: Tomas Hlavacek <tomas.hlavacek@nic.cz> Signed-off-by: Marek Behun <marek.behun@nic.cz> create mode 100644 drivers/misc/atsha204a-i2c.c create mode 100644 include/atsha204a-i2c.h Signed-off-by: Stefan Roese <sr@denx.de>
2017-07-12drivers/i2c/muxes/pca954x: Add pca9547 I2C mux supportMarek Behún
This I2C mux is found, for example, on the Turris Omnia board. Signed-off-by: Marek Behun <marek.behun@nic.cz> Reviewed-by: Heiko Schocher <hs@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
2017-07-12arch/arm/dts: Add Turris Omnia device treeMarek Behún
This device tree is taken from mainline Linux kernel commit 7b7db5ab. Added is also a -u-boot.dtsi file with these additions: - aliases for I2C and SPI devices are added, because i2cmux and SPI flash doesn't work otherwise - spi_flash node has been added so that the new DM API works - the ATSHA204A node is added in the i2c@5 node - "u-boot,dm-pre-reloc"s are added in needed nodes for SPL build to work correctly Signed-off-by: Marek Behun <marek.behun@nic.cz> create mode 100644 arch/arm/dts/armada-385-turris-omnia-u-boot.dtsi create mode 100644 arch/arm/dts/armada-385-turris-omnia.dts Signed-off-by: Stefan Roese <sr@denx.de>
2017-07-12orion_wdt: Support for the Orion WatchdogMarek Behún
The Orion watchdog can be found on some Marvell Armada chips. This driver is based on the code by Tomas Hlavacek in the CZ.NIC turris-omnia-uboot repository, which can be found at https://gitlab.labs.nic.cz/turris/turris-omnia-uboot, and that one is based on code by Sylver Bruneau. His code is already in mainline Linux kernel. The code uses the new driver model API. Signed-off-by: Tomas Hlavacek <tomas.hlavacek@nic.cz> Signed-off-by: Marek Behun <marek.behun@nic.cz> create mode 100644 drivers/watchdog/orion_wdt.c Signed-off-by: Stefan Roese <sr@denx.de>
2017-07-12driver/ddr: Add support for setting timing in hws_topology_mapMarek Behún
The DDR3 training code for Marvell A38X currently computes 1t timing when given board topology map of the Turris Omnia, but Omnia needs 2t. This patch adds support for enforcing the 2t timing in struct hws_topology_map, through a new enum hws_timing, which can assume following values: HWS_TIM_DEFAULT - default behaviour, compute whether to enable 2t from the number of CSs HWS_TIM_1T - enforce 1t HWS_TIM_2T - enforce 2t This patch also sets all the board topology maps (db-88f6820-amc, db-88f6820-gp, controlcenterdc and clearfog) to have timing set to HWS_TIM_DEFAULT. Signed-off-by: Marek Behun <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
2017-07-11am33xx: board: Refactor USB initialization into separate functionAlexandru Gagniuc
The declaration of otg*_plat and otg*_board_data is guarded by CONFIG_USB_MUSB_*, but their use in arch_misc_init is not. The ifdef flow goes something like: if (CONFIG_USB_MUSB_* && other_conditions) declare usb_data if (other_conditions) use usb_data Thus when CONFIG_USB_MUSB_* is not declared, we try to use the data structures, but these structures aren't defined. To fix this, move the USB initialization code into the same #ifdef which guards the declaration of the data structures. Since the DM_USB vs legacy cases are completely different, use two versions of arch_misc_init(), for readability. Signed-off-by: Alexandru Gagniuc <alex.g@adaptrum.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-07-11configs: am335x_evm: Enable FASTBOOT based on kconfigAlexandru Gagniuc
When CONFIG_CMD_FASTBOOT or CONFIG_USB_FUNCTION_FASTBOOT are defined in am335x_evm.h, a dependency on g_dnl.c is created. This in turn creates a dependency on having USB gadget enabled. As a result we can't create configs with USB gadget disabled. Since these CONFIG_ variables are now part of kconfig, move them to the board defconfigs, and out of am335x_evm.h. This both preserves current defaults, and allows creating configs with USB gadget off. Signed-off-by: Alexandru Gagniuc <alex.g@adaptrum.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-07-11ARM: ti816x: Fix enabling GPIO0, enable GPIO1 as wellTom Rini
The TI816x has 2 GPIO banks. For bank 0 we had been clearing the enable bit when setting BIT(8). Correct this by setting it to BIT(1) | BIT(8) after we set and wait for BIT(1) (aka PRCM_MOD_EN). Enable GPIO1 as well so that when CMD_GPIO is enabled it won't crash probing the second bank. Enable CMD_GPIO on ti816x_evm. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-07-11ti816x: Enable ethernet supportTom Rini
The ti816x SoC revision of the ethernet IP block is handled by the "davinci_emac" driver, rather than the "cpsw" driver as done by later members of the family. Enable the relevant plumbing. Signed-off-by: Sriramakrishnan <srk@ti.com> Signed-off-by: Vitaly Wool <vitaly.wool@konsulko.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2017-07-11mtd: nand: make nand_info array staticGrygorii Strashko
Make make nand_info array static, since all direct users of nand_info array have been converted to use get_nand_dev_by_index() API. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2017-07-11armv8: fsl-layerscape: use get_nand_dev_by_index()Grygorii Strashko
As part of preparation for nand DM conversion the new API has been introduced to remove direct access to nand_info array. So, use it here instead of accessing to nand_info array directly. Cc: Albert Aribaud <albert.u.boot@aribaud.net> Cc: York Sun <york.sun@nxp.com> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2017-07-11board: toradex: use get_nand_dev_by_index()Grygorii Strashko
As part of preparation for nand DM conversion the new API has been introduced to remove direct access to nand_info array. So, use it here instead of accessing to nand_info array directly. Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2017-07-11board: BuR: use get_nand_dev_by_index()Grygorii Strashko
As part of preparation for nand DM conversion the new API has been introduced to remove direct access to nand_info array. So, use it here instead of accessing to nand_info array directly. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Reviewed-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-07-11board: ronetix: use get_nand_dev_by_index()Grygorii Strashko
As part of preparation for nand DM conversion the new API has been introduced to remove direct access to nand_info array. So, use it here instead of accessing to nand_info array directly. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2017-07-11board: atmel: use get_nand_dev_by_index()Grygorii Strashko
As part of preparation for nand DM conversion the new API has been introduced to remove direct access to nand_info array. So, use it here instead of accessing to nand_info array directly. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2017-07-11cmd: mvebu: bubt: use get_nand_dev_by_index()Grygorii Strashko
As part of preparation for nand DM conversion the new API has been introduced to remove direct access to nand_info array. So, use it here instead of accessing to nand_info array directly. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2017-07-11mtd: nand: drv: use get_nand_dev_by_index()Grygorii Strashko
As part of preparation for nand DM conversion the new API has been introduced to remove direct access to nand_info array. So, use it here instead of accessing to nand_info array directly Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2017-07-11net: fm: use get_nand_dev_by_index()Grygorii Strashko
As part of preparation for nand DM conversion the new API has been introduced to remove direct access to nand_info array. So, use it here instead of accessing to nand_info array directly. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2017-07-11net: phy: cortina: use get_nand_dev_by_index()Grygorii Strashko
As part of preparation for nand DM conversion the new API has been introduced to remove direct access to nand_info array. So, use it here instead of accessing to nand_info array directly Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2017-07-11cmd: nand: remove direct access to struct mtd_info->privGrygorii Strashko
Replace direct access to struct mtd_info->priv with proper accessor mtd_to_nand(). Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2017-07-11fs: use get_nand_dev_by_index()Grygorii Strashko
As part of preparation for nand DM conversion the new API has been introduced to remove direct access to nand_info array. So, use it here instead of accessing to nand_info array directly. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2017-07-11common: use get_nand_dev_by_index()Grygorii Strashko
As part of preparation for nand DM conversion the new API has been introduced to remove direct access to nand_info array. So, use it here instead of accessing to nand_info array directly. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2017-07-11cmd: jffs2: use get_nand_dev_by_index()Grygorii Strashko
As part of preparation for nand DM conversion the new API has been introduced to remove direct access to nand_info array. So, use it here instead of accessing to nand_info array directly. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2017-07-11cmd: bootm: use get_nand_dev_by_index()Grygorii Strashko
As part of preparation for nand DM conversion the new API has been introduced to remove direct access to nand_info array. So, use it here instead of accessing to nand_info array directly. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2017-07-11dfu: dfu_nand: use get_nand_dev_by_index()Grygorii Strashko
As part of preparation for nand DM conversion the new API has been introduced to remove direct access to nand_info array. So, use it here instead of accessing to nand_info array directly. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2017-07-11common: env_nand: use get_nand_dev_by_index()Grygorii Strashko
As part of preparation for nand DM conversion the new API has been introduced to remove direct access to nand_info array. So, use it here instead of accessing to nand_info array directly. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2017-07-11cmd: nand: abstract global variable usage for dm conversionMugunthan V N
nand_info is used all over the file so abstract it with get_nand_dev_by_index() which will help for DM conversion. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2017-07-11Merge git://git.denx.de/u-boot-dmTom Rini
2017-07-11Merge branch 'master' of git://git.denx.de/u-boot-rockchipTom Rini
2017-07-11dm: ofnode: use fdt32_t for DT property value to fix sparse warningMasahiro Yamada
DTB is encoded in big endian. When we retrieve property values, we need to use fdt32_to_cpu (aka be32_to_cpu) for endian conversion. This is a bit error-prone, but sparse is useful to detect endian mismatch. We need to use (fdt32_t *) instead of (u32 *) for a pointer of a property value. Otherwise sparse warns "cast to restricted __be32". Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-07-11dm: include <dm/util.h> from driver/core/dump.cMasahiro Yamada
Include <dm/util.h> to fix sparse warnings: symbol 'dm_dump_all' was not declared. Should it be static? symbol 'dm_dump_uclass' was not declared. Should it be static? Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-07-11dm: ofnode: simplify ofnode_read_bool()Masahiro Yamada
Reuse ofnode_get_property() to simplify the implementation. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-07-11dm: ofnode: rename ofnode_read_prop() to ofnode_get_property()Masahiro Yamada
This function returns the pointer to the value of a node property. The current name ofnode_read_prop() is confusing. Follow the naming of_get_property() from Linux. The return type (const u32 *) is wrong. DT property values can be strings as well as integers. This is why of_get_property/fdt_getprop returns an opaque pointer. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-07-11dm: ofnode: simplify ofnode_read_prop()Masahiro Yamada
The code inside the if-block is the same as of_get_property(). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-07-11dm: ofnode: use ofnode_read_bool() to check property existenceMasahiro Yamada
This will clarify the code. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-07-11dm: include <dm/util.h> from drivers/core/util.cMasahiro Yamada
Fix sparse warnings "... was not declared. Should it be static?" Also, fix redefinition of dm_warn/dm_dbg. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-11fdt: Check for NULL return from fdt_getprop in 'fdt set'Tom Rini
While the previous pass through fixed one place where we knew that fdt_getprop would be given a positive len, in the case of 'fdt set' we do not, so check that we did no get NULL from fdt_getprop(). Cc: Simon Glass <sjg@chromium.org> Reported-by: Coverity (CID: 163249) Fixes 72c98ed1ab48 ("fdt: Add a check to do_fdt() for coverity") Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-07-11tegra: fdt: Ensure that the console UART is enabledSimon Glass
Many tegra boards have the console UART node disabled. With livetree this prevents serial from working since it does not 'force' the console to be bound. Updates the affected boards to fix this error. The boards were checked with: for b in $(grep tegra boards.cfg |grep -v integrator | \ awk '{print $7}' | sort); do echo $b; fdtgrep -c nvidia,tegra20-uart b/$b/u-boot.dtb |grep okay; done Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1
2017-07-11tegra: Show a debug message if the LCD PMIC fails to startSimon Glass
This error condition should have a debug() message. Add it. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1
2017-07-11dm: serial: Add livetree supportSimon Glass
Add support for a live device tree to the core serial uclass. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1
2017-07-11dm: serial: Separate out the core serial-device finding codeSimon Glass
This function is quite long. Move the core code into a separate function in preparation for adding livetree support. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1
2017-07-11dm: serial: ns16550: Convert to livetreeSimon Glass
Update this driver to support a live device tree. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1
2017-07-11tegra: Fix up include file orderingSimon Glass
Update these two files so include files in the right order. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1
2017-07-11video: simple-panel: Add a little more debuggingSimon Glass
Add some debugging to show when the backlight is enabled. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1
2017-07-11dm: video: Update pwm_backlight to support livetreeSimon Glass
Update this driver to support a live device tree. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1