summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-12-03ARM: DRA7: Make FIT boot as default boot on HS devicesLokesh Vutla
Verification has to be done before booting any images on HS devices. So default the boot to FIT on HS devices. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-12-03ti_armv7_common: env: Add support for loading FIT imagesLokesh Vutla
FIT is a new image format which is a Tree like structure and gives more flexibility in handling of various images. Mainly used for unification of multiple images in a single blob and provide security information for each image. U-Boot already has support for loading such images, so adding the environment support to load FIT image on all TI platforms. Reviewed-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-12-03ti_armv7_common: env: Consolidate support for loading images from mmcLokesh Vutla
Support for loading images from mmc is duplicated in all TI platforms. Add this information to DEFAULT_MMC_TI_ARGS so that it can be reused in all TI platforms. Reviewed-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-12-03configs: am43x: hs: Modify SPL load address to fix UART boot issueMadan Srinivas
An issue in the TI secure image generation tool causes the ROM to load the SPL at a different load address than what is specified by CONFIG_ISW_ENTRY_ADDR while doing a peripheral boot. This causes the SPL to fail on secure devices during peripheral boot. The TI secure image generation tool has been fixed so that the SPL will always be loaded at 0x403018E0 by the ROM code for both peripheral and memory boot modes. am43x hs defconfig file have been updated to reflect this change. Signed-off-by: Madan Srinivas <madans@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2016-12-03r2dplus: fixup CONFIG_SYS_TEXT_BASE to account arch/sh changesVladimir Zapolskiy
This change allows to reserve enough space at the end of board SDRAM to store two copies of U-Boot and malloc heap. Due to selection of the CONFIG_SYS_TEXT_BASE the second code/data copying is not avoided, first of all this may depend on a used toolchain, secondly at this point some level of volatility is wanted to do more platform changes and do not care about probably changed calculated in runtime relocation offset. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
2016-12-03sh: generate position independent code for all platformsVladimir Zapolskiy
Finally add fpic compilation option to produce relocatable code. Note that this requires to define CONFIG_NEEDS_MANUAL_RELOC for all board files, also relocation support still has some limitations (e.g. a developer should care not to overwrite the executing code or memset() with zeroes not yet relocated data on malloc init etc.), which may be fixed while switching to PIE. Due to short investigation the architecture code is not ready for PIE linking, this will require some manipulations with .dyn* sections. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
2016-12-03sh: share the correct version of start.S among all cpusVladimir Zapolskiy
It is easy to note that SH2/SH3/SH4 start.S code is practically the same with a minor difference for SH2 where a short data header is present. To avoid unwanted code duplication and to automatically convert SH2 and SH3 platforms to generic board support move fixed SH4 start.S into arch/sh/lib/start.S and share it among all platforms. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-03sh4: fix start.S by calling board_init_f() after first code relocationVladimir Zapolskiy
Like on ARM platform keep the first code relocation from a U-boot image storage to RAM at CONFIG_SYS_TEXT_BASE, then pass execution to a generic board_init_f() with empty GD flags. If CONFIG_SYS_TEXT_BASE is equal to a calculated by board_init_f() relocation address there will be no more code and data copy, however it's worth to mention that the first copy happens even if $pc on _start is the same as CONFIG_SYS_TEXT_BASE, on practice this works without a problem. Also note that _sh_start is renamed back to _start to correct gd->mon_len calculation by setup_mon_len(), the opposite rename was done in pre-generic board commit 2024b968ee9 ("sh: Fix build in start.S"). Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-03sh: add shared relocate_code() function and call board_init_r()Vladimir Zapolskiy
Commits b61e90e6fd83 ("sh: Drop the arch-specific board init") and f41e6088eb1a ("sh: Fix build errors for generic board") left code and data relocation done in start.S, however further actual U-boot configuration is not started anymore. Practically SH boards with the code relocated into the expected position by start.S still can be booted, so the change adds this option and provides an option how to relocate code for board_init_r() execution. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-03sh: add common dram_init() function for all boardsVladimir Zapolskiy
Generic board support assumes a different method of specifying DRAM size on board, also it can be shared among all boards, notably only sh7763rdp board has a custom legacy dram_init(), however the difference is only in printing some additional information, this feature can be removed. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-03sh: define CONFIG_DISPLAY_BOARDINFO to print board informationVladimir Zapolskiy
All SH boards define a checkboard() function which outputs basic board information on boot, however generic board support requires to define CONFIG_DISPLAY_BOARDINFO to do that, so define it for the boards. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-03sh: remove undefined DEBUG preprocessor token from board config filesVladimir Zapolskiy
By default this undef is a noop, moreover at this point when the platform support is broken is prevents debugging of U-boot by manual insertion of #define DEBUG into common files, so it makes sense to remove the option from all SH boards as a harmful one. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-03sh: add MEMORY command to a shared linker scriptVladimir Zapolskiy
At the moment in runtime all defined sections are copied into or created in RAM, specify this explicitly to assert potential out of RAM placements of the sections. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-03sh: define entry point and reloc_dst inside a linker scriptVladimir Zapolskiy
No functional change, concentrate linker script commands in one place for convenience. Entry point is set to CONFIG_SYS_TEXT_BASE by default on build, so this option can be omitted from being added to the linker script. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-03sh: place board lowlevel_init code in the beginning of .textVladimir Zapolskiy
Reference lowlevel_init of all supported SH2A/SH3/SH4/SH4A boards from a shared linker script, the lowlevel_init function will be called by a relative address. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-03sh4: use single u-boot linker script for all boardsVladimir Zapolskiy
Three supported SH4/SH4A boards with the bootloader image stored on SPI flash have own flavour of a linker script, in turn they are equal among each other. The only difference is that the text from lowlevel_init.o is placed right after start.o, which makes sense. Note that .bss section is not marked as NOLOAD, because for about 10 years this is a default option of a GNU linker, either the attribute is found or not the resulting image file is the same. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-03common: sh: add necessary define bits to board_fVladimir Zapolskiy
Since a platform conversion to generic board support has not been accomplished some architecture specific bits are missing from board_f init sequence, the change adds a number of basic expected callbacks into early init sequence. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-03r2dplus: select rtl8139 driver in defconfigVladimir Zapolskiy
CONFIG_RTL8139 was moved to a board defconfig by a commit 86e9dc86b1a2 ("net: Move CONFIG_RTL8139 to Kconfig"), however it was done incorrectly due to a missing CONFIG_NETDEVICES selection, thus virtually it was just a removal of the driver compilation. As an unlucky consequence the option was completely removed by a purge commit adad96e60d0e ("configs: Re-sync HUSH options"), restore the driver inclusion back. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-03r2dplus: use P1 area space for text base and PCI system memoryVladimir Zapolskiy
While both options are acceptable use P1 area physical addresses instead of external memory space of text base and PCI system memory for unification purposes, all other supported superh boards have the same selection. This allows to easily ensure that CONFIG_SYS_TEXT_BASE is located within available DRAM. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-03sh4: remove __io config options from r2dplus and r7780mp boardsVladimir Zapolskiy
Defined __io is no-op for the SH architecture and it can be removed from board files without any functional change. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-03pci: sh7751: map PCI memory space into SDRAMVladimir Zapolskiy
For ease of use and accounting a condition that on SH4 pci_phys_to_bus() and pci_bus_to_phys() are one in one mappings due to unimplemented __iomem() conversion, this change fixes access to SDRAM memory by PCI devices. This change also generalizes PCI system memory configuration, which is taken from board specific defines rather than hardcoded in the PCI host driver. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
2016-12-03pci: sh7751: fix up PCI I/O space addressVladimir Zapolskiy
The change actually maps PCI I/O window to the same address on PCI bus as it is stated by a comment, before the change transfers to the PCI I/O space are failed due to misconfiguration of the most significant 14 bits of the PCI address in PCIIOBR (note that it is set to 0x0). Most probably the problem remained unnoticed, because communcation to all tested PCI devices is done over PCI memory space only. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
2016-12-03sh4: cache: move exported cache manipulation functions into cache.cVladimir Zapolskiy
No functional change, moving cache manipulation functions into cache.c allows to collect all of them in a single location and as a pleasant side effect cache_control() function can be unexported now. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-03sh: cache: don't modify CCR from P1 areaVladimir Zapolskiy
cache_wback_all() is a local function and it is called from cache_control() only, which is in turn jumps to P2 area. The change fixes an issue when cache_wback_all() returns from P2 to P1, however cache_control() continues to manipulate with CCR register, according to the User's Manual this is restricted. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
2016-12-03sh: cache use jump_to_P2() and back_to_P1() from asm/system.hVladimir Zapolskiy
Both jump_to_P2() and back_to_P1() functions are found in asm/system.h header file and functionally they are the same, don't redefine them. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-03sh3: remove unused cache.c file from being builtVladimir Zapolskiy
The change is similar to commit 994b56616bae ("sh: delete an unused source file") for SH2, however here the removed cache.c file was built and included into an image as a dead code. If it is needed in future the contents can be reused from a similar arch/sh/cpu/sh4/cache.c file, which is in turn will be moved to a shared among all core flavours location at arch/sh/lib/cache.c. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-03sh4: cache: correct flush_cache() to writeback and invalidateVladimir Zapolskiy
In common usecases flush_cache() assumes both cache invalidation and write-back to memory, instead of doing cache invalidation only with the wrapped 'ocbi' instruction pin flush_cache() to cache invalidation with memory write-back done by 'ocbp'. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-03sh4: cache: correct dcache flush to invalidate with write-backVladimir Zapolskiy
In common usecases flush_cache() assumes both cache invalidation and write-back to memory, thus in flush_dcache_range() implementation change SH4 cache write-back only instruction 'ocbwb' with cache purge instruction 'ocbp', according to the User's Manual there should be no performance penalty for that. Note that under circumstances only cache invalidation is expected from flush_cache() call, in these occasional cases the current version of flush_cache() works, which is a wrapper over invalidate_dcache_range() at the moment, this will be fixed in the following change. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
2016-12-03compiler.h: use u-boot endian macros on OpenBSDJonathan Gray
When building u-boot on sparc64 and powerpc hosts it became clear that u-boot expects endian conversion defines to be macros: lib/crc32.c:87: error: braced-group within expression allowed only inside a function For OpenBSD switch from using system definitions equivalent to the u-boot ones and define glibc __BYTE_ORDER __BIG_ENDIAN __LITTLE_ENDIAN names, as at least some parts of the non-cross build assumes those names are present (ie crc32.c). Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
2016-12-03ARM: am57xx_evm: enable DFU supportSekhar Nori
AM57xx GP EVM has USB2 port of the SoC exposed as USB client port. It is useful to be able to use this port for USB DFU downloads. Enable USB DFU support. Tested on AM57x GP EVM Rev A3 using DFU to download to connected SD card. configs for HS version of the AM57x EVM are included in the patch but not really tested. Signed-off-by: Sekhar Nori <nsekhar@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-12-03ARM: ti: consolidate dfu environment variablesSekhar Nori
Introduce include/environment/ti/dfu.h that consolidates environment variable definitions for various TI boards that support DFU today. Tested on AM335x EVM, AM437x SK EVM and DRA74x EVM by using DFU to write to SD card. Signed-off-by: Sekhar Nori <nsekhar@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-12-02cmd: scsi: Make private functions staticMichal Simek
Two functions should be static because they are not exported to any other file. Warnings were reported by sparse C=1. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-02scsi: Separate SCSI private block description initializationMichal Simek
When blk_create_device() is called some parameters in blk_desc are automatically filled. Separate SCSI private initialization and SCSI full block device initialization not to rewrite already prepared data. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-02scsi: Change scsi_scan() to be able to return valueMichal Simek
With DM_SCSI this function will return more than one return value to cover errors. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-02scsi: Make private functions staticMichal Simek
Several functions should be static because they are not exported to any other file. Warnings were reported by sparse C=1. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-02scsi: Remove completely unused functionsMichal Simek
These functions are not called for any location. This patch removes them scsi_trim_trail(), scsi_get_disk_count() and scsi_setup_read6(). Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-02scsi: Simplify scsi_read/scsi_write()Michal Simek
There is no reason to directly point to static allocated array when we have proper block_dev pointer available via parameter in !CONFIG_BLK. For CONFIG_BLK this is read directly from uclass platdata. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-02scsi: Move pccb buffer initalization directly to scsi_detect_devMichal Simek
pccb is pointer to temporary buffer which is used only for sending command. Make it local as is done in scsi_read/scsi_write. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-02scsi: Take lun from device block descriptionMichal Simek
Prepare LUN(Logical unit number) directly in block description structure and reuse it. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-02scsi: Extract device detection algorithmMichal Simek
The patch enables running detection algorithm on block device description structure. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-02scsi: Extract block device initializationMichal Simek
Extract block device initialization to specific function. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-02common: miiphyutil: Work and report phy address in hex in mdio cmdMichal Simek
It is confusing that mdio commands work and report phy id as decimal value when mii is working with hex values. For example: ZynqMP> mdio list gem: 21 - TI DP83867 <--> ethernet@ff0e0000 ZynqMP> mdio read ethernet@ff0e0000 0 Reading from bus gem PHY at address 21: 0 - 0x1140 ZynqMP> mii dump 21 0 Incorrect PHY address. Range should be 0-31 ... ZynqMP> mii dump 15 0. (1140) -- PHY control register -- (8000:0000) 0.15 = 0 reset U-Boot normally takes hex values that's why this patch is changing mdio command to handle hex instead of changing mii command to handle decimal values. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2016-12-02ARM: zynq: Enable SD1 and qspi for picozed boardSiva Durga Prasad Paladugu
Enable SD1 and qspi for picozed board. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-12-02ARM: zynq(mp): remove unneeded CONFIG_USB_MAX_CONTROLLER_COUNT definesMasahiro Yamada
ARCH_ZYNQ(MP) selects DM_USB, where CONFIG_USB_MAX_CONTROLLER_COUNT is not used. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Moritz Fischer <moritz.fischer@ettus.com> Acked-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-12-02ARM64: zynqmp: List secondary software boot modesMichal Simek
Using alternative bootmode field to support automatic secondary boot modes. It is purely software setting where SW modes are using free bootmode combinations. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-12-02ARM64: zynqmp: Use DTS name for different psu_init_gpl* files in SPLMichal Simek
CONFIG_SYS_CONFIG_NAME is not proper config option for different low level init files because different board revisions requires different psu_init_gpl* files. Also at the end of moving drivers to DM all board specific configuration files should be removed. The same changes was done for Zynq. "ARM: zynq: Simplify zynq configuration" (sha1: ad5b5801264e573bfbf17a20b04c546985c5bfc1) Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-12-02ARM64: zynqmp: Force certain bootmode for SPLMichal Simek
ZynqMP provides an option to overwrite bootmode setting which can change SPL behavior. For example: boot SPL via JTAG and then SPL loads images from SD. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-12-01Merge git://www.denx.de/git/u-boot-marvellTom Rini
2016-12-01tools/kwbimage: add DEBUG optionChris Packham
Offset 0x1 in the generated kwb image file is a set of flags, bit 0 enables debug output from the BootROM firmware. Allow a DEBUG option in the kwb configuration to request debug output from the BootROM firmware. Signed-off-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Stefan Roese <sr@denx.de>
2016-12-01tools/kwbimage: add BAUDRATE optionChris Packham
Offset 0x18 in some Marvell datasheets this field is redacted as "reserved". This offset is actually a set of options and bits 2:0 allow the selection of the UART baudrate. Allow a BAUDRATE option to set the UART baudrate for any messages coming from the BootROM firmware. Signed-off-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Stefan Roese <sr@denx.de>