summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2016-09-09Merge branch 'master' of git://www.denx.de/git/u-boot-imxTom Rini
2016-09-06regulator: fixed: obey startup delayJohn Keeping
When enabling a fixed regulator, it may take some time to rise to the correct voltage. If we do not delay here then subsequent operations will fail. Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-09-06meson: odroid-c2: enable Ethernet support through the device treeBeniamino Galvani
Remove the device definition from board file, update the driver with the new compatible property and update config with necessary options. Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-09-06pinctrl: add driver for meson-gxbb pin controllerBeniamino Galvani
Add a pin controller driver for Meson GXBB adapted from Linux kernel. Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-09-06pinctrl: generic: scan for "pins" and "groups" properties in sub-nodesBeniamino Galvani
In cases where the pins and groups definitions are in a sub-node, as: uart_a { mux { groups = "uart_tx_a", "uart_rx_a"; function = "uart_a"; }; }; pinctrl_generic_set_state_subnode() returns an error for the top-level node and pinctrl_generic_set_state() fails. Instead, return success so that the child nodes are tried. Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-09-06serial: bcm283x_mu: Detect disabled serial deviceAlexander Graf
On the raspberry pi, you can disable the serial port to gain dynamic frequency scaling which can get handy at times. However, in such a configuration the serial controller gets its rx queue filled up with zero bytes which then happily get transmitted on to whoever calls getc() today. This patch adds detection logic for that case by checking whether the RX pin is mapped to GPIO15 and disables the mini uart if it is not mapped properly. That way we can leave the driver enabled in the tree and can determine during runtime whether serial is usable or not, having a single binary that allows for uart and non-uart operation. Signed-off-by: Alexander Graf <agraf@suse.de> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-09-06bcm2835_gpio: Implement GPIOF_FUNCAlexander Graf
So far we could only tell the gpio framework that a GPIO was mapped as input or output, not as alternative function. This patch adds support for determining whether a function is mapped as alternative. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
2016-09-06mtd: nand: mxs: fix cache alignment for cache lines >32Stefan Agner
Currently the command buffer gets allocated with a size of 32 bytes. This causes warning messages on systems with cache lines bigger than 32 bytes: CACHE: Misaligned operation at range [9df17a00, 9df17a20] Define command buffer to be at least 32 bytes, but more if cache line is bigger. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Reviewed-by: Stefano Babic <sbabic@denx.de>
2016-09-01nand: Fix some more NULL name testsScott Wood
Now that nand_info[] is an array of pointers we need to test the pointer itself rather than using name as a proxy for NULLness. Fixes: b616d9b0a708eb9 ("nand: Embed mtd_info in struct nand_chip") Signed-off-by: Scott Wood <oss@buserror.net> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Tony Lindgren <tony@atomide.com> Acked-by: Tony Lindgren <tony@atomide.com>
2016-09-01mtd: nand: pxa3xx: use nand_set_controller_dataChris Packham
In commit 17cb4b8f327e ("mtd: nand: Add+use mtd_to/from_nand and nand_get/set_controller_data") the assignment of mtd->priv was removed but was not replaced. This adds the required nand_set_controller_data() call. Signed-off-by: Chris Packham <judge.packham@gmail.com>
2016-08-28Merge branch 'master' of git://git.denx.de/u-boot-uniphierTom Rini
2016-08-28ARM: uniphier: change UNIPHIER_SERIAL to default y optionMasahiro Yamada
This is very likely to be necessary for normal use cases. Set its default to 'y' for shorter defconfig files. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-28mmc: uniphier-sd: just return if already set to desired clock rateMasahiro Yamada
With this, we can save unnecessary udelay(). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-28mmc: uniphier-sd: return error code if unsupported width is givenMasahiro Yamada
With the CONFIG_DM_MMC_OPS migration, the .set_ios callback can return an integer now. Return an appropriate error value rather than sudden death by BUG(). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-28mmc: uniphier-sd: move uniphier_sd_init() belowMasahiro Yamada
No more reason to define this function above the ops structure. Move it near the caller. Also, change its return type to void because it never fails. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-28mmc: uniphier-sd: migrate to CONFIG_DM_MMC_OPSMasahiro Yamada
Catch up with the DM migration. As struct dm_mmc_ops does not have .init callback, call the init function directly from the probe function. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-28mmc: uniphier-sd: add static qualifiers to probe and remove callbacksMasahiro Yamada
They are both only referenced in this file. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-26sunxi: display: Use PWM to drive backlight where applicableHans de Goede
When the backlight's pwm input is connected to a pwm output of the SoC, actually use pwm to drive the backlight. The mean reason for doing this is to fix the backlight turning off for aprox. 1 second while the kernel is booting. This is caused by the kernel actually using pwm to drive the backlight, so that it can dim the backlight. First the pwm driver loads and switches the pinmux for the pin driving the backlight's pwm input to the pwm controller. Then about 1s later the actual backlight driver loads and tells the pwm driver to actually update the pwm settings, which have a power-on-reset value of "off". An additional advantage is that this allows us to initatiate the backlight at 80%, which is the kernel default, avoiding a brightness change while the kernel loads. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed by: Peter Korsgaard <peter@korsgaard.com>
2016-08-26Merge branch 'master' of git://git.denx.de/u-boot-i2cTom Rini
2016-08-26i2c: mvtwsi: Fix order of address bytes (high to low)Stefan Roese
Patch f8a10ed1 [i2c: mvtwsi: Make address length variable] accidentally inverted the sequence of address bytes sent to the I2C device. This patch corrects this by sending the highest byte first and the lowest byte last again. Tested on theadorable Armada-XP board. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Mario Six <mario.six@gdsys.cc> Cc: Heiko Schocher <hs@denx.de>
2016-08-25spi: tegra: fix hang in set_mode()Stephen Warren
In tegra20_slink.c, the set_mode() function may be executed before the SPI bus is claimed the first time, and hence the clocks to the SPI controller may not be running. If so, any register read/write at this time will hang the CPU. Fix this by ensuring the clock is running as soon as the driver is probed. This is observed on the Tegra30 Beaver board. Apply the same clock initialization fix to all other Tegra SPI drivers so that if set_mode() is ever implemented there, the same bug will not appear. Note that tegra114_spi.c already operates in this fashion. The clock manipulation code is copied from claim_bus() to probe() rather than moved. This ensures that any calls to set_speed() take effect; the clock can't be set once during probe and left unchanged. Fixes: 5cb1b7b395c0 ("spi: tegra20: Add support for mode selection") Cc: Mirza Krak <mirza.krak@hostmobility.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
2016-08-25ARM: tegra: remove stale nvidia, bpmp I2C DT propertyStephen Warren
The nvidia,bpmp property is left over from an old BPMP I2C binding, and shouldn't be present. Remove it from the SoC DT file, and update the I2C driver not to parse it; the value wasn't used for anything any more anyway. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
2016-08-25ARM: tegra: fix Tegra186 SDHCI clock/reset namesStephen Warren
The Tegra SDHCI binding dictates that the reseet name for the Tegra SDHCI clock be "sdhci" not "sdmmc", and that the clock is accessed by index rather than by name. Fix the Tegra186 DT and MMC driver to honor this. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
2016-08-25ARM: tegra: fix Tegra186 I2C clock nameStephen Warren
The Tegra I2C binding dictates that the clock name for the Tegra I2C clock be "div-clk" not "i2c". Fix the Tegra186 DT and I2C driver to honor this. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
2016-08-22net: davinci_emac: Restore the internal MDIO accessors return valueskarl beldan
The spatch series converting legacy drivers from miiphy_register to mdio_register changed the return convention of the davinci_emac internal MDIO accessors, making the internal code relying on it misbehaving: no mdiodev get registered and U-Boot crashes when using net cmds in the context of the old legacy net API. ATM davinci_emac_initialize and cpu_eth_init don't return a proper value in that case but fixing them would not avoid the crash. This change is just a follow-up to the spatch pass, the MDIO accessors of the mdiodev introduced by the spatch pass retain their proper values. Signed-off-by: Karl Beldan <karl.beldan+oss@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2016-08-22net/fm: Remove unused code of FMan QMIHou Zhiqiang
The QMan is not used in FMan IM mode, so no QMI enqueue or QMI dequeue are performed. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2016-08-22net: davinci_emac: Invalidate only the received portion of a bufferkarl beldan
ATM when receiving a packet the whole buffer is invalidated, this change optimizes this behaviour. Signed-off-by: Karl Beldan <karl.beldan+oss@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com>
2016-08-22net: davinci_emac: Round up top tx buffer boundaries for dcache opskarl beldan
check_cache_range() warns that the top boundaries are not properly aligned when flushing or invalidating the buffers and make these operations fail. This gets rid of the remaining warnings: CACHE: Misaligned operation at range Signed-off-by: Karl Beldan <karl.beldan+oss@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com>
2016-08-22net: davinci_emac: Remove useless dcache ops on descriptorskarl beldan
ATM the rx and tx descriptors are handled as cached memory while they lie in a dedicated RAM of the SoCs, which is an uncached area. Removing the said dcache ops, while optimizing the logic and clarifying the code, also gets rid of most of the check_cache_range() incurred warnings: CACHE: Misaligned operation at range Signed-off-by: Karl Beldan <karl.beldan+oss@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2016-08-20Merge branch 'rmobile' of git://git.denx.de/u-boot-shTom Rini
[trini: Drop CMD_BOOTI as it's now on by default on ARM64] Signed-off-by: Tom Rini <trini@konsulko.com>
2016-08-20pinctrl: fix typos in comment blocks of pinconfig_post_bind()Masahiro Yamada
'-' is never used in function names. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-20fastboot: implement KconfigSteve Rae
implement Kconfig for the 'fastboot' feature set Signed-off-by: Steve Rae <steve.rae@raedomain.com>
2016-08-17arm: rmobile: Add BLANCHE board supportmasakazu.mochizuki.wd@hitachi.com
BLANCHE is development board based on R-Car V2H SoC (R8A7792) This commit supports the following periherals: - SCIF, Ethernet, QSPI, MMC Signed-off-by: Masakazu Mochizuki <masakazu.mochizuki.wd@hitachi.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2016-08-17mmc: rmobile: add a compiler barrierYannick Gicquel
Building w/ GCC v5.2, the SD card access is broken due to invalid data in the response command reconstructed at the end of sh_sdhci_get_response(). Add a memory barrier between the two main steps of this function to ensure the resp[] table content is consistent before bits reordering. This fix has been tested Ok on Porter board rev1.0 using v2016.03 release. Signed-off-by: Yannick Gicquel <yannick.gicquel@iot.bzh>
2016-08-17serial: sh: Add support R8A7795Hiroyuki Yokoyama
This can be used in the same way as other R-CAR serial setting. Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2016-08-17ARM: Rmobile: Rename CONFIG_RMOBILE to CONFIG_ARCH_RMOBILENobuhiro Iwamatsu
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2016-08-16Merge branch 'master' of git://git.denx.de/u-boot-x86Tom Rini
2016-08-16i2c: intel_i2c: SMBus driver PCI addition (e.g. BayTrail)Stefan Roese
This patch adds support for the SMBus block read/write functionality. Other protocols like the SMBus quick command need to get added if this is needed. This patch also removed the SMBus related defines from the Ivybridge pch.h header. As they are integrated in this driver and should be used from here. This change is added in this patch to avoid compile breakage to keep the source git bisectable. Tested on a congatec BayTrail board to configure the SMSC2513 USB hub. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Simon Glass <sjg@chromium.org> Cc: Heiko Schocher <hs@denx.de> Cc: George McCollister <george.mccollister@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-08-16misc: Add simple driver for some Nuvoton NCT6102D devicesStefan Roese
This simple driver provides some functions to control some of the integrated devices. The watchdog is enabled per default. This driver adds a function to disable the watchdog. Also the internal legacy UART (io address 0x3f8/0x2f8) is enabled per default. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Cc: Simon Glass <sjg@chromium.org>
2016-08-16mmc: mmc_legacy: fix the compiler error with disabled CONFIG_DM_MMC_OPSJaehoon Chung
To prevent the compiler error, split the checking condition whether cfg->ops is NULL or not. It's more clearly, because it's not included in mmc_config structure when CONFIG_DM_MMC_OPS is disabled. drivers/mmc/mmc_legacy.c: In function ‘mmc_create’: drivers/mmc/mmc_legacy.c:118:31: error: ‘const struct mmc_config’ has no member named ‘ops’ drivers/mmc/mmc_legacy.c:118:58: error: ‘const struct mmc_config’ has no member named ‘ops’ make[1]: *** [drivers/mmc/mmc_legacy.o] Error 1 Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-08-16mmc: send CMD0 before CMD1 for some MMC cardsYangbo Lu
When the MMC framework was added in u-boot, the mmc_go_idle was added before mmc_send_op_cond_iter in function mmc_send_op_cond annotating that some cards seemed to need this. Actually, we still need to do this in function mmc_complete_op_cond for those cards. This has been verified on Micron MTFC4GACAECN eMMC chip. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2016-08-16drivers: mmc: omap_hsmmc: fix build breakageSekhar Nori
structure member 'cd_inverted' of omap_hsmmc_data is available only when OMAP_HSMMC_USE_GPIO is defined. When CONFIG_DM_MMC is defined, but not CONFIG_OMAP_GPIO, this will cause build breakage in omap_hsmmc driver of the sort: CC drivers/mmc/omap_hsmmc.o ../drivers/mmc/omap_hsmmc.c: In function 'omap_hsmmc_ofdata_to_platdata': ../drivers/mmc/omap_hsmmc.c:1763:6: error: 'struct omap_hsmmc_data' has no member named 'cd_inverted' priv->cd_inverted = fdtdec_get_bool(fdt, node, "cd-inverted"); ^ Fix this by accessing cd_inverted only when OMAP_HSMMC_USE_GPIO is defined. Signed-off-by: Sekhar Nori <nsekhar@ti.com> Acked-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-08-15xtensa: add support for the 'xtfpga' evaluation boardChris Zankel
The 'xtfpga' board is actually a set of FPGA evaluation boards that can be configured to run an Xtensa processor. - Avnet Xilinx LX60 - Avnet Xilinx LX110 - Avnet Xilinx LX200 - Xilinx ML605 - Xilinx KC705 These boards share the same components (open-ethernet, ns16550 serial, lcd display, flash, etc.). Signed-off-by: Chris Zankel <chris@zankel.net> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-08-15Merge branch 'master' of git://git.denx.de/u-boot-atmelTom Rini
2016-08-15mmc: atmel_sdhci: Convert to the driver model supportWenyou Yang
Convert the driver to the driver model while retaining the existing legacy code. This allows the driver to support boards that have converted to driver model as well as those that have not. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2016-08-15dm: atmel: Add driver model support for the ehci driverWenyou Yang
Add driver model support while retaining the existing legacy code. This allows the driver to support boards that have converted to driver model as well as those that have not. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Acked-by: Simon Glass <sjg@chromium.org>
2016-08-15pinctrl: at91-pio4: Add pinctrl driverWenyou Yang
AT91 PIO4 controller is a combined gpio-controller, pin-mux and pin-config module. The peripheral's pins are assigned through per-pin based muxing logic. The pin configuration is performed on specific registers which are shared along with the gpio controller. So regard the pinctrl device as a child of atmel_pio4 device. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Andreas Bießmann <andreas@biessmann.org>
2016-08-15gpio: atmel_pio4: Rework to support DM & DTWenyou Yang
Rework the driver to support driver model and device tree, and support to regard the pio4 pinctrl device as a child of atmel_pio4 device. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-08-15gpio: atmel_pio4: Move PIO4 definitions to head fileWenyou Yang
In order to make these PIO4 definitions shared with AT91 PIO4 pinctrl driver, move them from the existing gpio driver to the head file, and rephrase them. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-08-15Merge branch 'master' of git://git.denx.de/u-boot-netTom Rini