summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-01-14bootm: Factor out common parts of image decompression codeSimon Glass
Adjust the code so that the error reporting can all be done at the end, and is the same for each decompression method. Try to detect when decompression fails due to lack of space. Keep the behaviour of resetting on failure even though there should be no memory corruption now. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-14bootm: Use print_decomp_msg() in all casesSimon Glass
Refactor to allow this function to be used to announce the image being loaded regardless of compression type and even when there is no decompression. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-14test: Add unit tests for bootm image decompressionSimon Glass
Use each compression method (including uncompressed). Test for normal operation, insufficient space and corrupted data. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-14test: Rename test_compression to ut_compressionSimon Glass
Try to keep the names of the unit test commands consistent. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-14bootm: Export bootm_decomp_image()Simon Glass
Export this function for testing. Also add a parameter so that values other than CONFIG_SYS_BOOTM_LEN can be used for the maximum uncompressed size. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-14test: Add DEBUG output option to test-fit.pySimon Glass
Sometimes it is useful to see the output from U-Boot, so add an option to make this easier. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-14sandbox: Correct ordering of 'sb save' commandsSimon Glass
Prior to commit d455d87 there was an inconsistency between the position of the 'address' parameter in 'sb load' and 'sb save'. This was corrected but it broke some tests. Fix the tests and also the help for 'sb save'. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-14bootm: Move compression progress/error messages into a functionSimon Glass
This code is repeated in several places, and does not detect a common fault where the image is too large. Move it into its own function and provide a more helpful messages in this case, for compression schemes which support this. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-14lzma: fix buffer bound check error furtherSimon Glass
Commit 4d3b8a0d fixed a problem with lzma decompress where it would run out of bytes to decompress. The algorithm needs to know how many uncompressed bytes it is expected to produce. However, the fix introduced a potential buffer overrun, and causes the compression test to fail (test_compression command in sandbox). The correct fix seems to be to use the minimum of the expected number of uncompressed bytes and the amount of output space available. That way things work normally when there is enough space, and return an error (without overrunning available space) when there is not. Signed-off-by: Antonios Vamporakis <ant@area128.com> CC: Kees Cook <keescook@chromium.org> CC: Simon Glass <sjg@chromium.org> CC: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> CC: Luka Perkov <luka@openwrt.org> Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-14common/memsize.c: Coding style cleanupWolfgang Denk
Prepare code to make later modifications checkpatch-clean. Signed-off-by: Wolfgang Denk <wd@denx.de>
2015-01-14.travis.yml: build u-boot on travis-ciMeier, Roger
Goal: - building all variants of U-Boot with multiple configurations - code quality checks and metrics - https://travis-ci.org/u-boot/u-boot/builds
2015-01-14Merge branch 'buildman' of git://git.denx.de/u-boot-x86Tom Rini
Conflicts: tools/buildman/control.py Signed-off-by: Tom Rini <trini@ti.com>
2015-01-14README.scrapyard: fill commit and date fieldsMasahiro Yamada
This commit was generated by the following command: scripts/fill_scrapyard.py The commit-ID of CPCIISER4 removal has been fixed by hand because the board was removed by commit 370572601027 (ppc4xx: remove CPCIISER4 board), but it was added to README.scrapyard by commit 9a4018e09a2f (ppc4xx: remove DP405 board). Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2015-01-14scripts: add a utility to fill blank fields of doc/README.scrapyardMasahiro Yamada
We are removing bunch of non-generic boards these days. Updating doc/README.scrapyard is a really tedious task, but it can be automated. I hope this tool will make our life easier. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2015-01-14sunxi: usbc: Add support for usb-vbus0 controller by axp drivebus pinHans de Goede
The axp221 / axp223's N_VBUSEN pin can be configured as an output rather then an input, and this is used on some boards to control usb-vbus0, add support for this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-14sunxi: usbc: Add support for usb0 to the common usbc codeHans de Goede
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-14sunxi: Move usb-controller init code out of ehci-sunxi.c for reuse for otgHans de Goede
Most of the usb-controller init code found in ehci-sunxi.c also is necessary to init the otg usb controller, so move it to a common place. While at it also update various #ifdefs / defines for sun8i support. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-14sunxi: axp221: Add support for controlling the drivebus pinHans de Goede
The axp221 / axp223's N_VBUSEN pin can be configured as an output rather then an input, add axp_drivebus_enable() and _disable() functions to set the pin in output mode and control it. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-14sunxi: axp221: Protect axp221_init against multiple callsHans de Goede
The voltage setting code knows it needs to call axp221_init before calling the various voltage setting functions. But users of axp utility functions like axp221_get_sid() do not know this, so the utility functions always call axp221_init() to ensure that the p2wi / rsb setup magic has been done. Since doing this repeatedly is quite expensive, add a check to axp221_init so that it only does the initialization once. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-14sunxi: axp221: correct ALDO2 description for sun6iChen-Yu Tsai
ALDO2 is used to power LPDDR2 SDRAM on both the reference design and the Hummingbird A31, when this type of RAM is present. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-01-14sunxi: Hummingbird_A31_defconfig: Enable VGA output through external DACChen-Yu Tsai
The Hummingbird A31 uses an external DAC connected to the LCD0 outputs for the on board VGA output. The DAC has a power control that's toggled by GPIO. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-01-14sunxi: video: Add support for external DAC enable pinChen-Yu Tsai
The external DAC for VGA output might have either a power or reset control pin that needs to be pulled up, as is the case on the Hummingbird A31. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-01-14sunxi: video: Allow external DACs for VGA on platforms without TV encodersChen-Yu Tsai
Using an external DAC for VGA output was available on sun5i. Since some other SoCs don't have a builtin TV encoder, but might have use for a VGA output, enable the option for the platforms that don't have TV encoders. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-01-14sunxi: Enable pre-console bufferSiarhei Siamashka
This allows to always have a complete log on the VGA/HDMI/LCD console. Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-01-14console: Use pre-console buffer to get complete log on all consolesSiarhei Siamashka
Currently the pre-console buffer can accumulate early log messages and flush them to the serial console as soon as it becomes available. This patch just adds one more pre-console buffer flushing point and does all the same for the other consoles too. This is particularly useful for the vga/hdmi/lcd console, where we can see all the older messages now (except for the log messages from SPL). Naturally, we don't want to get an extra copy of the log messages on the serial console again at the second flushing point, so the serial console has to be explicitly filtered out. Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Tom Rini <trini@ti.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-01-14sun7i: Move psci_arch_init close to text_endJan Kiszka
"adr rX, text_end" only works if the label is close. Adding further code to the other functions will prevent this. So move the containing function close to label. No functional change. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-14sun7i: Add support for taking CPUs offline via PSCIJan Kiszka
Based on the original version by Marc Zyngier. It adds a psci_cpu_off implementation for the A20 SoC. The mechanism works by first preparing the calling CPU to go offline (disable and flush cache, disable SMP), then requesting CPU 0 to pull the plug. The request is sent as FIQ on SGI15. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-14sunxi: video: Add lvds supportHans de Goede
Add support for lvds lcd panels Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Anatolij Gustschin <agust@denx.de>
2015-01-14sunxi: add Linksprite pcDuino v1/v2 supportZoltan HERPAI
Add support for a sun4i board built by Linksprite. This addition covers both v1 and v2 versions. As the board has been working with 408MHz memory setting in the u-boot-sunxi branch, and has been proven to be running stable during my tests as well, a respective new DRAM config file is added as well. Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-01-14sunxi: video: Add a hpd_delay parameter to configure hpd delayHans de Goede
In some extreme cases it may be necessary to wait 1.5 seconds or more for a hpd signal to show up (and be able to read edid info), but we do not want to penalize all headless boots with an extra second boot delay, so add a hpd_delay parameter which can be set through the video-mode env. variable. While at it raise the default from 300ms to 500ms as 300 may very well be too low in many cases. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-14sunxi: video: Add VGA output supportHans de Goede
Add support for VGA directly from the sunxi SoC / display engine. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-14sunxi: video: Fallback from HDMI to VGA on boards with VGAHans de Goede
If a board has no LCD, but does have VGA fallback to VGA when no HDMI cable is connected (unless hpd=0). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-14sunxi: video: Add support for using PORTD hsync/vsync pins with tcon1Hans de Goede
Add support for using PORTD hsync/vsync pins with tcon1, this is a preparation patch for adding native VGA support. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-14sunxi: video: Use sunxi_lcdc_get_clk_delay to calculate tcon1 delayHans de Goede
Use sunxi_lcdc_get_clk_delay to calculate tcon1 delay instead of hardcoding it to 30. We will still end up using 30 for most modes, but for e.g. 800x600 this makes a (small) difference. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-14sunxi: video: Remove sunxi_display.enabled variableHans de Goede
Having both a sunxi_display.enabled variable and sunxi_display.monitor == sunxi_monitor_none duplicates state, use sunxi_display.monitor = sunxi_monitor_none when ever we do not have a display. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-14sunxi: Ippo_q8h defconfigs: Enable the LCD panel found on these tablets.Hans de Goede
Enable the new LCD support on Ippo_q8h tablets. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk> Tested-by: Chen-Yu Tsai <wens@csie.org>
2015-01-14sunxi: A13-OLinuXino defconfigs: Enable VGA output, add lcd-mode for 7" LCDHans de Goede
Enable VGA output on the A13-OLinuXino and A13-OLinuXinoM now that we've support for it. Also add LCD timing and gpio info for the Olimex 7" LCD module. We can safely put this in the default config on this boards, since by default we will always use VGA, and the LCD timing info will only get used if the user explicitly sets monitor=lcd in the video-mode env. variable. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-14sunxi: sunxi-common.h: Reduce bootm_size to take the framebuffer into accountHans de Goede
Before video output support can be enabled on the A13-OLinuXinoM, bootm_size must first be reduced to take into account that the framebuffer is shaved of the top of the DRAM. For other boards this is not an issue since bootm was set to 256M and all boards have at least 512M except for the A13-OLinuXinoM. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-14sunxi: video: Add support for VGA via external DACs connected to the LCD pinsHans de Goede
Add support for external DACs connected to the parallel LCD interface driving a VGA connector, such as found on the Olimex A13 boards. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-14sunxi: video: Enable video on sun8i, which supports LCD but not HDMIHans de Goede
The A23 (sun8i) only has lcd output support, so allow building the video code without HDMI support for use with the A23. Also the A23 has the same reset bits (and necessity to enable the DRC block) as the sun6i, so enable those bits for sun8i too. Note building without HDMI support is useful for the A13 (sun5i variant) too, as that one does not have HDMI either. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-14sunxi: video: Add lcd output supportHans de Goede
Add lcd output support, see the new Kconfig entries and doc/README.video for how to enable / configure this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-14sunxi: video: Move sunxi_drc_initHans de Goede
Move sunxi_drc_init to directly above sunxi_engines_init, to avoid unnecessary #ifdef-ery in later patches. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-14sunxi: video: Modify sunxi_lcdc_pll_set to work with both tcon0 and tcon1Hans de Goede
Modify sunxi_lcdc_pll_set to work with both tcon0 and tcon1, this is a preparation patch for adding lcd support. While at it also swap the divider search order, searching from low to high, as the comment above the code says we should do. In cases where there are multiple solutions this will result in picking a lower pll clock and divider, which is more stable and saves power. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-14sunxi: video: Prepare for lcd supportHans de Goede
Refactor sunxi_mode_set into a bunch of helpers, and make it do a switch case on sunxi_display.monitor to decide what to do. Also rename sunxi_lcdc_mode_set to sunxi_lcdc_tcon1_mode_set, as it sets the timings for tcon1, and for lcd support we need a similar function operating on tcon0. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-14sunxi: video: Improve monitor video-mode option handlingHans de Goede
Add a sunxi_monitor enum and parse the monitor option string into this enum once, rather then doing strcmp-s on it in various places. This also adds checking for it being a valid value. This also adds new "none" and "lcd" values in preparation for lcd support. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-14sunxi: gpio: Add support for gpio pins on the AXP209 pmicHans de Goede
Some boards use GPIO-s on the pmic, one example of this is the A13-OLinuXino board, which uses gpio0 of the axp209 for the lcd-power signal. This commit adds support for gpio pins on the AXP209 pmic, the sunxi_gpio.c changes are universal, adding gpio support for the other AXP pmics (when necessary) should be a matter of adding the necessary axp_gpio_foo functions to their resp. drivers, and add "#define AXP_GPIO" to their header file. Note this commit only adds support for the non device-model version of the gpio code, patches for adding support to the device-model version are very welcome. The string representation for these gpio-s is AXP0-#, the 0 in the AXP0 prefix is there in case we need to support gpio-s on more then 1 pmic in the future. At least A80 boards have 2 pmics, and we may end up needing to support gpio-s on both. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-14sunxi: gpio: Properly sort mux defines by port numberHans de Goede
Move a few mux defines around so that all the mux defines are properly sorted by port number. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-14sunxi: video: Set input sync enableHans de Goede
Add a write to the "unknown" (*) register to enable auto input sync, when initially adding sunxi hdmi output support this magic write from the android kernel code was missed, causing lcdc -> hdmi encoder sync problems. With this write added, we can drop the modesetting retries and the extra delays added to work around these sync problems. With the retries dropped there also is no need to 0 all the enable flags at the beginning of the modeset, as they are initialized to 0 already by engines_init. *) "unknown" is the actual name of this register in the android kernel sources Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk> Acked-by: Anatolij Gustschin <agust@denx.de>
2015-01-14sunxi: video: Give hotplug-detect (hpd) signal some time to show upHans de Goede
When using a hdmi powered hdmi to vga dongle, and cold booting a sunxi device, the hpd detect code would not see the dongle (until a warm reboot), because the dongle needs some time to boot. Testing has shown that this dongle needs 213ms to respond on a cold boot, so wait up to 300ms for a hpd signal to show up before giving up. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk> Acked-by: Anatolij Gustschin <agust@denx.de>
2015-01-14sunxi: video: When using edid use CEA681 extension blocks to select hdmi outputHans de Goede
When using edid use CEA681 edid extension blocks to select between dvi and hdmi output formats, so that u-boot will automatically do the right thing. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk> Acked-by: Anatolij Gustschin <agust@denx.de>