summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-05-24ARM64: zynqmp: Enable CLK frameworkMichal Simek
ZynqMP is using fixed clocks now that's why enabling it to be available for drivers. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-05-24ARM64: zynqmp: Add SPL support supportMichal Simek
Support RAM and MMC boot mode in SPL also with SPL_FIT images. In MMC boot mode two boot options are available: 1) Boot flow with ATF(EL3) and full U-Boot(EL2): aarch64-linux-gnu-objcopy -O binary bl31.elf bl31.bin mkimage -A arm64 -O linux -T kernel -C none -a 0xfffe5000 -e 0xfffe5000 -d bl31.bin atf.ub cp spl/boot.bin <sdcard fat partition> cp atf.ub <sdcard fat partition> cp u-boot.bin <sdcard fat partition> 2) Boot flow with full U-Boot(EL3): cp spl/boot.bin <sdcard> cp u-boot*.img <sdcard> 3) emmc boot mode dd if=/dev/zero of=sd.img bs=1024 count=1024 parted sd.img mktable msdos parted sd.img mkpart p fat32 0% 100% kpartx -a sd.img mkfs.vfat /dev/mapper/loop0p1 mount /dev/mapper/loop0p1 /mnt/ cp spl/boot.bin /mnt cp u-boot.img /mnt cp u-boot.bin /mnt cp atf.ub /mnt umount /dev/mapper/loop0p1 kpartx -d sd.img cp sd.img /tftpboot/ and program it via u-boot tftpb 10000 sd.img mmcinfo mmc write 10000 0 $filesize mmc rescan mmc part ls mmc 0 psu_init() function contains low level SoC setup generated for every HW design by Xilinx design tools. xil_io.h is only supporting file to fix all dependencies from tools. The same solution was used on Xilinx Zynq. The patch also change CONFIG_SYS_INIT_SP_ADDR to the end of OCM which stays at the same location all the time. Bootrom expects starting address to be at 0xfffc0000 that's why this address is SPL_TEXT_BASE. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-05-24ARM64: zynqmp: Add missing u-boot,dm-pre-reloc to DTSIMichal Simek
Add missing u-boot,dm-pre-reloc to get IPs initialized. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-05-24ARM64: zynqmp: Align gic ranges for 64k in device treeAlexander Graf
The GIC ranges in the zynqmp device tree are only 4kb aligned. Since commit 12e14066f we automatically deal with aliases GIC regions though, so we can map them transparently into guests even on 64kb page size systems. This patch makes use of that features and sets GICC and GICV to 64kb aligned and sized regions. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-05-24tools: zynqmpimage: Add Xilinx ZynqMP boot header generationMichal Simek
Add support for the zynqmpimage to mkimage. Only basic functionality is supported without encryption and register initialization with one partition which is filled by U-Boot SPL. For more detail information look at Xilinx ZynqMP TRM. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-05-24SPL: FIT: Enable SPL_FIT_LOAD in RAM based boot modeMichal Simek
Support loading FIT in SPL for RAM bootmode. CONFIG_SPL_LOAD_FIT_ADRESS points to address where FIT image is stored in memory. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
2016-05-24ARM: zynq: Call ps7_post_config() for SPLMichal Simek
If ps7_post_config() is defined call it. It is enabling for example level shifters for PL bitstreams. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-05-24ARM64: zynqmp: Enable option to overwrite default variablesMichal Simek
Enable overwriting variables out of main config file. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-05-24spl: Introduce new function spl_board_prepare_for_bootMichal Simek
Call this function before passing control from SPL. For fpga case it is necessary to enable for example level shifters when bitstream is programmed. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-05-24ARM64: zynqmp: Add debug uart for zc1751-dc1Michal Simek
It is helpful for debugging. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-05-24ARM64: zynqmp: Enable SPI_FLASH and FLASH_BAR for ep108Michal Simek
Add missing SPI flash options. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-05-24ARM64: zynqmp: Remove CONFIG_PREBOOTMichal Simek
CONFIG_PREBOOT variable is breaking ./test/py framework. Remove it. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-05-24ARM: zynq: Add support for SPL_LOAD_FITMichal Simek
Enable minimal function to be able to compile SPL_LOAD_FIT. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-05-24ARM64: zynqmp: Wire up debug_uart setupMichal Simek
It has to be enabled by debug_uart_init(). Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-05-24ARM64: zynqmp: Enable eMMC boot partitions commandsMichal Simek
Enable some additional features of the eMMC boot partitions. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-05-24ARM64: zynqmp: Add support for reading MAC from eepromMichal Simek
Add support for on board eeprom with programmed MAC for using in u-boot to have uniq address for every board. Most of the time uniq MAC address is on a label on the board. If address is not programmed use these command to program it. On zcu102: ZynqMP> mm.b 0 00000000: 00 ? 00 00000001: a0 ? 0a 00000002: 35 ? 35 00000003: 02 ? 02 00000004: 00 ? ef 00000005: 00 ? 67 00000006: 00 ? q i2c dev 5 i2c write 0 54 20 6 i2c md 54 20 Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-05-24ARM64: zynqmp: Enable missing distro default optionsMichal Simek
Enable all options which distros requires. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-05-24ARM64: zynqmp: Enable HUSH parser for all zynqmp targetsMichal Simek
Enable HUSH for all zynqmp boards which don't have it. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-05-24ARM: dts: zynq: describe SLCR as simple-mfd rather than simple-busMasahiro Yamada
Commit 9f56917ab88a ("dm: core: make simple-bus compatible to simple-mfd") made possible to import the following commit: Linux commit: bc5ba9b98435bf76d92e0954da1784695aa449f1 The SLCR (System-Level Control Registers) block is an MFD (Multi Function Device) rather than a bus. "simple-mfd" seems a more suitable compatible string than "simple-bus". Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-05-24gpio: zynq: Add support for reading gpio pin stateMichal Simek
Add zynq_gpio_get_function() which return status on gpio pin. This function enables gpio status command. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-05-24ARM: zynq: load u-boot.img whether CONFIG_OF_SEPARATE is defined or notMasahiro Yamada
Since commit ad1ecd2063da ("fdt: Build a U-Boot binary without device tree"), u-boot-dtb.img is identical to u-boot.img, so SPL can always load u-boot.img whether CONFIG_OF_SEPARATE is defined or not. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-05-24ARM: sama5d2: Implement boot device autodetectionMarek Vasut
Implement support for saving ARM register R4 early during boot using save_boot_params . Implement support for decoding the stored register R4 value in spl_boot_device() to obtain boot device from which the SoC booted. This way, the SPL will always load U-Boot from the same device from which the SPL itself booted instead of using hard-coded boot device. This functionality is useful for example when booting sama5d2-xplained from SD card, where by default the SPL would try loading the U-Boot from eMMC and fail. This is because eMMC is on SDHCI0 (BOOT_DEVICE_MMC1), while SD slot is on SDHCI1 (BOOT_DEVICE_MMC2) and the SPL was hard-wired to always boot from BOOT_DEVICE_MMC1. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Andreas Bießmann <andreas.devel@googlemail.com> Cc: Wenyou Yang <wenyou.yang@atmel.com> Reviewed-by: Andreas Bießmann <andreas@biessmann.org>
2016-05-24ARM: atmel: Enable FIT image support for SAMA5DxMarek Vasut
Enable the fitImage support for the entire SAMA5Dx lineup of CPUs. The fitImage is superior image format to uImage and it is useful to have it available. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Andreas Bießmann <andreas.devel@googlemail.com> Cc: Wenyou Yang <wenyou.yang@atmel.com> Reviewed-by: Andreas Bießmann <andreas@biessmann.org> [rebase on current ToT] Signed-off-by: Andreas Bießmann <andreas@biessmann.org>
2016-05-24board: sama5d2_xplained: change SDHCI GCK's clock source to UPLLWenyou Yang
Change the clock source of the SDHCI's generated clock from PLLA to UPLL clock to align to Linux driver. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Reviewed-by: Andreas Bießmann <andreas@biessmann.org>
2016-05-24ARM: at91: clock: complete the GCK's clock sourcesWenyou Yang
Add the UPLL clock and master clock as a clock source for getting the generated clock frequency to complete its clock sources support. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Reviewed-by: Andreas Bießmann <andreas@biessmann.org>
2016-05-24ARM: at91: clock: fix the GCK's clock sourceWenyou Yang
Before enabling a generated clock whose source is from the UPLL clock, check and enable the UPLL clock. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Reviewed-by: Andreas Bießmann <andreas@biessmann.org>
2016-05-24board: atmel: sama5d2_xplained: fix the missing pin config of SDMMC0Wenyou Yang
Fix the missing pin config of the SDMMC0 interface. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Reviewed-by: Andreas Bießmann <andreas@biessmann.org>
2016-05-24board: atmel: add SAMA5D2 PTC Engineering boardWenyou Yang
The board supports following features: - Boot media support: NAND Flash/SPI Flash - Support ethernet - Support USB mass storage Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Reviewed-by: Andreas Bießmann <andreas@biessmann.org>
2016-05-24ARM: at91: sama5d2: add macro & field definitionsWenyou Yang
They will be used on SAMA5D2 PTC board. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Reviewed-by: Andreas Bießmann <andreas@biessmann.org>
2016-05-23Merge branch 'master' of git://git.denx.de/u-boot-x86Tom Rini
2016-05-23Merge branch 'master' of git://git.denx.de/u-boot-mipsTom Rini
2016-05-23ARM: fix ifdef in ARMv8 lowlevel_init() againMasahiro Yamada
Commit 116611937faa ("ARM: fix ifdefs in ARMv8 lowlevel_init()") accidentally inverted the logic of CONFIG_ARMV8_MULTIENTRY. Fixes: 116611937faa ("ARM: fix ifdefs in ARMv8 lowlevel_init()") Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
2016-05-23SPL: fat: Fix spl_parse_image_header() return value handlingTom Rini
The spl_parse_image_header() can return 0 and it is not an error. Only treat non-zero return value as an error. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Peng Fan <van.freenix@gmail.com> Reviewed-by: Stefano Babic <sbabic@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-05-23omap3: Fix SPI registers on am33xx and am43xxMartin Hejnfelt
When the base registers are read from device tree the base is not 0x48030100 as the driver expects, but 0x48030000, resulting in non functioning SPI. To deal with this, use same idea as how this is done in the linux kernel (drivers/spi/spi-omap2-mcspi.c) and add a structure with a field that is used to shift the registers on these systems. v2: Fixed commit subject line to correct cpu Signed-off-by: Martin Hejnfelt <mh@newtec.dk>
2016-05-23kbuild: fixdep: Check fstat(2) return valueTom Rini
Coverity has recently added a check that will find when we don't check the return code from fstat(2). Copy/paste the checking logic that print_deps() has with an appropriate re-wording of the perror() message. [ Linux commit : 46fe94ad18aa7ce6b3dad8c035fb538942020f2b ] Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Michal Marek <mmarek@suse.com>
2016-05-23spl: Setup default value for OF_LISTMichal Simek
OF_LIST can't remain empty that's why setup it up to default DTB. If it is empty u-boot.img is created without FDT partition: For example: ./tools/mkimage -f auto -A arm -T firmware -C none -O u-boot -a 0x8000000 -e 0 -n "U-Boot 2016.05-rc3 ..." -E -b -d u-boot-nodtb.bin u-boot.img Can't set 'timestamp' property for '' node (FDT_ERR_NOSPACE) FIT description: Firmware image with one or more FDT blobs Created: Wed May 4 15:02:52 2016 Image 0 (firmware@1) Description: U-Boot 2016.05-rc3-00080-gff2e12ae22a8-dirty for zynqmp board Created: Wed May 4 15:02:52 2016 Type: Firmware Compression: uncompressed Data Size: unavailable Architecture: ARM Load Address: 0x08000000 Default Configuration: 'conf@1' Configuration 0 (conf@1) Description: unavailable Kernel: unavailable And then image like this doesn't contain description and link to FDT and can't boot. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-05-23spl: fit: Print error message when FDT is not presentMichal Simek
When FDT is not present in the image user doesn't get any error what's wrong. Print error message if LIBCOMMON_SUPPORT is enabled. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Seris-cc: uboot Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-05-23mkimage: Add a quiet modeSimon Glass
Some build systems want to be quiet unless there is a problem. At present mkimage displays quite a bit of information when generating a FIT file. Add a '-q' flag to silence this. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2016-05-23image-fit: Don't display an error in fit_set_timestamp()Simon Glass
This function returns an error code and its caller may be able to fix the error. For example fit_handle_file() expands the device tree to fit if there is a lack of space. In this case the caller does not want an error displayed. It is confusing, since it suggests that something is wrong, when it fact everything is fine. Drop the error. Signed-off-by: Simon Glass <sjg@chromium.org>
2016-05-23malloc: improve memalign fragmentation fixStephen Warren
Commit 4f144a416469 "malloc: work around some memalign fragmentation issues" enhanced memalign() so that it can succeed in more cases where heap fragmentation is present. However, it did not solve as many cases as it could. This patch enhances the code to cover more cases. The alignment code works by allocating more space than the user requests, then adjusting the returned pointer to achieve alignment. In general, one must allocate "alignment" bytes more than the user requested in order to guarantee that alignment is possible. This is what the original code does. The previous enhancement attempted a second allocation if the padded allocation failed, and succeeded if that allocation just happened to be aligned; a fluke that happened often in practice. There are still cases where this could fail, yet where it is still possible to honor the user's allocation request. In particular, if the heap contains a free region that is large enough for the user's request, and for leading padding to ensure alignment, but has no or little space for any trailing padding. In this case, we can make a third(!) allocation attempt after calculating exactly the size of the leading padding required to achieve alignment, which is the minimal over-allocation needed for the overall memalign() operation to succeed if the third and second allocations end up at the same location. This patch isn't checkpatch-clean, since it conforms to the existing coding style in dlmalloc.c, which is different to the rest of U-Boot. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-05-23x86: galileo: Override SMBIOS product nameBin Meng
Override the default product name U-Boot reports in the SMBIOS table, to be compatible with the Intel provided UEFI BIOS, as Linux kernel drivers (drivers/mfd/intel_quark_i2c_gpio.c and drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c) make use of it to do different board level configuration. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-05-23x86: Switch to use SMBIOS Kconfig options when writing SMBIOS tablesBin Meng
Make use of the newly added Kconfig options of board manufacturer and product name to write SMBIOS tables. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-05-23x86: kconfig: Add two options for SMBIOS manufacturer and product nameBin Meng
This introduces two Kconfig options to be used by SMBIOS tables: board manufacturer and product name. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-05-23x86: galileo: Enable MP table generationBin Meng
Now that we have added CPU uclass driver and fixed the IOAPIC ID conflict, enable MP table generation so that IOAPIC can be used by the Linux kernel. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-05-23x86: broadwell: Correct I/O APIC IDBin Meng
Currently ID 2 is assgined to broadwell I/O APIC, however per chromebook_samus.dts 2 is the core#2 LAPIC ID. Now we change I/O APIC ID to 4 to avoid conflict. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-05-23x86: quark: Assign a unique I/O APIC IDBin Meng
After power-on, both LAPIC and I/O APIC appear with the same APIC ID zero, which creates an ID conflict. When generating MP table, U-Boot reports zero as the LAPIC ID in the processor entry, and zero as the I/O APIC ID in the I/O APIC as well as the I/O interrupt assignment entries. Such MP table confuses Linux kernel and finally a kernel panic is seen during boot: BUG: unable to handle kernel paging request at ffff9000 IP: [<c101d462>] native_io_apic_write+0x22/0x30 *pdpt = 00000000014fb001 *pde = 00000000014ff067 *pte = 0000000000000000 Oops: 0002 [#1] Modules linked in: Pid: 1, comm: swapper Tainted: G W 3.8.7 #3 intel galileo/galileo EIP: 0060:[<c101d462>] EFLAGS: 00010086 CPU: 0 EIP is at native_io_apic_write+0x22/0x30 ... Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000009 Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-05-23x86: Call lapic_setup() in interrupt_init()Bin Meng
Let's configure LAPIC in a common place - interrupt_init(). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-05-23x86: Remove SMP limitation in lapic_setup()Bin Meng
At present LAPIC is enabled and configured as virtual wire mode in lapic_setup() only when CONFIG_SMP is on. This limitation is however not necessary as for uniprocessor this is still needed. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-05-23x86: Don't touch IA32_APIC_BASE MSR on Intel QuarkBin Meng
Intel Quark processor core provides an integrated Local APIC but does not support the IA32_APIC_BASE MSR. As a result, the Local APIC is always globally enabled and the Local APIC base address is fixed at 0xfee00000. Attempting to access the IA32_APIC_BASE MSR causes a general protection fault. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-05-23x86: galileo: Enable CPU driverBin Meng
Add a cpu node in the device tree and enable CPU driver. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>