summaryrefslogtreecommitdiff
path: root/arch
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'signed-efi-next' of git://github.com/agraf/u-bootTom Rini2016-10-1925-551/+165
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch queue for efi - 2016-10-19 Highlights this time around: - Add run time service (power control) support for PSCI (fixed in v3) - Add efi gop pointer exposure - SMBIOS support for EFI (on ARM) - efi pool memory unmap support (needed for 4.8) - initial x86 efi payload support (fixed up in v2) - various bug fixes Signed-off-by: Tom Rini <trini@konsulko.com> Conflicts: include/tables_csum.h
| * efi_loader: Rename EFI_RUNTIME_{TEXT, DATA} to __efi_runtime{, _data}Alexander Graf2016-10-191-6/+6
| | | | | | | | | | | | | | | | | | | | | | Compiler attributes are more commonly __foo style tags rather than big upper case eye sores like EFI_RUNTIME_TEXT. Simon Glass felt quite strongly about this, so this patch converts our existing defines over to more eye friendly ones. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org>
| * x86: efi: Add EFI loader support for x86Simon Glass2016-10-193-1/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | Add the required pieces to support the EFI loader on x86. Since U-Boot only builds for 32-bit on x86, only a 32-bit EFI application is supported. If a 64-bit kernel must be booted, U-Boot supports this directly using FIT (see doc/uImage.FIT/kernel.its). U-Boot can act as a payload for both 32-bit and 64-bit EFI. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi: Use asmlinkage for EFIAPISimon Glass2016-10-199-0/+0
| | | | | | | | | | | | | | | | This is required for x86 and is also correct for ARM (since it is empty). Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * cpu: Add get_vendor callbackAlexander Graf2016-10-195-0/+29
| | | | | | | | | | | | | | | | | | | | The CPU udevice already has a few callbacks to retreive information about the currently running CPUs. This patch adds a new get_vendor() call that returns the vendor of the main CPUs. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * cpu: Add DMTF id and family fieldsAlexander Graf2016-10-191-0/+5
| | | | | | | | | | | | | | | | | | | | For SMBIOS tables we need to know the CPU family as well as CPU IDs. This patches allocates some space for them in the cpu device and populates it on x86. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * smbios: Allow compilation on 64bit systemsAlexander Graf2016-10-191-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The SMBIOS generation code passes pointers as u32. That causes the compiler to warn on casts to pointers. This patch moves all address pointers to uintptr_t instead. Technically u32 would be enough for the current SMBIOS2 style tables, but we may want to extend the code to SMBIOS3 in the future which is 64bit address capable. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * x86: Move smbios generation into arch independent directoryAlexander Graf2016-10-195-534/+1
| | | | | | | | | | | | | | | | | | We will need the SMBIOS generation function on ARM as well going forward, so let's move it into a non arch specific location. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * x86: Move table csum into separate fileAlexander Graf2016-10-192-12/+2
| | | | | | | | | | | | | | | | | | We need the checksum function without all the other table functionality soon, so let's split it out into its own C file. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * efi_loader: Add generic PSCI RTSAlexander Graf2016-10-191-5/+26
| | | | | | | | | | | | | | | | | | Now that we have generic PSCI reset and shutdown support in place, we can advertise those as EFI Run Time Services, allowing efi applications and OSs to reset and shut down systems. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org>
| * arm: Provide common PSCI based reset handlerAlexander Graf2016-10-192-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most armv8 systems have PSCI support enabled in EL3, either through ARM Trusted Firmware or other firmware. On these systems, we do not need to implement system reset manually, but can instead rely on higher level firmware to deal with it. The exclude list seems excessive right now, but NXP is working on providing an in-tree PSCI implementation, so that all NXP systems can eventually use PSCI as well. Signed-off-by: Alexander Graf <agraf@suse.de> [agraf: fix meson] Reviewed-by: Simon Glass <sjg@chromium.org>
| * arm: Add PSCI shutdown functionAlexander Graf2016-10-182-0/+16
| | | | | | | | | | | | | | | | | | Using PSCI you can not only reset the system, you can also shut it down! This patch exposes a function to do exactly that to whatever code wants to make use of it. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org>
| * arm: Disable HVC PSCI calls by defaultAlexander Graf2016-10-183-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | All systems that are running on armv8 are running bare metal with firmware that implements PSCI running in EL3. That means we don't really need to expose the hypercall variants of them. This patch leaves the code in, but makes the code explicit enough to have the compiler optimize it out. With this we don't need to worry about hvc vs smc calling convention when calling psci helper functions. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* | Merge branch 'master' of git://git.denx.de/u-boot-uniphierTom Rini2016-10-1828-175/+283
|\ \
| * | ARM: uniphier: remove unnecessary EHCI reset deassertionMasahiro Yamada2016-10-182-8/+6
| | | | | | | | | | | | | | | | | | | | | It is now deasserted by the reset controller driver. Drop the ad-hoc code. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * | ARM: dts: uniphier: sync DT with latest LinuxMasahiro Yamada2016-10-1825-164/+274
| | | | | | | | | | | | Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * | ARM: uniphier: fix addresses of Cortex-A72 gear setting macrosMasahiro Yamada2016-10-181-3/+3
| |/ | | | | | | | | | | My mistake during copy-paste work. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | x86: Add implementations of setjmp() and longjmp()Simon Glass2016-10-183-1/+86
| | | | | | | | | | | | | | | | Bring in these functions from Linux v4.4. They will be needed for EFI loader support. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | x86: Move table csum into separate headerAlexander Graf2016-10-182-12/+2
|/ | | | | | | | | We need the checksum function without all the other table functionality soon, so let's split it out into its own header file. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* Merge git://git.denx.de/u-boot-mpc85xxTom Rini2016-10-152-11/+0
|\
| * arch: powerpc: Remove unused dts frequency fixup for lbc_clkPrabhakar Kushwaha2016-10-142-11/+0
| | | | | | | | | | | | | | | | | | | | lbc_clk is used to fixup dts as "bus frequency". It is not being used by Linux IFC and eLBC driver. So remove unused "bus frqeuency" fix-up of devicre tree. Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
* | ARM: create .secure_stack section only for PSCIMasahiro Yamada2016-10-141-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jon Master reports that QEMU refuses to load a U-Boot image built with CONFIG_ARMV7_NONSEC, but without CONFIG_ARMV7_PSCI since commit 5a3aae68c74e ("ARM: armv7: guard memory reserve for PSCI with #ifdef CONFIG_ARMV7_PSCI"). It looks like only PSCI that needs the Secure stack, so move the #ifdef to guard the whole of .secure_stack allocation in order not to create the empty section. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reported-by: Jon Masters <jcm@redhat.com> Link: http://patchwork.ozlabs.org/patch/664025/
* | libfdt: Sync fdt_for_each_subnode() with upstreamSimon Glass2016-10-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | The signature for this macro has changed. Bring in the upstream version and adjust U-Boot's usages to suit. Signed-off-by: Simon Glass <sjg@chromium.org> Update to drivers/power/pmic/palmas.c: Signed-off-by: Keerthy <j-keerthy@ti.com> Change-Id: I6cc9021339bfe686f9df21d61a1095ca2b3776e8
* | libfdt: Bring in upstream stringlist functionsSimon Glass2016-10-133-12/+12
|/ | | | | | | | | | | | | | These have now landed upstream. The naming is different and in one case the function signature has changed. Update the code to match. This applies the following upstream commits by Thierry Reding <treding@nvidia.com> : 604e61e fdt: Add functions to retrieve strings 8702bd1 fdt: Add a function to get the index of a string 2218387 fdt: Add a function to count strings Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge git://git.denx.de/u-boot-dmTom Rini2016-10-122-17/+29
|\
| * sandbox/fs: Set correct filetype for unknown filetypeStefan Brüns2016-10-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | The "hostfs ls" command prefixes each directory entry with either DIR, LNK or " " if it is a directory, symlink resp. regular file, or "???" for any other or unknown type. The latter only works if the type is set correctly, as the entry defaults to OS_FILET_REG and e.g. socket files show up as regular files. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Simon Glass <sjg@chromium.org>
| * sandbox: Use the address in readl/writel() functionsSimon Glass2016-10-111-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present these functions do not touch addr, which can raising warnings about unused variables. This fixes the following warnings: sandbox_spl defconfig drivers/core/regmap.c: In function ‘regmap_read’: drivers/core/regmap.c:125:12: warning: unused variable ‘ptr’ [-Wunused-variable] uint32_t *ptr = map_physmem(map->base + offset, 4, MAP_NOCACHE); ^ drivers/core/regmap.c: In function ‘regmap_write’: drivers/core/regmap.c:134:12: warning: unused variable ‘ptr’ [-Wunused-variable] uint32_t *ptr = map_physmem(map->base + offset, 4, MAP_NOCACHE); Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 3bfb8cb4 (dm: regmap: Implement simple regmap_read & regmap_write)
| * sandbox/fs: Use readdir instead of deprecated readdir_rStefan Brüns2016-10-111-8/+11
| | | | | | | | | | | | | | | | Using readdir_r limits the maximum file name length and may even be unsafe, and is thus deprecated in since glibc 2.24. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Simon Glass <sjg@chromium.org>
| * sandbox/fs: Use correct size path name bufferStefan Brüns2016-10-111-3/+10
| | | | | | | | | | | | | | | | | | The readdir linux manpage explicitly states (quoting POSIX.1) that sizeof(d_name) is not correct for determining the required size, but to always use strlen. Grow the buffer if needed. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Simon Glass <sjg@chromium.org>
| * sandbox/fs: Make linking of nodes in os_dirent_ls more obviousStefan Brüns2016-10-111-2/+2
| | | | | | | | | | | | | | | | | | Previously, after reading/creating the second dirent, the second entry would be chained to the first entry and the first entry would be linked to head. Instead, immediately link the first entry to head. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Simon Glass <sjg@chromium.org>
* | Merge branch 'master' of git://git.denx.de/u-boot-x86Tom Rini2016-10-1228-1075/+202
|\ \
| * | x86: coreboot: Convert to use DM coreboot video driverBin Meng2016-10-128-4/+11
| | | | | | | | | | | | | | | | | | | | | This converts coreboot to use DM framebuffer driver. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | x86: mrccache: Fix error handling in mrccache_get_region()Simon Glass2016-10-111-3/+5
| | | | | | | | | | | | | | | | | | | | | This should return normal errors, not device-tree errors. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | x86: Drop unused init_helper functionsSimon Glass2016-10-112-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | Drop init_bd_struct_r() which is no-longer used. Also drop the declaration for init_func_spi() since this is now handled by generic board init. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | x86: ivybridge: Tidy up enable_clock_gating() for 64-bitSimon Glass2016-10-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Fix the hex case and remove unused brackets. Use ~0U instead of ~0UL to allow compilation on 64-bit machines. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | x86: ivybridge: Fix PCH power setupSimon Glass2016-10-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | At present pch_power_options() has the arguments to writel() around the wrong way. Fix this and update it to compile on 64-bit machines. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | x86: Correct address casts in interrupt codeSimon Glass2016-10-111-2/+2
| | | | | | | | | | | | | | | | | | | | | We should cast an address to unsigned long, not u32. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | x86: Correct address casts in cpu codeSimon Glass2016-10-111-6/+4
| | | | | | | | | | | | | | | | | | | | | We should cast an address to unsigned long, not u32. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | x86: Allow interrupts to be disabled in 64-bit modeSimon Glass2016-10-111-1/+4
| | | | | | | | | | | | | | | | | | | | | Update the code to support both 32-bit and 64-bit modes. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | dm: x86: Move link to use driver model for videoSimon Glass2016-10-119-1035/+0
| | | | | | | | | | | | | | | | | | | | | | | | Update the configuration to use the new driver. Drop the existing plumbing code and unused header files. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | dm: x86: Move samus to use new driver model supportSimon Glass2016-10-111-1/+0
| | | | | | | | | | | | | | | | | | | | | Update the samus driver to avoid the direct call to the video BIOS setup. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | x86: Add an accelerated memmove() functionSimon Glass2016-10-112-1/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | Bring in a faster memmove() from Linux 4.7. This speeds up scrolling on the display. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
| * | x86: Fix Linux v4.7+ zimage booting (update bootparam.h)Stefan Roese2016-10-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Booting Linux kernel v4.7+ does not work since Linux kernel commit 974f221c "x86/boot: Move compressed kernel to the end of the decompression buffer". This patch adds the latest version of the setup_header struct, adding "init_size" which is needed since this commit referenced above. With this patch, booting Linux v4.8-rc8 does work again on x86 boards. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
| * | x86: baytrail: Add 2nd eMMC controller to the PCI probe listStefan Roese2016-10-111-2/+3
| |/ | | | | | | | | | | | | | | | | | | With this addition, the eMMC device available on the congatec and DFI BayTrail SoM is detected correctly. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-tegraTom Rini2016-10-122-43/+76
|\ \
| * | ARM: tegra: reduce DRAM size mapped into MMU on ARM64Stephen Warren2016-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ARM CPUs can architecturally (speculatively) prefetch completely arbitrary normal memory locations, as defined by the current translation tables. The current MMU configuration for 64-bit Tegras maps an extremely large range of addresses as DRAM, well beyond the actual physical maximum DRAM window, even though U-Boot only needs access to the first 2GB of DRAM; the Tegra port of U-Boot deliberately limits itself to 2GB of RAM since some HW modules on at least some 64-bit Tegra SoCs can only access a 32-bit physical address space. This change reduces the amount of RAM mapped via the MMU to disallow the CPU from ever speculatively accessing RAM that U-Boot will definitely not access. This avoids the possibility of the HW raising SError due to accesses to always-invalid physical addresses. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
| * | colibri_t20: fix usb operation and controller orderMarcel Ziswiler2016-10-101-22/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this patch the following error will be shown: Colibri T20 # usb start starting USB... No controllers found This patch fixes USB operation and also the controller order as the CI UDC driver may only be instantiated on the first aka OTG port. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
| * | colibri_t20: fix display configurationMarcel Ziswiler2016-10-101-20/+51
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Without this patch the following error will be shown: stdio_add_devices: Video device failed (ret=-22) As commit ec5507707a1d1e84056a6c864338f95f6118d3ca (video: tegra: Move to using simple-panel and pwm-backlight) states the Colibri T20 needs updating too which this patch finally attempts doing. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
* | Merge branch 'master' of http://git.denx.de/u-boot-sunxiTom Rini2016-10-121-21/+43
|\ \
| * | sunxi: Fix H3 DRAM impedance calibration on rev. A chipsJens Kuske2016-10-101-21/+43
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | H3 seems to have a silicon bug breaking the impedance calibration. This is currently worked around in software by multiple steps combining the results to replace the wrong values. Revision A chips need a different workaround, which is present in the vendor bootloader too, but got overlooked in lack of information and affected boards till now. This commit adds a simplified version without correction factor, which would be 1.00 for all known boards anyway. Signed-off-by: Jens Kuske <jenskuske@gmail.com> Reviewed-by: Jagan Teki <jteki@openedev.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>