karo-tx-uboot.git
4 years agokaro: tx6: enable CONFIG_BMP_*BPP to make splashscreen functional again
Lothar Waßmann [Thu, 26 Nov 2015 13:07:39 +0000 (14:07 +0100)]
karo: tx6: enable CONFIG_BMP_*BPP to make splashscreen functional again

4 years agokaro: tx6: rework PMIC code to allow for different configs for same chip
Lothar Waßmann [Thu, 26 Nov 2015 13:06:28 +0000 (14:06 +0100)]
karo: tx6: rework PMIC code to allow for different configs for same chip

4 years agokaro: tx6ul: enable soft_i2c for PMIC access
Lothar Waßmann [Thu, 26 Nov 2015 13:05:17 +0000 (14:05 +0100)]
karo: tx6ul: enable soft_i2c for PMIC access

4 years agokaro: tx6: set TX6_REV=0x1 where appropriate to eliminate code for unused PMIC chips
Lothar Waßmann [Thu, 26 Nov 2015 13:00:18 +0000 (14:00 +0100)]
karo: tx6: set TX6_REV=0x1 where appropriate to eliminate code for unused PMIC chips

4 years agokaro: tx6ul: fix max. dimensions of framebuffer
Lothar Waßmann [Thu, 26 Nov 2015 12:59:22 +0000 (13:59 +0100)]
karo: tx6ul: fix max. dimensions of framebuffer

4 years agokaro: tx6: disable LCD in '_noenv' config
Lothar Waßmann [Mon, 16 Nov 2015 07:57:32 +0000 (08:57 +0100)]
karo: tx6: disable LCD in '_noenv' config

4 years agokaro: tx6: remove secure_boot fuse override which is a leftover from secure boot...
Lothar Waßmann [Mon, 16 Nov 2015 07:56:32 +0000 (08:56 +0100)]
karo: tx6: remove secure_boot fuse override which is a leftover from secure boot tests

4 years agoMerge branch 'tx48-devel' into karo-devel
Lothar Waßmann [Mon, 26 Oct 2015 13:46:20 +0000 (14:46 +0100)]
Merge branch 'tx48-devel' into karo-devel

4 years agoMerge branch 'tx28-devel' into karo-devel
Lothar Waßmann [Mon, 26 Oct 2015 13:44:47 +0000 (14:44 +0100)]
Merge branch 'tx28-devel' into karo-devel

4 years agokaro: tx28: Kconfig: select CMD_ROMUPDATE for TX28 modules
Lothar Waßmann [Mon, 26 Oct 2015 13:19:48 +0000 (14:19 +0100)]
karo: tx28: Kconfig: select CMD_ROMUPDATE for TX28 modules

4 years agoMerge branch 'tx28-bugfix' into karo-devel
Lothar Waßmann [Mon, 26 Oct 2015 13:14:47 +0000 (14:14 +0100)]
Merge branch 'tx28-bugfix' into karo-devel

4 years agoMerge branch 'tx51-bugfix' into karo-devel
Lothar Waßmann [Mon, 26 Oct 2015 13:14:36 +0000 (14:14 +0100)]
Merge branch 'tx51-bugfix' into karo-devel

4 years agotools: elftosb: use g++ to compile elftosb to prevent link error due to missing libm
Lothar Waßmann [Mon, 26 Oct 2015 11:41:39 +0000 (12:41 +0100)]
tools: elftosb: use g++ to compile elftosb to prevent link error due to missing libm

4 years agotools: elftosb: makefile indentation and whitespace cleanup
Lothar Waßmann [Mon, 26 Oct 2015 11:40:59 +0000 (12:40 +0100)]
tools: elftosb: makefile indentation and whitespace cleanup

4 years agokaro: tx48: fix build error "undefined reference to `mmc_legacy_init'"
Lothar Waßmann [Mon, 26 Oct 2015 11:23:28 +0000 (12:23 +0100)]
karo: tx48: fix build error "undefined reference to `mmc_legacy_init'"

4 years agokaro: fdt: prevent duplicate call of fdt_fixup_ethernet()
Lothar Waßmann [Mon, 26 Oct 2015 11:15:08 +0000 (12:15 +0100)]
karo: fdt: prevent duplicate call of fdt_fixup_ethernet()

fdt_fixup_ethernet() is already called internally
by boot_prep_linux(). Remove the calls to it in ft_board_setup().

4 years agovideo: ipu: initialize g_ipu_clk, g_ldb_clk statically KARO-TX6UL-2015-10-23
Lothar Waßmann [Fri, 23 Oct 2015 10:46:03 +0000 (12:46 +0200)]
video: ipu: initialize g_ipu_clk, g_ldb_clk statically

When the FB driver has not been initialized, booting Linux will hang
the system when ipuv3_fb_shutdown() is called from arch_preboot_os()
because clk_enable(g_ipu_clk) is a NOP with g_ipu_clk == NULL.
There is no need to initialize these variables at runtime, so use
static initialization to prevent this problem.

4 years agoarm: mx6: fix the AIPS?_BASE_ADDR fsckup introduced by commit f5def95698f6
Lothar Waßmann [Thu, 22 Oct 2015 13:04:44 +0000 (15:04 +0200)]
arm: mx6: fix the AIPS?_BASE_ADDR fsckup introduced by commit f5def95698f6

commit f5def95698f6f3d8923f0e38706e3e5ebed81a10 ("imx: mx6: Fixed AIPS3 base address issue")
claimed to fix an AIPS3 base address issue, while it in fact messed up
the AIPS1 and AIPS2 base addresses too.

4 years agokaro: tx6: adapt romupdate command for i.MX6UL
Lothar Waßmann [Thu, 22 Oct 2015 09:28:29 +0000 (11:28 +0200)]
karo: tx6: adapt romupdate command for i.MX6UL

4 years agokaro: tx6: remove unused code from flash.c
Lothar Waßmann [Thu, 22 Oct 2015 09:28:05 +0000 (11:28 +0200)]
karo: tx6: remove unused code from flash.c

4 years agonand: mxs: convey return code from failed function rather than '0' in mxs_nand_ecc_wr...
Lothar Waßmann [Thu, 22 Oct 2015 09:27:22 +0000 (11:27 +0200)]
nand: mxs: convey return code from failed function rather than '0' in mxs_nand_ecc_write_page()

4 years agonand: mxs: make fake_ecc_layout static
Lothar Waßmann [Thu, 22 Oct 2015 09:26:36 +0000 (11:26 +0200)]
nand: mxs: make fake_ecc_layout static

4 years agonand: mxs: use CONFIG_ARCH_MX6 instead of CONFIG_SOC_MX6Q
Lothar Waßmann [Thu, 22 Oct 2015 09:26:22 +0000 (11:26 +0200)]
nand: mxs: use CONFIG_ARCH_MX6 instead of CONFIG_SOC_MX6Q

4 years agokaro: tx6ul: disable PMIC init
Lothar Waßmann [Tue, 20 Oct 2015 11:35:50 +0000 (13:35 +0200)]
karo: tx6ul: disable PMIC init

The I2C-GPIO driver requires configuration via DTB which is not
currently supported for Ka-Ro modules. So, disable the PMIC access for
now.

4 years agokaro: tx6: change DGCTRL init values depending on SoC type
Lothar Waßmann [Tue, 20 Oct 2015 11:28:03 +0000 (13:28 +0200)]
karo: tx6: change DGCTRL init values depending on SoC type

4 years agokaro: tx6: add TXUL support
Lothar Waßmann [Tue, 20 Oct 2015 11:27:51 +0000 (13:27 +0200)]
karo: tx6: add TXUL support

4 years agokaro: tx6: selectively set individual CCGR bits via DCD
Lothar Waßmann [Mon, 19 Oct 2015 11:49:04 +0000 (13:49 +0200)]
karo: tx6: selectively set individual CCGR bits via DCD

4 years agokaro: tx6: eliminate PHYS_SDRAM_1_WIDTH and use CONFIG_SYS_SDRAM_BUS_WIDTH instead
Lothar Waßmann [Mon, 19 Oct 2015 10:42:42 +0000 (12:42 +0200)]
karo: tx6: eliminate PHYS_SDRAM_1_WIDTH and use CONFIG_SYS_SDRAM_BUS_WIDTH instead

4 years agokaro: tx6: config.mk cleanup
Lothar Waßmann [Mon, 19 Oct 2015 10:37:29 +0000 (12:37 +0200)]
karo: tx6: config.mk cleanup

4 years agokaro: tx6: further cleanups
Lothar Waßmann [Mon, 19 Oct 2015 10:36:46 +0000 (12:36 +0200)]
karo: tx6: further cleanups

4 years agoarm: mx6: use imx6_thermal driver
Lothar Waßmann [Mon, 19 Oct 2015 10:28:12 +0000 (12:28 +0200)]
arm: mx6: use imx6_thermal driver

4 years agoarm: mx6: use fuse_read() for OCOTP fuse access
Lothar Waßmann [Mon, 19 Oct 2015 10:27:05 +0000 (12:27 +0200)]
arm: mx6: use fuse_read() for OCOTP fuse access

4 years agoarm: mxs: ocotp: disable OCOTP clock after access is finished
Lothar Waßmann [Mon, 12 Oct 2015 12:04:28 +0000 (14:04 +0200)]
arm: mxs: ocotp: disable OCOTP clock after access is finished

4 years agoremove obsolete functions ocotp_clk_{en,dis}able
Lothar Waßmann [Mon, 12 Oct 2015 09:28:33 +0000 (11:28 +0200)]
remove obsolete functions ocotp_clk_{en,dis}able

4 years agokconfig: arm: remove duplicate definitions of SOC_MX*
Lothar Waßmann [Mon, 12 Oct 2015 12:02:36 +0000 (14:02 +0200)]
kconfig: arm: remove duplicate definitions of SOC_MX*

4 years agokconfig: arm: move ARCH_MX? out of choice which selects TARGETs that depend on those
Lothar Waßmann [Mon, 12 Oct 2015 12:01:23 +0000 (14:01 +0200)]
kconfig: arm: move ARCH_MX? out of choice which selects TARGETs that depend on those

4 years agokconfig: arm: make cache configurable via Kconfig
Lothar Waßmann [Mon, 12 Oct 2015 08:42:36 +0000 (10:42 +0200)]
kconfig: arm: make cache configurable via Kconfig

4 years agoarm: mx6: remove CONFIG_ macros that are now included in Kconfig from header file
Lothar Waßmann [Mon, 12 Oct 2015 08:41:54 +0000 (10:41 +0200)]
arm: mx6: remove CONFIG_ macros that are now included in Kconfig from header file

4 years agoarm: mx6: rename some missed instances of CONFIG_MX6* to CONFIG_SOC_MX6*
Lothar Waßmann [Mon, 12 Oct 2015 08:40:51 +0000 (10:40 +0200)]
arm: mx6: rename some missed instances of CONFIG_MX6* to CONFIG_SOC_MX6*

4 years agodma: apbh: let APBH_DMA be selected, instead of enabling it by default
Lothar Waßmann [Mon, 12 Oct 2015 08:37:22 +0000 (10:37 +0200)]
dma: apbh: let APBH_DMA be selected, instead of enabling it by default

4 years agonet: fec_mxc: move CONFIG_FEC_MXC_PHYADDR from Kconfig to include/configs/*.h
Lothar Waßmann [Mon, 12 Oct 2015 08:21:52 +0000 (10:21 +0200)]
net: fec_mxc: move CONFIG_FEC_MXC_PHYADDR from Kconfig to include/configs/*.h

4 years agoarm: imx: prevent build error when CONFIG_FEC_MXC_PHYADDR is undefined
Lothar Waßmann [Mon, 12 Oct 2015 08:15:31 +0000 (10:15 +0200)]
arm: imx: prevent build error when CONFIG_FEC_MXC_PHYADDR is undefined

4 years agoimx: remove duplicated prototype for fecmxc_initialize() which is already defined...
Lothar Waßmann [Fri, 9 Oct 2015 10:32:18 +0000 (12:32 +0200)]
imx: remove duplicated prototype for fecmxc_initialize() which is already defined in include/netdev.h

4 years agokconfig: remove redundant 'default n'
Lothar Waßmann [Fri, 9 Oct 2015 09:45:53 +0000 (11:45 +0200)]
kconfig: remove redundant 'default n'

4 years agogpio: use appropriate return values for cmd handler
Lothar Waßmann [Fri, 9 Oct 2015 09:45:21 +0000 (11:45 +0200)]
gpio: use appropriate return values for cmd handler

4 years agonet: fec_mxc: use some more appropriate return values
Lothar Waßmann [Fri, 9 Oct 2015 09:43:47 +0000 (11:43 +0200)]
net: fec_mxc: use some more appropriate return values

4 years agonet: fec_mxc: consolidate data types and remove useless type casts
Lothar Waßmann [Fri, 9 Oct 2015 09:43:17 +0000 (11:43 +0200)]
net: fec_mxc: consolidate data types and remove useless type casts

4 years agonet: fec_mxc: don't write to reserved register on i.MX6UL
Lothar Waßmann [Fri, 9 Oct 2015 09:42:36 +0000 (11:42 +0200)]
net: fec_mxc: don't write to reserved register on i.MX6UL

4 years agonet: fec_mxc: don't try to clear read-only registers
Lothar Waßmann [Fri, 9 Oct 2015 08:53:38 +0000 (10:53 +0200)]
net: fec_mxc: don't try to clear read-only registers

The registers in the affected address range are all read only. There
is no use in trying to clear them.

4 years agonet: fec_mxc: use a definite delay when waiting for TDAR/RDAR to clear
Lothar Waßmann [Fri, 9 Oct 2015 08:58:56 +0000 (10:58 +0200)]
net: fec_mxc: use a definite delay when waiting for TDAR/RDAR to clear

4 years agonet: fec_mxc: autodetect PHY address if phy_id < 0
Lothar Waßmann [Fri, 9 Oct 2015 09:00:32 +0000 (11:00 +0200)]
net: fec_mxc: autodetect PHY address if phy_id < 0

4 years agoRevert "video: ipu_disp: Fix clock polarity logic"
Lothar Waßmann [Fri, 9 Oct 2015 08:37:42 +0000 (10:37 +0200)]
Revert "video: ipu_disp: Fix clock polarity logic"

This reverts commit 2740e5de4f3cd0aa36efcfe1a995fb6e3858cc97.

The patch made the U-Boot driver behave different from the Linux
driver, so that for U-Boot and Linux different settings in the DTB
would be required!

4 years agokaro: tx28: select PHYLIB in Kconfig
Lothar Waßmann [Mon, 5 Oct 2015 10:43:45 +0000 (12:43 +0200)]
karo: tx28: select PHYLIB in Kconfig

4 years agokaro: tx51: fix definition of CONFIG_SYS_CPU_CLK_STR
Lothar Waßmann [Mon, 28 Sep 2015 08:06:15 +0000 (10:06 +0200)]
karo: tx51: fix definition of CONFIG_SYS_CPU_CLK_STR

4 years agokaro: configs: set 'baseboard' variable in 'noenv' U-Boot
Lothar Waßmann [Tue, 22 Sep 2015 11:57:24 +0000 (13:57 +0200)]
karo: configs: set 'baseboard' variable in 'noenv' U-Boot

4 years agokaro: use lldiv() for 64bit division
Lothar Waßmann [Tue, 22 Sep 2015 11:56:37 +0000 (13:56 +0200)]
karo: use lldiv() for 64bit division

4 years agokaro: tx6: don't perform DQS gating calibration KARO-TX6-2015-09-18
Lothar Waßmann [Fri, 18 Sep 2015 14:31:32 +0000 (16:31 +0200)]
karo: tx6: don't perform DQS gating calibration

DQS Gating calibration may yield incorrect results due to a bug in the
ROM code. Also preset all relevant timing registers to sane values
before doing the DDR calibration.

4 years agokaro: tx6: don't position CSF at fixed offset
Lothar Waßmann [Fri, 18 Sep 2015 12:34:49 +0000 (14:34 +0200)]
karo: tx6: don't position CSF at fixed offset

4 years agokaro: tx6: remove usesless symbol _image_binary_end
Lothar Waßmann [Fri, 18 Sep 2015 12:34:27 +0000 (14:34 +0200)]
karo: tx6: remove usesless symbol _image_binary_end

4 years agokaro: tx6: cleanup defconfig files
Lothar Waßmann [Fri, 18 Sep 2015 12:04:24 +0000 (14:04 +0200)]
karo: tx6: cleanup defconfig files

4 years agokaro: cleanup after merge of v2015.10-rc2
Lothar Waßmann [Thu, 17 Sep 2015 05:31:36 +0000 (07:31 +0200)]
karo: cleanup after merge of v2015.10-rc2

4 years agosunxi: increase SYS_MONITOR_LEN
Boris Brezillon [Mon, 27 Jul 2015 14:21:26 +0000 (16:21 +0200)]
sunxi: increase SYS_MONITOR_LEN

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
4 years agodts: fix dependency of OF_SPL_REMOVE_PROPS
Masahiro Yamada [Fri, 28 Aug 2015 11:28:42 +0000 (20:28 +0900)]
dts: fix dependency of OF_SPL_REMOVE_PROPS

This should depend on SPL_OF_CONTROL (it is not equivalent to
SPL && OF_CONTROL).

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
4 years agopinctrl: sandbox: add sandbox pinctrl driver
Masahiro Yamada [Thu, 27 Aug 2015 03:44:30 +0000 (12:44 +0900)]
pinctrl: sandbox: add sandbox pinctrl driver

This driver actually does nothing but test pinctrl uclass, and
demonstrate how things work.

To try this driver, uncomment /* #define DEBUG */ in the
drivers/pinctrl/pinctrl-sandbox.c, and debug messages will be
displayed.

  DRAM:  128 MiB
  sandbox pinmux: group = 1 (serial_a), function = 1 (serial)
  Using default environment

  In:    cros-ec-keyb
  Out:   lcd
  Err:   lcd
  Net:   Net Initialization Skipped
  eth0: eth@10002000, eth1: eth@80000000, eth5: eth@90000000
  => i2c dev 0
  Setting bus to 0
  sandbox pinmux: group = 0 (i2c), function = 0 (i2c)
  sandbox pinconf: group = 0 (i2c), param = 3, arg = 1

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
4 years agopinctrl: add pin control uclass support
Masahiro Yamada [Thu, 27 Aug 2015 03:44:29 +0000 (12:44 +0900)]
pinctrl: add pin control uclass support

This creates a new framework for handling of pin control devices,
i.e. devices that control different aspects of package pins.

This uclass handles pinmuxing and pin configuration; pinmuxing
controls switching among silicon blocks that share certain physical
pins, pin configuration handles electronic properties such as pin-
biasing, load capacitance etc.

This framework can support the same device tree bindings, but if you
do not need full interface support, you can disable some features to
reduce memory foot print.  Typically around 1.5KB is necessary to
include full-featured uclass support on ARM board (CONFIG_PINCTRL +
CONFIG_PINCTRL_FULL + CONFIG_PINCTRL_GENERIC + CONFIG_PINCTRL_PINMUX),
for example.

We are often limited on code size for SPL.  Besides, we still have
many boards that do not support device tree configuration.  The full
pinctrl, which requires OF_CONTROL, does not make sense for those
boards.  So, this framework also has a Do-It-Yourself (let's say
simple pinctrl) interface.  With CONFIG_PINCTRL_FULL disabled, the
uclass itself provides no systematic mechanism for identifying the
peripheral device, applying pinctrl settings, etc.  They must be
done in each low-level driver.  In return, you can save much memory
footprint and it might be useful especially for SPL.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
4 years agodm: core: allow device_bind() to not return a device pointer
Masahiro Yamada [Thu, 27 Aug 2015 03:44:28 +0000 (12:44 +0900)]
dm: core: allow device_bind() to not return a device pointer

This is useful when we want to bind a device, but do not need the
pointer to the device.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
4 years agotegra: nyan: Enable TPM command and driver
Simon Glass [Sun, 23 Aug 2015 00:31:44 +0000 (18:31 -0600)]
tegra: nyan: Enable TPM command and driver

The TPM is listed in the device tree. Enable the driver and 'tpm' command
so that it can be used.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Christophe Ricard <christophe-h.ricard@st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agotpm: Enable 'tpmtest' command for Chrome OS boards with TPMs
Simon Glass [Sun, 23 Aug 2015 00:31:43 +0000 (18:31 -0600)]
tpm: Enable 'tpmtest' command for Chrome OS boards with TPMs

This command provides a few useful tests so enable it for common boards.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Christophe Ricard<christophe-h.ricard@st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agodm: tpm: Add a 'tpmtest' command
Simon Glass [Sun, 23 Aug 2015 00:31:42 +0000 (18:31 -0600)]
dm: tpm: Add a 'tpmtest' command

These tests come from Chrome OS code. They are not particularly tidy but can
be useful for checking that the TPM is behaving correctly. Some knowledge of
TPM operation is required to use these.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Christophe Ricard<christophe-h.ricard@st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agotpm: Add functions to access flags and permissions
Simon Glass [Sun, 23 Aug 2015 00:31:41 +0000 (18:31 -0600)]
tpm: Add functions to access flags and permissions

Add a few new functions which will be used by the test command in a future
patch.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Christophe Ricard<christophe-h.ricard@st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agotpm: Add a 'tpm info' command
Simon Glass [Sun, 23 Aug 2015 00:31:40 +0000 (18:31 -0600)]
tpm: Add a 'tpm info' command

Add a command to display basic information about a TPM such as the model and
open/close state. This can be useful for debugging.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Christophe Ricard <christophe-h.ricard@st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agodm: tpm: Convert LPC driver to driver model
Simon Glass [Sun, 23 Aug 2015 00:31:39 +0000 (18:31 -0600)]
dm: tpm: Convert LPC driver to driver model

Convert the tpm_tis_lpc driver to use driver model and update boards which
use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Christophe Ricard<christophe-h.ricard@st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agodm: tpm: Convert I2C driver to driver model
Simon Glass [Sun, 23 Aug 2015 00:31:38 +0000 (18:31 -0600)]
dm: tpm: Convert I2C driver to driver model

Convert the tpm_tis_i2c driver to use driver model and update boards which
use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Christophe Ricard<christophe-h.ricard@st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agoexynos: x86: dts: Add tpm nodes to the device tree for Chrome OS devices
Simon Glass [Sun, 23 Aug 2015 00:31:37 +0000 (18:31 -0600)]
exynos: x86: dts: Add tpm nodes to the device tree for Chrome OS devices

Add a TPM node to the various Chromebooks so that driver can be converted to
driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Christophe Ricard<christophe-h.ricard@st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agotpm: Check that parse_byte_string() has data to parse
Simon Glass [Sun, 23 Aug 2015 00:31:36 +0000 (18:31 -0600)]
tpm: Check that parse_byte_string() has data to parse

Rather then crashing when there is no data, print an error. The error is
printed by the caller to parse_byte_string().

Acked-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agodm: tpm: sandbox: Convert TPM driver to driver model
Simon Glass [Sun, 23 Aug 2015 00:31:35 +0000 (18:31 -0600)]
dm: tpm: sandbox: Convert TPM driver to driver model

Convert the sandbox TPM driver to use driver model. Add it to the device
tree so that it can be found on start-up.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Christophe Ricard <christophe-h.ricard@st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agotpm: Report tpm errors on the command line
Simon Glass [Sun, 23 Aug 2015 00:31:34 +0000 (18:31 -0600)]
tpm: Report tpm errors on the command line

When a 'tpm' command fails, we set the return code but give no indication
of failure. This can be confusing.

Add an error message when any tpm command fails.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Christophe Ricard<christophe-h.ricard@st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agodm: i2c: Add a command to adjust the offset length
Simon Glass [Sun, 23 Aug 2015 00:31:33 +0000 (18:31 -0600)]
dm: i2c: Add a command to adjust the offset length

I2C chips can support a register offset, with registers accessible by
sending this offset as the first part of any read or write transaction.
Most I2C chips have a single byte offset, thus the offset length is 1.
This provides access for up 256 registers.

However other offset lengths are supported, including 0.

Add a command to provide access to the offset length from the command
line. This allows the offset length to be read or written.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Christophe Ricard<christophe-h.ricard@st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agodm: tpm: Convert the TPM command and library to driver model
Simon Glass [Sun, 23 Aug 2015 00:31:32 +0000 (18:31 -0600)]
dm: tpm: Convert the TPM command and library to driver model

Add driver model support to the TPM command and the TPM library. Both
support only a single TPM at present.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Christophe Ricard<christophe-h.ricard@st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agodm: tpm: Add a uclass for Trusted Platform Modules
Simon Glass [Sun, 23 Aug 2015 00:31:31 +0000 (18:31 -0600)]
dm: tpm: Add a uclass for Trusted Platform Modules

Add a new uclass for TPMs which uses almost the same TIS (TPM Interface
Specification) as is currently implemented. Since init() is handled by the
normal driver model probe() method, we don't need to implement that. Also
rename the transfer method to xfer() which is a less clumbsy name.

Once all drivers and users are converted to driver model we can remove the
old code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Christophe Ricard<christophe-h.ricard@st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agotpm: tpm_tis_i2c: Tidy up delays
Simon Glass [Sun, 23 Aug 2015 00:31:30 +0000 (18:31 -0600)]
tpm: tpm_tis_i2c: Tidy up delays

Use a _US suffix for microseconds and a _MS suffic for milliseconds. Move
all timeouts and delays into one place. Use mdelay() instead of udelay()
where appropriate.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Christophe Ricard <christophe-h.ricard@st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agotpm: tpm_tis_i2c: Use a consistent tpm_tis_i2c_ prefix
Simon Glass [Sun, 23 Aug 2015 00:31:29 +0000 (18:31 -0600)]
tpm: tpm_tis_i2c: Use a consistent tpm_tis_i2c_ prefix

Use the same prefix on each function for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Christophe Ricard <christophe-h.ricard@st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agotpm: tpm_tis_i2c: Simplify init code
Simon Glass [Sun, 23 Aug 2015 00:31:28 +0000 (18:31 -0600)]
tpm: tpm_tis_i2c: Simplify init code

Move all the init and uninit code into one place.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Christophe Ricard<christophe-h.ricard@st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agotpm: tpm_tis_i2c: Move definitions into the header file
Simon Glass [Sun, 23 Aug 2015 00:31:27 +0000 (18:31 -0600)]
tpm: tpm_tis_i2c: Move definitions into the header file

Some definitions are in the C file and some are in the header file. Move
everything into the header file for consistency and to reduce clutter.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agotpm: tpm_tis_i2c: Merge struct tpm into tpm_chip
Simon Glass [Sun, 23 Aug 2015 00:31:26 +0000 (18:31 -0600)]
tpm: tpm_tis_i2c: Merge struct tpm into tpm_chip

There are too many structures storing the same sort of information. Move the
fields from struct tpm into struct tpm_chip and remove the former struct.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agotpm: tpm_tis_i2c: Merge struct tpm_dev into tpm_chip
Simon Glass [Sun, 23 Aug 2015 00:31:25 +0000 (18:31 -0600)]
tpm: tpm_tis_i2c: Merge struct tpm_dev into tpm_chip

There are too many structures storing the same sort of information. Move the
fields from struct tpm_dev into struct tpm_chip and remove the former
struct.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agotpm: tpm_tis_i2c: Drop struct tpm_vendor_specific
Simon Glass [Sun, 23 Aug 2015 00:31:24 +0000 (18:31 -0600)]
tpm: tpm_tis_i2c: Drop struct tpm_vendor_specific

This function is misnamed since it only applies to a single driver. Merge
its fields into its parent.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agotpm: tpm_tis_i2c: Drop unnecessary methods
Simon Glass [Sun, 23 Aug 2015 00:31:23 +0000 (18:31 -0600)]
tpm: tpm_tis_i2c: Drop unnecessary methods

The function methods in struct tpm_vendor_specific just call local functions.
Change the code to use a direct call.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agotpm: Move the I2C TPM code into one file
Simon Glass [Sun, 23 Aug 2015 00:31:22 +0000 (18:31 -0600)]
tpm: Move the I2C TPM code into one file

The current Infineon I2C TPM driver is written in two parts, intended to
support use with other I2C devices. However we don't have any users and the
Atmel I2C TPM device does not use this file.

We should simplify this and remove the unused abstration. As a first step,
move the code into one file.

Also the name tpm_private.h suggests that the header file is generic to all
TPMs but it is not. Rename it indicate that it relates only to this driver

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agotpm: Convert drivers to use SPDX
Simon Glass [Sun, 23 Aug 2015 00:31:21 +0000 (18:31 -0600)]
tpm: Convert drivers to use SPDX

Add an SPDX header to two drivers that don't have it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Christophe Ricard <christophe-h.ricard@st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agotpm: Convert board config TPM options to Kconfig
Simon Glass [Sun, 23 Aug 2015 00:31:20 +0000 (18:31 -0600)]
tpm: Convert board config TPM options to Kconfig

Convert all TPM options to Kconfig and tidy up.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Christophe Ricard <christophe-h.ricard@st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agotpm: Add Kconfig options for TPMs
Simon Glass [Sun, 23 Aug 2015 00:31:19 +0000 (18:31 -0600)]
tpm: Add Kconfig options for TPMs

Add new Kconfig options for TPMs in preparation for moving boards to use
Kconfig for TPM configuration.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Christophe Ricard<christophe-h.ricard@st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agotpm: Drop two unused options
Simon Glass [Sun, 23 Aug 2015 00:31:18 +0000 (18:31 -0600)]
tpm: Drop two unused options

The address of the I2C TPM is now defined in the device tree so there is no
need for the CONFIG options.

Remove them from the README and board config to avoid confusion.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Christophe Ricard <christophe-h.ricard@st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agotpm: Remove old pre-driver-model I2C code
Simon Glass [Sun, 23 Aug 2015 00:31:17 +0000 (18:31 -0600)]
tpm: Remove old pre-driver-model I2C code

This is not used anymore by any board so drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Christophe Ricard <christophe-h.ricard@st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agoexynos: Rise ARM voltage to 1.1V for chained bootloaders
Misha Komarovskiy [Tue, 25 Aug 2015 08:53:26 +0000 (11:53 +0300)]
exynos: Rise ARM voltage to 1.1V for chained bootloaders

If board uses downstream Chrome OS U-Boot as first stage
bootloader and upstream version is chained second stage,
1.1V is minimum voltage borderline.

Signed-off-by: Misha Komarovskiy <zombah@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Correct 'Series-cover-cc' detection logic
Simon Glass [Sun, 23 Aug 2015 00:28:01 +0000 (18:28 -0600)]
buildman: Correct 'Series-cover-cc' detection logic

This requires 'Series-cover_cc' at present which is incorrect. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agodrivers: kconfig: Sort driver menu in alphabetical order
Bin Meng [Fri, 21 Aug 2015 05:44:16 +0000 (22:44 -0700)]
drivers: kconfig: Sort driver menu in alphabetical order

Sort different types of drivers in alphabetical order.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
4 years agodrivers: kconfig: Move PHYS_TO_BUS to "Device Drivers" menu
Bin Meng [Fri, 21 Aug 2015 05:44:15 +0000 (22:44 -0700)]
drivers: kconfig: Move PHYS_TO_BUS to "Device Drivers" menu

Right now PHYS_TO_BUS shows in the Kconfig main menu, move it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
4 years agodrivers: kconfig: Move "Generic Driver Options" menu to the top
Bin Meng [Fri, 21 Aug 2015 05:44:14 +0000 (22:44 -0700)]
drivers: kconfig: Move "Generic Driver Options" menu to the top

Make "Generic Driver Options" menu show on the top in the Kconfig.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
4 years agodm: core: Add Kconfig for simple bus driver
Marek Vasut [Sun, 2 Aug 2015 23:15:48 +0000 (01:15 +0200)]
dm: core: Add Kconfig for simple bus driver

Add Kconfig entries for the simple-bus driver, both for U-Boot
and for SPL. The simple-bus is enabled by default in U-Boot and
disabled by default in SPL to preserve the original behavior.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
Modified to fit on top of Masahiro's $(SPL) setup:
Signed-off-by: Simon Glass <sjg@chromium.org>