summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-11-26usb: xhci: Add Renesas R-Car xHCI driverMarek Vasut5-0/+837
Add firmware V3, firmware loader and XHCI glue for the Renesas R-Car Gen3 SoCs XHCI controller. Thus far only the R-Car Gen3 R8A7795 ES2.0+ and R8A7796 are supported. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Bin Meng <bmeng.cn@gmail.com>
2017-11-26usb: ehci: Fix accessors for big-endian platforms and descriptorsAlexey Brodkin1-4/+4
Commit 9000eddbae0d ("drivers/usb/ehci: Use platform-specific accessors") broke USB 2.0 on big-endian platforms because for them writel/readl() does automatic conversion of BE data to LE. Proper implementation requires to use "raw" variant of these accessors which read/write data without messing with endianess. While at it replace cpu_to_be32() to be32_to_cpu() in readl() to keep sane semantics. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Marek Vasut <marex@denx.de> Reported-by: Vladimir Boroda <boroda@yahoo.com>
2017-11-26cmd: usb: ignore blk, emulation devices in usb tree/info displaySuneel Garapati1-3/+19
Usb tree/info commands iterate over all usb uclass devices recursively. Blk uclass devices based on struct blk_desc are created for mass storage device, treating them as usb uclass devices based on struct usb_device and referencing usb config interface descriptors cause crash. To fix, ignore blk and usb_emul uclass devices in usb_show_info and usb_tree_graph. Also avoid addition of preamble for blk uclass child devices, otherwise tree dump gets messed up. Signed-off-by: Suneel Garapati <suneelglinux@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-11-24Merge git://git.denx.de/u-boot-arcTom Rini6-4/+135
2017-11-24arc: cache: Add required NOPs after invalidation of instruction cacheAlexey Brodkin1-0/+7
As per ARC HS databook (see chapter 5.3.3.2) it is required to add 3 NOPs after each write to IC_IVIC which we do from now on. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Eugeniy Paltsev <paltsev@synopsys.com>
2017-11-24arc: bootm: Move slave cores kick-starting under !fakeAlexey Brodkin1-4/+4
Currently slave cores will be kick-started even if we want to dry run bootm which is not what we really want. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Eugeniy Paltsev <paltsev@synopsys.com>
2017-11-24ARC: HSDK: introduce CREG GPIO driverEugeniy Paltsev4-0/+124
The HSDK can manage some pins via CREG registers block. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2017-11-24Merge git://git.denx.de/u-boot-dmTom Rini25-138/+455
2017-11-23binman: Return non-zero exit code on test failureSimon Glass1-2/+6
Return exit code 1 when test fail so that callers can detect this. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-23binman: Add add test for using an Intel MRC binarySimon Glass2-0/+20
MRC (Memory Reference Code) is a binary blob used to set up the SDRAM controller on some Intel boards. Add a test for this feature. With this test coverage on binman is back up to 100%. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-23binman: Add add test for SPL with a microcode pointerSimon Glass3-31/+84
Add a test for this feature. It allows SPL to hold a pointer to the microcode block. This is used for 64-bit U-Boot on x86. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-23binman: Add a test for x86-start16-splSimon Glass2-1/+22
This allows us to put the 16-bit x86 start-up code in SPL. Add a test for it. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-23binman: Add test for u-boot-spl-bss-padSimon Glass6-1/+64
Add a test that we can pad the BSS with zero bytes. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-23binman: Check for files missing from test coverageSimon Glass1-3/+19
Files that are never imported are not shown in the test-coverage report. Detect these and show an error. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-23binman: Increase test coverage back to 100%Simon Glass1-7/+4
Make a minor tweak to fix test coverage. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-23binman: Add a main program to the testsSimon Glass2-0/+8
Add a main program so that the tests can be executed directly, without going through the main binman program. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-23binman: Add tests for importlib availabilitySimon Glass2-2/+36
Add a test that the 'entry' module works with or without importlib. The tests are numbered so that they are executed in the correct order. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-23binman: Set up 'entry' to permit full test coverageSimon Glass3-5/+10
There is a little check at the top of entry.py which decides if importlib is available. At present this has no test coverage. To add this we will need to import the module twice, once with importlib and once without. In preparation for allowing a test to control the importing of this module, remove all global imports of the 'entry' module. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-23binman: Append to PYTHONPATH when running test coverageSimon Glass1-1/+1
Rather that overwrite this, append to it, in case the caller has already set up the path correctly. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-23dtoc: Fix up testsSimon Glass1-45/+37
The tool has changed slightly since it was originally written. Update the tests to suit. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-23buildman: Fix up testsSimon Glass1-10/+21
The tests were broken by two separate commits which adjusted the output when boards are listed. Fix this by adding back a PowerPC board and putting the name of each board in the test. Fixes: b9f7d881 (powerpc, 5xx: remove some "5xx" remains) Fixes: 8d7523c5 (buildman: Allow showing the list of boards with -n) Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-23buildman: Allow skipping of tests which use the networkSimon Glass3-4/+11
Accessing the network slows down the test and limits the environment in which it can be run. Add an option to disable network tests. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-23patman: Fix up tests to pass with newest checkpatchSimon Glass1-15/+26
The checkpatch tool was updated but the patman tests were not. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-23test/run: Report and return failureSimon Glass1-3/+17
This script runs the tests but does not report failure. Also it always returns an exit code of 0 even on failure. Fix these problems by checking the result of each test. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-23binman: Disable the no-unit_address_vs_reg warningsSimon Glass1-1/+2
These warnings are not useful for binman tests. Disable them. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-23binman: Rename tests to ftestSimon Glass2-2/+2
At present these tests use the same filename as patman. This adds confusion when running all tests, since error messages look very similar. In fact binman tries to run the wrong tests at present. Rename the tests. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-23binman: Add a Makefile for test-program compilationSimon Glass3-8/+36
These test programs are includedd as binary files in U-Boot to avoid having to build them (and associated toolchain differences). Instructions on building are in the files themselves, but it seems better to provide a Makefile which can be manually run when desired. Add a Makefile, separate from the normal build system, to handle this. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-23binman: Add docs explaining how to enable binman for a boardSimon Glass1-0/+21
The process is not obvious. Add a little section to explain how to move a board to use binman. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-23binman: Add better Makefile debuggingSimon Glass2-5/+16
There is a debugging option in the Makefile to allow people to figure out which u-boot.dtsi files are used in the build. But is it not easy to use since it only shows files it finds, not those it is looking for. Update it and update the mention of it to the docs. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-22Merge git://git.denx.de/u-boot-rockchipTom Rini60-892/+676
2017-11-22rockchip: remove duplicate CONFIG_ENV_SIZE definitionsPhilipp Tomsich3-5/+0
A few header files still have a definition of CONFIG_ENV_SIZE, causing warnings during buildman runs. This removes the duplicate definitions from evb_px5.h, geekbox.h and rv1108_common.h. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-22rockchip: check download key before bootupAndy Yan1-3/+46
Enter download mode if the download key pressed. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> [Converted printfs in boot_mode.c to debug/pr_err:] Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-22rockchip: add support for enter to bootrom download modeAndy Yan3-2/+50
Rockchip bootrom will enter download mode if it returns from spl/tpl with a non-zero value and couldn't find a valid image in the backup partition. This patch provide a method to instruct the system to back to bootrom download mode by checking the BROM_DOWNLOAD_FLAG register. As the bootrom download function relys on some modules such as interrupts, so we need to back to bootrom as early as possbile before the tpl/spl code override the interrupt configurations. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-22rockchip: make boot_mode related codes reused across all platformsAndy Yan9-73/+71
setup_boot_mode function use the same logic but different mode register address across all the rockchip platforms, so it's better to make this function reused across all the platforms, and let the mode register address setting from the config file. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-22rockchip: spi: the symbol for Hertz is HzHeinrich Schuchardt1-1/+1
fix typo Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-22rockchip: clock: update sysreset driver bindingKever Yang8-24/+112
Using priv for new sysreset driver binding. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-22rockchip: sysreset: update Makefile to work with merged sysreset driverPhilipp Tomsich1-10/+1
After applying the merged sysreset driver, there are build failures due to an out-of-sync Makefile. This updates drivers/sysreset/Makefile to address these build failures. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-22rockchip: sysreset: merge into one common driverKever Yang10-397/+52
Use a common driver for all Rockchip SOC instead of one for each SoC. Use driver_data for reg offset. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-22rockchip: mkimage: remove unused code-paths (spl_boot0 is now implied)Philipp Tomsich1-31/+14
With all targets converted to generate prepadded images, this removes the spl_boot0 field from our config structure and removes the unused code-path (for images that are not prepadded): i.e. spl_boot0 is now implied as 'true' and the code is specialised by removing the other case. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-22rockchip: rk3188: move CONFIG_SPL_* entries from rk3188_common.h to KconfigPhilipp Tomsich2-7/+6
There still are a few CONFIG_SPL_* options selected using defines from rk3188_common.h instead of via Kconfig. This migrates those over to Kconfig. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-22rockchip: back-to-bootrom: allow passing a cmd to the bootromPhilipp Tomsich9-12/+15
The BROM supports forcing it to enter download-mode, if an appropriate result/cmd-word is returned to it. There already is a series to support this in review, so this prepares the (newly C-version) of the back-to-bootrom code to accept a cmd to passed on to the BROM. All the existing call-sites are adjusted to match the changed function signature. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Andy Yan <andy.yan@rock-chips.com>
2017-11-22rockchip: rk3188: use boot0 hook to load up SPL in 2 stepsPhilipp Tomsich6-112/+9
For the RK3188, the BROM will attempt to load up the first stage image (SPL for the RK3188) in two steps: first 1KB to offset 0x800 in the SRAM and then the remainder to offset 0xc00 in the SRAM. It always enters at 0x804, though. With this changeset, the RK3188 boot removes the TPL (stub) stage and builds a single SPL binary that utilizes the early back-to-bootrom via the boot0-hook. Consequently, the passing of the saved boot params via pmu->os_reg[2] is also removed. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-22rockchip: back-to-bootrom: replace assembly-implementation with C-codePhilipp Tomsich4-79/+73
The back-to-bootrom implementation for Rockchip has always relied on the stack-pointer being valid on entry, so there was little reason to have this as an assembly implementation. This provides a new C-only implementation of save_boot_params and back_to_bootrom (relying on setjmp/longjmp) and removes the older assembly-only implementation. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Andy Yan <andy.yan@rock-chips.com>
2017-11-22arm: provide a PCS-compliant setjmp implementationPhilipp Tomsich4-81/+98
The previous setjmp-implementation (as a static inline function that contained an 'asm volatile' sequence) was extremely fragile: (some versions of) GCC optimised the set of registers. One critical example was the removal of 'r9' from the clobber list, if -ffixed-reg9 was supplied. To increase robustness and ensure PCS-compliant behaviour, the setjmp and longjmp implementation are now in assembly and closely match what one would expect to find in a libc implementation. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Andy Yan <andy.yan@rock-chips.com>
2017-11-22arm: mark save_boot_params_ret as a functionPhilipp Tomsich1-0/+1
As no '.type' was set for save_boot_params_ret in start.S, binutils did not track whether it was emitted as A32 or T32. By properly marking save_boot_params_ret as a potential function entry, we can make sure that the compiler will insert the appropriate instructions for branching to save_boot_params_ret both for call-sites emitted as A32 and T32. Reported-by: Andy Yan <andy.yan@rock-chips.com> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Andy Yan <andy.yan@rock-chips.com>
2017-11-22arm: make save_boot_params_ret prototype visible for AArch64Philipp Tomsich1-31/+31
The save_boot_params_ret() prototype (for those of us, that have a valid SP on entry and can implement save_boot_params() in C), was previously only defined for !defined(CONFIG_ARM64). This moves the declaration to a common block to ensure the prototype is available to everyone that might need it. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Andy Yan <andy.yan@rock-chips.com>
2017-11-22rockchip: boot0 hook: support early return for RK3188/RK3066-style BROMPhilipp Tomsich2-6/+47
Some Rockchip BROM versions (e.g. the RK3188 and RK3066) first read 1KB data from NAND into SRAM and executes it. Then, following a return to bootrom, the BROM loads additional code to SRAM (not overwriting the first block read) and reenters at the same address as the first time. To support booting either a TPL (on the RK3066) or SPL (on the RK3188) using this model of having to count entries, this commit adds code to the boot0 hook to track the number of entries and handle them accordingly. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Signed-off-by: Paweł Jarosz <paweljarosz3691@gmail.com> Tested-by: Andy Yan <andy.yan@rock-chips.com>
2017-11-22bcm281xx: boot0 hook: adjust to unified boot0 semanticsPhilipp Tomsich1-0/+2
This updates the BCM281xx boot0-hook to the updated boot0 semantics by emitting _start and the vector table before the boot0 hook (as was the case before). Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-22bcm235xx: boot0 hook: adjust to unified boot0 semanticsPhilipp Tomsich1-0/+2
This updates the BCM235xx boot0-hook to the updated boot0 semantics by emitting _start and the vector table before the boot0 hook (as was the case before). Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Version-changes: 5 - ran 'whitespace-cleanup'
2017-11-22socfpga: boot0 hook: adjust to unified boot0 semanticsPhilipp Tomsich1-0/+3
With the updated boot0 semantics (i.e. giving the boot0-hook control over when and where the vector table is emitted), the boot0-hook for the socfpga needs to be adjusted. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>