summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'xilinx-for-v2018.11' of git://git.denx.de/u-boot-microblazeTom Rini2018-09-274-12/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Xilinx changes for v2018.11 - Handle BOARD_LATE_INIT via Kconfig SPL: - Enable GZIP for all partitions types(not only for kernel) ZynqMP: - Rearrange pmufw version handling - Support newer PMUFW with improved fpga load sequence Zynq: - Cleanup config file - Simplify zybo config by enabling option via Kconfig net: - Fix gems max-speed property reading - Enable support for fixed-link phys
| * arm: zynq: zybo: migrate CONFIG_DISPLAY to defconfigLuis Araneda2018-09-261-2/+0
| | | | | | | | | | | | | | | | Only add CONFIG_DISPLAY to defconfig because CONFIG_I2C_EDID is automatically selected by CONFIG_DISPLAY Signed-off-by: Luis Araneda <luaraneda@gmail.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * arm: zynq: Remove useless comments from config fileMichal Simek2018-09-261-8/+0
| | | | | | | | | | | | Moving options to Kconfig some comments are useless now. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * arm64: zynqmp: Handle CONFIG_BOARD_LATE_INIT via KconfigMichal Simek2018-09-262-2/+0
| | | | | | | | | | | | Disable BOARD_LATE_INIT via Kconfig. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* | Merge tag 'signed-efi-next' of git://github.com/agraf/u-bootTom Rini2018-09-2614-105/+2468
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch queue for efi - 2018-09-26 A lot of goodness in this release. We're *very* close to running the UEFI Shell and SCT natively. The only missing piece are HII protocols. - FAT write support (needed for SCT) - improved FAT directory support (needed for SCT) - RTC support with QEMU -M virt - Sandbox support (run UEFI binaries in Linux - yay) - Proper UTF-16 support - EFI_UNICODE_COLLATION_PROTOCOL support (for UEFI Shell) - EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL support (for UEFI Shell) - Fix window size determination - Fix Tegra by explicitly unmapping RAM - Clean up handle entanglement - Lots of generic code cleanup [trini: Fixup merge conflict in include/configs/qemu-arm.h] Signed-off-by: Tom Rini <trini@konsulko.com>
| * | efi_loader: refactor efi_setup_loaded_image()Heinrich Schuchardt2018-09-232-15/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create the handle of loaded images and the EFI_LOADED_IMAGE_PROTOCOL inside efi_setup_loaded_image(). Do not use local variables. Currently we expect the loaded image handle to point to the loaded image protocol. Additionally we have appended private fields to the protocol. With the patch the handle points to a loaded image object and the private fields are added here. This matches how we handle the net and the gop object. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | rtc: pl031: convert the driver to driver modelAKASHI Takahiro2018-09-231-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | With this patch, PL031 driver is converted to driver-model-compliant driver. In addition, CONFIG_SYS_RTC_PL031_BASE is no longer valid. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: remove redundant statementHeinrich Schuchardt2018-09-231-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ascii2unicode() always ends the u16 string with '\0'. Remove redundant assignment. Add description for efi_str_to_u16() and ascii2unicode(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: create root nodeHeinrich Schuchardt2018-09-231-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we assign a lot of protocols to loaded images though these protocols are not related to them. Instead they should be installed on a separate handle. Via the device path it is the parent to the devices like the network adapter. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | sandbox: Fix setjmp/longjmpAlexander Graf2018-09-231-21/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In sandbox, longjmp returns to itself in an endless loop because os_longjmp() calls into longjmp() which is provided by U-Boot which again calls os_longjmp(). Setjmp on the other hand must not return because otherwise the return freees up stack elements that we need during longjmp(). The only straight forward fix that doesn't involve nasty hacks I could find is to directly link against the system setjmp/longjmp implementations. That means we just provide the compiler with hints that the symbol will be available and actually fill them out with versions from libc. This approach should be reasonably platform agnostic Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | sandbox: Add support for calling abort()Simon Glass2018-09-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function is useful to signal that the application needs to exit immediate. It can be caught with a debugger (e.g. gdb). Add a stub for it so that it can be called from within sandbox when an internal error occurs. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi: sandbox: Add distroboot supportSimon Glass2018-09-231-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | With sandbox these values depend on the host system. Let's assume that it is x86_64 for now. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOLHeinrich Schuchardt2018-09-231-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL. The implementation of notification functions is postponed to a later patch. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_selftest: refactor text input testHeinrich Schuchardt2018-09-231-0/+16
| | | | | | | | | | | | | | | | | | | | | Move reusable utility functions to efi_selftest_util.c. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: support Unicode text inputHeinrich Schuchardt2018-09-231-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Up to now the EFI_TEXT_INPUT_PROTOCOL only supported ASCII characters. With the patch it can consume UTF-8 from the console. Currently only the serial console and the console can deliver UTF-8. Local consoles are restricted to ASCII. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | fs: fat: support unlinkAKASHI Takahiro2018-09-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this patch, unlink support is added to FAT file system. A directory can be deleted only if it is empty. In this implementation, only a directory entry for a short file name will be removed. So entries for a long file name can and should be reclaimed with fsck. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | fs: add unlink interfaceAKASHI Takahiro2018-09-231-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | "unlink" interface is added to file operations. This is a preparatory change as unlink support for FAT file system will be added in next patch. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | fs: fat: support mkdirAKASHI Takahiro2018-09-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | In this patch, mkdir support is added to FAT file system. A newly created directory contains only "." and ".." entries. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | fs: add mkdir interfaceAKASHI Takahiro2018-09-231-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | "mkdir" interface is added to file operations. This is a preparatory change as mkdir support for FAT file system will be added in next patch. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | fs: fat: extend get_fs_info() for write useAKASHI Takahiro2018-09-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | get_fs_info() was introduced in major re-work of read operation by Rob. We want to reuse this function in write operation by extending it with additional members in fsdata structure. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: SPDX-License-Identifier for efi.hHeinrich Schuchardt2018-09-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add the missing SPDX-License-Identifier based on Linux kernel commit b24413180f56 ("License cleanup: add SPDX GPL-2.0 license identifier to files with no license"). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: SPDX-License-Identifier for efi_api.hHeinrich Schuchardt2018-09-231-18/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the missing SPDX-License-Identifier based on Linux kernel commit b24413180f56 ("License cleanup: add SPDX GPL-2.0 license identifier to files with no license"). Correct formatting errors. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: struct efi_simple_text_input_protocolHeinrich Schuchardt2018-09-233-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | %s/efi_simple_input_interface/efi_simple_text_input_protocol/ We should be consistent in the naming of the EFI protocol interface structures. The protocol is called EFI_SIMPLE_TEXT_INPUT_PROTOCOL. %s/ExtendedVerification/extended_verification/ Use consistent naming of function parameters. Do not use CamelCase. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: EFI_UNICODE_COLLATION_PROTOCOLHeinrich Schuchardt2018-09-234-0/+106
| | | | | | | | | | | | | | | | | | | | | The patch implements the EFI_UNICODE_COLLATION_PROTOCOL. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | lib: charset: upper/lower case conversionHeinrich Schuchardt2018-09-231-0/+16
| | | | | | | | | | | | | | | | | | | | | Provide functions for upper and lower case conversion. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: capitalization tableHeinrich Schuchardt2018-09-231-0/+2028
| | | | | | | | | | | | | | | | | | | | | | | | This patch provides a define to initialize a table that maps lower to capital letters for Unicode code point 0x0000 - 0xffff. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: simplify ifdefsStephen Warren2018-09-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Use CONFIG_IS_ENABLED(EFI_LOADER) to avoid explicitly checking CONFIG_SPL too. This simplifies the conditional. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | lib: charset: remove obsolete functionsHeinrich Schuchardt2018-09-231-23/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove functions: - utf8_to_utf16() - utf16_strcpy() - utf16_strdup() Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | test: unit tests for Unicode functionsHeinrich Schuchardt2018-09-231-1/+2
| | | | | | | | | | | | | | | | | | | | | Provide unit tests for Unicode functions. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | lib: charset: utility functions for UnicodeHeinrich Schuchardt2018-09-231-0/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | utf8_get() - get next UTF-8 code point from buffer utf8_put() - write UTF-8 code point to buffer utf8_utf16_strnlen() - length of a utf-8 string after conversion to utf-16 utf8_utf16_strncpy() - copy a utf-8 string to utf-16 utf16_get() - get next UTF-16 code point from buffer utf16_put() - write UTF-16 code point to buffer utf16_strnlen() - number of codes points in a utf-16 string utf16_utf8_strnlen() - length of a utf-16 string after conversion to utf-8 utf16_utf8_strncpy() - copy a utf-16 string to utf-8 Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: rename utf16_strlen, utf16_strnlenHeinrich Schuchardt2018-09-231-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function names utf16_strlen() and utf16_strnlen() are misnomers. The functions do not count utf-16 characters but non-zero words. So let's rename them to u16_strlen and u16_strnlen(). In utf16_dup() avoid assignment in if clause. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* | | configs: Drop CONFIG_SYS_SCSI_MAXDEVICETuomas Tynkkynen2018-09-255-6/+1
| | | | | | | | | | | | | | | | | | | | | This option has never been used for anything. Drop it. Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | ata: Drop CONFIG_SYS_SCSI_MAX_* from boards using DM_SCSITuomas Tynkkynen2018-09-254-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | These options are not used or necessary when device model is being used for SCSI. Just drop them. Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | Add include/asm-generic/atomic.hChris Packham2018-09-251-0/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The arm, xtensa and mips version of atomic.h were already very similar (the mips one was a copy of xtensa). Combine these implementations together to produce a generic atomic.h that can be included by these architectures (and any others that need it in future). Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* | | spi: add support for ARM PL022 SPI controllerQuentin Schulz2018-09-251-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the ARM PL022 SPI controller for the standard variant (0x00041022) which has a 16bit wide and 8 locations deep TX/RX FIFO. A few parts were borrowed from the Linux kernel driver. Cc: Armando Visconti <armando.visconti@st.com> Cc: Vipin Kumar <vipin.kumar@st.com> Signed-off-by: Quentin Schulz <quentin.schulz@bootlin.com>
* | | drivers: net: cpsw: add support to update phy addressSekhar Nori2018-09-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some boards using TI CPSW, it may be possible that PHY address was not latched correctly, and the actual address that the phy responds on is different from that set in device-tree. For example, see this problem report on beaglebone black: https://groups.google.com/d/msg/beagleboard/9mctrG26Mc8/1FuI_i5KW10J Add support to check for this condition and use the detected phy address when its safe to do so. Also, add a public API that exposes the phy address of a given slave. This can be used to update device-tree that is passed to Linux kernel. Signed-off-by: Sekhar Nori <nsekhar@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* | | configs: sama5d27_som1_ek: Add defconfig for ENV/boot from uSDCodrin Ciubotariu2018-09-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a defconfig for sama5d27_som1_ek board to get environment from uSD. The defconfig is made from sama5d27_som1_ek_mmc_defconfig, with 'bootcmd' and 'bootargs' changed to kernel, device-tree and rootfs from uSD. The environment is expected to be found in uSD's FAT partition. Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
* | | configs: sama5d27_som1_ek: Set CONFIG_BOOTARGS using KconfigCodrin Ciubotariu2018-09-251-3/+0
| | | | | | | | | | | | | | | | | | | | | CONFIG_BOOTARGS can be set using Kconfig, so we no longer need it in the config files. Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
* | | configs: sama5d27_som1_ek: Remove unnecessary FAT_ENV_xxx macrosCodrin Ciubotariu2018-09-251-3/+0
| | | | | | | | | | | | | | | | | | | | | FAT_ENV_xxx options can now be set using Kconfig, so we no longer need them in the config files. Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
* | | configs: sama5d2_xplained: Add defconfig for ENV/boot from eMMCCodrin Ciubotariu2018-09-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a defconfig for sama5d2_xplained board to get environment from eMMC. The defconfig is made from sama5d2_xplained_mmc_defconfig, with 'bootcmd' and 'bootargs' changed to kernel, device-tree and rootfs from eMMC. The environment is expected to be found in eMMC's FAT partition. Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
* | | spl: Weed out CONFIG_SYS_TEXT_BASE usageMarek Vasut2018-09-251-0/+9
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SPL loaders assume that the CONFIG_SYS_TEXT_BASE memory location is available and can be corrupted by loading ie. uImage or fitImage headers there. Sometimes it could be beneficial to load the headers elsewhere, ie. if CONFIG_SYS_TEXT_BASE is not yet writable while we still want to parse the image headers in some local onchip memory to ie. extract firmware from that image. Add the possibility to override the location where the headers get loaded by introducing new function, spl_get_load_buffer() which takes two arguments -- offset from the CONFIG_SYS_TEXT_BASE and size of the data that are to be loaded there -- and returns a valid buffer address or hangs the system. The default behavior is the same as before, add the offset to CONFIG_SYS_TEXT_BASE and return that address. User can override the weak spl_get_load_buffer() function though. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
* | mips: Add Gardena Smart-Gateway board supportStefan Roese2018-09-231-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Gardena Smart-Gateway boards have a MT7688 SoC with 128 MiB of RAM and 8 MiB of flash (SPI NOR) and additional 128MiB SPI NAND storage. This patch also includes 2 targets. One is the target that can be programmed into the SPI NOR flash and a 2nd target "xxx-ram" is added to support loading and booting via an already running U-Boot version. This allows easy development and testing without the need to flash the image each time. Signed-off-by: Stefan Roese <sr@denx.de> [fixed and regenerated defconfig files] Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
* | mips: Add LinkIt Smart 7688 supportStefan Roese2018-09-231-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The LinkIt Smart 7688 modules have a MT7688 SoC with 128 MiB of RAM and 32 MiB of flash (SPI NOR). This patch also includes 2 targets. One is the target that can be programmed into the SPI NOR flash and a 2nd target "xxx-ram" is added to support loading and booting via an already running U-Boot version. This allows easy development and testing without the need to flash the image each time. Signed-off-by: Stefan Roese <sr@denx.de> [fixed and regenerated defconfig files] Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
* | MIPS: cache: remove config option CONFIG_SYS_MIPS_CACHE_MODEDaniel Schwierzeck2018-09-222-6/+0
|/ | | | | | | | Caches should be configured to mode CONF_CM_CACHABLE_NONCOHERENT (or CONF_CM_CACHABLE_COW when a CM is available). There is no need to make this configurable. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
* Merge git://git.denx.de/u-boot-imxTom Rini2018-09-192-57/+55
|\ | | | | | | | | - changes in pico-* boards - fix imx6ull pinmux
| * pico-imx7d: Add PICO-Hobbit baseboard supportOtavio Salvador2018-09-181-1/+4
| | | | | | | | | | | | This adds the device tree to the DFU and bootmenu environment setting. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
| * pico-imx6ul: Add PICO-Pi baseboard supportOtavio Salvador2018-09-181-0/+3
| | | | | | | | | | | | This adds the device tree to the DFU and bootmenu environment setting. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
| * Merge branch 'master' of git://git.denx.de/u-boot into masterStefano Babic2018-09-1837-150/+21
| |\ | | | | | | | | | Signed-off-by: Stefano Babic <sbabic@denx.de>
| * | pico-imx6ul: Add Falcon mode supportOtavio Salvador2018-09-141-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Falcon mode boots the kernel directly from SPL, without loading the full U-Boot. As pico-imx6ul does not have a GPIO for selecting Falcon versus normal mode, enter in Falcon mode when the customer selects the CONFIG_SPL_OS_BOOT option in menuconfig. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
| * | pico-imx6ul: Remove CONFIG_FSL_USDHC from .hOtavio Salvador2018-09-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | The CONFIG_FSL_USDHC is defined inside "mx6_common.h", which is already included in this file. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Reviewed-by: Fabio Estevam <festevam@gmail.com>