summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-01-28bcm2835_mu_serial: Convert to KconfigAlexander Graf
Setting config options using headers is deprecated. This patch converts the BCM2835 Mini-UART to Kconfig. Signed-off-by: Alexander Graf <agraf@suse.de>
2018-01-28pl01x: Convert CONFIG_PL01X_SERIAL to KconfigAlexander Graf
We want to use Kconfig logic to depend on whether pl01x devices are built in, so let's convert their inclusion selection to Kconfig. This round goes to pl01x. Signed-off-by: Alexander Graf <agraf@suse.de>
2018-01-28pl011: Convert CONFIG_PL011_SERIAL to KconfigAlexander Graf
We want to use Kconfig logic to depend on whether pl01x devices are built in, so let's convert their inclusion selection to Kconfig. This round goes to pl011. Signed-off-by: Alexander Graf <agraf@suse.de>
2018-01-28pl010: Convert CONFIG_PL010_SERIAL to KconfigAlexander Graf
We want to use Kconfig logic to depend on whether pl01x devices are built in, so let's convert their inclusion selection to Kconfig. This round goes to pl010. Signed-off-by: Alexander Graf <agraf@suse.de>
2018-01-28pl01x: Convert to dev_readAlexander Graf
The fdtdec API is deprecated, convert the pl010 and pl011 devices to use the dev_read API instead. Signed-off-by: Alexander Graf <agraf@suse.de>
2018-01-28serial_bcm283x_mu: Fail loading if not muxedAlexander Graf
The bcm283x mini-uart is only really usable as U-Boot serial output when it is muxed to the UART pins of the RPi pin header. So fail probing in case it is not muxed correctly, as in that case firmware did not initialize it properly either. Signed-off-by: Alexander Graf <agraf@suse.de>
2018-01-28serial_bcm283x_mu: Always skip initAlexander Graf
The serial initialization doesn't always quite work for me, so let's always skip it for now. We know that firmware on the RPi initializes us properly already. Signed-off-by: Alexander Graf <agraf@suse.de>
2018-01-28serial_bcm283x_mu: Convert to dev_readAlexander Graf
The fdtdec API got deprecated in favor of dev_read calls. Use those instead. Signed-off-by: Alexander Graf <agraf@suse.de>
2018-01-28rpi: Determine PL011/Mini-UART availability at runtimeAlexander Graf
Firmware on the Raspberry Pi family of devices can dynamically configure either the PL011, Mini-UART or no device at all to be routed to the user accessible UART pins. That means we need to always include both drivers, because we can never be sure which of the two serial devices firmware actually chooses to use. Signed-off-by: Alexander Graf <agraf@suse.de>
2018-01-28serial: bcm283x_mu: Remove support for post-init disablingAlexander Graf
We are switching to a model where a serial device doesn't even get probed when it's not muxed properly, so we don't need device specific disabling functionality anymore. Signed-off-by: Alexander Graf <agraf@suse.de>
2018-01-28rpi: Remove runtime disabling support for serialAlexander Graf
We are switching to a model where our board file can directly fail probing of serial devices when they're not usable, so remove the current runtime hack we have. Signed-off-by: Alexander Graf <agraf@suse.de>
2018-01-28serial: Use next serial device if probing failsAlexander Graf
Currently our serial device search chokes on the fact that the serial probe function could fail. If it does, instead of searching for the next usable serial device, it just quits. This patch changes the fallback logic so that even when a serial device was not probed correctly, we just try the next ones until we find one that works. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-01-28am33xx: board: Call spl_early_init() to support sdram_init()Faiz Abbas
With driver model enabled in SPL, sdram_init() requires device tree and malloc to be initialized. Therefore call spl_early_init() in early_system_init(). Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
2018-01-28arm: add support for PDU001Felix Brack
This patch adds support for the PDU001 board. Signed-off-by: Felix Brack <fb@ltec.ch> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-01-28mmc: Add bcm2835 sdhost controllerAlexander Graf
The BCM2835 family of SoCs has 2 different SD controllers: One based on the SDHCI spec and a custom, home-grown one. This patch implements a driver for the latter based on the Linux driver. This is needed so that we can make use of device trees that assume driver presence of both SD controllers. Signed-off-by: Alexander Graf <agraf@suse.de>
2018-01-28bcm283x: Add pinctrl driverAlexander Graf
The bcm283x family of SoCs have a GPIO controller that also acts as pinctrl controller. This patch introduces a new pinctrl driver that can actually properly mux devices into their device tree defined pin states and is now the primary owner of the gpio device. The previous GPIO driver gets moved into a subdevice of the pinctrl driver, bound to the same OF node. That way whenever a device asks for pinctrl support, it gets it automatically from the pinctrl driver and GPIO support is still available in the normal command line phase. Signed-off-by: Alexander Graf <agraf@suse.de>
2018-01-28powerpc: Drop CONFIG_WALNUT and other related dead codeTuomas Tynkkynen
CONFIG_WALNUT was dropped in June 2017 in: commit 98f705c9cefdfd ("powerpc: remove 4xx support") While at it, the related CONFIG_MACH_SPECIFIC and the have_of and _machine variables are unused as well, so drop them too. Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
2018-01-28libfdt: migrate include/libfdt_env.h to a wrapperMasahiro Yamada
libfdt_env.h is supposed to provide system-dependent defines. scripts/dtc/libfdt/libfdt_env.h from upstream DTC is suitable for user-space, so we should use this for USE_HOSTCC case. For compiling U-Boot, we need to override such system-dependent defines, so use <linux/libfdt_env.h> imported from Linux. <libfdt.h> selects a proper one. Maybe, we should split header inclusion completely, but I do not want too many patches at one. I can rip off the include/libfdt_env.h from HOST_EXTRACFLAGS. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-01-28libfdt: migrate libfdt.h to a wrapper + U-Boot own codeMasahiro Yamada
There is tons of code duplication between lib/libfdt/libfdt.h and scripts/dtc/libfdt/libfdt.h. Evacuate the U-Boot own code to include/libfdt.h and remove lib/libfdt/libfdt.h. For host tools, <libfdt.h> should include scripts/dtc/libfdt/libfdt.h, which is already suitable for user-space. For compiling U-Boot, <linux/libfdt.h> should be included because we need a different libfdt_env.h . Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-01-28libfdt: move working_fdt and FDT_RAMDISK_OVERHEAD to include/libfdt.hMasahiro Yamada
libfdt_env.h exists to contain system-dependent defines: - typedef of fdt*_t - fdt*_to_cpu(), cpu_to_fdt* working_fdt and FDT_RAMDISK_OVERHEAD are unrelated to the environment, so they must get out of this header. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-01-28tools: include necessary headers explicitlyMasahiro Yamada
Several host-tools use "bool" type without including <stdbool.h>. This relies on the crappy header inclusion chain. tools/Makefile has the following line: HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \ All host-tools are forced to include libfdt_env.h even if they are totally unrelated to FDT. Then, <stdbool.h> is indirectly included as follows: include/libfdt_env.h -> include/linux/types.h -> <stdbool.h> I am fixing this horrible crap. In advance, I need to add necessary include directives explicitly. tools/fdtgrep.c needs more; <fctl.h> for open() and <errno.h> for errno. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-01-28libfdt: fix <linux/libfdt.h>Masahiro Yamada
I do not remember why, but this is apparently a file-copy mistake. The file name is libfdt.h, but its content is that of libfdt_env.h Re-import it from upstream Linux. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-01-28libfdt: migrate fdt_rw.c to a wrapper of scripts/dtc/libfdt/fdt_rw.cMasahiro Yamada
The only difference between scripts/dtc/libfdt/fdt_rw.c and lib/libfdt/fdt_rw.c is fdt_remove_unused_strings(). It is only used by fdtgrep, so we do not need to compile it for U-Boot image. Move it to tools/libfdt/fdw_rw.c so that lib/libfdt/fdt_rw.c can be a wrapper of scripts/dtc/libfdt/fdt_rw.c. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-01-28host-tools: use python2 explicitly for shebangMasahiro Yamada
All of these host tools are apparently written for Python2, not Python3. Use 'python2' in the shebang line according to PEP 394 (https://www.python.org/dev/peps/pep-0394/). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-01-28ARM: omap3: evm: Fix distro bootcmd UBIFS and MMC supportDerald D. Woods
The omap3_evm board does not boot when commit: a47ca2cf67 ("ARM: omap3: evm: Add kernel image loading from UBIFS and EXT4") is applied after commit: 3dde8f2037 ("Merge git://git.denx.de/u-boot-mmc") This commit reduces the CONFIG_EXTRA_ENV_SETTINGS size and better leverages the existing distro bootcmd infrastructure. - Use updated UBIFS support from config_distro_bootcmd.h - Use LEGACY_MMC naming found in am335x_evm.h and ti_omap4_common.h - Remove extra environment content that is no longer needed [MMC(0:1)/extlinux/extlinux.conf] ---8<------------------------------------------------------------------- default omap3-evm-mmc-fat label omap3-evm-mmc-fat kernel /zImage fdt /omap3-evm.dtb append console=ttyO0,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait ---8<------------------------------------------------------------------- [MMC(0:2)/boot/extlinux/extlinux.conf] ---8<------------------------------------------------------------------- default omap3-evm-mmc-ext4 label omap3-evm-mmc-ext4 kernel /boot/zImage fdt /boot/omap3-evm.dtb append console=ttyO0,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait ---8<------------------------------------------------------------------- [NAND(ubi0:rootfs)/boot/extlinux/extlinux.conf] ---8<------------------------------------------------------------------- default omap3-evm-nand-ubifs label omap3-evm-nand-ubifs kernel /boot/zImage fdt /boot/omap3-evm.dtb append console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=rootfs noinitrd rootfstype=ubifs rootwait ---8<------------------------------------------------------------------- Fixes: a47ca2cf67 ("ARM: omap3: evm: Add kernel image loading from UBIFS and EXT4") Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
2018-01-28distro bootcmd: Allow board defined UBI partition and volume namesDerald D. Woods
This commit allows overriding the default assumption that the boot UBI MTD partition is named 'UBI' and the UBI volume is 'boot'. A board desiring to use a legacy or alternative NAND layout can now define the following two extra environment variables: bootubipart=<some_ubi_partition_name> bootubivol=<some_ubi_volume_name> EXAMPLE: [include/configs/some_board.h] ---8<------------------------------------------------------------------- [...] #include <config_distro_defaults.h> #define MEM_LAYOUT_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV #define BOOT_TARGET_DEVICES(func) \ func(UBIFS, ubifs, 0) #include <config_distro_bootcmd.h> [...] #define CONFIG_EXTRA_ENV_SETTINGS \ MEM_LAYOUT_ENV_SETTINGS \ "bootubivol=rootfs\0" \ "bootubipart=rootfs\0" \ BOOTENV [...] ---8<------------------------------------------------------------------- Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
2018-01-28spl: use different BOARD_INIT MACRO for spl and tplKever Yang
SPL and TPL may not always need spl_board_init() at the same time. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2018-01-28fs: btrfs: Fix unaligned memory accessesAlberto Sánchez Molero
Loading files stored with lzo compression from a btrfs filesystem was producing unaligned memory accesses, which were causing a data abort and a reset on an Orange Pi Zero. The change in hash.c is not triggered by any error but follows the same pattern. Please confirm. Fixed according to doc/README.unaligned-memory-access.txt Signed-off-by: Alberto Sánchez Molero <alsamolero@gmail.com> Tested-by: Robert Nelson <robertcnelson@gmail.com>
2018-01-28clk: clk_stm32f: Fix PLLSAICFGR_PLLSAIP_4 divider valuePatrice Chotard
PLLSAIP divider uses 2 bits (bits 16 and 17) into RCC_PLLSAICFGR register, available combination are : 00: PLLSAIP = 2 01: PLLSAIP = 4 10: PLLSAIP = 6 11: PLLSAIP = 8 Previously, the divider value was incorrectly set to 6. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-01-28ARM: AM43XX: Call hw_data_init() again after relocation to update *ctrlFaiz Abbas
hw_data_init() is called before relocation to initialise hardware data. Since ctrl is initialized to OMAP_SRAM_SCRATCH_SYS_CTRL in arch/arm/mach-omap2/am33xx/hw_data.c, the pointer *ctrl will not be updated during relocation and will hold a stale value. Therefore call hw_data_init() again after relocation to reinitialize *ctrl. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2018-01-28configs: Replace CONFIG_ISW_ENTRY_ADDR with CONFIG_SYS_TEXT_BASEFaiz Abbas
Since 7e0ed13 ("Convert ARCH_OMAP2PLUS boards' CONFIG_SYS_TEXT_BASE to Kconfig"), a default SYS_TEXT_BASE was set for all ARCH_OMAP2PLUS devices. CONFIG_ISW_ENTRY_ADDR is used to set SYS_TEXT_BASE in qspi boot. Simplify this by directly assigning SYS_TEXT_BASE in the defconfig. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2018-01-28tools: remove unused retJelle van der Waa
Remove unused ret from fw_env_flush. Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-01-28clk: clk_stm32f: Move SYSCFG clock setup into configure_clocks()Patrice Chotard
Move SYSCFG clock setup into configure_clocks() instead of calling clock_setup() from board file. As this clock is only needed in case of ethernet enabled and as both stm32f4 and stm32f7 are using the Designware ethernet IP, we use CONFIG_ETH_DESIGNWARE to only enable this clock if needed. Move the RMII setup from board_early_init_f() to board_init() to insure that RMII bit is set only when clock driver is initialized. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-01-28clk: clk_stm32f: Remove STMMAC clock setupPatrice Chotard
Thanks to 'commit ba1f96672522 ("net: designware: add clock support")' we don't need anymore to setup the STMMAC clock in board. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
2018-01-28ARM: dts: stm32: Add STMMAC clocks for stm32f746Patrice Chotard
Add ETHMAC, ETHMACRX and ETHMACTX clocks for STMMAC. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
2018-01-28atomic-long: Fix warnings on arm64Bradley Bolen
Several inline functions in this file reference undefined functions in U-Boot. For example: atomic-long.h:73:9: warning: implicit declaration of function 'atomic64_sub_and_test' atomic-long.h:80:9: warning: implicit declaration of function 'atomic64_dec_and_test' atomic-long.h:87:9: warning: implicit declaration of function 'atomic64_inc_and_test' Handle this the same as the 32 bit build by wrapping these functions in a __UBOOT__ check. Signed-off-by: Bradley Bolen <bradleybolen@gmail.com>
2018-01-28ARM: dts: stm32: add stm32429-eval-u-boot dts filePatrice Chotard
_ Add gpio compatible and aliases for stm32f469 _ Add FMC sdram node _ Add "u-boot,dm-pre-reloc" for rcc, fmc, fixed-clock, pinctrl, pwrcfg and gpio nodes. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-01-28ARM: dts: stm32: Add STM32F429 Evaluation board supportPatrice Chotard
This DT file comes from kernel v4.15, this board offers : _ STM32F429NIH6 microcontroller _ 4.3” color TFT LCD with resistive touchscreen (480 x 272 pixels) _ Six 5 V power supply options: Power jack ST-LINK/V2 USB connector User USB HS connector User USB FS1 connector User USB FS2 connector Daughterboard _ SAI Audio DAC, stereo audio jack which supports headset with microphone _ Stereo digital microphone, audio terminal connector used to connect external speakers _ 2 GBytes (or more) SDIO interface MicroSD card _ RF EEPROM on I2 C compatible serial interface _ RS-232 communication _ IrDA transceiver _ JTAG/SWD and ETM trace debug support, ST-LINK/V2 embedded _ IEEE-802.3-2002 compliant Ethernet connector _ Camera module _ 8M x 32-bit SDRAM, 1M x 16-bit SRAM and 8M x 16-bit NOR Flash _ Joystick with 4-directional control and selector _ Reset, Wakeup and Tamper buttons _ 4 color user LEDs _ Extension connectors & memory connectors for daughterboard or wrapping board _ USB OTG HS and FS with Micro-AB connectors _ RTC with backup battery _ CAN2.0A/B compliant connection _ Potentiometer _ Motor control connector Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-01-28board: stm32: Add stm32f429-evaluation board supportPatrice Chotard
Add stm32f429-evaluation board support. For more information, please visit: http://www.st.com/en/evaluation-tools/stm32429i-eval.html Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-01-28configs: stm32f: Remove STM32_HSE_HZ for all STM32F seriesPatrice Chotard
As clk_stm32f driver is able to retrieve HSE frequency from DT, CONFIG_STM32_HSE_HZ becomes useless. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-01-28clk: stm32: retrieve external oscillator frequency from DTPatrice Chotard
All current STM32F4 supported boards uses a 8MHz external oscillator. All current STM32F7 supported boards uses a 25MHz external oscillator. In order to introduce the new stm32f429-evaluation board which uses a 25MHz external oscillator without creating a dedicated struct stm32_clk_info for this board, retrieve the external oscillator frequency from DT and set pll_m accordingly to obtain 1MHz for the VCO. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-01-28ARM: dts: stm32: add "u-boot, dm-pre-reloc" for clk_hse in stm32f7-u-bootPatrice Chotard
In order to retrieve the clk_hse fixed clock phandle in clk_stm32f driver, add "u-boot,dm-pre-reloc" property in Uboot specific DT file. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-01-28arm: bootm-fdt.c: fix compiler warningHeiko Schocher
compiling U-Boot with bosch_mpcxxxxd_sd_defconfig drops warning: arch/arm/lib/bootm-fdt.c: In function ‘arch_fixup_fdt’: arch/arm/lib/bootm-fdt.c:37:6: warning: unused variable ‘ret’ [-Wunused-variable] int ret = 0; ^~~ Fix it. Signed-off-by: Heiko Schocher <hs@denx.de>
2018-01-28arm: mach-omap2: Pass args to secure ROM in SRAM in SPLAndrew F. Davis
When in early SPL we make some secure ROM calls that can effect DRAM, due to this it is more stable to store the args for these calls in SRAM, but uninitialized and zero'd globals are placed in BSS, located in DRAM. Force our args into the data section which is in SRAM during SPL. Signed-off-by: Andrew F. Davis <afd@ti.com>
2018-01-28common: board_r: Fix style violationsMario Six
Fix some style violations in the board_r file. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-01-28common: board_f: Fix style violationsMario Six
Fix some style violations in the board_f file. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-01-28serial: ns16550: Fix style violationMario Six
Clarify the computation precedence in two ternary operator constructions. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-01-28include: dm: Fix 'devioe'/'devuce' typosMario Six
There are some typos in the documentation of some functions in read.h; fix those. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-01-28gpio: mpc8xxx: Make live-tree compatibleMario Six
Make the MPC8xxx GPIO driver compatible with a live device tree. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-01-28gpio: mpc8xxx: Make compatible with more SoCsMario Six
Finally, make the mpc8xxx driver capable of handling more GPIO devices; this entails adding a special case for the MPC5121 SoC, and adding a set of new compatible strings. Signed-off-by: Mario Six <mario.six@gdsys.cc>