summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* watchdog: add designware driverSteffen Trumtrar2016-11-033-0/+200
| | | | | | | Port the linux v4.8-rc1 Synopsys DesignWare watchdog driver to barebox. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* reset: import socfpga-reset driver from linuxSteffen Trumtrar2016-10-182-0/+125
| | | | | | | Port the linux v4.8-rc1 reset-socfpga driver to barebox. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: ubi: Fix scrubbing during attachSascha Hauer2016-10-113-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | ensure_wear_leveling() is called at the end of ubi_wl_init() and may come to the decision to scrub some blocks. In the Kernel this is done in a separate thread, but in barebox we do this synchronously. The problem is that during ubi_wl_init() the EBA system is not yet initialized (ubi_eba_init() is not yet called), so the wear level worker hits a NULL pointer deref when the fastmap needs to be updated and ubi_write_fastmap() accesses vol->eba_tbl. Solve this by honoring the ubi->thread_enabled flag which is only set to true when UBI is sufficiently initialized. This means we now can have multiple works queued, so we can no longer simply do one work when queued, but instead have to continue to do work until all work is done. The best place to do so is a ubi_thread() function which behaves similar to the Kernel function with the same name, but is called synchronously in barebox. To make sure that the initially queued works are done, the call to (no-op) wake_up_process() at the end of ubi_attach_mtd_dev() is replaced with a call to ubi_thread(). While at it also honor the ubi->ro_mode flag to make sure we do not do any wear leveling work on readonly UBI devices. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/usb'Sascha Hauer2016-10-1010-39/+292
|\
| * usb: imx-us-phy: implement notify_(dis)concectSascha Hauer2016-09-291-0/+27
| | | | | | | | | | | | | | | | | | | | | | The i.MX6 USB phy does not recognize disconnects of high speed devices when the USBPHY_CTRL_ENHOSTDISCONDETECT is not set. The phy does not work properly though when this bit is always set, so implement the notify_(dis)concect() callbacks to set this bit whenever a high speed device is connected and to clear it again when the device is disconnected. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: imx-us-phy: Convert driver to generic phy supportSascha Hauer2016-09-293-4/+66
| | | | | | | | | | | | | | The generic phy layer now supports USB phys, so convert the driver over to use it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * phy: Add usb-nop-xceiv supportSascha Hauer2016-09-293-4/+116
| | | | | | | | | | | | | | | | | | Add a nop usb transcveiver driver. At the moment it does nothing, so is nothing more than a driver to satisfy the device tree dependencies. clk / vbus-regulator / vbus-detect-gpio support can be added later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * phy: Introduce to_usbphy conversion functionSascha Hauer2016-09-291-0/+12
| | | | | | | | | | | | | | | | | | | | The generic phy support layer has the necessary list handling and phy retrieval functions, so we should reuse them for usb phys. This adds a phy_to_usbphy() conversion function which drivers can implement which attach to the generic phy layer and are really usb phys. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * phy: Introduce of_phy_get_by_phandleSascha Hauer2016-09-291-0/+36
| | | | | | | | | | | | | | | | | | Currently generic phy support assumes that the standard phy binding from dts/Bindings/phy/phy-bindings.txt is used. This adds a helper function which can be used to retrieve a phy when this standard binding is not used. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: imx-usb-phy: Drop unnecessary read/modify/writeSascha Hauer2016-09-291-5/+2
| | | | | | | | | | | | | | When writing to the USBPHY_CTRL register read/modify/write is unncessary since we are writing to the associated bit set register anyway. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: ehci: forward phy given in registration data to hostSascha Hauer2016-09-291-0/+1
| | | | | | | | | | | | | | Allow to pass a phy in the registration data and forward it to the usb_host structure. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: Add usb phy to usb hostSascha Hauer2016-09-291-0/+8
| | | | | | | | | | | | | | | | Add a struct usb_phy * member to struct usb_host. Also, call usb_phy_notify_connect() / usb_phy_notify_disconnect() when there are connection changes on the root hub. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: Use standard debug macroSascha Hauer2016-09-281-27/+25
| | | | | | | | | | | | Use standard pr_debug instead of homebrew USB_PRINTF Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/ubi'Sascha Hauer2016-10-102-13/+189
|\ \
| * | mtd: ubi: add API call to rename volumes.Giorgio Dal Molin2016-09-272-0/+159
| | | | | | | | | | | | | | | Signed-off-by: Giorgio Dal Molin <iw3gtf@arcor.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: ubi: remove now unused ioctlsSascha Hauer2016-09-271-14/+5
| | | | | | | | | | | | | | | | | | | | | | | | The only ioctl needed is the one to get the ubi_num from a file descriptor. The remaining ioctls are now implemented as regular function calls. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: ubi: introduce barebox specific ioctl to get ubi_numSascha Hauer2016-09-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Code wishing to manipulate ubi devices from outside the ubi layer needs the ubi_num as reference. Add an ioctl to get the ubi_num from a filedescriptor. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: ubi: Add API calls to create/remove volumesSascha Hauer2016-09-221-0/+23
| |/ | | | | | | | | | | | | | | | | | | Currently we use a ioctl API to create/remove ubi volumes. This means we always have to carry all function code for ubi volume manipulation when the ioctl is compiled in. This adds a function API to create/remove volumes so that the linker can throw the unused code away later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mvebu'Sascha Hauer2016-10-103-2/+4
|\ \
| * | pinctrl: mvebu: armada-370 fix gpio name for mpp63Uwe Kleine-König2016-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was found that pin 63 also works as input and so the respective function is renamed from "gpo" to "gpio". The respective commit in Linux is: a526973e0291 ("pinctrl: mvebu: Fix mapping of pin 63 (gpo -> gpio)") which appeared in v4.1-rc3. The devicetrees are fixed accordingly since commit ce5cad51f381 ("ARM: dts: armada-370: Update the mpp63 function in the device tree on Armada 370") which appeared in v4.6-rc1. This fixes a runtime warning on the affected machines (globalscale-mirabox and netgear-rn104) and makes the pin functional again. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | pinctrl: mvebu: add newline to error messageUwe Kleine-König2016-10-041-1/+2
| | | | | | | | | | | | | | | Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: mvneta: clean txdesc before usageUwe Kleine-König2016-09-161-0/+1
| |/ | | | | | | | | | | | | | | This fixes tx error detection which triggered way too often because the hardware doesn't seem to clear the error bits on success 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/mtd'Sascha Hauer2016-10-101-30/+26
|\ \
| * | nand: denali: get rid of compile-time debug informationSteffen Trumtrar2016-09-261-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | Remove dev_dbgs containing __FILE__ and __LINE__ and no other interesting debug informations. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | nand: denali: use is_timeout in while loopSteffen Trumtrar2016-09-261-16/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using udelay and a countdown, use the is_timeout function. Also, move the code closer to the kernel version, i.e. check for the correct bank and clean the interrupt status. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | nand: denali: use correct interrupts in read_pageSteffen Trumtrar2016-09-261-2/+3
| |/ | | | | | | | | | | | | | | The interrupt mask is incorrect in case of HW error correction. The driver will time out waiting for the wrong interrupts. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2016-10-101-14/+12
|\ \
| * | firmware: altera-serial: simplify handling of optional gpioUwe Kleine-König2016-09-271-7/+5
| | | | | | | | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | firmware: altera-serial: Make the driver match the dt binding documentationUwe Kleine-König2016-09-271-7/+7
| |/ | | | | | | | | 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 Hauer2016-10-101-49/+0
|\ \
| * | mtd: imx-nand: Move v3 register definitions to include fileSascha Hauer2016-09-221-49/+0
| |/ | | | | | | | | | | | | Move v3 register definitions to include file so that they can be reused for the early nand boot code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | net/phy: marvell: fix error handlingUwe Kleine-König2016-10-041-1/+2
| | | | | | | | | | | | | | Without first assigning to ret it doesn't make sense to check it. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | video: tc358767: depend on EDID helpersLucas Stach2016-10-041-0/+1
| | | | | | | | | | | | | | The eDP part need to be able to read the panel EDID. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mfd: syscon: drop EXPORT_SYMBOL for static functionLucas Stach2016-10-041-2/+0
| | | | | | | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | serial: arm_dcc: depend on !CPU_V8Lucas Stach2016-10-041-1/+1
|/ | | | | | | | The DCC console uses coprocessor registers registers accesses, the implementation of those for ARMv8 is currently missing. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/video'Sascha Hauer2016-09-1310-29/+1354
|\
| * video/edid: Fix edid_to_display_timings error pathPhilipp Zabel2016-09-051-1/+0
| | | | | | | | | | | | | | | | | | | | | | edid_to_display_timings is called in drivers/video/imx-ipu-v3/imx-hdmi.c, drivers/video/simple-panel.c, and drivers/video/edid.c with the struct display_timings *timings parameter pointing to an embedded struct display_timings inside a struct fb_info. The timings pointer is not to be freed in the error path. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: tc358767: add eDP video encoder driverAndrey Gusakov2016-08-253-0/+1322
| | | | | | | | | | | | | | | | | | This patch adds support for the Toshiba TC358767 eDP bridge, connected via DPI. Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: add VPL ioctl to get bus formatPhilipp Zabel2016-08-251-2/+6
| | | | | | | | | | | | | | | | | | The i.MX specific DI_MODE VPL ioctl already allows to query the encoder input bus format. This patch also allows non-i.MX specific encoder drivers to report their input bus format. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: switch to media bus formatsPhilipp Zabel2016-08-256-28/+28
| | | | | | | | | | | | | | | | | | | | | | V4L2 pixel formats are supposed to describe video frames in memory. To describe the pixel format on the hardware bus between display interface and encoders, use media bus formats, which are more expressive. This allows to get rid of the custom GBR24 and LVDS666 fourccs. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/socfpga'Sascha Hauer2016-09-131-3/+22
|\ \
| * | clk: socfpga: add divider registers to the main pll outputsEnrico Jorns2016-08-181-3/+22
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is based on kernel patch 0691bb1b5a1865b3bbc9b7ce6e26eff546abb1cf by Dinh Nguyen <dinguyen@altera.com>. The C0(mpu_clk), C1(main_clk), and C2(dbg_base_clk) outputs from the main PLL go through a pre-divider before coming into the system. These registers were hidden for the CycloneV platform, but are now used for the ArriaV platform. This patch updates the clock driver to read the div-reg property for the socfpga-periph-clk clocks. Note: The registers used for the div-reg property are not documented but set by the preloader. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/rockchip'Sascha Hauer2016-09-136-1/+919
|\ \
| * | mci: dw_mmc: Add RK3288 compatible stringWadim Egorov2016-08-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | The SDHC used in the RK2928 and RK3288 are compatible with each other. Add a compatible string for RK3288's SDHC. Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clk: Add RK3288 clock driverWadim Egorov2016-08-262-1/+839
| | | | | | | | | | | | | | | | | | | | | | | | Add clk driver for RK3288 SoC. This driver comes from the Linux kernel. Based on kernel v4.4 Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clocksource: Add rk3288 timer driverWadim Egorov2016-08-263-0/+78
| |/ | | | | | | | | | | | | This driver comes from the u-boot (v2016.01). Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2016-09-133-4/+2
|\ \
| * | mci: mmci: Fix read FIFO handlingMichael Olbrich2016-09-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the Linux kernel and the qemu code, the MMCIFIFOCNT contains the remaining number of words to read, excluding those that are already in the FIFO. So the current number of bytes in the FIFO is host_remain - (readl(base + MMCIFIFOCNT) << 2). Also writing to MMCIDATACTRL will reset the read counter. As a result, MCI_DATABLOCKEND is never set and read_bytes() waits forever. With this change, SD-Card support on qemu vexpress works correctly. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: phy: of_phy_register_fixed_link(): drop redundant initializationAntony Pavlov2016-08-221-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The phy_device_create() function makes all necessary phydev initialization so we can drop phydev->pause and phydev->link initialization in the of_phy_register_fixed_link() function. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mfd mc13xxx: add MC13892_REVISION_2_4Alexander Kurz2016-08-181-0/+1
| |/ | | | | | | | | | | | | | | An MC13892CJ having REV[4:0]=0x14 can be found in the kindle-d01100. Add the revision to the list to support this device. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>