summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* dm: tpm: sandbox: Convert TPM driver to driver modelSimon Glass2015-08-313-12/+50
| | | | | | | | | 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>
* tpm: Report tpm errors on the command lineSimon Glass2015-08-311-22/+24
| | | | | | | | | | | 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>
* dm: i2c: Add a command to adjust the offset lengthSimon Glass2015-08-311-0/+33
| | | | | | | | | | | | | | | | 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>
* dm: tpm: Convert the TPM command and library to driver modelSimon Glass2015-08-313-6/+53
| | | | | | | | | 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>
* dm: tpm: Add a uclass for Trusted Platform ModulesSimon Glass2015-08-3110-286/+630
| | | | | | | | | | | | | | 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>
* tpm: tpm_tis_i2c: Tidy up delaysSimon Glass2015-08-312-31/+28
| | | | | | | | | | 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>
* tpm: tpm_tis_i2c: Use a consistent tpm_tis_i2c_ prefixSimon Glass2015-08-311-55/+58
| | | | | | | | 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>
* tpm: tpm_tis_i2c: Simplify init codeSimon Glass2015-08-311-23/+10
| | | | | | | | 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>
* tpm: tpm_tis_i2c: Move definitions into the header fileSimon Glass2015-08-312-335/+335
| | | | | | | | 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>
* tpm: tpm_tis_i2c: Merge struct tpm into tpm_chipSimon Glass2015-08-312-15/+10
| | | | | | | | 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>
* tpm: tpm_tis_i2c: Merge struct tpm_dev into tpm_chipSimon Glass2015-08-312-44/+25
| | | | | | | | | 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>
* tpm: tpm_tis_i2c: Drop struct tpm_vendor_specificSimon Glass2015-08-312-60/+35
| | | | | | | | 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>
* tpm: tpm_tis_i2c: Drop unnecessary methodsSimon Glass2015-08-312-12/+4
| | | | | | | | 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>
* tpm: Move the I2C TPM code into one fileSimon Glass2015-08-314-618/+550
| | | | | | | | | | | | | | | 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>
* tpm: Convert drivers to use SPDXSimon Glass2015-08-312-29/+4
| | | | | | | | 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>
* tpm: Convert board config TPM options to KconfigSimon Glass2015-08-3116-16/+36
| | | | | | | | 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>
* tpm: Add Kconfig options for TPMsSimon Glass2015-08-313-0/+82
| | | | | | | | | 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>
* tpm: Drop two unused optionsSimon Glass2015-08-312-8/+0
| | | | | | | | | | | 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>
* tpm: Remove old pre-driver-model I2C codeSimon Glass2015-08-313-179/+7
| | | | | | | | 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>
* exynos: Rise ARM voltage to 1.1V for chained bootloadersMisha Komarovskiy2015-08-311-3/+4
| | | | | | | | | 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>
* buildman: Correct 'Series-cover-cc' detection logicSimon Glass2015-08-311-1/+1
| | | | | | This requires 'Series-cover_cc' at present which is incorrect. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
* drivers: kconfig: Sort driver menu in alphabetical orderBin Meng2015-08-311-24/+26
| | | | | | | Sort different types of drivers in alphabetical order. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* drivers: kconfig: Move PHYS_TO_BUS to "Device Drivers" menuBin Meng2015-08-311-2/+2
| | | | | | | 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>
* drivers: kconfig: Move "Generic Driver Options" menu to the topBin Meng2015-08-311-2/+2
| | | | | | | 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>
* dm: core: Add Kconfig for simple bus driverMarek Vasut2015-08-313-6/+17
| | | | | | | | | | | | 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>
* dm: Use dev_get_addr() where possibleSimon Glass2015-08-3120-29/+26
| | | | | | | | | | This is a convenient way for a driver to get the hardware address of a device, when regmap or syscon are not being used. Change existing callers to use it as an example to others. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
* dm: simplify uclass_foreach_dev() implementationMasahiro Yamada2015-08-311-7/+2
| | | | | | | | This can be simply written with list_for_each_entry(), maybe this macro was not necessary in the first place. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
* ARM: dts: uniphier: add ProXstream2 and PH1-LD6b SoC/board supportMasahiro Yamada2015-08-314-2/+334
| | | | | | | | | | | | | | Initial version of DTSI for ProXstream2 and PH1-LD6b and DTS for PH1-LD6b reference board. Import from Linux with some adjustments: - Use SPDX-License-Identifier - Add clock-frequency to serial nodes - Drop unusable nodes from -ref.dts While I am here, sort Makefile entries alphabetically. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: dts: uniphier: add PH1-Pro5 SoC supportMasahiro Yamada2015-08-311-0/+216
| | | | | | | | Initial version of UniPhier PH1-Pro5 device tree. (Imported from Linux with adjustment for SPDX License Identifier) Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: dts: uniphier: sync with LinuxMasahiro Yamada2015-08-319-107/+472
| | | | | | | This commit imports device tree updates from Linux. It eventually adds pinctrl-related nodes and properties. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* serial: uniphier: drop platform data supportMasahiro Yamada2015-08-312-44/+15
| | | | | | | | | | This driver is enabled only for UniPhier SoCs and ARCH_UNIPHIER now selects OF_CONTROL and SPL_OF_CONTROL. This driver no longer needs to support platform data configuration. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* ARM: uniphier: enable SPL_OF_CONTROLMasahiro Yamada2015-08-3114-67/+31
| | | | | | | | | | | | | Device Tree really improves code maintainability and is now available for SPL too. This is the state-of-the-art implementation in U-boot. The board files (platform data) are no longer needed. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* ARM: uniphier: select SPL_DM rather than default in defconfigMasahiro Yamada2015-08-305-4/+1
| | | | | | Now UniPhier SoCs highly depend on Driver Model for SPL, too. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: remove unused macroMasahiro Yamada2015-08-301-2/+0
| | | | | | This macro is not referenced at all. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: fix build error when CONFIG_DEBUG_LL is definedMasahiro Yamada2015-08-301-0/+2
| | | | | | | The build error happens if CONFIG_DEBUG_LL and CONFIG_MACH_PH1_SLD3 are both enabled. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* mtd: denali_spl: do not allocate page_buffer in .bss sectionMasahiro Yamada2015-08-301-20/+12
| | | | | | | | | | | | | | | | | | | Since commit 2580a2a7e719 ("mtd: nand: Increase max sizes of OOB and Page size"), three boards (ph1_ld4, ph1_pro4, ph1_sld8) fail to build with the following error message: arm-linux-gnueabi-ld.bfd: SPL image plus BSS too big They compile drivers/mtd/nand/denali_spl.c and it has a page_buffer as static data: static uint8_t page_buffer[NAND_MAX_PAGESIZE]; This buffer required 8KB in .bss section before that commit and now it has been increased to 16KB. Given limited code/memory size for SPL, it is not a good idea to allocate a page buffer statically. In the first place, the load address 'dst' can be used as a page buffer. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* tools/atmelimage.c: Fix warning when debug is enabledTom Rini2015-08-281-1/+1
| | | | | | | | | | Otherwise we get: tools/atmelimage.c:134:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t’ [-Wformat=] debug("atmelimage: interrupt vector #%d is 0x%08X\n", pos+1, ^ Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
* ARM: OMAP5/AM43xx: remove enabling USB clocks from enable_basic_clocks()Kishon Vijay Abraham I2015-08-282-42/+0
| | | | | | | | | | Now that we have separate function to enable USB clocks, remove enabling USB clocks from enable_basic_clocks(). Now board_usb_init() should take care to invoke enable_usb_clocks() for enabling USB clocks. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* board: ti: invoke clock API to enable and disable clocksKishon Vijay Abraham I2015-08-284-0/+10
| | | | | | | | invoke enable_usb_clocks during board_usb_init and disable_usb_clocks during board_usb_exit to enable and disable clocks respectively. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: AM43xx: Add functions to enable and disable USB clocksKishon Vijay Abraham I2015-08-282-0/+73
| | | | | | | | | | | Added functions to enable and disable USB clocks which can be invoked during USB init and USB exit respectively. Cc: Roger Quadros <rogerq@ti.com> Cc: Tero Kristo <t-kristo@ti.com> Cc: Nishanth Menon <nm@ti.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: OMAP5: Add functions to enable and disable USB clocksKishon Vijay Abraham I2015-08-282-0/+101
| | | | | | | | | | | Added functions to enable and disable USB clocks which can be invoked during USB init and USB exit respectively. Cc: Roger Quadros <rogerq@ti.com> Cc: Tero Kristo <t-kristo@ti.com> Cc: Nishanth Menon <nm@ti.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* board: ti: OMAP5: added USB initializtion codeKishon Vijay Abraham I2015-08-282-0/+81
| | | | | | | | | Implemented board_usb_init(), board_usb_cleanup() and usb_gadget_handle_interrupts() in omap5 board file that can be invoked by various gadget drivers. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* board: ti: beagle_x15: added USB initializtion codeKishon Vijay Abraham I2015-08-282-1/+112
| | | | | | | | | Implemented board_usb_init(), board_usb_cleanup() and usb_gadget_handle_interrupts() in beagle_x15 board file that can be invoked by various gadget drivers. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* include: configs: am43xx_evm: add 'usb stop' in usbboot envKishon Vijay Abraham I2015-08-281-0/+2
| | | | | | | | | | | | The usbboot environment variable has 'usb start' command but doesn't have the corresponding 'usb stop' command. This breaks usb peripheral mode if tried after 'run usbboot' fails to load the images in usb host mode. Fix it here by adding 'usb stop' command in usbboot env. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* board: ti: remove duplicate initialization of vbus_id_statusKishon Vijay Abraham I2015-08-282-4/+0
| | | | | | | | vbus_id_status is initialized in board_usb_init. So remove it while creating dwc3_device objects. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* TI PHY: Add support to control 2nd USB PHY in DRA7xx/AM57xxKishon Vijay Abraham I2015-08-281-4/+11
| | | | | | | | Added support to power on/power off the second USB PHY present in DRA7xx and AM57xx. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: DRA7: Enable clocks for USB OTGSS2 and USB PHY2Kishon Vijay Abraham I2015-08-284-0/+23
| | | | | | | | Enabled clocks for the second dwc3 controller and second USB PHY present in DRA7. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* usb: dwc3: dwc3-omap: Use the clear register inorder to clear the interruptsKishon Vijay Abraham I2015-08-281-18/+28
| | | | | | | | | | Writing "0x00" to the USBOTGSS_IRQENABLE_SET_MISC and USBOTGSS_IRQENABLE_SET_0 doesn't disable the interrupts. Used USBOTGSS_IRQENABLE_CLR_MISC and USBOTGSS_IRQENABLE_CLR_0 instead. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Acked-by: Marek Vasut <marex@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
* Makefile: fix SOURCE_DATE_EPOCH for *BSD hostAndreas Bießmann2015-08-281-3/+15
| | | | | | | | | | | | | | | | | | | The SOURCE_DATE_EPOCH mechanism for reproducible builds require some date(1) with -d switch to print the relevant date and time strings of another point of time. In other words it requires some date(1) that behaves like the GNU date(1) [1]. The BSD date(1) [2] on the other hand has the same switch but with a different meaning. Respect this and check the date(1) abilities before usage, error on non working version. Use the well known pre- and suffixes for the GNU variant of a tool on *BSD hosts to search for a working date(1) version. [1] http://man7.org/linux/man-pages/man1/date.1.html [2] http://www.freebsd.org/cgi/man.cgi?query=date Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
* picosam9g45: adopt CONFIG_SYS_PROMPTAndreas Bießmann2015-08-282-1/+1
| | | | | | | | Commit 181bd9dc61d2da88b78f1c1138a685dae39354d6 introduced Kconfig selection for SYS_PROMPT. When applying the new picosam9g45 board this change slipped through, adopt it. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
OpenPOWER on IntegriCloud