summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* 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/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>
| * | | nvmem: ocotp: Convert to NVMEM deviceAndrey Smirnov2018-05-311-3/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not that barebox has a proper NVMEM subsystem, convert OCOTP driver to use that to both make things more consistent with Linux and also allow accessing OCOTP fields without the need for imx_ocotp_read_field()/imx_ocotp_write_field(). Cc: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Tested-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | nvmem: Use name from struct nvmem_config for cdevAndrey Smirnov2018-05-311-15/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original name, 'nvmemN', doesn't really give any hint about which physical HW it may represent, so change the code to either pick up an DT alias or use the name passed via 'struct nvmem_config'. Cc: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Tested-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | i.MX: ocotp: Move OCOTP driver to drivers/nvmemAndrey Smirnov2018-05-313-0/+675
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Move OCOTP driver to drivers/nvmem to be consistent with Linux kerenel. Cc: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Tested-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> 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-06-1113-65/+1180
|\ \ \
| * | | clocksource: armv8-timer: Make use of postcore_platform_driver()Andrey Smirnov2018-06-111-5/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | clocksource: armv8-timer: Make armv8_clocksource_read() staticAndrey Smirnov2018-06-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are no users of that function outside of the driver itself, so re-declare it as static. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | pinctrl: i.MX: Add support for i.MX8Andrey Smirnov2018-06-111-6/+50
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | clocksource: armv8-timer: Convert explicit assembly into helpersAndrey Smirnov2018-06-111-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move inline assembly related to querying and counter value as well as getting and setting counter frequency register into asm/system.h as well as converting it inot helper functions. This is done to make the code availible to other parts of the system. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | gpio: i.MX: Add i.MX8mq supportSascha Hauer2018-06-111-0/+3
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mmc: i.MX esdhc: Add i.MX8 supportSascha Hauer2018-06-111-0/+1
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | serial: i.MX: Add i.MX8 supportSascha Hauer2018-06-111-1/+4
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | clock: Add i.MX8MQ clock driverSascha Hauer2018-06-115-0/+1078
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is based on Lucas' patch sent as "[PATCH v2 4/4] clk: imx: add clock driver for i.MX8MQ CCM" to the mailing list. It will likely need some rework before it is finally merged, so apply the reworks here before merging into barebox. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> [andrew.smirnov@gmail.com: Fix pll type for IMX8MQ_VIDEO2_PLL1] Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: fec_imx: Make use of IS_ALIGNEDAndrey Smirnov2018-06-111-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: fec_imx: Use dma mapping functionsSascha Hauer2018-06-112-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than doing DMA on the input buffer address get a proper DMA address from the mapping functions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: fec_imx: remove unnecessary DMA sync opsSascha Hauer2018-06-111-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The fec receive buffers are coherently mapped, no need to dma_sync on them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: imx-esdhc: use dma mapping functionsSascha Hauer2018-06-111-27/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than relying on the fact that addresses can be just casted into DMA addresses use proper DMA mapping functions. This fixes compiler warnings when we do DMA on this 32bit only device on aarch64 SoCs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | nvmem: snvs_lpgpr: Drop stray commasAndrey Smirnov2018-05-231-4/+4
| | |/ | |/| | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/clk'Sascha Hauer2018-06-113-4/+137
|\ \ \
| * | | clk: support pinmux configuration in clock provider nodesNikita Yushchenko2018-05-141-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some device trees use pinctrl-* settings inside device tree nodes for clock providers. Barebox does not threat clock providers (such as fixed-clock or gpio-gate-clock) as conventional devices, thus setting default pinctrl configuration in driver binding code does not happen for clock providers. This patch adds setting default pinctrl configuration to of_clk_init(), just before calling clock provider's probe routine. Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | clk: add clk-gpio driverNikita Yushchenko2018-05-142-1/+131
| |/ / | | | | | | | | | | | | | | | | | | | | | This implements support for gpio-gate-clock device tree nodes, that define clocks that can be enabled or disabled via GPIO line. Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | wdt: da9053: fix missed dev->hwdev conversionLucas Stach2018-06-081-1/+1
| | | | | | | | | | | | | | | | | | Fixes: 1ef7cd07a304 (watchdog: rename dev to hwdev) Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | mtd: core: Fix printing partitions in hexTeresa Remmet2018-06-071-1/+1
| |/ |/| | | | | | | | | | | | | When printing the partition size with "0x" prefix the value has to be displayed in hex. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | usb: gadget: fastboot: fix barebox update without using bufferMichael Grzeschik2018-05-171-1/+1
|/ | | | | | | | | | | | Commit e5098495 "usb: gadget: fastboot: Add option to download to a buffer" breaks the use of temporary files for fastboot barebox_update. In the patch the ".imagefile = FASTBOOT_TMPFILE" allocation gets removed, but data.imagefile is still used. This leads to an NULL pointer dereference. We fix it by using sourcefile instead. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/socfpga'Sascha Hauer2018-05-091-0/+1
|\
| * net: make SoCFPGA-specific designware driver work againAntony Pavlov2018-04-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | If MFD_SYSCON is disabled in .config then socfpga_designware_eth probe fails with this message: socfpga_designware_eth ff702000.ethernet: Could not get sysmgr-syscon node Thanks to Steffen for hint! Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/serdev'Sascha Hauer2018-05-099-82/+6
|\ \
| * | serial: Drop .remove functions from all driversAndrey Smirnov2018-04-178-82/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Depending on specifics, some 'serdev' devices might need prevent parent console device from being removed and corresponding memory deallocated to properly function until the very end of Barebox's execution. An example of such a use-case would be a reset handler relying on a serdev device for transport. To avoid having to develop complicatione reference counting/ownership scheme drop all of the code that calls console_unregister() and frees the memory effectively making the problem above impossible to arise. All of the de-initialization that serial drivers were doing in their .remove functions was somewhat superflous anyway, so this change should be pretty harmless. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | console: Add simplified 'serdev' framework from Linux kernelAndrey Smirnov2018-04-171-0/+6
| |/ | | | | | | | | | | | | | | | | Port 'serdev' UART-slave deivce framework found in recent Linux kernels (post 4.13) in order to be able to port 'serdev' slave drivers from Linux. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/net'Sascha Hauer2018-05-091-0/+1
|\ \
| * | net: phy: micrel: fix too late link upChristian Hemp2018-04-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit a4cee7207a1 ("net: phy: micrel: Add workaround for bad autoneg") by Philipp Zabel <p.zabel@pengutronix.de>: Based on kernel commit d2fd719bcb0e ("net/phy: micrel: Add workaround for bad autoneg") by Nathan Sullivan <nathan.sullivan@ni.com>: Very rarely, the KSZ9031 will appear to complete autonegotiation, but will drop all traffic afterwards. When this happens, the idle error count will read 0xFF after autonegotiation completes. Reset the PHY when in that state. is it possible that we get the link to late and barebox reports "Network is down". The problem is that ksz9031_config_init is called again in an error case. In this case autoneg will restart but waiting for finish is missing. Signed-off-by: Christian Hemp <c.hemp@phytec.de> Tested-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2018-05-099-5/+1203
|\ \ \
| * | | watchdog: Port RAVE SP watchdog driver from Linux kernelAndrey Smirnov2018-05-043-0/+432
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Port RAVE SP watchdog driver from Linux kernel Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mfd: Port RAVE SP driver from Linux kernelAndrey Smirnov2018-05-043-0/+767
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Port MFD driver for RAVE SP from Linux kernel. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | usbnet: increase bulk message timeoutNikita Yushchenko2018-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Timeout of 1ms is too low for case when device operates in Full Speed mode. This causes most incoming frames to be lost. Since timeout is only used to get out of polling loop in case of no response from hardware, increasing it should be safe for all platforms. Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Tested-By: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | video: tc358767: don't link AUX i2c adapter to parent OF nodeLucas Stach2018-04-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise the i2c core will try to populate the TC358767 child nodes as i2c devices, which is wrong. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | pinctrl-vf610: Make use of BIT macroAndrey Smirnov2018-04-111-3/+3
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/mfd-dialog'Sascha Hauer2018-05-092-12/+149
|\ \ \ \
| * | | | mfd: da9063: update Kconfig for DA9062Stefan Christ2018-04-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Christian Hemp <c.hemp@phytec.de>