summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/usb'Sascha Hauer2019-12-1010-121/+110
|\
| * usb: musb: use usb_register_otg_device()Sascha Hauer2019-11-212-37/+8
| | | | | | | | | | | | | | We now have usb_register_otg_device() to register an "otg" device. Use it and drop the custom code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: i.MX: Use usb_register_otg_device()Sascha Hauer2019-11-212-73/+13
| | | | | | | | | | | | | | We now have usb_register_otg_device() to register an "otg" device. Use it and drop the custom code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: dwc3: register otg deviceSascha Hauer2019-11-213-4/+12
| | | | | | | | | | | | | | When the role in the device tree is specified as "otg" then register a otg device in barebox so that the user can configure the desired mode. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: Add function to register otg devSascha Hauer2019-11-213-1/+74
| | | | | | | | | | | | | | | | We have two drivers in the tree which register an "otg" device to configure the host/peripheral switching. Before introducing a third driver create a common function for it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: dwc3: remove unnecessary warningSascha Hauer2019-11-211-6/+3
| | | | | | | | | | | | | | | | | | The dwc3 driver warns when the value written to DWC3_GFLADJ happens to be same as already read from the register. This always happens when the driver was previously running when started 2nd stage from another barebox. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/stm32'Sascha Hauer2019-12-109-35/+252
|\ \
| * | remoteproc: add support for starting st,stm32mp1-m4Ahmad Fatoum2019-11-253-0/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The STM32MP157C-DK2 has a Cortex-M4 MCU in addition to the two Cortex-A7 MPUs. This remoteproc driver allows barebox running on a Cortex-A7 core to bootstrap the MCU with an ELF binary. Code ported from Linux v5.3 with rpmsg bits removed. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | remoteproc: register a device for new remoteproc instancesAhmad Fatoum2019-11-251-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | struct rproc has a device_d dev field, but so far it was unregistered. The implementation had a few downsides: - dev_printf prints NULL, because the unique_name of the device is NULL - The name used by firmwareload is the device tree node's name, which might be unnecessarily verbose, e.g. mlahb:m4@10000000.of - All remoteproc devices are given the same (unused) name and index Fix these by registering a device for the remoteproc and using it where appropriate. While at it, allow the remoteproc name to come from a device tree alias as well. This breaks user behavior in that firmwareload now uses the alias or remoteprocN to reference the remoteproc instance. This is probably acceptable as the driver is a very recent addition. Cc: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | nvmem: bsec: fix typo in function name (s/st32/stm32/)Ahmad Fatoum2019-11-151-2/+2
| | | | | | | | | | | | | | | | | | | | | A m was missing. Reinstate it. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | i2c: stm32: use device_reset_us helper instead of open-codingAhmad Fatoum2019-11-131-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | The exact sequence is already available in form of device_reset_us. Make use of it. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | watchdog: stm32_iwdg: return -ENOSYS on attempt to disableAhmad Fatoum2019-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The stm32_iwdg watchdog can't be disabled. To have the wd commant report this fact correctly to the user, the ->set_timeout needs to return -ENOSYS which is interpreted as "Watchdog cannot be disabled" instead of -EINVAL which means "Timeout value out of range". Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mfd: stpmic1: use register define from headerAhmad Fatoum2019-11-132-18/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | A previous commit has copied over the upstream <linux/mfd/stpmic1.h> header. Use it instead of replicating register definitions in the MFD and watchdog cell driver. No functional change. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/sdhci'Sascha Hauer2019-12-1012-1074/+1338
|\ \ \
| * | | mci: imx-esdhc: Share code for esdhc_send_cmd()Andrey Smirnov2019-12-044-202/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Versions of esdhc_send_cmd() in imx-esdhc.c and imx-esdhc-pbl.c implement almost the same algorithm. To avoid code repetition, move that code to imx-esdhc-common.c and adjust all of the users accordingly. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: imx-esdhc: Introduce esdhc_poll()Andrey Smirnov2019-12-044-39/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace all of the explcitly coded timeout loops with a shared subroutine that is used by both regular driver and PBL code. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: imx-esdhc: Share code for esdhc_(setup|do)_data operationsAndrey Smirnov2019-12-044-81/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PBL and PIO case of the regular driver do exaclty the same thing during esdhc_(setup|do)_data stages of esdhc_send_cmd(). Move the code to a common file and adjust all of the users accordingly. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: imx-esdhc-pbl: Use sdhci_set_cmd_xfer_mode()Andrey Smirnov2019-12-041-31/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop extra code by converting imx-esdhc-pbl.c to use sdhci_set_cmd_xfer_mode(). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: imx-esdhc-pbl: Use sdhci_transfer_data()Andrey Smirnov2019-12-044-35/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop some extra code by converting esdhc_do_data() to use sdhci_transfer_data(). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: imx-esdhc-pbl: Share IO accessors with regular driverAndrey Smirnov2019-12-045-208/+218
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With a bit of a change to PBL ESDHC initialization code it is possible to share all of the low-level I/O accessor code with the regular driver, including sharing definitions of flags describing HW's quirks. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: imx-esdhc-pbl: Drop 'wrap_wml' flagAndrey Smirnov2019-12-041-17/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IMX_SDHCI_WML doesn't change its value during PBL opearation, so it should be possible to configure it once. Doing it once also allows us to move the call into SoC specific code making 'wrap_wml' flag unnecessary. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: imx-esdhc-pbl: Share initialization codeAndrey Smirnov2019-12-041-31/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move common ESDHC initialization code into subroutines and convert the rest of the code to use it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: imx-esdhc-pbl: Don't setup DMA registersAndrey Smirnov2019-12-041-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PBL code is PIO only, so setting up DMA related registers shouldn't be necessary. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: imx-esdhc: Drop extra helper varaibleAndrey Smirnov2019-12-041-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's already 'ret' availible, no need to declare another return value variable. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: imx-esdhc: Drop unused type definitionAndrey Smirnov2019-12-041-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There doesn't seem to be any users of struct fsl_esdhc_cfg in the tree. Drop it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: imx-esdhc: Drop unnecessary type conversionAndrey Smirnov2019-12-041-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nether esdhc_setup_data() nor esdhc_do_data() really need struct mci_host, so we can drop a bit of extra type conversion code by changing their signature to accept struct fsl_esdhc_host instead Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: dove: fix dereference of nullable pointerAhmad Fatoum2019-11-251-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | data->{blocks, blocksize, flags} are all used outside of the if clause checking whether data is not NULL. Fix this to avoid dereferencing null pointers. Fixes: bdcf89d274 ("mci: add Marvell Dove SDHCI driver") Cc: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: add Arasan SDHCI controller driverThomas Haemmerle2019-11-214-0/+433
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the Arasan SDHCI controller, which is found on the Xilinx Zynq 7000 and ZynqMP SoCs. This just adds very basic PIO read/write support. This submission is also missing the tap delay configuration, which is required for the high speed modes on the ZynqMP, but this can be added in a separate patch once it is clear how the interface for this feature should look like. The driver skeleton was provided by Michael, most of the actual driver porting work was done by Thomas and some coding style fixes and write support bug fixes added by Lucas. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Thomas Haemmerle <thomas.haemmerle@wolfvision.net> Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: mci-bcm2835: Use generic PIO transfer functionSascha Hauer2019-11-211-84/+8
| | | | | | | | | | | | | | | | | | | | | | | | Use sdhci_transfer_data() to share more code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: imx-esdhci: Use generic PIO transfer functionSascha Hauer2019-11-211-68/+1
| | | | | | | | | | | | | | | | | | | | | | | | Use sdhci_transfer_data() in PIO mode to share mode code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: tegra: Use sdhci_set_cmd_xfer_mode()Sascha Hauer2019-11-211-30/+3
| | | | | | | | | | | | | | | | | | | | | | | | Use sdhci_set_cmd_xfer_mode() to share more code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: bcm2835: Use sdhci_set_cmd_xfer_mode()Sascha Hauer2019-11-211-20/+2
| | | | | | | | | | | | | | | | | | | | | | | | Use sdhci_set_cmd_xfer_mode() to share more code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: imx-esdhc: Use sdhci_set_cmd_xfer_mode()Sascha Hauer2019-11-211-46/+11
| | | | | | | | | | | | | | | | | | | | | | | | Use sdhci_set_cmd_xfer_mode() to share more code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: dove: Use sdhci_set_cmd_xfer_mode()Sascha Hauer2019-11-211-28/+4
| | | | | | | | | | | | | | | | | | | | | | | | Use sdhci_set_cmd_xfer_mode() to share more code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: sdhci: remove duplicate register defines for prsstat bitsSascha Hauer2019-11-215-26/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We have duplicate register bit defines for the prsstat register. Remove the duplicates. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: sdhci: remove duplicate register defines for interrupt bitsSascha Hauer2019-11-216-70/+41
| | | | | | | | | | | | | | | | | | | | | | | | We have duplicate bit defines for the interrupt bits. Remove the duplicates. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: sdhci: remove duplicate transfer mode register definesSascha Hauer2019-11-215-18/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We have duplicate register bit defines for the transfer mode register. Remove the duplicates. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: sdhci: remove 32bit register definesSascha Hauer2019-11-211-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | The 32bit register defines are no longer used. Remove them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: imx-esdhc-pbl: Use 16bit register definitionsSascha Hauer2019-11-211-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We have some register defines in a 16bit access version and a 32bit access version. Use the former to get rid of the latter later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: tegra: Use 16bit register definitionsSascha Hauer2019-11-211-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We have some register defines in a 16bit access version and a 32bit access version. Use the former to get rid of the latter later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: mci-bcm2835: Use 16bit register definitionsSascha Hauer2019-11-211-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We have some register defines in a 16bit access version and a 32bit access version. Use the former to get rid of the latter later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: imx-esdhc: Use 16bit register definitionsSascha Hauer2019-11-211-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We have some register defines in a 16bit access version and a 32bit access version. Use the former to get rid of the latter later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: dove: use sdhci helpersSascha Hauer2019-11-212-54/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | To use the sdhci helpers we have to switch to the sdhci accessors. Also use sdhci_read_response(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: tegra: use sdhci helpersSascha Hauer2019-11-212-58/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | To use the sdhci helpers we have to switch to the sdhci accessors. Also use sdhci_read_response(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: bcm2835: use sdhci helpersSascha Hauer2019-11-212-65/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | To use the sdhci helpers we have to switch to the sdhci accessors. Also use sdhci_read_response(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: imx-esdhc: use sdhci helpersSascha Hauer2019-11-213-64/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | To use the sdhci helpers we have to switch to the sdhci accessors. Also use sdhci_read_response(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: sdhci: Add missing command type definesSascha Hauer2019-11-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Add some missing register definitions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: Add sdhci helperSascha Hauer2019-11-194-0/+176
| | |/ | |/| | | | | | | | | | | | | | | | | | | We have several SDHCI compatible drivers in the tree. This starts with a set of generic helper functions for these drivers to share some common functionality. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/randfixes'Sascha Hauer2019-12-1017-34/+43
|\ \ \
| * | | pinctrl: at91pio4 depends on OFDEVICELucas Stach2019-12-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the selected options require OFDEVICE to be enabled. As the driver is only used of DT probed systems it's okay to depend on OFDEVICE. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>