summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2019-04-27avb: add support for named persistent valuesIgor Opaniuk1-19/+102
AVB 2.0 spec. revision 1.1 introduces support for named persistent values that must be tamper evident and allows AVB to store arbitrary key-value pairs [1]. Introduce implementation of two additional AVB operations read_persistent_value()/write_persistent_value() for retrieving/storing named persistent values. Correspondent pull request in the OP-TEE OS project repo [2]. [1]: https://android.googlesource.com/platform/external/avb/+/android-9.0.0_r22 [2]: https://github.com/OP-TEE/optee_os/pull/2699 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org> Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
2019-04-27sysreset: syscon: remove POWER reset causePatrick Delaunay1-0/+3
The sysreset of 'POWER' type is a PMIC reset defined as 'remove and restore power'. So normally only COLD/WARN is supported by sysreset_syscon. This modification allows to use the function sysreset_walk(SYSRESET_POWER) when it is supported by PMIC driver (see example in stpmic1). Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-04-27net: lpc32xx: Use IRAM for transmit bufferGregory CLEMENT1-1/+7
Since the introduction of the driver, some memory in IRAM is reserved for the TX buffers. However there are not used but instead of it, it is the buffer provided by the net stack which is used. As stated in the comment of the driver, not using the IRAM buffer could cause cache issue and lower the throughput. For the second argument it is less the case for transmitting buffers because the throughput gain in IRAM is mitigated by the time to copy the data from RAM to IRAM, but the first argument is still valid and indeed this patch fixes issue seen with Ethernet on some boards Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2019-04-27mtd: nand: raw: Fix CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT behaviorGregory CLEMENT1-2/+2
The purpose of "mtd: nand: raw: allow to disable unneeded ECC layouts" was to allow disabling the default ECC layouts if a driver is known to provide its own ECC layout. However, this commit did the opposite and disabled the default layout when it was _not_ selected. It breaks all the NAND drivers not providing their own ECC layout this patch fix this situation. It was tested with the lpc32xx_nand_slc driver. Fixes: a38c3af868 ("mtd: nand: raw: allow to disable unneeded ECC layouts") Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> Tested-by: Eugen Hristev <eugen.hristev@microchip.com>
2019-04-27firmware: ti_sci: Modify auth_boot TI-SCI API to match new versionAndrew F. Davis2-11/+23
SYSFW version 2019.01 introduces a slightly modified version of this API, add support for it here. Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Andreas Dannenberg <dannenberg@ti.com>
2019-04-27firmware: ti_sci: Add support for firewall managementAndrew F. Davis2-0/+298
TI-SCI message protocol provides support for controlling the firewall configurations available in SoC. Introduce support for the set of TI-SCI message protocol APIs that provide us with this capability of controlling firewalls. Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Andreas Dannenberg <dannenberg@ti.com>
2019-04-26Merge git://git.denx.de/u-boot-marvellTom Rini7-23/+101
- Add DM based generic watchdog start and reset implementation and remove all ad-hoc implementations (Stefan) - Move mv_sdhci to DM (Pierre) - Misc turris_omnia updates (Pierre) - Change openrd targets to correctly build again (size changes and fixes to the dts targets) and bring it back into Travis builds (Stefan) - Add Kirkwood db-88f6281-bp board (Chris)
2019-04-26Merge branch 'master' of git://git.denx.de/u-boot-socfpgaTom Rini2-6/+25
2019-04-26watchdog: at91sam9_wdt: Remove now superfluous wdt start and resetStefan Roese1-8/+0
With the new generic function, the scattered other functions are now removed to be replaced by the generic one. The new version also enables the configuration of the watchdog timeout via the DT "timeout-sec" property (if enabled via CONFIG_OF_CONTROL). The watchdog servicing is enabled via CONFIG_WATCHDOG. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Eugen Hristev <eugen.hristev@microchip.com>
2019-04-26watchdog: mpc8xx_wdt: Watchdog driver and macros cleanupStefan Roese3-5/+2
With the generic watchdog driver now implemented, this patch removes some legacy stuff from the MPC8xx watchdog driver and its Kconfig integration. CONFIG_MPC8xx_WATCHDOG is completely removed and hw_watchdog_reset() is made static, as the watchdog will now get serviced via the DM infrastructure if enabled via CONFIG_WATCHDOG. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Christophe Leroy <christophe.leroy@c-s.fr>
2019-04-26watchdog: cadence: Remove driver specific "timeout-sec" handlingStefan Roese1-9/+6
Now that we have a generic DT property "timeout-sec" handling, the driver specific implementation can be dropped. This patch also changes the timeout restriction to the min and max values (clipping). Before this patch, the value provided via "timeout-sec" was used if the parameter was too high or low. Now the driver specific min and max values are used instead. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Michal Simek <michal.simek@xilinx.com> Tested-by: Michal Simek <michal.simek@xilinx.com> (on zcu100)
2019-04-26watchdog: Implement generic watchdog_reset() versionStefan Roese2-0/+27
This patch tries to implement a generic watchdog_reset() function that can be used by all boards that want to service the watchdog device in U-Boot. This watchdog servicing is enabled via CONFIG_WATCHDOG. Without this approach, new boards or platforms needed to implement a board specific version of this functionality, mostly copy'ing the same code over and over again into their board or platforms code base. With this new generic function, the scattered other functions are now removed to be replaced by the generic one. The new version also enables the configuration of the watchdog timeout via the DT "timeout-sec" property (if enabled via CONFIG_OF_CONTROL). This patch also adds a new flag to the GD flags, to flag that the watchdog is ready to use and adds the pointer to the watchdog device to the GD. This enables us to remove the global "watchdog_dev" variable, which was prone to cause problems because of its potentially very early use in watchdog_reset(), even before the BSS is cleared. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Tom Rini <trini@konsulko.com> Cc: Michal Simek <michal.simek@xilinx.com> Cc: "Marek Behún" <marek.behun@nic.cz> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: Maxim Sloyko <maxims@google.com> Cc: Erik van Luijk <evanluijk@interact.nl> Cc: Ryder Lee <ryder.lee@mediatek.com> Cc: Weijie Gao <weijie.gao@mediatek.com> Cc: Simon Glass <sjg@chromium.org> Cc: "Álvaro Fernández Rojas" <noltari@gmail.com> Cc: Philippe Reynes <philippe.reynes@softathome.com> Cc: Christophe Leroy <christophe.leroy@c-s.fr> Reviewed-by: Michal Simek <michal.simek@xilinx.com> Tested-by: Michal Simek <michal.simek@xilinx.com> (on zcu100)
2019-04-26mmc: mv_sdhci: add driver model supportPierre Bourdon1-1/+66
The new DM implementation currently does not support the Sheeva 88SV331xV5 specific quirk present in the legacy implementation. The legacy code is thus kept for this SoC and others not yet migrated to DM_MMC. Signed-off-by: Pierre Bourdon <delroth@gmail.com> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Stefan Roese <sr@denx.de> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
2019-04-25rtc: m41t62: add compatible for m41t82Simon Goldschmidt1-0/+11
This adds a compatible string for m41t82. This ensures that this driver can be used for m41t82 in DM mode, too (asit was usable for this model in non-DM mode before). In addition, the HT bit has to be reset during probe, since the m41t82 chip sets it when entering battery standby mode. This patch ensures this driver works on socfpga_socrates. Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2019-04-25i2c: designware: fix reset handling on socfpga gen5Simon Goldschmidt1-6/+14
Using this driver on socfpga gen5 with DM_I2C enabled leads to a data abort as the 'i2c' reset property cannot be found (the gen5 dtsi does not provide reset-names). The actual bug was to check 'if (&priv->reset_ctl)', which is never false. While at it, convert the driver to use 'reset_get_bulk' instead of looking at a specific named reset and also make it release the reset on driver remove before starting the OS. Fixes: 622597dee4f6 ("i2c: designware: add reset ctrl to driver") Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2019-04-24Merge tag 'pull-24apr19' of git://git.denx.de/u-boot-dmTom Rini4-24/+16
Various minor sandbox iumprovements Fixes for tracing with sandbox Refactoring for boot_get_fdt()
2019-04-24Merge tag 'u-boot-stm32-mcu-20190423' of https://github.com/pchotard/u-bootTom Rini4-13/+72
STM32 MCUs update: - DT rework and alignment with DT kernel v4.20 - mmc: arm_pl180_mmci: Synchronize compatible with kernel v4.20 - mmc: stm32_sdmmc2: Synchronize properties with kernel v4.20 - configs: update for F746/769 boards
2019-04-24Merge tag 'u-boot-amlogic-20190423' of git://git.denx.de/u-boot-amlogicTom Rini18-192/+1868
- Add support for Amlogic p200 & p201 Reference Designs - Add Amlogic SoC information display - Add support for the Libretech-AC AML-S805X-AC board - Add Amlogic AXG reset compatible - Add I2C support for Amlogic AXG - Fix AXG PIN and BANK pinctrl definitions - Fix regmap_read_poll_timeout warning about sandbox_timer_add_offset - Add initial support for Amlogic G12A SoC and U200 board - Enable PHY_REALTEK for selected boards - Fix Khadas VIM2 README
2019-04-24dm: core: Change platform specific translation-offset handlingStefan Roese3-24/+15
Testing has shown that the current DM implementation of a platform / board specific translation offset, as its needed for the SPL on MVEBU platforms is buggy. The translation offset is confingured too late, after the driver bind functions are run. This may result in incorrect address translations. With the current implementation its not possible to configure the offset earlier, as the DM code has not run at all. This patch now removed the set_/get_translation_offset() calls and moves the translation offset into the GD variable translation_offset. This variable will get used when CONFIG_TRANSLATION_OFFSET is enabled. This option is enabled only for MVEBU on ARM32 platforms, where its currenty needed and configured in the SPL. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Pierre Bourdon <delroth@gmail.com> Cc: Baruch Siach <baruch@tkos.co.il> Cc: Simon Glass <sjg@chromium.org> Cc: Heiko Schocher <hs@denx.de> Cc: Tom Rini <trini@konsulko.com> Tested-by: Pierre Bourdon <delroth@gmail.com> Tested-by: Baruch Siach <baruch@tkos.co.il>
2019-04-24simple-bus: add DM_FLAG_PRE_RELOC flag to simple-bus driverLukas Auer1-0/+1
Boards such as qemu-riscv, which receive their device tree at runtime, for example from QEMU or firmware, are unable to add the appropriate device tree properties to make devices available pre relocation. Instead, they must rely on the DM_FLAG_PRE_RELOC flag to be set for the required drivers. Add the DM_FLAG_PRE_RELOC flag to the simple-bus driver to make devices under it with drivers that have set the flag as well available pre relocation for these boards. Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
2019-04-24pinctrl: add driver for MT8516Fabien Parent3-0/+396
Add Pinctrl driver for MediaTek MT8516 SoC. Signed-off-by: Fabien Parent <fparent@baylibre.com> Acked-by: Ryder Lee <ryder.lee@mediatek.com>
2019-04-24clk: mediatek: add driver for MT8516Fabien Parent2-0/+803
Add clock driver for MediaTek MT8516 SoC. Signed-off-by: Fabien Parent <fparent@baylibre.com> Acked-by: Ryder Lee <ryder.lee@mediatek.com> [trini: Redo whitespace] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-04-24clk: mediatek: add support for SETCLR_INV and NO_SETCLR flagsFabien Parent1-0/+12
Add the implementation for the CLK_GATE_SETCLR_INV and CLK_GATE_NO_SETCLR flags. Signed-off-by: Fabien Parent <fparent@baylibre.com> Acked-by: Ryder Lee <ryder.lee@mediatek.com>
2019-04-24mmc: mtk-sd: fix configuration option checkFabien Parent1-4/+4
We either need to use IS_ENABLED(CONFIG_FOO) or CONFIG_IS_ENABLED(FOO). IS_ENABLE(FOO) will always return false. This commit fixes the comparison by using the CONFIG_IS_ENABLED(FOO) syntax. Signed-off-by: Fabien Parent <fparent@baylibre.com>
2019-04-24mmc: mtk-sd: add support for MT8516Fabien Parent1-0/+10
Add config for handling MT8516 SoC. Signed-off-by: Fabien Parent <fparent@baylibre.com> Acked-by: Ryder Lee <ryder.lee@mediatek.com>
2019-04-24mmc: mtk-sd: add source_cg clock supportFabien Parent1-0/+5
Some MediaTek SoC need an additional clock "source_cg". Enable this new clock. We reuse the same clock name as in the kernel. Signed-off-by: Fabien Parent <fparent@baylibre.com> Acked-by: Ryder Lee <ryder.lee@mediatek.com>
2019-04-24net: add higmacv300 Ethernet driver for HiSilicon platformShawn Guo3-0/+607
It adds the driver for HIGMACV300 Ethernet controller found on HiSilicon SoCs like Hi3798CV200. It's based on a downstream U-Boot driver, but quite a lot of code gets rewritten and cleaned up to adopt driver model and PHY API. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-04-24reset: add reset driver for HiSilicon platformShawn Guo3-0/+110
It adds a Driver Model compatible reset driver for HiSlicon platform. The driver implements a custom .of_xlate function, and uses .data field as reset register offset and .id field as bit shift. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-04-24pci: Add boundary check for hose->regionsThierry Reding1-0/+5
Make sure that we don't overflow the hose->regions array, otherwise we would end up overwriting the hose->region_count field and cause mayhem to ensue. Also print an error message when we'd be overflowing because it indicates that there aren't enough regions available and the number needs to be increased. Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-04-24led: bcm6858: allow to use this driver on ARCH_963158Philippe Reynes1-1/+1
Allow the led bcm6858 driver to be used on bcm63158. They have the same led controller. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2019-04-23mmc: stm32_sdmmc2: Fix r1b timeout issueChristophe Kerello1-6/+55
On response type r1b, if DTIME is not defined or too short, the Datatimeout and DPSM flag occurs. Like the DPSM is activated all next data transfer will be frozen. To avoid this freeze: -The driver must define a DTIME on all r1b response type. -DTIME of SDMMC must be defined for alls stop transmission (for read and write request) even if MMC_RSP_BUSY is not set. -If busy timeout occur, an abort request must be sent to reinitialize the DPSM. Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Tested-by: Patrick DELAUNAY <patrick.delaunay@st.com>
2019-04-23mmc: stm32_sdmmc2: Update DT properties with v4.19 bindingsPatrick Delaunay1-3/+3
Some properties name has been updated: - st,dirpol becomes st,sig-dir - st,negedge becomes st,neg-edge - st,pin-ckin becomes st,use-ckin Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-04-23mmc: arm_pl180_mmci: Sync compatible with kernelPatrice Chotard2-4/+13
Initially the compatible string was wrongly set to "st,stm32f4xx-sdio". Use compatible string used by kernel instead and identify mmci variant using "arm,primecell-periphid" property. Currently, the DM part of mmci driver is only used by STM32 SoCs, that's why the switch case gets only one entry. It will be populated easily with new variant in the future. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-04-23pinctrl: stm32: Add st,stm32f769-pinctrl compatible stringPatrice Chotard1-0/+1
Due to DT kernel synchronisation, add new pinctrl compatible string for stm32f769. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-04-23clk: meson: add g12a supportJerome Brunet3-0/+324
Add basic support for the Amlogic G12A clock controller based on the AXG driver. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-04-23clk: create meson directory and move related driversJerome Brunet7-1/+25
In order to support the Amlogic G12A clock controller, re-architect the clock files into a meson directory. No functionnal changes. MAINTAINERS entry is also updated. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-04-23pinctrl: meson: add g12a supportJerome Brunet5-5/+1312
Add pinctrl support for the Amlogic G12A SoC, which is very similar to the Amlogic AXG support but with an additionnal drive-strength register bank. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-04-23regmap: fix regmap_read_poll_timeout warning about sandbox_timer_add_offsetNeil Armstrong2-2/+2
When fixing sandbox test for regmap_read_poll_timeout(), the sandbox_timer_add_offset was introduced but only defined in sandbox code thus generating warnings when used out of sandbox : include/regmap.h:289:2: note: in expansion of macro 'regmap_read_poll_timeout_test' regmap_read_poll_timeout_test(map, addr, val, cond, sleep_us, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/meson_spifc.c:169:8: note: in expansion of macro 'regmap_read_poll_timeout' ret = regmap_read_poll_timeout(spifc->regmap, REG_SLAVE, data, ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/meson_spifc.c: In function 'meson_spifc_txrx': include/regmap.h:277:4: warning: implicit declaration of function 'sandbox_timer_add_offset' [-Wimplicit-function-declaration] This fix adds a timer_test_add_offset() only defined in sandbox, and renames the previous sandbox_timer_add_offset() to it. Cc: Simon Glass <sjg@chromium.org> Reported-by: Tom Rini <trini@konsulko.com> Fixes: df9cf1cc08 ("test: dm: regmap: Fix the long test delay") Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-04-23led: add initial support for bcm6858Philippe Reynes3-0/+258
The driver add the support of the led IP on bcm6858. This led IP can drive up to 32 leds, and can handle blinking. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2019-04-23misc: fs_loader: Replace label with DT phandleTien Fong Chee1-21/+15
In previously label which will be expanded to the node's full path was used, and now replacing label with most commonly used DT phandle. The codes were changed accordingly to the use of DT phandle and supporting multiple instances. Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
2019-04-23misc: fs_loader: Add support for initializing block deviceTien Fong Chee1-0/+23
Firmware loader would encounter problem if the block device is accessed before initializing it. This patch would adding the support of probing block device and initializing block before the block device is accessed by firmware loader. Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-04-22drivers: nand: brcmnand: add an option to read the write-protect from device ↵Philippe Reynes1-0/+3
tree The option write-protect may only change on the kernel command line, we add a property in the device tree to be more flexible. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2019-04-22drivers: nand: brcmnand: add parameter parameter-page-big-endianPhilippe Reynes1-2/+15
The parameter page isn't always in big endian, so we add an option to choose the endiannes of the parameter page. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2019-04-22drivers: nand: brcmnand: add initial supportPhilippe Reynes10-0/+3334
The driver brcmnand come from linux kernel 4.18. Only SoC bcm6838 and bcm6858 are supported. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2019-04-22mtd: nand: provide several helpers to do common NAND operationsBoris Brezillon1-160/+853
Linux commit 97d90da8a88 ("mtd: nand: provide several helpers to do common NAND operations") This is part of the process of removing direct calls to ->cmdfunc() outside of the core in order to introduce a better interface to execute NAND operations. Here we provide several helpers and make use of them to remove all direct calls to ->cmdfunc(). This way, we can easily modify those helpers to make use of the new ->exec_op() interface when available. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> [miquel.raynal@free-electrons.com: rebased and fixed some conflicts] Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com> [Philippe Reynes: adapt code to u-boot and only keep new function] Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2019-04-22Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini8-78/+509
- Various fastboot, dwc2/stm32 updates
2019-04-22Merge branch 'master' of git://git.denx.de/u-boot-socfpgaTom Rini11-24/+396
- Various stratix10, gen5 updates
2019-04-21usb: dwc2: fix gadget disconnectFabrice Gasnier2-3/+17
This fixes a disconnect issue detected with fastboot command, when using dwc2 driver. - On u-boot side: uboot>$ fastboot 0 - On USB host PC side, few seconds after PC>$ fastboot reboot # Get stuck, uboot target never reboots By enabling DEBUG_ISR logs, the bus suspend interrupt is seen before the PC command has been issued. When the USB bus suspend occurs, there's a HACK that disables the fastboot (composite driver). Here is the call stack upon USB bus suspend: - dwc2_handle_usb_suspend_intr() - dev->driver->disconnect() - composite_disconnect() - reset_config() - f->disable() - fastboot_disable() - usb_ep_disable(f_fb->out_ep); - usb_ep_disable(f_fb->in_ep); .. other disable calls. When the resume interrupt happens, everything has been disabled, then nothing happens. fastboot command gets stuck on HOST side. Remove original HACK, that disconnects the composite driver upon USB bus suspend. Implement disconnect detection instead: - check GINTSTS OTG interrupt - read GOTGINT register - check GOTGINT, SesEndDet bit (e.g. session end) This is inspired by what is implemented currently in Linux dwc2 driver. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Reviewed-by: Marek Vasut <marex@denx.de>
2019-04-21fastboot: add support for 'getvar platform'Eugeniu Rosca1-0/+14
Our R-Car3 Android userspace relies on the output of 'fastboot getvar platform' and U-Boot currently is not able to handle it: host $> fastboot getvar platform getvar:platform FAILED (remote: Variable not implemented) finished. total time: 0.001s We either have the option of adding 'fastboot.platform' variable to the default/saved environment as a workaround or add proper 'fastboot getvar platform' support in U-Boot via this patch. In the latter case, other platforms can benefit from it too. Note that R-Car3 already exports 'platform' environment variable via v2019.01 commit 00e4b57e9e71c3 ("ARM: rmobile: Set environment variable containing CPU type"). Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
2019-04-21fastboot: Replace literal 32 with PART_NAME_LENAlex Kiernan1-3/+3
Where we have to compute partition names, rather than using a hardcoded 32 for the partition name length, replace with PART_NAME_LEN. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Reviewed-by: Eugeniu Rosca <rosca.eugeniu@gmail.com>