summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* arm: socfpga: Add clock driver for Arria 10Ley Foon Tan2017-05-185-1/+1335
| | | | | | | Add clock driver support for Arria 10. Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com> Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
* arm: socfpga: Add reset driver support for Arria 10Ley Foon Tan2017-05-185-0/+644
| | | | | | | Add reset driver support for Arria 10. Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com> Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
* arm: socfpga: Add A10 macrosLey Foon Tan2017-05-181-1/+7
| | | | | | Add i2c, timer and other A10 macros. Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
* arm: socfpga: Restructure misc driverLey Foon Tan2017-05-184-349/+400
| | | | | | | | | Restructure misc driver in the preparation to support A10. Move the Gen5 specific code to gen5 file. Change all uint32_t_to u32. Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
* arm: socfpga: Restructure system managerLey Foon Tan2017-05-184-123/+138
| | | | | | | | | Restructure system manager in the preparation to support A10. No functional change. Change uint32_t to u32. Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
* arm: socfpga: Restructure reset manager driverLey Foon Tan2017-05-185-133/+176
| | | | | | | Restructure reset manager driver in the preparation to support A10. Move the Gen5 specific code to gen5 files. Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
* arm: socfpga: Restructure clock manager driverLey Foon Tan2017-05-186-816/+867
| | | | | | | | | | | Restructure clock manager driver in the preparation to support A10. Move the Gen5 specific code to _gen5 files. - Change all uint32_t to u32 and change to use macro BIT(n) for bit shift. - Check return value from wait_for_bit(). So change return type to int for cm_write_with_phase() and cm_basic_init(). Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
* Merge git://git.denx.de/u-boot-uniphierTom Rini2017-05-1723-24/+336
|\ | | | | | | | | | | | | - Add workaround code to make LD20 SoC boot from ARM Trusted Firmware - Sync DT with Linux to fix DTC warnings - Add new SoC support code - Misc fix, updates
| * ARM: uniphier: add more init code for PXs3Masahiro Yamada2017-05-179-1/+76
| | | | | | | | | | | | Add the boot device table and reset deassertion for eMMC. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * ARM: uniphier: move kernel physical base to 0x82080000Masahiro Yamada2017-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | Reserve enough space below the kernel base. The assumed address map is: 80000000 - 80ffffff : for IPP 81000000 - 81ffffff : for ARM secure 82000000 - : for Linux Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * ARM: dts: uniphier: sync DT with LinuxMasahiro Yamada2017-05-1710-21/+237
| | | | | | | | | | | | | | | | | | Fix the following DTC warnings: Warning (simple_bus_reg): Node /soc/system-bus@58c00000/support_card@1,1f00000/ethernet@00000000 simple-bus unit address format error, expected "0" Warning (simple_bus_reg): Node /soc/system-bus@58c00000/support_card@1,1f00000/uart@000b0000 simple-bus unit address format error, expected "b0000" Warning (simple_bus_reg): Node /soc/smpctrl@59800000 simple-bus unit address format error, expected "59801000" Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * ARM: uniphier: add weird workaround code for LD20Masahiro Yamada2017-05-172-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When booting from ARM Trusted Firmware, U-Boot runs in EL1-NS. The boot flow is as follows: BL1 -> BL2 -> BL31 -> BL33 (i.e. U-Boot) This boot sequence works fine for LD11 SoC (Cortex-A53), but LD20 SoC (Cortex-A72) hangs in U-Boot. The solution I found is to read sctlr_el1 and write back the value as-is. This should be no effect, but surprisingly fixes the problem for LD20 to boot. I do not know why. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * ARM: uniphier: add usbupdate commandMasahiro Yamada2017-05-171-0/+5
| | | | | | | | | | | | | | This script command will be useful to update boot images in the USB storage. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * ARM: uniphier: fix MODEL field of REVISION registerMasahiro Yamada2017-05-171-1/+1
| | | | | | | | | | | | The MODEL field is 3 bit wide. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | Merge git://git.denx.de/u-boot-x86Tom Rini2017-05-1744-117/+1008
|\ \
| * | x86: minnowmax: Remove incorrect pad-offset of several pinsBin Meng2017-05-171-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove 'pad-offset' of soc_gpio_s5_0, soc_gpio_s5_1, soc_gpio_s5_2, pin_usb_host_en0 and pin_usb_host_en1. These offsets are actually wrong. Correct value should be added by 0x2000, but since they are supposed to be 'mode-gpio', 'pad-offset' is not needed at all. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | x86: ich6_gpio: Add use-lvl-write-cache for I/O access modeBin Meng2017-05-176-5/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a device-tree property use-lvl-write-cache that will cause writes to lvl to be cached instead of read from lvl before each write. This is required on some platforms that have the register implemented as dual read/write (such as Baytrail). Prior to this fix the blue USB port on the Minnowboard Max was unusable since USB_HOST_EN0 was set high then immediately set low when USB_HOST_EN1 was written. This also resolves the 'gpio clear | set' command warning like: "Warning: value of pin is still 0" Signed-off-by: George McCollister <george.mccollister@gmail.com> <rebased on latest origin/master, fixed all baytrail boards> Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | spi: ich: Configure SPI BIOS parameters for Linux upon U-Boot exitStefan Roese2017-05-172-7/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a remove function to the Intel ICH SPI driver, that will be called upon U-Boot exit, directly before the OS (Linux) is started. This function takes care of configuring the BIOS registers in the SPI controller (similar to what a "standard" BIOS or coreboot does), so that the Linux MTD device driver is able to correctly read/write to the SPI NOR chip. Without this, the chip is not detected at all. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Jagan Teki <jteki@openedev.com>
| * | x86: bootm: Add dm_remove_devices_flags() call to bootm_announce_and_cleanup()Stefan Roese2017-05-171-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a call to dm_remove_devices_flags() to bootm_announce_and_cleanup() so that drivers that have one of the removal flags set (e.g. DM_FLAG_ACTIVE_DMA_REMOVE) in their driver struct, may do some last-stage cleanup before the OS is started. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | dm: core: Add DM_FLAG_OS_PREPARE flagStefan Roese2017-05-172-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new flag can be added to DM device drivers, which need to do some final configuration before U-Boot exits and the OS (e.g. Linux) is started. The remove functions of those drivers will get called at this stage to do these last-stage configuration steps. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com>
| * | serial: serial-uclass: Use force parameter in stdio_deregister_dev()Stefan Roese2017-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On my x86 platform I've noticed, that calling dm_uninit() or the new function dm_remove_devices_flags() does not remove the desired device at all. Debugging showed, that the serial uclass returns -EPERM in serial_pre_remove(). This patch sets the force parameter when calling stdio_deregister_dev() resulting in a removal of the device. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | x86: Convert MMC to driver modelSimon Glass2017-05-177-81/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | Convert the pci_mmc driver over to driver model and migrate all x86 boards that use it. 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: Document ACPI S3 supportBin Meng2017-05-171-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we have ACPI S3 support on Intel MinnowMax board, document some generic information of S3 and how to test it. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
| * | x86: minnowmax: Enable ACPI S3 resumeBin Meng2017-05-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This turns on ACPI S3 resume for minnowmax board. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
| * | x86: acpi: Fix Windows S3 resume failureBin Meng2017-05-174-2/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | U-Boot sets up the real mode interrupt handler stubs starting from address 0x1000. In most cases, the first 640K (0x00000 - 0x9ffff) system memory is reported as system RAM in E820 table to the OS. (see install_e820_map() implementation for each platform). So OS can use these memories whatever it wants. If U-Boot is in an S3 resume path, care must be taken not to corrupt these memorie otherwise OS data gets lost. Testing shows that, on Microsoft Windows 10 on Intel Baytrail its wake up vector happens to be installed at the same address 0x1000. While on Linux its wake up vector does not overlap this memory range, but after resume kernel checks low memory range per config option CONFIG_X86_RESERVE_LOW which is 64K by default to see whether a memory corruption occurs during the suspend/resume (it's harmless, but warnings are shown in the kernel dmesg logs). We cannot simply mark the these memory as reserved in E820 table because such configuration makes GRUB complain: unable to allocate real mode page. Hence we choose to back up these memories to the place where we reserved on our stack for our S3 resume work. Before jumping to OS wake up vector, we need restore the original content there. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
| * | x86: pci: Allow conditionally run VGA rom in S3Bin Meng2017-05-172-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new CONFIG_S3_VGA_ROM_RUN option so that U-Boot can bypass executing VGA roms in S3. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
| * | x86: acpi: Turn on ACPI mode for S3Bin Meng2017-05-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Before jumping to OS waking up vector, we need turn on ACPI mode for S3, just like what we do for a normal boot. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
| * | x86: acpi: Refactor acpi_resume()Bin Meng2017-05-175-12/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To do something more in acpi_resume() like turning on ACPI mode, we need locate ACPI FADT table pointer first. But currently this is done in acpi_find_wakeup_vector(). This changes acpi_resume() signature to accept ACPI FADT pointer as the parameter. A new API acpi_find_fadt() is introduced, and acpi_find_wakeup_vector() is updated to use FADT pointer as the parameter as well. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
| * | x86: acpi: Make enter_acpi_mode() publicBin Meng2017-05-172-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | enter_acpi_mode() is useful on other boot path like S3 resume, so make it public. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
| * | x86: apci: Change PM1_CNT register access to RMWBin Meng2017-05-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In enter_acpi_mode() PM1_CNT register is changed to PM1_CNT_SCI_EN directly without preserving its previous value. Update to change the register access to read-modify-write (RMW). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
| * | x86: Adjust board_final_cleanup() orderBin Meng2017-05-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call board_final_cleanup() before write_tables(), so that anything done in board_final_cleanup() on a normal boot path is also done on an S3 resume path. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
| * | x86: Do not clear high table area for S3Bin Meng2017-05-171-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When SeaBIOS is being used, U-Boot reserves a memory area to be used for configuration tables like ACPI. But it should not be cleared otherwise ACPI table will be missing. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
| * | x86: fsp: Save stack address to CMOS for next S3 bootBin Meng2017-05-174-1/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the end of pre-relocation phase, save the new stack address to CMOS and use it as the stack on next S3 boot for fsp_init() continuation function. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
| * | x86: Add an early CMOS access libraryBin Meng2017-05-173-0/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a library that provides CMOS (inside RTC SRAM) access at a very early stage when driver model is not available yet. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
| * | x86: acpi: Resume OS if resume vector is foundBin Meng2017-05-174-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | In an S3 resume path, U-Boot does everything like a cold boot except in the last_stage_init() it jumps to the OS resume vector. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
| * | x86: acpi: Add one API to find OS wakeup vectorBin Meng2017-05-173-0/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | This adds one API acpi_find_wakeup_vector() to locate OS wakeup vector from the ACPI FACS table, to be used in the S3 boot path. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
| * | x86: acpi: Add wake up assembly stubBin Meng2017-05-173-0/+88
| | | | | | | | | | | | | | | | | | | | | | | | This adds a wake up stub before jumping to OS wake up vector. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
| * | x86: fsp: Mark memory used by U-Boot as reserved in the E820 table for S3Bin Meng2017-05-172-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | U-Boot itself as well as everything that is consumed by U-Boot (like heap, stack, dtb, etc) needs to be reserved and reported in the E820 table when S3 resume is on. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
| * | x86: baytrail: Conditionally report S3 in the ACPI tableBin Meng2017-05-172-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | When U-Boot is built without ACPI S3 support, it should not report S3 in the ACPI table otherwise when kernel does STR it won't work. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
| * | x86: Store and display previous sleep stateBin Meng2017-05-174-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add one member in the global data to store previous sleep state, and display the state during boot in print_cpuinfo(). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
| * | x86: fsp: acpi: Pass different boot mode to FSP initBin Meng2017-05-172-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | When ACPI S3 resume is turned on, we should pass different boot mode to FSP init instead of default BOOT_FULL_CONFIG. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
| * | x86: Add post codes for OS resumeBin Meng2017-05-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This adds OS_RESUME (0x40) and RESUME_FAILURE (0xed) post codes. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
| * | x86: baytrail: acpi: Add APIs for determining/clearing sleep stateBin Meng2017-05-172-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | This adds APIs for determining previous sleep state from ACPI I/O registers, as well as clearing sleep state on BayTrail SoC. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
| * | x86: acpi: Add Kconfig option and header file for ACPI resumeBin Meng2017-05-172-0/+76
| |/ | | | | | | | | | | | | | | | | This introduces a Kconfig option for ACPI S3 resume, as well as a header file to include anything related to ACPI S3 resume. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
* | Merge git://git.denx.de/u-boot-mpc85xxTom Rini2017-05-162-2/+6
|\ \ | |/ |/|
| * powerpc: t1024: Fix SRDS_MAX_LANES valuePaulo Zaneti2017-05-152-2/+6
| | | | | | | | | | | | | | | | T1023 and T1024 have 4 SerDes lanes. Fix macro SRDS_MAX_LANES and use this macro instead of hard-coded value in t1024_serdes.c. Signed-off-by: Paulo Zaneti <paulo.zaneti@datacom.ind.br> Signed-off-by: York Sun <york.sun@nxp.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-mmcTom Rini2017-05-1652-101/+173
|\ \ | | | | | | | | | | | | | | | | | | - Add #undef CONFIG_DM_MMC_OPS to omap3_logic in the SPL build case, to match other TI platforms in the same situation. Signed-off-by: Tom Rini <trini@konsulko.com>
| * | mmc: atmel_sdhci: Enable the quirk SDHCI_QUIRK_WAIT_SEND_CMDWenyou Yang2017-05-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | To fix the timeout of sending the write command, enable the quirk SDHCI_QUIRK_WAIT_SEND_CMD. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | mmc: descend into drivers/mmc only when CONFIG_MMC is enabledMasahiro Yamada2017-05-154-18/+14
| | | | | | | | | | | | | | | | | | | | | | | | This simplifies makefiles. Also, arrange the order of objects in drivers/mmc/Makefile so that the framework objects are listed before drivers. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * | mmc: replace CONFIG_GENERIC_MMC with CONFIG_MMCMasahiro Yamada2017-05-1540-59/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now CONFIG_GENERIC_MMC and CONFIG_MMC match for all defconfig. We do not need two options for the same feature. Deprecate the former. This commit was generated with the sed script 's/GENERIC_MMC/MMC/' and manual fixup of drivers/mmc/Kconfig. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>