summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-02-08aspeed: ast2500: Fix H-PLL and M-PLL clock rate calculationmaxims@google.com
Fix H-PLL and M-PLL rate calculation in ast2500 clock driver. Without this fix, valid setting can lead to division by zero when requesting the rate of H-PLL or M-PLL clocks. Signed-off-by: Maxim Sloyko <maxims@google.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-08cmd: gpt: backup boot code before writing MBRVincent Tinelli
On some cases the first 440 bytes of MBR are used to keep an additional information for ROM boot loader. 'gpt write' command doesn't preserve that area and makes boot code gone. Preserve boot code area when run 'gpt write' command. Signed-off-by: Vincent Tinelli <vincent.tinelli@intel.com> Signed-off-by: Brennan Ashton <brn@deako.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-08cmd: rework "license" commandMasahiro Yamada
The previous commit ("add a new command to show .config contents") improves the basic infrastructure of "embed a compressed file into the U-Boot image, and print it by a command". The same pattern for the "license" command. This commit reworks the command to improve the following: [1] Improve log style Kbuild style log GZIP cmd/license_data.gz CHK cmd/license_data_gz.h UPD cmd/license_data_gz.h CHK cmd/license_data_size.h UPD cmd/license_data_size.h instead of the bare Make log: cat ./Licenses/gpl-2.0.txt | gzip -9 -c | \ tools/bin2header license_gzip > ./include/license.h [2] Collect related code into the "cmd" directory Prior to this commit, the license.h was created by tools/Makefile, placed under the "include" directory, included from cmd/license.c, and deleted by the top-level Makefile. It is not a good idea to scatter related code. [3] Drop the fixed-malloc size LICENSE_MAX Just allocate the minimum required size of buffer because we know the size of the original gpl-2.0.txt. [4] Fix more issues Terminate the buffer with zero to prevent puts() from over-running. Add "static" to do_license. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-08cmd: add a new command "config" to show .config contentsMasahiro Yamada
This feature is inspired by /proc/config.gz of Linux. In Linux, if CONFIG_IKCONFIG is enabled, the ".config" file contents are embedded in the kernel image. If CONFIG_IKCONFIG_PROC is also enabled, the ".config" contents are exposed to /proc/config.gz. Users can do "zcat /proc/config.gz" to check which config options are enabled on the running kernel image. The idea is almost the same here; if CONFIG_CMD_CONFIG is enabled, the ".config" contents are compressed and saved in the U-Boot image, then printed by the new command "config". The usage is quite simple. Enable CONFIG_CMD_CONFIG, then run > config from the command line interface. The ".config" contents will be printed on the console. This feature increases the U-Boot image size by about 4KB (this is mostly due to the gzip-compressed .config file). By default, it is enabled only for Sandbox because we do not care about the memory footprint on it. Of course, this feature is architecture agnostic, so you can enable it on any board if the image size increase is acceptable for you. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-08scripts: import bin2c.c from Linux 4.10-rc6Masahiro Yamada
Import scripts/basic/bin2c.c of Linux. In Linux Kernel, this file was moved to scripts/basic directory by commit 8370edea81e3 ("bin2c: move bin2c in scripts/basic"). In U-Boot, we do not need to follow that commit. Just put it in the original directory "scripts". Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-08arm64: use store with auto-incrementMasahiro Yamada
Save one instruction. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-08arm64: use xzr to zero-out the bss sectionMasahiro Yamada
AArch64 has a zero register (xzr). Use it instead of x2. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-08patman: Handle non-ascii characters in namesChris Packham
When gathering addresses for the Cc list patman would encounter a UnicodeDecodeError due to non-ascii characters in the author name. Address this by explicitly using utf-8 when building the Cc list. Signed-off-by: Chris Packham <judge.packham@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-02-08buildman: Allow showing the list of boards with -nSimon Glass
As well as showing the number of boards, allow showing the actual list of boards that would be built, if -v is provided. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-02-08cros_ec: i2c: Add support for version 3 of the EC protocolMoritz Fischer
Add support for version 3 of the ec protocol. It basically works by stitching some additional header in front (special command code), and having a result and packet_length stitched on for the reply. Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com> Cc: Simon Glass <sjg@chromium.org> Cc: u-boot@lists.denx.de Acked-by: Simon Glass <sjg@chromium.org> Tested on snow: Tested-by: Simon Glass <sjg@chromium.org>
2017-02-08simple-bus: enable support for of-platdataKever Yang
Just do nothing in post_bind if of-platdata enabled, for there is no dm_scan_fdt_dev(). Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org> Fixed subject line typo: Signed-off-by: Simon Glass <sjg@chromium.org>
2017-02-08dm: core: Replace of_offset with accessorSimon Glass
At present devices use a simple integer offset to record the device tree node associated with the device. In preparation for supporting a live device tree, which uses a node pointer instead, refactor existing code to access this field through an inline function. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-02-08patman: Format checkpatch messages for IDE throwbackSimon Glass
It is convenient to be able to deal with checkpatch warnings in the same way as build warnings. Tools such as emacs and kate can quickly locate the source file and line automatically. To achieve this, adjust the format to match the C compiler, and output to stderr. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-02-08dtoc: Replace dot with underscore to avoid compiler errorsSimon Glass
If there is a '.' in a compatible string, then dtoc will produce a struct with a name containing a '.'. This won't work, so replace it with '_'. Also add a suitable test to the sandbox device tree to catch this. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-02-08cros_ec: i2c: Group i2c write / read into single transactionMoritz Fischer
Replace dm_i2c_write() / dm_i2c_read() with transaction using struct i2c_msg[2] in order to allow for i2c controller to detect write/read cycle to emit a repeated start condition. Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com> Cc: Simon Glass <sjg@chromium.org> Cc: u-boot@lists.denx.de Acked-by: Simon Glass <sjg@chromium.org> Tested on snow: Tested-by: Simon Glass <sjg@chromium.org>
2017-02-08common: fdt_support: Remove check for mtdparts in fdt_fixup_mtdpartsLadislav Michl
fdt_fixup_mtdparts currently does nothing when partition info is runtime-generated or compiled-in defaults are used. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Fix nits in commit message: Signed-off-by: Simon Glass <sjg@chromium.org>
2017-02-08arm: socfpga: set the mpuclk divider in the Altera group registerDinh Nguyen
The mpuclk register in the Altera group of the clock manager divides the mpu_clk that is generated from the C0 output of the main pll. Without this patch, the default value of the register is 1, so the mpuclk will always get divided by 2 if the correct value is not set. For example, on the Arria5 socdk board, the MPU clock is only 525 MHz, and it should be 1.05 GHz. Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
2017-02-07drivers: net: Provide Kconfig menu for PHYLIBAlex
Provide the necessary Kconfig symbols so that PHYLIB support may be enabled in Kconfig, as opposed to needing to #define these symbols in C source headers. BITBANGMII and MV88E6352_SWITCH are left out of the PHYLIB submenu as they don't seem to explicitly depend on it (i.e. they do not use the phy_driver class). Signed-off-by: Alexandru Gagniuc <alex.g@adaptrum.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07net: phy: Improve the Marvell 151x constantsJoe Hershberger
Use some constants for the phy configuration instead of so many magic numbers. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07net: fec_mxc: Fix corruption of device tree blobDaniel Strnad
Modifying content of dev->name leads to the device tree corruption because it points to the node name located there. Signed-off-by: Daniel Strnad <strnadda@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Jagan Teki <jagan@amarulasolutions.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07net: designware: Fix for use with current Linux device tree for Meson GXHeiner Kallweit
In Uboot for Meson GX the compatible string in meson-gxbb.dtsi so far is: compatible = "amlogic,meson6-dwmac", "snps,dwmac"; On Linux in the same dt file it's compatible = "amlogic,meson-gx-dwmac", "amlogic,meson-gxbb-dwmac", "snps,dwmac"; To avoid breaking ethernet with the next DT synch from Linux to U-Boot (planned as prerequisite for adding Meson GX MMC driver to U-Boot) add "amlogic,meson-gx-dwmac" to the compatibility list in the designware driver. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07net: phy: dp83867: Add support for MAC impedance configurationMugunthan V N
Add support for programmable MAC impedance configuration and fix typo in DT impedance parameters names. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Tested-by: Lokesh Vutla <lokeshvutla@ti.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07net: phy: vitesse: Fix cis8204 RGMII_ID codePhil Edworthy
Commit 79e86ccb3786c8b20004db3fa10a70049456f580 "vitesse: remove duplicated argument to ||" correctly removed a redundant check. However, I believe that the original code was simply wrong, and should have been checking against RGMII_ID. To fix this and avoid similar problems in the future, use the phy_interface_is_rgmii helper function. Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07net: phy: Marvell: Use phy_interface_is_rgmii helper functionPhil Edworthy
Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com> Reviewed-by: Stefan Roese <sr@denx.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07net: phy: Add support for Marvell M88E1512Phil Edworthy
This device also works with the 88E1518 code, so we just adjust the UID mask accordingly. Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07net: phy: Fix mask so that we can identify Marvell 88E1518Phil Edworthy
The mask for the 88E1510 meant that the 88E1518 code would never be used. Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com> Reviewed-by: Stefan Roese <sr@denx.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07net: phy: ti: Fix dp83867 RGMII_TXID interface pathPhil Edworthy
There is code that is specifically for RGMII_TXID interface, but this will never get used because the code checks that the RGMII interface is RGMII_ID to RGMII_RXID; RGMII_TXID is after this. To fix this and avoid similar problems in the future, use the phy_interface_is_rgmii helper function. Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07tools: Add tool to add crc8 to a mac addressoliver@schinagl.nl
This patch adds a little tool that takes a generic MAC address and generates a CRC byte for it. The output is the full MAC address without any separators, ready written into an EEPROM. Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com> Signed-off-by: Olliver Schinagl <oliver@schinagl.nl> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07tools: Allow crc8 to be usedoliver@schinagl.nl
This patch enables crc8 to be used from within the tools directory using u-boot/crc.h. Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2017-02-07net: core: cosmetic: A MAC address is not limited to SROMoliver@schinagl.nl
Currently, we print that the MAC from the SROM does not match. It can be many forms of ROM, so lets drop the S. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07net: cosmetic: Define ethernet name lengtholiver@schinagl.nl
There are various places where the ethernet device name is defined to several different sizes. Lets add a define and start using it. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07net: cosmetic: Make the MAC address string less magicaloliver@schinagl.nl
In u-boot printf has been extended with the %pM formatter to allow printing of MAC addresses. However buffers that want to store a MAC address cannot safely get the size. Add a define for this case so the string of a MAC address can be reliably obtained. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07net: cosmetic: Do not use magic values for ARP_HLENoliver@schinagl.nl
Commit 674bb249825a ("net: cosmetic: Replace magic numbers in arp.c with constants") introduced a nice define to replace the magic value 6 for the ethernet hardware address. Replace more hardcoded instances of 6 which really reference the ARP_HLEN (iow the MAC/Hardware/Ethernet address). Signed-off-by: Olliver Schinagl <oliver@schinagl.nl> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07net: macb: Remove redundant #ifdef CONFIG_DM_ETHWenyou Yang
Remove the redundant #ifdef CONFIG_DM_ETH/#endif. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07net: macb: Add the clock supportWenyou Yang
Due to introducing the at91 clock driver, add the clock support. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07net: Kconfig: Add CONFIG_MACB optionWenyou Yang
Add CONFIG_MACB option in KConfig to be used to select the Cadence MACB Ethernet driver. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
2017-02-07x86: make LOAD_FROM_32_BIT visible for platformsAndy Shevchenko
This option is useful not only for development, but for the platforms where U-Boot is run from custom ROM bootloader. For example, Intel Edison is that board. Make this option visible that platforms can select it if needed. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-07x86: qemu: Add a config for 64-bit U-BootBin Meng
Add a new board config which uses 64-bit U-Boot. Supported features are the same as the other 64-bit board (Google Chromebook Link). It is a start for us to test 64-bit U-Boot easily without the need to access a real hardware. Note CONFIG_SPL_ENV_SUPPORT is required for QEMU 64-bit as without this the SPL build fails at the end. This is just a workaround as CONFIG_SPL_ENV_SUPPORT is not needed at all. common/built-in.o:(.data.env_htab+0xc): undefined reference to 'env_flags_validate' lib/built-in.o: In function `hsearch_r': lib/hashtable.c:380: undefined reference to 'env_callback_init' lib/hashtable.c:382: undefined reference to 'env_flags_init' make[1]: *** [spl/u-boot-spl] Error 1 Except those SPL options required by 64-bit, compared to 32-bit config, the following options are different: - CONFIG_SYS_MALLOC_F_LEN has to be increased to 0x1000 for SPL. - CONFIG_DEBUG_UART has to be included due to the weird issue. See TODO comments in arch/x86/cpu/x86_64/cpu.c:arch_setup_gd(). Once this issue gets fixed, debug uart can be optional. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-07x86: qemu: Add build options for SPLBin Meng
If SPL is used we want to use the generic SPL framework and boot from SPI via a board-specific means. Add these options to the board config file. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-07x86: qemu: Add a text base for 64-bit U-BootBin Meng
Set up the 64-bit U-Boot text base if building for that target. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-07tools: binman: Handle optional microcode case in SPL imageBin Meng
On platforms which do not require microcode in SPL, handle such case like U-Boot proper. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-07tools: binman: Call correct init for Entry_u_boot_spl_with_ucode_ptrBin Meng
u_boot_spl_with_ucode_ptr is derived from u_boot_with_ucode_ptr, hence it should call its parent's init. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-07x86: qemu: Mark ucode as optional for SPL in u-boot.dtsiBin Meng
QEMU does not need ucode and this is indicated in u-boot.dtsi for U-Boot proper. Now add the same for SPL. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-07x86: qemu: Set up device tree for SPLBin Meng
Add the correct pre-relocation tag so that the required device tree nodes are present in the SPL device tree. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-07x86: qemu: Fix compiler warnings for 64-bitBin Meng
This fixes compiler warnings for QEMU in 64-bit. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-07x86: qemu: Hide arch_cpu_init() and print_cpuinfo() for U-Boot properBin Meng
arch_cpu_init() and print_cpuinfo() should be only available in SPL build. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-07x86: Compile irq.c for 64-bitBin Meng
There is no reason not to compile irq.c for 64-bit. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-07x86: spl: Add weak arch_cpu_init_dm()Bin Meng
arch_cpu_init_dm() might not be implemented by every platform. Implement a weak version for SPL. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-07x86: Wrap print_ch() with config optionBin Meng
print_ch() should not be used if DEBUG_UART is off. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-07x86: qemu: Add missing DECLARE_GLOBAL_DATA_PTR in e820.cBin Meng
DECLARE_GLOBAL_DATA_PTR is missing which causes 64-bit build error. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>