summaryrefslogtreecommitdiff
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Remove unnecessary instances of DECLARE_GLOBAL_DATA_PTRTom Rini2018-04-27185-365/+0
| | | | | | | | 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>
* Convert CONFIG_SPI to KconfigAdam Ford2018-04-274-22/+5
| | | | | | | | | | | | | | 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>
* Merge git://git.denx.de/u-boot-usbTom Rini2018-04-262-11/+17
|\
| * usb: gadget: composite: fix NULL pointer when a non standard request is receivedChristophe Kerello2018-04-261-1/+4
| | | | | | | | | | | | | | | | | | | | | | 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>
| * usb: host: dwc3: fix phys initNeil Armstrong2018-04-261-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | arm: socfpga: Fix with the correct polling on bit is setTien Fong Chee2018-04-271-5/+5
| | | | | | | | | | | | | | | | | | 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>
* | Merge git://git.denx.de/u-boot-rockchipTom Rini2018-04-265-3/+44
|\ \ | |/ |/|
| * rockchip: rv1108: add ofdata_to_platdata() method for driverKever Yang2018-04-251-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * rockchip: rk3128: add ofdata_to_platdata() method for driverKever Yang2018-04-251-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * rockchip: rk3036: add ofdata_to_platdata() method for driverKever Yang2018-04-251-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * rockchip: timer: add compatible strings for rk3188 and rk3288Philipp Tomsich2018-04-251-0/+2
| | | | | | | | | | | | | | | | | | 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>
| * rockchip: clk: rk3288: add clk_enable function and support USB HOST0/HSICWadim Egorov2018-04-251-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge git://git.denx.de/u-boot-spiTom Rini2018-04-254-1/+186
|\ \ | |/ |/|
| * spi: dw: invert wait condition in dw_spi_xferEugeniy Paltsev2018-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * sf: Add Spansion s25fl208k entrySean Nyekjaer2018-04-191-0/+1
| | | | | | | | | | | | | | Add entry for Spansion s25fl208k part. Signed-off-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk> Reviewed-by: Jagan Teki <jagan@openedev.com>
| * mtd: sf: add support for sst26wf016, sst26wf032, sst26wf064Eugeniy Paltsev2018-04-191-0/+3
| | | | | | | | | | | | | | | | 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>
| * mtd: sf: Add support of sst26wf* flash ICs protection opsEugeniy Paltsev2018-04-192-0/+181
| | | | | | | | | | | | | | | | | | | | 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>
* | Merge git://git.denx.de/u-boot-videoTom Rini2018-04-242-1/+1
|\ \
| * | video-uclass: Fix logical-not-parentheses warningTom Rini2018-04-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | treewide: fix up files incorrectly marked executableFabio Estevam2018-04-091-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Inspired by the following kernel commit: "commit 90fda63fa1156ec1bcfd7f9ca384cec221f70a21 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sat Apr 7 13:31:23 2018 -0700 treewide: fix up files incorrectly marked executable Joe Perches noted that we have a few source files that for some inexplicable reason (read: I'm too lazy to even go look at the history) are marked executable: drivers/gpu/drm/amd/amdgpu/vce_v4_0.c drivers/net/ethernet/cadence/macb_ptp.c A simple git command line to show executable C/asm/header files is this: git ls-files -s '*.[chsS]' | grep '^100755' and then you can fix them up with scripting by just feeding that output into: | cut -f2 | xargs chmod -x and commit it. Which is exactly what this commit does. Reported-by: Joe Perches <joe@perches.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>" Do the same in the U-Boot source tree. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
* | | mmc: Staticize sd_select_bus_widthMarek Vasut2018-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge git://git.denx.de/u-boot-uniphierTom Rini2018-04-234-23/+52
|\ \ \
| * | | clk: uniphier: disable SPL_CLKMasahiro Yamada2018-04-241-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | mmc: uniphier-sd: skip clock set-up for SPLMasahiro Yamada2018-04-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | mmc: tmio: move clk_enable() to each driver's probe functionMasahiro Yamada2018-04-243-22/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Merge tag 'xilinx-for-v2018.05-rc3' of git://git.denx.de/u-boot-microblazeTom Rini2018-04-232-10/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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()
| * | | | watchdog: cadence: Remove useless ioremapMichal Simek2018-04-231-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | nand: zynq: Cleanup initializationEzequiel Garcia2018-04-231-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | nand: zynq: Fix driver initializationEzequiel Garcia2018-04-231-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | mmc: avoid division by zero in meson_mmc_config_clockHeinrich Schuchardt2018-04-231-0/+3
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge git://git.denx.de/u-boot-usbTom Rini2018-04-222-2/+4
|\ \ \
| * | | usb: dwc3-of-simple: fix error check of clk_get_bulk when disabledNeil Armstrong2018-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb: dwc3-of-simple: Add support for DRA7/AM57 platforms.Jean-Jacques Hiblot2018-04-212-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb: dwc3-of-simple: Fix dependenciesJean-Jacques Hiblot2018-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | mmc: sh_mmcif: Add Kconfig entryMarek Vasut2018-04-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | mmc: sh_mmcif: Add DM and DT probing supportMarek Vasut2018-04-211-13/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | clk: renesas: Minor clean up of the R8A7794 clock driverMarek Vasut2018-04-211-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | clk: renesas: Minor clean up of the R8A7792 clock driverMarek Vasut2018-04-211-7/+3
|/ / / | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge git://git.denx.de/u-boot-uniphierTom Rini2018-04-182-0/+11
|\ \ \ | |_|/ |/| |
| * | reset: uniphier: add ethernet reset control supportKunihiko Hayashi2018-04-181-0/+5
| | | | | | | | | | | | | | | | | | | | | 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>
| * | clk: uniphier: add ethernet clock control supportKunihiko Hayashi2018-04-181-0/+6
| | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge git://git.denx.de/u-boot-socfpgaTom Rini2018-04-174-0/+123
|\ \ \
| * | | i2c: designware: add reset ctrl to driverDinh Nguyen2018-04-171-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | reset: socfpga: add reset driver for SoCFPGA platformDinh Nguyen2018-04-173-0/+113
| | | | | | | | | | | | | | | | | | | | | | | | Add a DM compatible reset driver for the SoCFPGA platform. Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
* | | | clk: fix clk_get_bulk when phandle errorNeil Armstrong2018-04-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | reset: fix reset_get_bulk when phandle errorNeil Armstrong2018-04-171-2/+2
| |/ / |/| | | | | | | | | | | | | | | | | | | | 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>
* | | mmc: mv_sdhci: zero out sdhci_host structureMatt Pelland2018-04-171-1/+1
|/ / | | | | | | | | | | | | | | | | | | 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>
* | serial: Remove duplicated line in MakefilePatrice Chotard2018-04-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge git://git.denx.de/u-boot-x86Tom Rini2018-04-163-4/+6
|\ \
| * | pci: video: Only print out when everything is OKBin Meng2018-04-161-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>