summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/socfpga'Sascha Hauer2018-08-132-133/+159
|\
| * mci: dw: move defines to headerfileSteffen Trumtrar2018-08-082-114/+141
| | | | | | | | | | Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mci: dw_mmc: convert to BIT() macroSteffen Trumtrar2018-08-081-49/+50
| | | | | | | | | | Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mci: dw_mmc: remove device_d pointerSteffen Trumtrar2018-08-081-19/+17
| | | | | | | | | | | | | | | | The pointer to the struct device_d *dev is also saved to the struct mci_host. Get rid of it. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/pci'Sascha Hauer2018-08-131-4/+89
|\ \
| * | pci: add quirk infrastructureLucas Stach2018-08-081-4/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a cut down version of the Linux kernel PCI quirk infrastructure, which allows to register and execute some fixups before the driver is loaded. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PCI: link PCI devices with potentially existing OF nodesLucas Stach2018-08-081-0/+30
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | The document "PCI Bus Binding to: IEEE Std 1275-1994 Standard for Boot (Initialization Configuration) Firmware" describes how the PCI topology can be described in the DT, in order to augment the PCI devices with additional information via DT properties. This patch links OF nodes to the corresponding PCI devices if they exist, allowing PCI device drivers to query DT information like any platform device. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2018-08-134-19/+50
|\ \
| * | mci: s3c: fix providing info callbackUwe Kleine-König2018-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | There is no symbol iCONFIG_MCI_INFO, CONFIG_MCI_INFO makes sense here and matches what was added in the same commit to other drivers. Fixes: 73b0d228e5b0 ("driver: Attach info callback to device, not to driver") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | reset: socfpga: add missing driver nameSteffen Trumtrar2018-08-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The driver_d is missing the name property. When the reset driver is used in a non-of setup, this will result in an error during device_registration where the dev->name is matched to the driver->name. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | imx_thermal: Fixed missing dependency for the IMX_THERMAL configEugen Wiens2018-08-061-0/+2
| | | | | | | | | | | | | | | | | | | | | The temperature sensor driver for Freescale i.MX SoCs use internaly the OCOTP character device. If the config IMX_THERMAL is selected the OCOTP config was not selected and comes up with an error during booting. Signed-off-by: Eugen Wiens <eugen.wiens@jumo.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | aiodev: Fix whitespaces in KconfigSascha Hauer2018-08-061-4/+4
| | | | | | | | | | | | | | | | | | Replace whitespaces with tabs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net/e1000: allow to overwrite flash size from device treeUwe Kleine-König2018-07-131-14/+42
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When barebox probes the e1000 driver and the flash on the i210 device is unprogrammed, the driver assumes the flash has a size of only 4 kiB. This is annoying because to program the flash an image must be written that is bigger than 4 kiB. So you first have to flash the first sector to make barebox detect the right size on the next boot. Then reset the board to be able to write the remaining data. To work around that limitation, try to read the actual size from the device tree. (Note however that barebox' pci code currently doesn't use the device tree and so currently this try always fails without further patching.) Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2018-08-134-4/+10
|\ \
| * | pinctrl: i.MX: Add code to parse "input-enable"Andrey Smirnov2018-08-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Add code to parse "input-enable" and intepret it as SION bit. This is needed for I2C configuration on i.MX8MQ EVK board. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | i.MX: Select DRIVER_SPI_IMX_2_3 for i.MX8MQAndrey Smirnov2018-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Select DRIVER_SPI_IMX_2_3 for i.MX8MQ since that is the variant that's being used Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | i.MX: i2c: Fix build error in debug output codeAndrey Smirnov2018-08-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Looks like that particular chunk of the code have not been built in a while and bitrotted. Change function parameters appropriately to avoid breaking the build. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mci: imx-esdhc: send required clock pulses to card on initLucas Stach2018-08-091-1/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MMC cards need at least 74 clock pulses before any bus communication can occur. The i.MX SDHC controller auto-gates the clock when inactive, so if the SD enumeration is skipped for slots where we know that only a MMC card can be present (which is possible since b5289b742a89 "mmc: allow skipping SD card initialization") those inititialization clock pulses won't be sent out, resulting in command timeouts when trying to enumerate the card. Luckily the eSDHC controller has a hardware feature to send out 80 clock pulses. This has been validated to be available by checking the reference manual back to i.MX25. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | serial: lpuart: Avoid division by zero when requested baudrate isAndrey Smirnov2018-08-131-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With serdev device support added there's now a corner case where: 1. There is a DT node for a serdev device on one of the UARTs 2. There is no driver that binds against serdev device's compatibility string with 1 and 2 being true it is possible to end up in a situation where a particualr UART has not been initalized to any baudrate when clock_notifier_call_chain() gets called. This effectively translates to set_baudrate(uart, 0); which for LPUART driver result in a division by zero. To avoid this problem, convert lpuart_serial_setbaudrate() to treat zero baudrate as a request to disable the UART. While we are at it add a BUG_ON() to lpuart_setbrg() to simplify finding any future bugs. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | usb: gadget: allow to actually enable sparse fastboot supportUwe Kleine-König2018-08-081-3/+3
|/ | | | | | | | | | | | | | | When sparse support was (intended to be) made optional it was effectively unconditionally disabled because IS_ENABLED(USB_GADGET_FASTBOOT_SPARSE) always evaluates to 0. To actually make use of the introduced kconfig symbol the CONFIG_ prefix must not be skipped. Fixes: f4b5d3eeb607 ("usb: gadget: fastboot: Make sparse support optional") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Tested-by: Gavin Schenk <g.schenk@eckelmann.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2018-07-098-6/+28
|\
| * net: designware: make sure DMA is disabled on kernel start.Oleksij Rempel2018-07-024-0/+11
| | | | | | | | | | | | | | | | Halt is not automatically executed if we start the kernel. So, we may have potentially memory corruptions. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * drivers: of: Make use of devpath_to_name()Andrey Smirnov2018-06-251-4/+2
| | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: backlight: add slew time parameterLucas Stach2018-06-212-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | Currently the backlight implementation stretches a brightness change over a period of 100ms. While this is a fine default for PWM backlights, a user might wish to change this slew time to meet other constraints or even completely disable it for some backlight devices. Add a parameter and provide the default value from the backlight device. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * nand-bb: mtd_del_bb: fix missing pointer resetHeinrich Toews2018-06-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | If an attached bb device was removed before the actual mtd device the code would try due to a missing pointer reset to access the no more present bb device handle which leads to a page fault. This bug was made visible by commit "7649473 mtd: nand: remove automatically created bb devices" which relys on a correct mtd->cdev_bb handling. Signed-off-by: Heinrich Toews <heinrich.toews@wago.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx8mq'Sascha Hauer2018-07-091-0/+1
|\ \
| * | ARM: i.MX: ocotp: Provide missing .format_mac for i.MX8MQSascha Hauer2018-06-151-0/+1
| |/ | | | | | | | | | | | | | | Provide missing .format_mac for i.MX8MQ to prevent driver from crashing on start. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2018-07-0915-64/+582
|\ \
| * | mtd: gpmi-nand: Make sure clock is disabled during rate changeSascha Hauer2018-07-062-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On i.MX6 GPMI Nand controller the clock must be disabled during a rate change. Otherwise glitches on the clock line may occur which result in errors like: MXS NAND: Error sending command MXS NAND: DMA read error There were previous attempts to fix this. One is in: 54961378f0 imx6: clk: Gate off ENFC clock before setting clock rate This patch added a clk_disable() right before the rate change. Since a clk_disable() on a disabled clk is a no-op, the patch added a clk_enable() to the i.MX6 clk driver in the hope that the clk is enabled in the nand driver probe and the clk_disable() really takes place. This patch doesn't work. First of all it enabled the enfc_podf clk which was not the one that was actually disabled in the nand driver, resulting in the nand drivers call to clk_disable() still being a no-op. Then this patch also only works only on the classic i.MX6 which was the only one supported at that time, but not on the i.MX6UL, i.MX6SX and i.MX6SL which have a separate clk driver. Instead of adding more quirks to the other i.MX6 clk drivers, fix this in the GPMI driver. We no longer call clk_disable() on a disabled clk, but instead do a clk_enable() first which makes sure the hardware state is synchronized to the usage count and the following clk_disable() is really effective. At the same time we can (and actually must) remove the quirk in the i.MX6 clk driver. Also add clk_disable()/clk_enable() around another rate change in the GPMI driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clk: imx: remove unused clk_gate2_invertedSascha Hauer2018-07-061-17/+0
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | nvmem: rave-sp-eeprom: Add support for "zii,eeprom-name"Andrey Smirnov2018-07-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream kernel driver allows specifying EEPROM name via "zii,eeprom-name" property. Add code to support that in Barebox as well. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | nvmem: rave-sp-eeprom: Remove VLA usageAndrey Smirnov2018-07-051-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of patch [1] by Kees Cook [1] https://lkml.kernel.org/r/20180620182600.GA24297@beast Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: mtd_dataflash: Don't print bogus command values for READsAndrey Smirnov2018-07-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call to dev_dbg in dataflash_read() is located to early, before command[] is initialize to correct values, so it end up printing values from previous invocation. Move it such that it prints current call's values. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | nvmem: Introduce nvmem_cell_get_and_read()Andrey Smirnov2018-06-291-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce nvmem_cell_get_and_read() that combines getting a NVMEM cell by name and reading its contents. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | watchdog: rave-sp-wdt: Explicitly access EEPROM for bootsourceAndrey Smirnov2018-06-261-38/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RAVE SP firmware versions found on RDU2 provide decicated bootsource manipulation commands, which, under the hood, are just thin wrappers around write/read to a particular location in EEPROM. Unfortunately, RAVE SP firmware found on RDU1, does not provide any dedicated bootsource commands and its users are expected to access EEPROM directly. In order to avoid having separate code paths for handling those two cases, convert the code to access EEPROM directly via NVMEM API. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | watchdog: rave-sp-wdt: Remove bogus leftover codeAndrey Smirnov2018-06-261-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | This code should've been removed when the driver was rebased against latest watchdog plumbing in Barebox. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: imx: implement support for limiting host to full speedNikita Yushchenko2018-06-263-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed when host is known to not work properly in high speed mode. In linux, chipidea driver supports 'maximum-speed' device tree property. When that is set to "full-speed", driver sets PFSC bit in PORTSC register, which disallows use of high speed mode. This patch implements same support for barebox. Important technical detail is that PFSC bit is cleared by port reset, thus setting it has to be done in ehci->init() callback which is called after ehci_reset(). Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | video: Port RAVE SP backlight driver from Linux kernelAndrey Smirnov2018-06-213-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a minimal port of a kernel commit 6552d3141064 ("backlight: Add RAVE SP backlight driver"). All of the changes were kept to a minimum and limited to impedance matching between Barebox/Linux driver API. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | nvmem: Port RAVE SP EEPROM driver from Linux kernelAndrey Smirnov2018-06-213-1/+372
| |/ | | | | | | | | | | | | | | | | This is a minimal port of a kernel commit 3b51f47be171 ("nvmem: Add RAVE SP EEPROM driver"). All of the changes were kept to a minimum and limited to impedance matching between Barebox/Linux driver API. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / dts: update to v4.18-rc1Sascha Hauer2018-06-221-9/+8
|/ | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/of-bootsource'Sascha Hauer2018-06-111-5/+0
|\
| * of: Make of_property_get_value() publicAndrey Smirnov2018-05-181-5/+0
| | | | | | | | | | | | | | | | Make of_property_get_value() public, so it can be used in other part of the system. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2018-06-111-61/+55
|\ \
| * | mtd: nand: omap_gpmc: fix: remove bch4 string extantHeinrich.Toews@wago.com2018-05-311-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove an erroneous bch4 string leftover that leads to a false ecc mode mapping. BCH4 support was previously removed by Teresa Remmet: d316cda 'mtd: nand: omap_gpmc: Remove BCH4 support' Signed-off-by: Heinrich Toews <heinrich.toews@wago.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: nand: nand_omap_gpmc: Fix ecc stepsTeresa Remmet2018-05-241-60/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The eccsteps where set wrong for OMAP_ECC_BCH8_CODE_HW_ROMCODE. So the ECC was only corrected for the first 512 bytes chunk of a 2k page. Moved out the ecc step iteration out of the correcting loop to make it more alike the generic nand functions. And made sure that the ECC is caclulated for all chunks. This patch is based on work of Sascha Hauer. Fixes commit dec7b4d2bf9c ("mtd: nand_omap_gpmc: fix BCH error correction"). Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/mips'Sascha Hauer2018-06-112-2/+4
|\ \ \
| * | | i2c-mux-pca954x: fix out-of-bounds write for 64 bit systemsPeter Mamonov2018-05-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | get_drv_data(..., &data->type) overwrites memory beyond data->type member due to mismatch of sizeof(enum pca_type) and sizeof(void *) on 64 bit systems. Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: cfi-flash: fix write_buff() for 64 bit systemsPeter Mamonov2018-05-241-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | write_buff() uses ~(flash_info.portwidth - 1) to mask lower bits of addr. This causes higher 32 bits of addr to be discarded on a 64 bit system, since flash_info.portwidth is 32 bits long (unsigned int) and addr is 64 bits long (unsigned long). Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/imx-ocotp'Sascha Hauer2018-06-114-15/+720
|\ \ \
| * | | ARM: i.MX: ocotp: Add i.MX8MQ supportSascha Hauer2018-06-082-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> [andrew.smirnov@gmail.com: Rebased to account for move to nvmem] Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>