summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-01-14omap3_logic: Rework MACH_TYPE and fdtfile logicTom Rini
The MACH_TYPE values for the omap37xx based platforms are no longer officially valid, so we must not set and pass them. In order to not reference them but still be able to set the default fdtfile based on the board detection logic we need to combine the two steps into one. Cc: Adam Ford <aford173@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Adam Ford <aford173@gmail.com>
2017-01-14Merge git://git.denx.de/u-boot-fdtTom Rini
2017-01-14cmd/fdt: Make fdt get value endian-safe for single-cell propertiesAndreas Färber
On a Raspberry Pi 2 disagreements on cell endianness can be observed: U-Boot> fdt print /soc/gpio@7e200000 phandle phandle = <0x0000000d> U-Boot> fdt get value myvar /soc/gpio@7e200000 phandle; printenv myvar myvar=0x0D000000 Fix this by always treating the pointer as BE and converting it in fdt_value_setenv(), like its counterpart fdt_parse_prop() already does. Consistently use fdt32_t, fdt32_to_cpu() and cpu_to_fdt32(). Fixes: bc80295 ("fdt: Add get commands to fdt") Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Gerald Van Baren <gvb@unssw.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Simon Glass <sjg@chromium.org>
2017-01-14cmd: fdt: Print error message when fdt application failsStefan Agner
There are lots of reason why a FDT application might fail, the error code might give an indication. Let the error code translate in a error string so users can try to understand what went wrong. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-01-14libfdt: Correct fdt handling of overlays without fixups and base trees ↵David Gibson
without symbols The fdt_overlay_apply() function purports to support the edge cases where an overlay has no fixups to be applied, or a base tree which has no symbols (the latter can only work if the former is also true). However it gets it wrong in a couple of small ways: * In the no fixups case, it doesn't fail immediately, but will attempt fdt_for_each_property_offset() giving -FDT_ERR_NOTFOUND as the node offset, which will fail. Instead it should succeed immediately, since there's nothing to do. * In the case of no symbols, it again doesn't fail immediately. However if there is an actual fixup it will fail with an unexpected error, because -FDT_ERR_NOTFOUND is passed to fdt_getprop() when attempting to look up the symbols. We should instead return -FDT_ERR_NOTFOUND directly. Both of these errors lead to the code returning misleading error codes in failing cases. [ DTC commit: 7d8ef6e1db9794f72805a0855f4f7f12fadd03d3 ] Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-01-13Merge branch 'master' of http://git.denx.de/u-boot-mmcTom Rini
2017-01-13mmc: sunxi: revive depends on UART0_PORT_FMasahiro Yamada
Commit f401e907fcbc ("ARM: sunxi: remove bare default for CONFIG_MMC") dropped "depends on UART0_PORT_F", but it is still needed. Revive it as a prerequisite of CONFIG_MMC_SUNXI. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-01-13mmc: pic32_sdhci: rename {pci->pic}32_sdhci_get_cdMasahiro Yamada
I suspect this is a typo. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-01-13mmc: sdhci: fix NULL pointer access when host->ops is not setMasahiro Yamada
Until recently, sdhci_ops was used only for overriding IO accessors. (so, host->ops was not set by any drivers except bcm2835_sdhci.c) Now, we have more optional callbacks, get_cd, set_control_reg, and set_clock. However, the code if (host->ops->get_cd) host->ops->get_cd(host); ... expects host->ops is set for all drivers. Commit 5e96217f0434 ("mmc: pic32_sdhci: move the code to pic32_sdhci.c") and commit 62226b68631b ("mmc: sdhci: move the callback function into sdhci_ops") added sdhci_ops for pic32_sdhci.c and s5p_sdhci.c, but the other drivers still do not (need not) set host->ops because all callbacks in sdhci_ops are optional. host->ops must be checked to avoid the system crash caused by NULL pointer access. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-01-13Merge git://git.denx.de/u-boot-rockchipTom Rini
2017-01-12cmd: mem: Use memcpy for 'cp' commandFabio Estevam
Simplify the 'cp' command implementation by using the memcpy() function, which brings the additional benefit of performance gain for those who have CONFIG_USE_ARCH_MEMCPY selected. Tested on a mx6qsabreauto board where a 5x gain in performance is seen when reading 10MB from the parallel NOR memory. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
2017-01-12rockchip: Drop Ethernet from the TODOSjoerd Simons
Now that ethernet support works, it can be dropped from the rockchip TODO Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2017-01-12rockchip: Enable ETH address randomization for the rock2Romain Perier
This commit enables ethernet MAC address randomization on the rock2. It removes the error at startup 'ethernet@ff290000 address not set'. Signed-off-by: Romain Perier <romain.perier@collabora.com>
2017-01-12rockchip: Add PXE and DHCP to the default boot targetsSjoerd Simons
Now that at least on the firefly board we have network support, enable PXE and DHCP boot targets by default. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-01-12Enable DISTRO_DEFAULTS for Rockchip platformsRomain Perier
This enables suitable commands needed for booting general purpose Linux distribution. This is required for example if we want to use PXE or DHCP as default boot targets, symbols no longer enabled by config_distro_defaults.h . Signed-off-by: Romain Perier <romain.perier@collabora.com>
2017-01-12rockchip: evb-rk3339: Enable DHCPSimon Glass
This is the only RK3399 device without DHCP. Enable it so that we can use a common BOOT_TARGET_DEVICES setting. It is likely useful to be able to use USB networking, at least. Full networking can be enabled when a suitable platform needs it. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-01-12rockchip: Enable networking support on rock2 and fireflySjoerd Simons
Enable the various configuration option required to get the ethernet interface up and running on Radxa Rock2 and Firefly. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Signed-off-by: Romain Perier <romain.perier@collabora.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-01-12net: gmac_rockchip: Add Rockchip GMAC driverSjoerd Simons
Add a new driver for the GMAC ethernet interface present in Rockchip RK3288 SOCs. This driver subclasses the generic design-ware driver to add the glue needed specifically for Rockchip. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Romain Perier <romain.perier@collabora.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-01-12net: designware: Export the operation functionsSimon Glass
Export all functions so that drivers can use them, or not, as the need arises. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Romain Perier <romain.perier@collabora.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-01-12net: designware: Split the link init into a separate functionSimon Glass
With rockchip we need to make adjustments after the link speed is set but before enabling received/transmit. In preparation for this, split these two pieces into separate functions. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Romain Perier <romain.perier@collabora.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-01-12net: designware: Adjust dw_adjust_link() to return an errorSimon Glass
This function can fail, so return the error if there is one. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Romain Perier <romain.perier@collabora.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-01-12net: designware: Export various functions/struct to allow subclassingSjoerd Simons
To allow other DM drivers to subclass the designware driver various functions and structures need to be exported. Export these. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Signed-off-by: Romain Perier <romain.perier@collabora.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-01-12rockchip: video: fix mpixelclock in rockchip HDMINickey Yang Nickey Yang
Correct mpixelclock errors in rockchip_phy_config[] and rockchip_mpll_cfg[]. Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2017-01-12rockchip: rk3288: set isp/vop qos priority levelNickey Yang Nickey Yang
Isp-camera preview image will be broken when dual screen display mode. This patch set isp/vop qos level higher to solve this problem. We have verified this patch on rk3288-miniarm board. Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2017-01-12arm64: rk3399: update rockchip_get_cru APIKever Yang
rk3399 has two clock-controller: cru and pmucru, update the rockchip_get_crui() API, and rockchip_get_clk() do not used for other module. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2017-01-12dts: arm64: rk3399: add max-frequency for sdhciKever Yang
Add 'max-frequency' for sdhci node for clock init. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2017-01-12mmc: rockchip_sdhci: add clock init for mmcKever Yang
Init the clock rate to max-frequency from dts with clock driver api. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2017-01-12rockchip: Fix veyron-minnie's Kconfig descriptionMartin Michlmayr
The veyron-minnie Kconfig referred to jerry by mistake. Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-01-12rockchip: configs: make rk3036 env config same as rk3288Jacob Chen
To make rockchip soc keep the same partition map Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-01-12rockchip: configs: correct env offset when enable ↵Jacob Chen
CONFIG_ROCKCHIP_SPL_BACK_TO_BROM With CONFIG_ROCKCHIP_SPL_BACK_TO_BROM enabled, the environment is inside u-boot. So solve it by moving environment after u-boot. Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-01-12rockchip: dts: popmetal: add usb host power supply nodeKever Yang
The popmetal board using a HOST_VBUS_DRV gpio signal to control the USB host port 5V power, add a fix regulator and pinctrl for it, and enable the USB host1 controller with the vbus-supply. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org> Added rockchip: tag: Signed-off-by: Simon Glass <sjg@chromium.org>
2017-01-12rockchip: config: popmetal: enable the USB host controller and functionKever Yang
RK3288 using the dwc2 USB host controller, enable it and other usb host funtion like storage and ether. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Simon Glass <sjg@chromium.org> Added rockchip: tag: Signed-off-by: Simon Glass <sjg@chromium.org>
2017-01-12rockchip: board: popmetal: de-assert the host rst pin in board initKever Yang
The PopMetal board have a on board FE1.1 usb 2.0 hub which connect to the usb host port, we need to de-assert its reset pin to enable it. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Simon Glass <sjg@chromium.org> Added rockchip: tag: Signed-off-by: Simon Glass <sjg@chromium.org>
2017-01-11SPL: Adjust more debug prints for ulong entry_pointTom Rini
With entry_point now being an unsigned long we need to adapt the last two debug prints to use %lX not %X. Fixes: 11e1479b9e67 ("SPL: make struct spl_image 64-bit safe") Signed-off-by: Tom Rini <trini@konsulko.com>
2017-01-11power_i2c.c: Fix unused variable warningTom Rini
The variable ret was added but never set as we did not make calls to other functions that we needed to check the return value on. Fixes: 505cf4750ae5 ("power: change from meaningless value to error number") Signed-off-by: Tom Rini <trini@konsulko.com>
2017-01-11Merge tag 'xilinx-for-v2017.03' of git://www.denx.de/git/u-boot-microblazeTom Rini
Xilinx changes for v2017.03 - ATF handoff - DT syncups - gem: Use wait_for_bit(), add simple clk support - Simple clk driver for ZynqMP - Other small changes
2017-01-11ARM: sunxi: remove bare default for CONFIG_MMCMasahiro Yamada
The bare default entry is wrong. Just remove it since the (real) entry in drivers/mmc/Kconfig has "default ARM || PPC || SANDBOX". Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Marek Vasut <marex@denx.de>
2017-01-11mmc: move more driver config options to KconfigMasahiro Yamada
Move (and rename) the following CONFIG options to Kconfig: CONFIG_DAVINCI_MMC (renamed to CONFIG_MMC_DAVINCI) CONFIG_OMAP_HSMMC (renamed to CONFIG_MMC_OMAP_HS) CONFIG_MXC_MMC (renamed to CONFIG_MMC_MXC) CONFIG_MXS_MMC (renamed to CONFIG_MMC_MXS) CONFIG_TEGRA_MMC (renamed to CONFIG_MMC_SDHCI_TEGRA) CONFIG_SUNXI_MMC (renamed to CONFIG_MMC_SUNXI) They are the same option names as used in Linux. This commit was created as follows: [1] Rename the options with the following command: find . -name .git -prune -o ! -path ./scripts/config_whitelist.txt \ -type f -print | xargs sed -i -e ' s/CONFIG_DAVINCI_MMC/CONFIG_MMC_DAVINCI/g s/CONFIG_OMAP_HSMMC/CONFIG_MMC_OMAP_HS/g s/CONFIG_MXC_MMC/CONFIG_MMC_MXC/g s/CONFIG_MXS_MMC/CONFIG_MMC_MXS/g s/CONFIG_TEGRA_MMC/CONFIG_MMC_SDHCI_TEGRA/g s/CONFIG_SUNXI_MMC/CONFIG_MMC_SUNXI/g ' [2] Commit the changes [3] Create entries in driver/mmc/Kconfig. (copied from Linux) [4] Move the options with the following command tools/moveconfig.py -y -r HEAD \ MMC_DAVINCI MMC_OMAP_HS MMC_MXC MMC_MXS MMC_SDHCI_TEGRA MMC_SUNXI [5] Sort and align drivers/mmc/Makefile for readability Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Marek Vasut <marex@denx.de>
2017-01-11ARM: davinci: remove unused CONFIG_DAVINCI_MMC_SD1Masahiro Yamada
This CONFIG is not referenced from anywhere. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Marek Vasut <marex@denx.de>
2017-01-11mmc: move DesignWare-based drivers to KconfigMasahiro Yamada
Move (and rename) the following CONFIG options to Kconfig: CONFIG_EXYNOS_DWMMC (renamed to CONFIG_MMC_DW_EXYNOS) CONFIG_HIKEY_DWMMC (renamed to CONFIG_MMC_DW_K3) CONFIG_SOCFPGA_DWMMC (renamed to CONFIG_MMC_DW_SOCFPGA) The "HIKEY" is a board name, so it is not suitable for the MMC controller name. I am following the name used in Linux. This commit was generated as follows: [1] Rename the config options with the following command: find . -name .git -prune -o ! -path ./scripts/config_whitelist.txt \ -type f -print | xargs sed -i -e ' s/CONFIG_EXYNOS_DWMMC/CONFIG_MMC_DW_EXYNOS/g s/CONFIG_HIKEY_DWMMC/CONFIG_MMC_DW_K3/g s/CONFIG_SOCFPGA_DWMMC/CONFIG_MMC_DW_SOCFPGA/g ' [2] Commit the changes [3] Create the entries in drivers/mmc/Kconfig (with default y for EXYNOS and SOCFPGA) [4] Run the following: tools/moveconfig.py -y -r HEAD MMC_DW_EXYNOS MMC_DW_K3 MMC_DW_SOCFPGA [5] Sort and align drivers/mmc/Makefile for readability [6] Clean-up doc/README.socfpga by hand Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Marek Vasut <marex@denx.de>
2017-01-11mmc: move CONFIG_DWMMC to Kconfig, renaming to CONFIG_MMC_DWMasahiro Yamada
This commit was created as follows: [1] Rename the option with the following command: find . -name .git -prune -o ! -path ./scripts/config_whitelist.txt \ -type f -print | xargs sed -i -e 's/CONFIG_DWMMC/CONFIG_MMC_DW/g' [2] create the entry for MMC_DW in drivers/mmc/Kconfig (the prompt and help were copied from Linux) [3] run "tools/moveconfig.py -y MMC_DW" [4] add "depends on MMC_DW" to the MMC_DW_ROCKCHIP entry [5] Clean-up doc/README.socfpga by hand Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Marek Vasut <marex@denx.de>
2017-01-11mmc: rename CONFIG_ROCKCHIP_DWMMC to CONFIG_MMC_DW_ROCKCHIPMasahiro Yamada
I am trying to make all DesignWare-based driver options prefixed with CONFIG_MMC_DW_. This commit was generated as follows: find . -name .git -prune -o -type f -print | \ xargs sed -i -e 's/ROCKCHIP_DWMMC/MMC_DW_ROCKCHIP/g' Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Marek Vasut <marex@denx.de>
2017-01-11ARM: socfpga: remove unused CONFIG option and cleanup README.socfpgaMasahiro Yamada
CONFIG_SOCFPGA_DWMMC_FIFO_DEPTH is defined in the socfpga_common.h, but not referenced at all. Remove. Also, clean-up the README.socfpga. CONFIG_MMC should not be defined in the header since it was moved to Kconfig by commit c27269953b94 ("mmc: complete unfinished move of CONFIG_MMC"). I see no grep hit for the others. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Marek Vasut <marex@denx.de>
2017-01-11power: change from meaningless value to error numberJaehoon Chung
'-1' is absolutely meaningless value. This patch changed from meaningless value to error number. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-01-11mmc: uniphier-sd: fix Kconfig dependencyMasahiro Yamada
Some MMC drivers describe operations with the DM_MMC_OPS form, but there are still several drivers with older implementation. We can not compile drivers from different groups at the same time because the core framework is shared with #ifdef CONFIG_DM_MMC_OPS. Every driver should have "depends on DM_MMC_OPS" (or !DM_MMC_OPS) explicitly to express which framework it is based on. This will avoid enabling drivers with incompatible interface at the same time. It is incorrect to make a driver "select DM_MMC_OPS". While we are here, add "depends on OF_CONTROL" as well because this driver can be configured only by Device Tree. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-01-11mmc: sdhci-cadence: add Cadence SD4HC supportMasahiro Yamada
Add a driver for the Cadence SD4HC SD/SDIO/eMMC Controller. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-01-11mmc: sdhci: combine the Host controller v3.0 feature into one conditionJaehoon Chung
It doesn't need to seperate the condition. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2017-01-11mmc: sdhci: remove the SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWERJaehoon Chung
Ther is no usage anywhere. It doesn't need to maintain this bit. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2017-01-11mmc: sdhci: use the bitops APIs in sdhci.hJaehoon Chung
The using the bitops is too easy controlling than now. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2017-01-11mmc: sdhci: move the callback function into sdhci_opsJaehoon Chung
callback function should be moved into sdhci_ops struct. Other controller can use these ops for controlling clock or their own specific register. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>