summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2018-04-27Remove unnecessary instances of DECLARE_GLOBAL_DATA_PTRTom Rini
We have a large number of places where while we historically referenced gd in the code we no longer do, as well as cases where the code added that line "just in case" during development and never dropped it. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-04-27Convert CONFIG_SPI to KconfigAdam Ford
This converts the following to Kconfig: CONFIG_SPI This partly involves updating code that assumes that CONFIG_SPI implies things that are specific to the MPC8xx SPI driver. For now, just update the CONFIG tests. This also involves reworking the default for CONFIG_SYS_DEF_EEPROM_ADDR so that we don't set it when we cannot make a reasonable default, as it does not cause any compile failures. Signed-off-by: Adam Ford <aford173@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2018-04-26Merge git://git.denx.de/u-boot-usbTom Rini
2018-04-27arm: socfpga: Fix with the correct polling on bit is setTien Fong Chee
Commit 2baa997240d ("arm: socfpga: Add FPGA driver support for Arria 10") Polling on wrong cleared bit. Fix with correct polling on bit is set. Fixes: 2baa997240d ("arm: socfpga: Add FPGA driver support for Arria 10") Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
2018-04-26usb: gadget: composite: fix NULL pointer when a non standard request is receivedChristophe Kerello
In case usb configuration is unknown (cdev->config == NULL), non standard request should not be processed. Remove also the cdev->config check below which will never happen. This issue was seen using ums feature. Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-04-26usb: host: dwc3: fix phys initNeil Armstrong
When no PHYs are declared in the dwc3 node, the phy init fails. This patch checks if the "phys" property is presend and reports the error returned by dev_count_phandle_with_args(). This patchs also fixes the styles issues added in last commit. This patch should fix the DWC3 support on the UniPhier SoC family. Fixes: 7c839ea70c49 ("usb: host: dwc3: Add support for multiple PHYs") Reported-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-04-26Merge git://git.denx.de/u-boot-rockchipTom Rini
2018-04-25Merge git://git.denx.de/u-boot-spiTom Rini
2018-04-25rockchip: rv1108: add ofdata_to_platdata() method for driverKever Yang
Parse of data in dedicated api instead of in probe(). The clk_set_rate() may be called before the clk driver is probed, after core support set default clock. This patch fix system abort issue since: f4fcba5 clk: implement clk_set_defaults() Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-sytems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-sytems.com>
2018-04-25rockchip: rk3128: add ofdata_to_platdata() method for driverKever Yang
Parse of data in dedicated api instead of in probe(). The clk_set_rate() may be called before the clk driver is probed, after core support set default clock. This patch fix system abort issue since: f4fcba5 clk: implement clk_set_defaults() Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-sytems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-sytems.com>
2018-04-25rockchip: rk3036: add ofdata_to_platdata() method for driverKever Yang
Parse of data in dedicated api instead of in probe(). The clk_set_rate() may be called before the clk driver is probed, after core support set default clock. This patch fix system abort issue since: f4fcba5 clk: implement clk_set_defaults() Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2018-04-25rockchip: timer: add compatible strings for rk3188 and rk3288Philipp Tomsich
The DM driver for ockchip timer blocks is also applicable to the RK3188 and RK3288 timer blocks: add 'rockchip,rk3188-timer' and 'rockchip,rk3288-timer' to its compatible list to support devices claiming compatibility with these. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2018-04-25rockchip: clk: rk3288: add clk_enable function and support USB HOST0/HSICWadim Egorov
The generic ehci-driver (ehci-generic.c) will try to enable the clocks listed in the DTSI. If this fails (e.g. due to clk_enable not being implemented in a driver and -ENOSYS being returned by the clk-uclass), the driver will bail our and print an error message. This implements a minimal clk_enable for the RK3288 and supports the clocks mandatory for the EHCI controllers; as these are enabled by default we simply return success. Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2018-04-24Merge git://git.denx.de/u-boot-videoTom Rini
2018-04-24video-uclass: Fix logical-not-parentheses warningTom Rini
With clang-4.0 and later we see: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] if ((!gd->flags & GD_FLG_RELOC)) ^ ~ And while the compiler suggests adding parenthesis around gd->flags, a reading of the code says that we want to know when GD_FLG_RELOC is not set and then return. Cc: Simon Glass <sjg@chromium.org> Cc: Anatolij Gustschin <agust@denx.de> Signed-off-by: Tom Rini <trini@konsulko.com>
2018-04-23mmc: Staticize sd_select_bus_widthMarek Vasut
Staticize the function since it's only used in mmc.c . Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Tom Rini <trini@konsulko.com>
2018-04-23Merge git://git.denx.de/u-boot-uniphierTom Rini
2018-04-24clk: uniphier: disable SPL_CLKMasahiro Yamada
The last clock consumer in SPL, SD/eMMC driver, gave up using the clock driver. The clock driver is only used in U-Boot proper. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-04-24mmc: uniphier-sd: skip clock set-up for SPLMasahiro Yamada
The size of SPL is hitting the limit (64KB) for uniphier_v7_defconfig. When booting from SD/eMMC, obviously its clock has been properly set up by the boot ROM. Acutually, no need to re-initialize the clock in SPL. Using a clock driver would generalize the SoC specific code, but solving the memory footprint problem would win. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-04-24mmc: tmio: move clk_enable() to each driver's probe functionMasahiro Yamada
I need to differentiate the clock handling for uniphier-sd. Move it to each driver's probe function from the tmio common code so that renesas-sdhi will not be affected. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-04-23Merge tag 'xilinx-for-v2018.05-rc3' of git://git.denx.de/u-boot-microblazeTom Rini
Xilinx fixes for v2018.05-rc3 - Fix nand initialization - Runtime ddr detection for static DDR setting - Enable rewriting env locations - Sync defconfig for zc770 xm011 - Remove useless ioremap in watchdog - Check return value from soc_clk_dump()
2018-04-23mmc: avoid division by zero in meson_mmc_config_clockHeinrich Schuchardt
The Odroid C2 fails to read from mmc with U-Boot v2018.03. The change avoids a division by zero. The fix was suggested by Jaehoon in https://lists.denx.de/pipermail/u-boot/2018-January/318577.html Reported-by: Vagrant Cascadian <vagrant@debian.org> Suggested-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Tested-by: Vagrant Cascadian <vagrant@debian.org>
2018-04-23watchdog: cadence: Remove useless ioremapMichal Simek
There is no need to call ioremap. Also reg pointer is completely unused in the driver. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-04-23nand: zynq: Cleanup initializationEzequiel Garcia
CONFIG_NAND_ZYNQ selects CONFIG_SYS_NAND_SELF_INIT, so the driver doesn't have to play any ifdef game. Also, we can mark zynq_nand_init() as static and get rid of the mach-specific nand.h header. This is really a revert of: "mtd: zynq: nand: Move board_nand_init() function to board.c" (sha1: 310995d9f91ae56082b49be06fe8c3d01424f8f6) Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Reviewed-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-04-23nand: zynq: Fix driver initializationEzequiel Garcia
This driver is currently broken, refusing to initialize properly. The reason is that get_nand_dev_by_index() was being called before nand_register(), thus returning a pointer into uninitialized memory. In other words, the struct mtd_info used by the driver is total junk. Fix it by getting the correct struct mtd_info, via nand_to_mtd() on the driver's struct nand_chip. Tested on a custom board, where the CPU is halted without this patch. Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Reviewed-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-04-23spi: dw: invert wait condition in dw_spi_xferEugeniy Paltsev
While switching to readl_poll_timeout macros from custom code the waiting condition was accidently inverted, so it was pure luck that this code works at least in some conditions. Fix that by inverting exit condition for readl_poll_timeout. Fixes: c6b4f031d9 ("DW SPI: fix tx data loss on FIFO flush") Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-04-22Merge git://git.denx.de/u-boot-usbTom Rini
2018-04-21usb: dwc3-of-simple: fix error check of clk_get_bulk when disabledNeil Armstrong
The disabled clk API returns -ENOSYS unlike the reset API returning -ENOTSUPP. Fixes: ca7fdc8b1267 ("usb: host: Add simple of glue driver for DWC3 USB Controllers integration") Reported-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-04-21usb: dwc3-of-simple: Add support for DRA7/AM57 platforms.Jean-Jacques Hiblot
Add the compatibility with "ti,dwc3" and enable it by default if DM_USB is enabled. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2018-04-21usb: dwc3-of-simple: Fix dependenciesJean-Jacques Hiblot
This simple glue layer does not require CONFIG_MISC, but it does require CONFIG_DM_USB. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2018-04-21mmc: sh_mmcif: Add Kconfig entryMarek Vasut
Add Kconfig entry for SH MMCIF driver. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Jaehoon Chung <jh80.chung@samsung.com>
2018-04-21mmc: sh_mmcif: Add DM and DT probing supportMarek Vasut
Add MMC DM and DT probing support into the SH MMCIF driver. This patch abstracts out the common bits of the send command and set ios functions, so they can be used both by DM and non DM setups and adds the DM probe support. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Jaehoon Chung <jh80.chung@samsung.com>
2018-04-21clk: renesas: Minor clean up of the R8A7794 clock driverMarek Vasut
The initconst is not used in U-Boot, drop it. The r8a7794_crit_mod_clks is also not used in U-Boot, so drop it too. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2018-04-21clk: renesas: Minor clean up of the R8A7792 clock driverMarek Vasut
The initconst is not used in U-Boot, drop it. The r8a7792_crit_mod_clks is also not used in U-Boot, so drop it too. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2018-04-19sf: Add Spansion s25fl208k entrySean Nyekjaer
Add entry for Spansion s25fl208k part. Signed-off-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk> Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-04-19mtd: sf: add support for sst26wf016, sst26wf032, sst26wf064Eugeniy Paltsev
This commit adds support for the SST sst26wf016, sst26wf032 and sst26wf064 flash IC. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-04-19mtd: sf: Add support of sst26wf* flash ICs protection opsEugeniy Paltsev
sst26wf flash series block protection implementation differs from other SST series, so add specific implementation flash_lock/flash_unlock/flash_is_locked functions for sst26wf flash ICs. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2018-04-18Merge git://git.denx.de/u-boot-uniphierTom Rini
2018-04-18reset: uniphier: add ethernet reset control supportKunihiko Hayashi
Add reset lines for ethernet controller on each SoC. Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-04-18clk: uniphier: add ethernet clock control supportKunihiko Hayashi
Add clock control for ethernet controller on each SoC. Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-04-17Merge git://git.denx.de/u-boot-socfpgaTom Rini
2018-04-17clk: fix clk_get_bulk when phandle errorNeil Armstrong
This fixes the Coverity Defect CID 175347 when dev_count_phandle_with_args() returns a negative value. Fixes: a855be87da49 ("clk: Add get/enable/disable/release for a bulk of clocks") Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-04-17reset: fix reset_get_bulk when phandle errorNeil Armstrong
This fixes the Coverity Defect CID 175348 when dev_count_phandle_with_args() returns a negative value. Fixes: 0c28233903b5 ("reset: Add get/assert/deassert/release for bulk of reset signals") Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-04-17i2c: designware: add reset ctrl to driverDinh Nguyen
Add code to look for a reset manager property. Specifically, look for the reset-names of 'i2c'. A reset property is an optional feature, so only print out a warning and do not fail if a reset property is not present. If a reset property is discovered, then use it to deassert, thus bringing the IP out of reset. Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
2018-04-17reset: socfpga: add reset driver for SoCFPGA platformDinh Nguyen
Add a DM compatible reset driver for the SoCFPGA platform. Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
2018-04-17mmc: mv_sdhci: zero out sdhci_host structureMatt Pelland
The mv_sdhci driver was not zeroing the sdhci_host structure it allocates causing random access violations in parts of the mmc core where the "ops" member pointers are checked and called if not NULL. Signed-off-by: Matt Pelland <mpelland@starry.com> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
2018-04-16serial: Remove duplicated line in MakefilePatrice Chotard
The line "-obj-$(CONFIG_STM32_SERIAL) += serial_stm32.o" is found twice in Makefile. Fixes: ae74de0dfd45 ("serial: stm32: Rename serial_stm32x7.c to serial_stm32.c" Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Acked-by: Vikas Manocha <vikas.manocha@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-04-16Merge git://git.denx.de/u-boot-x86Tom Rini
2018-04-16pci: video: Only print out when everything is OKBin Meng
If video initialization fails, the "Video:" output message will be mixed with the next console log. Change to print out such message only when everything is OK, which improves the boot log readability. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-04-16video: vesa: Change default FRAMEBUFFER_VESA_MODEBin Meng
This changes the default FRAMEBUFFER_VESA_MODE to use 32-bit pixel format for better VxWorks compatibility. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>