]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
7 years agoGPT: fix error in partitions string doc
Alison Chaiken [Sun, 25 Jun 2017 23:43:19 +0000 (16:43 -0700)]
GPT: fix error in partitions string doc

The existing partitions-list parsing in cmd/gpt.c passes a value
from gpt_default() to set_gpt_info() that README.gpt suggests
should begin with 'partitions='.  Partition-list strings should
in fact begin with 'uuid_disk', as otherwise the call from
set_gpt_info() to extract_val() to find 'uuid_disk' will fail.
Change README.gpt accordingly.

Changes since v6: none.

Signed-off-by: Alison Chaiken <alison@peloton-tech.com>
7 years agodisk_partition: introduce macros for description string lengths
Alison Chaiken [Sun, 25 Jun 2017 23:43:18 +0000 (16:43 -0700)]
disk_partition: introduce macros for description string lengths

Changes since v6: none.

Signed-off-by: Alison Chaiken <alison@peloton-tech.com>
7 years agoEFI: replace number with UUID_STR_LEN macro
Alison Chaiken [Sun, 25 Jun 2017 23:43:17 +0000 (16:43 -0700)]
EFI: replace number with UUID_STR_LEN macro

Changes since v6: none.

Signed-off-by: Alison Chaiken <alison@peloton-tech.com>
7 years agoMerge tag 'xilinx-for-v2017.09' of git://www.denx.de/git/u-boot-microblaze
Tom Rini [Fri, 4 Aug 2017 11:23:32 +0000 (07:23 -0400)]
Merge tag 'xilinx-for-v2017.09' of git://www.denx.de/git/u-boot-microblaze

Xilinx changes for v2017.09

Zynq:
- Add Z-Turn board support

fpga:
- Remove intermediate buffer from code

Zynqmp:
- dts cleanup
- change psu_init handling
- Add options to get silicon version
- Fix time handling
- Map OCM/TCM via MMU
- Add new clock driver

7 years agoPowerPC: mpc85xx: Update ft_verify_fdt
Tom Rini [Thu, 3 Aug 2017 13:33:07 +0000 (09:33 -0400)]
PowerPC: mpc85xx: Update ft_verify_fdt

With the changes to fdt_get_base_address() we need to modify the logic
in ft_verify_fdt() for how we check the validity of the CCSR address.

Tested-on: qemu-ppce500 -M mpc8544ds
Fixes: 336a44877af8 ("fdt: Correct fdt_get_base_address()")
Cc: York Sun <york.sun@nxp.com>
Cc: Wolfgang Denk <wd@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoqemu-ppce500: Update get_phys_ccsrbar_addr_early()
Tom Rini [Thu, 3 Aug 2017 12:53:36 +0000 (08:53 -0400)]
qemu-ppce500: Update get_phys_ccsrbar_addr_early()

The logic of what fdt_get_base_address() will search for and return has
changed.  Rework get_phys_ccsrbar_addr_early() to perform the logic that
fdt_get_base_address used to perform.

Fixes: 336a44877af8 ("fdt: Correct fdt_get_base_address()")
Reviewed-by: Simon Glass <sjg@chromium.org>
Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoahci-pci: Update call to ahci_probe_scsi_pci()
Bin Meng [Thu, 3 Aug 2017 02:07:17 +0000 (19:07 -0700)]
ahci-pci: Update call to ahci_probe_scsi_pci()

ahci_probe_scsi() now takes a 'base' argument, and there is an API
that prepares base address for us: ahci_probe_scsi_pci().

Reported-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
7 years agoMerge branch 'rmobile' of git://git.denx.de/u-boot-sh
Tom Rini [Wed, 2 Aug 2017 23:30:27 +0000 (19:30 -0400)]
Merge branch 'rmobile' of git://git.denx.de/u-boot-sh

7 years agoARM: rmobile: Update defconfig of R-Car Gen3
Nobuhiro Iwamatsu [Wed, 2 Aug 2017 19:27:53 +0000 (04:27 +0900)]
ARM: rmobile: Update defconfig of R-Car Gen3

This updates defconfig of R-Car Gen3 to keep with the latest Kconfig.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agonet: ravb: Add clock handling support
Marek Vasut [Fri, 21 Jul 2017 21:20:35 +0000 (23:20 +0200)]
net: ravb: Add clock handling support

Add support for enabling and disabling the clock using the clock
framework based on the content of OF instead of doing it manually
in the board file.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agonet: ravb: Detect PHY correctly
Marek Vasut [Fri, 21 Jul 2017 21:20:34 +0000 (23:20 +0200)]
net: ravb: Detect PHY correctly

The order of parameters passed to the phy_connect() was wrong.
Moreover, only PHY address 0 was used. Replace this with code
capable of detecting the PHY address.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agonet: ravb: Add OF probing support
Marek Vasut [Fri, 21 Jul 2017 21:20:33 +0000 (23:20 +0200)]
net: ravb: Add OF probing support

Add support for probing the RAVB Ethernet block from device tree.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoserial: sh: Use the clock framework to obtain clock config
Marek Vasut [Fri, 21 Jul 2017 21:19:18 +0000 (23:19 +0200)]
serial: sh: Use the clock framework to obtain clock config

Since we now have clock driver on the RCar Gen3 , obtain the clock
configuration using the clock framework functions. In case this
fails, fall back to the original code for pulling the clock config
directly out of OF.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoserial: sh: Convert to Kconfig
Marek Vasut [Fri, 21 Jul 2017 21:18:46 +0000 (23:18 +0200)]
serial: sh: Convert to Kconfig

Convert the SH Serial to Kconfig using tools/moveconfig.py tool
and a bit of manual adjustment to cater for failed conversions.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Enable clock framework on ULCB
Marek Vasut [Fri, 21 Jul 2017 21:18:05 +0000 (23:18 +0200)]
ARM: rmobile: Enable clock framework on ULCB

Since there is now a clock driver for RCar Gen3, enable it on this board.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Enable clock framework on Salvator-X
Marek Vasut [Fri, 21 Jul 2017 21:18:04 +0000 (23:18 +0200)]
ARM: rmobile: Enable clock framework on Salvator-X

Since there is now a clock driver for RCar Gen3, enable it on this board.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoclk: rmobile: Add RCar Gen3 clock driver
Marek Vasut [Fri, 21 Jul 2017 21:18:03 +0000 (23:18 +0200)]
clk: rmobile: Add RCar Gen3 clock driver

Add clock driver for the RCar Gen3 R8A7795 and R8A7796 SoCs .
This driver allows reading out the clock configuration set by
previous boot stages and enabling and disabling clock using
the MSTP registers. Setting clock is not supported thus far.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Enable OF_CONTROL on RCar Gen3
Marek Vasut [Fri, 21 Jul 2017 21:17:00 +0000 (23:17 +0200)]
ARM: rmobile: Enable OF_CONTROL on RCar Gen3

Since the DTs are now in place, enable OF control so that they get
bundled into the U-Boot.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: dts: rmobile: Import DTS from Linux 4.12
Marek Vasut [Fri, 21 Jul 2017 21:16:59 +0000 (23:16 +0200)]
ARM: dts: rmobile: Import DTS from Linux 4.12

Import the RCar Gen3 DTS and headers from upstream Linux kernel v4.12-rc6,
commit 6f7da290413ba713f0cdd9ff1a2a9bb129ef4f6c . This includes both M3
and H3 ULCB and Salvator-X boards.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Increase console buffer sizes
Marek Vasut [Fri, 21 Jul 2017 21:16:08 +0000 (23:16 +0200)]
ARM: rmobile: Increase console buffer sizes

Allow pasting extra long lines into the U-Boot console on RCar Gen3.
This is OK since we have plenty of resources and it's convenient.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: ulcb: Add ULCB board support
Marek Vasut [Fri, 21 Jul 2017 21:15:21 +0000 (23:15 +0200)]
ARM: rmobile: ulcb: Add ULCB board support

Add initial support for the R8A7795 and R8A7796 based ULCB board.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Add PFC PUEN bank 5 address
Marek Vasut [Fri, 21 Jul 2017 21:15:20 +0000 (23:15 +0200)]
ARM: rmobile: Add PFC PUEN bank 5 address

Add the PFC5 PUEN address and SSI SDATA4 bit offset into the
rcar-gen3-base.h .

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoMerge git://git.denx.de/u-boot-fsl-qoriq
Tom Rini [Wed, 2 Aug 2017 14:52:26 +0000 (10:52 -0400)]
Merge git://git.denx.de/u-boot-fsl-qoriq

Signed-off-by: Tom Rini <trini@konsulko.com>
Conflicts:
include/configs/ls1046aqds.h
include/configs/ls1046ardb.h

7 years agoarm64: zynqmp: avoid out of buffer access
Heinrich Schuchardt [Sun, 30 Jul 2017 20:18:18 +0000 (22:18 +0200)]
arm64: zynqmp: avoid out of buffer access

strncat(a, b, c) appends a maximum of c characters plus the 0 byte
to a.

In board_init we first write 4 characters plus 0 byte to version.
So only ZYNQMP_VERSION_SIZE - 5 additional characters fit into
version.

The problem was indicated by cppcheck.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Make chip_id routine to handle based on el.
Siva Durga Prasad Paladugu [Tue, 25 Jul 2017 06:21:37 +0000 (11:51 +0530)]
arm64: zynqmp: Make chip_id routine to handle based on el.

Modify chip_id() routine such that to handle based on
the current el. Also make it available even if FPGA is
not enabled in system such it can be used always.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Make chip_id a global routine()
Siva Durga Prasad Paladugu [Tue, 25 Jul 2017 06:21:38 +0000 (11:51 +0530)]
arm64: zynqmp: Make chip_id a global routine()

This patch makes chip_id() as a global routine so that
it can be used in other places as required.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Modify chip_id routine to get either idcode or version
Siva Durga Prasad Paladugu [Tue, 25 Jul 2017 06:21:36 +0000 (11:51 +0530)]
arm64: zynqmp: Modify chip_id routine to get either idcode or version

This patch modifies the chip_id routine to get either idcode or
silicon version based on the argument received.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Move dts zcu102 to zcu102-revA
Michal Simek [Thu, 20 Jul 2017 10:38:27 +0000 (12:38 +0200)]
arm64: zynqmp: Move dts zcu102 to zcu102-revA

Not using board revision is causing confusion about which board is
supported and tested. Mark dts files exactly with board revision which
was tested. When new board revision arives it can be symlink if SW view
is the same. Also add -revX suffix to compatible string because user space
tools are parsing this string and can change behavior depends of board
revision.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoarm64: zynqmp: Dont write to system timestamp generator
Siva Durga Prasad Paladugu [Tue, 21 Feb 2017 12:28:29 +0000 (17:58 +0530)]
arm64: zynqmp: Dont write to system timestamp generator

Remove incorrect code of writing to system timestamp
counter registers. This register writes does nothing
and can be removed.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Do not setup time if already setup
Michal Simek [Wed, 12 Jul 2017 08:32:18 +0000 (10:32 +0200)]
arm64: zynqmp: Do not setup time if already setup

Newer psu_init_gpl.c/h contain clock setup. Detect if
reference clock is active. If yes, skip timer setup.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Fix SVD mask for getting chip ID
Michal Simek [Wed, 28 Jun 2017 13:40:32 +0000 (15:40 +0200)]
arm64: zynqmp: Fix SVD mask for getting chip ID

Mask should start from the first bit - using 0xe is just wrong.
3bits are used that's why 0x7 mask is correct.
This patch is fixing silicon ID code detection. Previous behavior was
that bit0 was completely ignored.
Issue was found on 2eg chip detection.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Add Kconfig option for adding psu_init to binary
Michal Simek [Wed, 12 Jul 2017 11:21:27 +0000 (13:21 +0200)]
arm64: zynqmp: Add Kconfig option for adding psu_init to binary

There is a need to include psu_init also in mini u-boot configuration
that's why handle psu_init via Kconfig property.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Call psu_init from board_early_init_f
Michal Simek [Wed, 12 Jul 2017 11:08:41 +0000 (13:08 +0200)]
arm64: zynqmp: Call psu_init from board_early_init_f

For some mini platforms there could be a need to include psu_init.
That's why move it to board file instead of spl only file.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Remove ifdef around zynqmp mmio read and write rotuines
Siva Durga Prasad Paladugu [Thu, 13 Jul 2017 13:31:12 +0000 (19:01 +0530)]
arm64: zynqmp: Remove ifdef around zynqmp mmio read and write rotuines

This patch removes ifdef around mmio read and write rotuines
and make them a single routine by checking the current el.
This patch helps to remove ifdef around invoke_smc as well.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Define a way to intialize TCM
Siva Durga Prasad Paladugu [Thu, 13 Jul 2017 13:31:09 +0000 (19:01 +0530)]
arm64: zynqmp: Define a way to intialize TCM

TCM on ZynqMP needs to be intialized in a sequence
and this patch provides a global routine to perform
this as per requirement.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Provide a Kconfig option to define OCM and TCM in MMU
Siva Durga Prasad Paladugu [Thu, 13 Jul 2017 13:31:10 +0000 (19:01 +0530)]
arm64: zynqmp: Provide a Kconfig option to define OCM and TCM in MMU

This patch provides an option to include OCM and TCM memory
into MMU table with corresponding memory attributes.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agofpga: xilinx: Avoid using local intermediate buffer
Siva Durga Prasad Paladugu [Thu, 2 Mar 2017 13:20:11 +0000 (18:50 +0530)]
fpga: xilinx: Avoid using local intermediate buffer

Dont use local temporary buffer for printing out the
info instead use directly from memroy. This fixes the
issue of stack corruprion due to local buffer overflow.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoclk: zynqmp: Remove unused macros/variables
Michal Simek [Mon, 24 Apr 2017 12:06:27 +0000 (14:06 +0200)]
clk: zynqmp: Remove unused macros/variables

These macros and one variable is not used anywhere that's why
they should be removed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoclk: zynqmp: Dont panic incase of mmio write/read failures
Siva Durga Prasad Paladugu [Thu, 13 Apr 2017 11:29:38 +0000 (16:59 +0530)]
clk: zynqmp: Dont panic incase of mmio write/read failures

Dont panic incase of mmio write/read failures instead return
error and let the peripheral driver take care of clock get
and set failures.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoclk: zynqmp: Add support for CCF driver
Siva Durga Prasad Paladugu [Fri, 3 Feb 2017 18:26:49 +0000 (23:56 +0530)]
clk: zynqmp: Add support for CCF driver

Add support for CCF, this CCF reads the ref clocks
from dt and checks all the required clock control
registers for its source , divisors and calculates
the clock from them. This supports clock and set
functions.

Panic when read/write fails.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agocommon: board_f: Make reserve_mmu a weak function
Siva Durga Prasad Paladugu [Thu, 13 Jul 2017 13:31:08 +0000 (19:01 +0530)]
common: board_f: Make reserve_mmu a weak function

Make reserve_mmu a weak so that it provides an option
to customize this routine as per platform need

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agozynq: Add Z-Turn board
Alexander Graf [Mon, 3 Jul 2017 11:41:36 +0000 (13:41 +0200)]
zynq: Add Z-Turn board

The Z-Turn board is a low cost development board based on the
Xilinx Zynq SoC. While it's powerful and quite versatile, it
so far lacked upstream support.

This patch adds basic support for the Z-Turn. It does however
for now miss enablement for MIO51 reset which means that USB
and ethernet don't work. For that either FSBL or SPL need to
be adjusted. The SPL part will follow later.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agozynq: Enable distro boot
Alexander Graf [Mon, 3 Jul 2017 11:41:35 +0000 (13:41 +0200)]
zynq: Enable distro boot

Distro boot allows devices to boot using standardized boot methods by
default. This can be very handy for distributions that want to run on
different platforms.

This patch moves the zynq platform to use its old, zynq specific boot
method first and then fall back to distro boot. That way supporting
Linux distributions like openSUSE is much easier.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agozynq: Add EFI runtime sections to linker script
Alexander Graf [Mon, 3 Jul 2017 11:41:34 +0000 (13:41 +0200)]
zynq: Add EFI runtime sections to linker script

When using EFI_LOADER, we add a few special sections for runtime code and
data which get relocated on demand when executing a target OS.

These runtime structures need to get annotated properly in the linker script.
While we do that properly in the generic one, we missed out on the zynq
specific linker script.

This patch adds the EFI runtime section annotations into the zynq linker script
so that the efi loader code actually works on that platform.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm: zynq: Label whole PL part as fpga_full region
Michal Simek [Tue, 14 Feb 2017 16:40:21 +0000 (17:40 +0100)]
arm: zynq: Label whole PL part as fpga_full region

This will simplify dt overlay structure for the whole PL.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Moritz Fischer <moritz.fischer@ettus.com>
7 years agoMerge git://git.denx.de/u-boot-x86
Tom Rini [Tue, 1 Aug 2017 19:38:32 +0000 (15:38 -0400)]
Merge git://git.denx.de/u-boot-x86

7 years agoMerge git://git.denx.de/u-boot-mmc
Tom Rini [Tue, 1 Aug 2017 19:38:23 +0000 (15:38 -0400)]
Merge git://git.denx.de/u-boot-mmc

7 years agoarm64: ls2088ardb: Add distro secure boot support
VINITHA PILLAI [Mon, 12 Jun 2017 04:13:45 +0000 (09:43 +0530)]
arm64: ls2088ardb: Add distro secure boot support

Enable validation of boot.scr script prior to its execution dependent
on "secureboot" flag in environment. Also enable "secureboot=y"
flag in environment for ARM based platforms instead of bootcmd.

Signed-off-by: Vinitha Pillai <vinitha.pillai@nxp.com>
Signed-off-by: Sumit Garg <sumit.garg@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarm64: ls2088ardb: Add distro boot support
Zhang Ying-22455 [Mon, 5 Jun 2017 03:07:18 +0000 (11:07 +0800)]
arm64: ls2088ardb: Add distro boot support

Include common config_distro_defaults.h and config_distro_bootcmd.h
for u-boot enviroments to support automatical distro boot which
scan boot.scr from external storage devices(e.g. SD/USB/SATA/SCSI disk)
and execute autoboot script. Tested on ls2088ardb with automatically
boot Ubuntu from SD card or USB disk, if it fails to detect external
storage disk, fall back to nor/qspi boot.

Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarm: ls1021atwr: Add distro secure boot support
Sumit Garg [Tue, 6 Jun 2017 15:21:31 +0000 (20:51 +0530)]
arm: ls1021atwr: Add distro secure boot support

Enable validation of boot.scr script prior to its execution dependent
on "secureboot" flag in environment. Disable fall back option to
qspi boot in case of secure boot. Also enable "secureboot=y" flag
in environment for ARM based platforms instead of bootcmd.

Signed-off-by: Sumit Garg <sumit.garg@nxp.com>
Tested-by: Vinitha Pillai <vinitha.pillai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarm64: ls1046ardb: Add distro secure boot support
Sumit Garg [Tue, 6 Jun 2017 15:20:29 +0000 (20:50 +0530)]
arm64: ls1046ardb: Add distro secure boot support

Enable validation of boot.scr script prior to its execution dependent
on "secureboot" flag in environment. Disable fall back option to
qspi boot in case of secure boot. Also enable "secureboot=y" flag
in environment for ARM based platforms instead of bootcmd.

Signed-off-by: Sumit Garg <sumit.garg@nxp.com>
Tested-by: Vinitha Pillai <vinitha.pillai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarm64: ls1043ardb: Add distro secure boot support
Sumit Garg [Mon, 5 Jun 2017 18:21:51 +0000 (23:51 +0530)]
arm64: ls1043ardb: Add distro secure boot support

Enable validation of boot.scr script prior to its execution dependent
on "secureboot" flag in environment. Disable fall back option to
nor/qspi boot in case of secure boot. Also enable "secureboot=y"
flag in environment for ARM based platforms instead of bootcmd.

Signed-off-by: Sumit Garg <sumit.garg@nxp.com>
Tested-by: Vinitha Pillai <vinitha.pillai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarm64: ls1046ardb: Add distro boot support
Qianyu Gong [Thu, 15 Jun 2017 03:10:09 +0000 (11:10 +0800)]
arm64: ls1046ardb: Add distro boot support

Tested on ls1046ardb with automatically boot Ubuntu from SD card or
USB disk, if it fails to detect external storage disk, fall back to
qspi boot.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@nxp.com>
Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: ls1046a: move CONFIG_CMD_USB to defconfig
Qianyu Gong [Thu, 15 Jun 2017 03:10:08 +0000 (11:10 +0800)]
armv8: ls1046a: move CONFIG_CMD_USB to defconfig

Move the macro to defconfig to take effect globally.

Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarm64: ls1043ardb: Add distro boot support
Shengzhou Liu [Thu, 8 Jun 2017 07:59:48 +0000 (15:59 +0800)]
arm64: ls1043ardb: Add distro boot support

Include common config_distro_defaults.h and config_distro_bootcmd.h
for u-boot enviroments to support automatical distro boot which
scan boot.scr from external storage devices(e.g. SD/USB/SATA/SCSI disk)
and execute autoboot script. Tested on ls1043ardb with automatically
boot Ubuntu from SD card or USB disk, if it fails to detect external
storage disk, fall back to nor/qspi boot.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agosoc/fsl-layerscape: Update SVR number for LS2081A and LS2041A
Santan Kumar [Fri, 9 Jun 2017 06:18:08 +0000 (11:48 +0530)]
soc/fsl-layerscape: Update SVR number for LS2081A and LS2041A

Update SVR as per the SOC document.
 -LS2081A: 0x870919 -> 0x870918
 -LS2041A: 0x870915 -> 0x870914

Signed-off-by: Santan Kumar <santan.kumar@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agofsl/usb: enable errata-a010151 for ls2088a and ls2081a
Santan Kumar [Fri, 9 Jun 2017 06:18:07 +0000 (11:48 +0530)]
fsl/usb: enable errata-a010151 for ls2088a and ls2081a

Signed-off-by: Santan Kumar <santan.kumar@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoboard/ls2080aqds, SD-boot: Update env offset
Santan Kumar [Fri, 9 Jun 2017 06:18:04 +0000 (11:48 +0530)]
board/ls2080aqds, SD-boot: Update env offset

As per new memory layout, Update env offset
from 0x200000 to 0x300000

Signed-off-by: Santan Kumar <santan.kumar@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: Remove duplicate definition for IH_ARCH_ARM and IH_ARCH_ARM64
Alison Wang [Thu, 8 Jun 2017 08:15:14 +0000 (16:15 +0800)]
armv8: Remove duplicate definition for IH_ARCH_ARM and IH_ARCH_ARM64

The duplicate definitions for IH_ARCH_ARM and IH_ARCH_ARM64 are removed.
The definitions in <image.h> are used.

According to this modification, the comparison between os arch and cpu
arch is done in C programming instead of ASM programming.

Signed-off-by: Alison Wang <alison.wang@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agospi: fsl_qspi: Pet watchdog even more
Alexander Stein [Thu, 1 Jun 2017 07:32:19 +0000 (09:32 +0200)]
spi: fsl_qspi: Pet watchdog even more

Pet the watchdog once upon each command call (qspi_xfer) and during
each loop iteration in several commands.

This fixes a watchdog reset especially during erase command.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarm: ls1021atwr: Add distro boot support
Alison Wang [Fri, 26 May 2017 07:46:15 +0000 (15:46 +0800)]
arm: ls1021atwr: Add distro boot support

This patch includes common config_distro_defaults.h and
config_distro_bootcmd.h for u-boot enviroments to support distro boot
which automatically scan boot.scr from storage devices(e.g.
SD/USB/SATA/SCSI disk) and execute autoboot script on LS1021ATWR board.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@nxp.com>
Signed-off-by: Alison Wang <alison.wang@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agox86: Switch all boards to use DM SCSI
Bin Meng [Mon, 31 Jul 2017 02:24:02 +0000 (19:24 -0700)]
x86: Switch all boards to use DM SCSI

After MMC is converted to DM, convert to use DM SCSI as well for all
x86 boards and imply BLK for both MMC and SCSI drivers.

CONFIG_SCSI_DEV_LIST is no longer used. Clean them up.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: Convert MMC to driver model
Simon Glass [Mon, 31 Jul 2017 02:24:01 +0000 (19:24 -0700)]
x86: Convert MMC to driver model

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>
[bmeng: remove DM_MMC from edison_defconfig]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
7 years agoblock: ide: Fix build error when CONFIG_BLK is on
Bin Meng [Mon, 31 Jul 2017 02:24:00 +0000 (19:24 -0700)]
block: ide: Fix build error when CONFIG_BLK is on

Add missing #ifndef CONFIG_BLK to wrap dev_desc->block_read.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agodm: scsi: Add a generic PCI-based AHCI driver
Bin Meng [Mon, 31 Jul 2017 02:23:59 +0000 (19:23 -0700)]
dm: scsi: Add a generic PCI-based AHCI driver

This adds support for PCI-based AHCI controller based on DM SCSI.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
7 years agox86: ivybridge: remove unused uma_memory_size
xypron.glpk@gmx.de [Sun, 30 Jul 2017 19:17:26 +0000 (21:17 +0200)]
x86: ivybridge: remove unused uma_memory_size

The value of uma_memory_size depends on an undefined value
from the stack. The value of uma_memory_size is changed but
never used.

So simply remove this superfluous code.

The problem was indicated by cppcheck.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: Convert INTEL_ICH6_GPIO to Kconfig
Bin Meng [Sun, 30 Jul 2017 13:23:28 +0000 (06:23 -0700)]
x86: Convert INTEL_ICH6_GPIO to Kconfig

This converts Intel ICH6 GPIO driver to Kconfig, and add it to the
imply list of platform drivers.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: kconfig: Move USB to platform Kconfig
Bin Meng [Sun, 30 Jul 2017 13:23:27 +0000 (06:23 -0700)]
x86: kconfig: Move USB to platform Kconfig

Like other peripheral drivers, move USB related drivers to platform
Kconfig as well.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: kconfig: Let board select SPI flash
Bin Meng [Sun, 30 Jul 2017 13:23:26 +0000 (06:23 -0700)]
x86: kconfig: Let board select SPI flash

Only a specific type of SPI flash exists on a board, having board
Kconfig to select the SPI flash seems to make more sense. Other
flash types are not necessary except coreboot, which implies all
available flash drivers there.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: qemu: Remove SPI flash from defconfigs
Bin Meng [Sun, 30 Jul 2017 13:23:25 +0000 (06:23 -0700)]
x86: qemu: Remove SPI flash from defconfigs

QEMU does not support ICH SPI controller yet. It's meaningless to
include SPI flash support.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: qemu: kconfig: Imply platform specific drivers
Bin Meng [Sun, 30 Jul 2017 13:23:24 +0000 (06:23 -0700)]
x86: qemu: kconfig: Imply platform specific drivers

Imply Qemu-specific drivers in the platform Kconfig.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: quark: kconfig: Imply platform specific drivers
Bin Meng [Sun, 30 Jul 2017 13:23:23 +0000 (06:23 -0700)]
x86: quark: kconfig: Imply platform specific drivers

Imply Quark-specific drivers in the platform Kconfig.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: tangier: kconfig: Imply platform specific drivers
Bin Meng [Sun, 30 Jul 2017 13:23:22 +0000 (06:23 -0700)]
x86: tangier: kconfig: Imply platform specific drivers

Imply Tangier-specific drivers in the platform Kconfig.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: queensbay: kconfig: Imply platform specific drivers
Bin Meng [Sun, 30 Jul 2017 13:23:21 +0000 (06:23 -0700)]
x86: queensbay: kconfig: Imply platform specific drivers

Imply drivers that work with Intel Queensbay platform.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: coreboot: kconfig: Imply drivers that are useful
Bin Meng [Sun, 30 Jul 2017 13:23:20 +0000 (06:23 -0700)]
x86: coreboot: kconfig: Imply drivers that are useful

U-Boot as coreboot payload can run on any x86 hardware ideally.
Let's imply some common drivers that are useful.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: broadwell: kconfig: Imply platform specific drivers
Bin Meng [Sun, 30 Jul 2017 13:23:19 +0000 (06:23 -0700)]
x86: broadwell: kconfig: Imply platform specific drivers

Imply Broadwell-specific drivers in the platform Kconfig.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: ivybridge: kconfig: Imply platform specific drivers
Bin Meng [Sun, 30 Jul 2017 13:23:18 +0000 (06:23 -0700)]
x86: ivybridge: kconfig: Imply platform specific drivers

Imply drivers that are working with Ivybridge platform in the
platform Kconfig.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: baytrail: kconfig: Imply platform specific drivers
Bin Meng [Sun, 30 Jul 2017 13:23:17 +0000 (06:23 -0700)]
x86: baytrail: kconfig: Imply platform specific drivers

BayTrail integrates lots of peripherals that have U-Boot drivers.
Imply those in the platform Kconfig.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: kconfig: Imply DM uclass drivers
Bin Meng [Sun, 30 Jul 2017 13:23:16 +0000 (06:23 -0700)]
x86: kconfig: Imply DM uclass drivers

Now that all x86 boards have been converted to use DM, we can imply
these uclass drivers (DM_ETH, DM_RTC, DM_USB, DM_VIDEO) from the
top level.

Previously DM_GPIO, DM_KEYBOARD, DM_SERIAL, DM_SPI, DM_SPI_FLASH
are selected. Change to use 'imply' to allow them to be removed.

Note with this change, chromebook_link64 build fails:

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

CONFIG_SPL_ENV_SUPPORT is required for chromebook_link64 to build
again. This is just a workaround as it is not needed at all. See
commit bda40d5 "x86: qemu: Add a config for 64-bit U-Boot" for
the same issue seen on QEMU 64-bit target.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: kconfig: Select OF_CONTROL
Bin Meng [Sun, 30 Jul 2017 13:23:15 +0000 (06:23 -0700)]
x86: kconfig: Select OF_CONTROL

This is a must have for all x86 boards.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: kconfig: Imply ENABLE_MRC_CACHE in the platform Kconfig
Bin Meng [Sun, 30 Jul 2017 13:23:14 +0000 (06:23 -0700)]
x86: kconfig: Imply ENABLE_MRC_CACHE in the platform Kconfig

Platform knows whether MRC cache is implemented, but using it can
be a choice of a specific board.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: kconfig: Select ARCH_EARLY_INIT_R in the platform Kconfig
Bin Meng [Sun, 30 Jul 2017 13:23:13 +0000 (06:23 -0700)]
x86: kconfig: Select ARCH_EARLY_INIT_R in the platform Kconfig

This is architecture-dependent early initialization hence should
be put in the platform Kconfig.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: kconfig: Select ARCH_MISC_INIT in the platform Kconfig
Bin Meng [Sun, 30 Jul 2017 13:23:12 +0000 (06:23 -0700)]
x86: kconfig: Select ARCH_MISC_INIT in the platform Kconfig

arch_misc_init() is intended to do architecture-dependent stuff.
This is required by each platform.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: kconfig: Let board select BOARD_EARLY_INIT_F
Bin Meng [Sun, 30 Jul 2017 13:23:11 +0000 (06:23 -0700)]
x86: kconfig: Let board select BOARD_EARLY_INIT_F

CONFIG_BOARD_EARLY_INIT_F literally indicates board-specific codes
and should be not 'default y' for all x86 boards.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: kconfig: Imply HAVE_INTEL_ME in the platform Kconfig
Bin Meng [Sun, 30 Jul 2017 13:23:10 +0000 (06:23 -0700)]
x86: kconfig: Imply HAVE_INTEL_ME in the platform Kconfig

Intel Management Engine is required by the platform, however it's
not a must have when building a U-Boot image. For example, during
development normally programming ME firmware is a one-time effort.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: kconfig: Select PCI and DM_PCI
Bin Meng [Sun, 30 Jul 2017 13:23:09 +0000 (06:23 -0700)]
x86: kconfig: Select PCI and DM_PCI

PCI is the de facto interconnect bus in an x86 system.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: kconfig: Select USE_PRIVATE_LIBGCC
Bin Meng [Sun, 30 Jul 2017 13:23:08 +0000 (06:23 -0700)]
x86: kconfig: Select USE_PRIVATE_LIBGCC

x86 is using the built-in libgcc implementation and this cannot be
turned off.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: kconfig: Select TIMER and X86_TSC_TIMER
Bin Meng [Sun, 30 Jul 2017 13:23:07 +0000 (06:23 -0700)]
x86: kconfig: Select TIMER and X86_TSC_TIMER

Without a timer, U-Boot just doesn't boot. This is not something
we can turn off.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: Make table address selectable
Andy Shevchenko [Fri, 28 Jul 2017 17:02:15 +0000 (20:02 +0300)]
x86: Make table address selectable

Some firmwares might have another window for generated tables.

So, introduce two configuration options to select start address and
maximum length for the generated tables.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
7 years agox86: tsc: Rename try_msr_calibrate_tsc() to cpu_mhz_from_msr()
Bin Meng [Wed, 26 Jul 2017 03:12:05 +0000 (20:12 -0700)]
x86: tsc: Rename try_msr_calibrate_tsc() to cpu_mhz_from_msr()

Rename try_msr_calibrate_tsc() to cpu_mhz_from_msr(), as that
better describes what the routine does.

This keeps in sync with Linux kernel commit:
  02c0cd2: x86/tsc_msr: Remove irqoff around MSR-based TSC enumeration

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: tsc: Correct Silvermont reference clock values
Bin Meng [Wed, 26 Jul 2017 03:12:04 +0000 (20:12 -0700)]
x86: tsc: Correct Silvermont reference clock values

Atom processors use a 19.2 MHz crystal oscillator.

Early processors generate 100 MHz via 19.2 MHz * 26 / 5 = 99.84 MHz.

Later processors generate 100 MHz via 19.2 MHz * 125 / 24 = 100 MHz.

Update the Silvermont-based tables accordingly, matching the Software
Developers Manual.

Also, correct a 166 MHz entry that should have been 116 MHz, and add
a missing 80 MHz entry for VLV2.

This keeps in sync with Linux kernel commit:
  05680e7: x86/tsc_msr: Correct Silvermont reference clock values

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: tsc: Update comments and expand definitions in freq_desc_tables[]
Bin Meng [Wed, 26 Jul 2017 03:12:03 +0000 (20:12 -0700)]
x86: tsc: Update comments and expand definitions in freq_desc_tables[]

Some processor abbreviations in the comments of freq_desc_tables[]
are obscure. This updates part of these to mention processors
that are known to us. Also expand frequency definitions.

This keeps in sync with Linux kernel commit:
  9e0cae9: x86/tsc_msr: Update comments, expand definitions

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: tsc: Remove the fail handling in try_msr_calibrate_tsc()
Bin Meng [Wed, 26 Jul 2017 03:12:02 +0000 (20:12 -0700)]
x86: tsc: Remove the fail handling in try_msr_calibrate_tsc()

If either ratio or freq is zero, the return value is zero. There
is no need to create a fail branch and return zero there.

This keeps in sync with Linux kernel commit:
  14bb4e3: x86/tsc_msr: Remove debugging messages

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: tsc: Identify Intel-specific code
Bin Meng [Wed, 26 Jul 2017 03:12:01 +0000 (20:12 -0700)]
x86: tsc: Identify Intel-specific code

try_msr_calibrate_tsc() is currently Intel-specific, and should not
execute on any other vendor's parts.

This keeps in sync with Linux kernel commit:
  ba82683: x86/tsc_msr: Identify Intel-specific code

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: tsc: Read all ratio bits from MSR_PLATFORM_INFO
Bin Meng [Wed, 26 Jul 2017 03:12:00 +0000 (20:12 -0700)]
x86: tsc: Read all ratio bits from MSR_PLATFORM_INFO

Currently we read the tsc radio like this:

ratio = (MSR_PLATFORM_INFO >> 8) & 0x1f;

Thus we get bit 8-12 of MSR_PLATFORM_INFO, however according to the
Intel manual, the ratio bits are bit 8-15.

Fix this problem by masking 0xff instead.

This keeps in sync with Linux kernel commit:
  886123f: x86/tsc: Read all ratio bits from MSR_PLATFORM_INFO

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: Enforce toolchain to generate 64-bit codes for 64-bit U-Boot
Bin Meng [Thu, 27 Jul 2017 13:12:35 +0000 (06:12 -0700)]
x86: Enforce toolchain to generate 64-bit codes for 64-bit U-Boot

64-bit U-Boot image is a combination of 32-bit U-Boot (SPL) plus
64-bit U-Boot (proper). For the U-Boot proper, it has be compiled
to 64-bit object codes. Attempting to use a toolchain to compile
64-bit U-Boot for qemu-x86_64, like kernel.org 4.9 i386-linux-gcc,
fails with the following errors:

  arch/x86/cpu/intel_common/microcode.c:79:2: error: PIC register
  clobbered by 'ebx' in 'asm'

The issue is because toolchain is preconfigured to generate code
for the 32-bit architecture (i386), and currently '-m64' is missing
in the makefile fragment. Using kernel.org 4.9 x86_64-linux-gcc
works out of the box, since it is preconfigured to generate 64-bit
codes.

When compiling U-Boot SPL, '-m32' is passed to the toolchain, no
mater 32-bit (i386-linux-) or 64-bit (x86_64-linux) the toolchain
is preconfigured to generate.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: Use default stack boundary alignment
Bin Meng [Thu, 27 Jul 2017 13:12:34 +0000 (06:12 -0700)]
x86: Use default stack boundary alignment

At present U-Boot x86 build is using -mpreferred-stack-boundary=2
which is 4 bytes stack boundary alignment. With 64-bit U-Boot, the
minimal required stack boundary alignment is 16 bytes.

If -mpreferred-stack-boundary is not specified, the default is 4
(16 bytes). Switch to use the default one.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoregulator: palmas: disable bypass when the LDO is enabled
Jean-Jacques Hiblot [Wed, 12 Jul 2017 09:42:47 +0000 (11:42 +0200)]
regulator: palmas: disable bypass when the LDO is enabled

Some LDOs have a bypass capability. Make sure that the bypass is disabled
when is the LDO is enabled (otherwise the voltage can't be changed).

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoregulator: palmas: Add support for LDO1 regulator to provide 1.8V
Kishon Vijay Abraham I [Wed, 12 Jul 2017 09:42:46 +0000 (11:42 +0200)]
regulator: palmas: Add support for LDO1 regulator to provide 1.8V

Modify palmas_mmc1_poweron_ldo() API to set the voltage based on the
voltage parameter passed as argument instead of always setting it to
3.0V. This allows MMC1 to set the LDO1 regulator voltage to 3.3V or 1.8V.
1.8V is required to add support for UHS mode.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agodm: sunxi: Move Linksprite_pcDuino3 to use DM for MMC, SATA
Simon Glass [Tue, 4 Jul 2017 19:31:32 +0000 (13:31 -0600)]
dm: sunxi: Move Linksprite_pcDuino3 to use DM for MMC, SATA

Move this board over to driver model for MMC and SATA. This means that it
uses CONFIG_BLK as well. In SPL these options remain turned off since it
increases the code size. One option would be to use CONFIG_SPL_OF_PLATDATA
to avoid device-tree overhead.

Signed-off-by: Simon Glass <sjg@chromium.org>