summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | mci: core: Increase clock for SD highspeed modeSascha Hauer2015-10-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Putting a SD card into highspeed mode doesn't help much when we still clock the card with 25MHz. Increase the clock speed to 50MHz for high speed cards. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ata: intf_platform_ide: add OF bindingsPeter Mamonov2015-09-241-5/+25
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | drivers: mci: Add mci_get_device_by_name functionDaniel Schultz2015-09-041-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Get a 'struct mci' by search after the device name. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | drivers: mci: Make two functions publicDaniel Schultz2015-09-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no possibility to read/write to the extended CSD register of MMC devices from a command. To avoid duplicated driver code, two driver functions have to be public. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/imx-ldb'Sascha Hauer2015-10-074-41/+81
|\ \ \ \
| * | | | video: backlight-pwm: Add regulator supportSascha Hauer2015-10-011-0/+13
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | video: backlight-pwm: Add error messageSascha Hauer2015-10-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Inform the user when we can't find a pwm for the backlight driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | video: ipuv3: print error message when no modes are foundSascha Hauer2015-10-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a common error, so print a message to inform the user what went wrong. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | video: simple-panel: Add support for device tree provided nodesSascha Hauer2015-10-011-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for display timings provided from device tree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | video: simple-panel: Add debug/error messagesSascha Hauer2015-10-011-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let the driver be more informative when something goes wrong. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | video: ipuv3: imx-ldb: Support video modes in ldb nodeSascha Hauer2015-10-011-28/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to support video modes directly in the ldb device node, that was lost in: 5bda17e video: ipuv3: Replace ipu_output with VPL. Add this support back. Also drop duplicate vpl ioctl forwarding for several calls. With this patch modes can either be retrieved from the ldb node as originally done or from the panel remote port. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | video: ipuv3: imx-ldb: remove unused variableSascha Hauer2015-10-011-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | endpoint is set but not used. Remove the code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | video: ipuv3: Do not crash when no mode is foundSascha Hauer2015-10-011-0/+5
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | When something is missing in the device tree or not all necessary drivers are compiled in it may happen that no valid mode is found. Do not crash in this case but print an error message. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/imx'Sascha Hauer2015-10-072-5/+63
|\ \ \ \
| * | | | chipidea-imx: allow phymode configuration in pdataEric Bénard2015-09-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | it's currently only handled through DT and for i.MX25 OTG port (at least), we need to configure portsc to get host mode working but it actually fails as ci->phymode is 0 which is USBPHY_INTERFACE_MODE_UNKNOWN Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | i2c: fsl: Add bus recovery supportSascha Hauer2015-09-171-5/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Useful for recovering busses. This needs additional device tree properties describing the sda/scl gpios. The corresponding linux patch with the binding description is currently under review. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Revert "spi: i.MX: optimize transfers for ECSPI v2.3"Sascha Hauer2015-10-051-72/+1
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | This does not work on the Efika MX Smartbook which uses SPI to connect the MC13892. Needs some rework. This reverts commit 746a5530bee37c8d2ffc75609447641b3f3cb55b.
* | | | video: imx: assert that image buffer doesn't cross a 4 MiB boundaryUwe Kleine-König2015-09-211-10/+39
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reference manual (for the i.MX25 in my case) states: This field must start at a location that enables a complete picture to be stored in a 4 Mbyte memory boundary (A [21:0]). A [31:22] has a fixed value for a picture’s image. Check this condition for user-supplied framebuffer values and enforce it for driver-allocated buffers. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / / net: e1000: correct function signature of set_ethaddrLucas Stach2015-09-091-1/+1
|/ / | | | | | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mfd: da9053: remove references to nonexistent cdev memberLucas Stach2015-09-041-2/+1
| | | | | | | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ata: ide-sff: fix integer overflow in ata_wait_ready()Peter Mamonov2015-09-041-1/+1
|/ | | | | Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/usb'Sascha Hauer2015-09-011-14/+26
|\
| * usb: ehci: prevent bad PORTSC register accessKuo-Jung Su2015-08-261-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. The 'index' of ehci_submit_root() is not always > 0. e.g. While it gets invoked from usb_get_descriptor(), the 'index' is always a '0'. (See ch.9 of USB2.0) 2. The PORTSC register is not always required, and thus it should only report a port error when necessary. It would cause a port scan failure if the ehci_submit_root() always gets terminated by a port error. Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com> Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: ehci: replace multiple use of le16_to_cpu(req->index) with variableKuo-Jung Su2015-08-261-9/+10
| | | | | | | | | | | | | | | | This is part of U-Boot commit: 7d9aa8f usb: Add new command to set USB 2.0 port test modes Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: ehci-hcd: initialize ehci->qh_list[] with zerosPeter Mamonov2015-08-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this initialization ehci->qh_list[0].qh_endpt2 is left uninitialized, which causes problems with some EHCI host controllers. Das u-boot uses the same strategy: static int ehci_common_init(struct ehci_ctrl *ctrl, uint tweaks) { ... qh_list = &ctrl->qh_list; /* Set head of reclaim list */ memset(qh_list, 0, sizeof(*qh_list)); qh_list->qh_link = cpu_to_hc32((unsigned long)qh_list | QH_LINK_TYPE_QH); qh_list->qh_endpt1 = cpu_to_hc32(QH_ENDPT1_H(1) | QH_ENDPT1_EPS(USB_SPEED_HIGH)); qh_list->qh_overlay.qt_next = cpu_to_hc32(QT_NEXT_TERMINATE); qh_list->qh_overlay.qt_altnext = cpu_to_hc32(QT_NEXT_TERMINATE); qh_list->qh_overlay.qt_token = cpu_to_hc32(QT_TOKEN_STATUS(QT_TOKEN_STATUS_HALTED)); ... } Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/socfpga'Sascha Hauer2015-09-013-60/+113
|\ \
| * | serial: ns16550: Set linux_console_nameSascha Hauer2015-08-261-0/+2
| | | | | | | | | | | | | | | | | | | | | The regular ns16450/ns16550 devices get the console name "ttyS" under Linux. Add this to the driver data. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clk: socfpga: don't register fixed clocksSteffen Trumtrar2015-08-191-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fixed clocks are registered from devicetree. Therefore the code path is not needed, but would instead register the clocks twice, which leads to the error message: clk_register clk f2s_periph_ref_clk is already registered, skipping! of_clk_init: failed to init clock for /soc/clkmgr@ffd04000/clocks/f2s_periph_ref_clk: 1 clk_register clk osc1 is already registered, skipping! of_clk_init: failed to init clock for /soc/clkmgr@ffd04000/clocks/osc1: 1 Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | gpio: dw: implement new bindingsSteffen Trumtrar2015-08-191-24/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | The gpio-driver was developed when the bindings where not stable. As these have changed in the meantime, the driver has to be updated to the status quo. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | gpio: dw: fix copy&paste variable nameSteffen Trumtrar2015-08-191-2/+2
| | | | | | | | | | | | | | | | | | | | | This is a DW driver not IMX; fix variable name. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clk: socfpga: fix dt binding supportSteffen Trumtrar2015-08-191-21/+52
| |/ | | | | | | | | | | | | | | Change the set_parent/get_parent functions for clock-gates to work with the Linux kernel DT bindings. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/restart'Sascha Hauer2015-09-0110-54/+583
|\ \
| * | mfd: da9053: add da9053 watchdog and system restart driverJuergen Borleis2015-08-283-0/+316
| | | | | | | | | | | | | | | | | | Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mfd: da9063: add da9063 watchdog and system restart driverPhilipp Zabel2015-08-283-0/+174
| | | | | | | | | | | | Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
| * | watchdog: Give watchdogs a nameSascha Hauer2015-08-274-1/+17
| | | | | | | | | | | | | | | | | | | | | This adds a dev and name member to struct watchdog which helps distinguishing between different watchdogs. Also add some debugging aids. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | watchdog: Allow multiple watchdogsSascha Hauer2015-08-271-12/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | Put watchdogs on a list to allow multiple watchdogs. Add a priority field to be able to pick the highest priority watchdog. This patch also provides a of_get_watchdog_priority() function to allow configuring the watchdog priority from the device tree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | restart: replace reset_cpu with registered restart handlersSascha Hauer2015-08-273-30/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces the reset_cpu() function which every SoC or board must provide with registered handlers. This makes it possible to have multiple reset functions for boards which have multiple ways to reset the machine. Also boards which have no way at all to reset the machine no longer have to provide a dummy reset_cpu() function. The problem this solves is that some machines have external PMICs or similar to reset the system which have to be preferred over the internal SoC reset, because the PMIC can reset not only the SoC but also the external devices. To pick the right way to reset a machine each handler has a priority. The default priority is 100 and all currently existing restart handlers are registered with this priority. of_get_restart_priority() allows to retrieve the priority from the device tree which makes it possible for boards to give certain restart handlers a higher priority in order to use this one instead of the default one. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | watchdog: imxwd: remove remove callbackSascha Hauer2015-08-261-12/+0
| |/ | | | | | | | | | | | | | | | | The imxwd is for resetting the system, so we should not unregister it during shutdown_barebox() as it may leave us without a restart handler. Only a bug (not setting reset_wd to NULL in remove()) made the whole thing work. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/of_path'Sascha Hauer2015-09-012-7/+11
|\ \
| * | of_path: Allow pointing directly to the partitionSascha Hauer2015-09-011-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | We could only point to partitions in the device tree by using &norflash, "partname:barebox-environment". Allow to point to the partition directly without having to parse the partition labels. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | cdev: Add function to find cdev by device_nodeSascha Hauer2015-09-011-2/+2
| |/ | | | | | | | | | | | | | | | | | | This adds a device_node member to struct cdev and a function to find a cdev by device_node. This also removes the setting of cdev->dev->device_node in the of partition parser. We must not set the device since it may not refer to a partition but to a whole device with partitions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mtd'Sascha Hauer2015-09-014-91/+122
|\ \
| * | spi: i.MX: optimize transfers for ECSPI v2.3Sascha Hauer2015-08-311-1/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of writing one word to the txfifo and then wait until one is received in the rxfifo we can write until the txfifos are not full and read as long the rxfifos contain data. This makes transfers for the m25p80 driver around 7 times faster here. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | spi: i.MX: create SoC specific transfer functionsSascha Hauer2015-08-311-14/+31
| | | | | | | | | | | | | | | | | | | | | There are SoC specific ways to optimize transfers. Make the way free to implement these by creating SoC specific transfer functions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | spi: i.MX: use start mode control bitSascha Hauer2015-08-311-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | The i.MX SPI controller in version 2.3 can immediately start a transfer when the txfifo is written to. In this mode we no longer have to trigger the transfer with the xch bit which makes the code a bit simpler. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: spi-nor: mostly drop lock/unlock codeSascha Hauer2015-08-281-66/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The lock/unlock code is broken beyond repair. First of all the algorithm doesn't work properly. SPI NOR flashes can only protect a certain amount of blocks from the end of the device which is incompatible to the protect(start,len) API we have. The algorithm tries to be clever by doing protection only when it does not protect unrelated blocks and unprotection only when it does not unprotect unrelated blocks. This breaks for example when some code protects the last blocks (which may contain the bootloader), then protects the blocks before the last ones (which may contain the environment). Then if we try to overwrite the bootloader this won't work since it would unprotect the environment aswell, so the driver will not unprotect anything resulting in a failed erase/write later. Then the protection behaviour is different between different flashes. Some have three protection bits, some have four. For some the smallest protection are is 1/16 of the device, others have 1/256 or 1/64. Some have a bit which selects the lower area instead of upper area for protection. The position of this bit differs on different flashes. This patch removes the lock code completely and always unprotects the whole device. This way we can unprotect a device for writing to it and never protect it again. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: m25p80: make it possible to use large blocks if desiredSascha Hauer2015-08-263-5/+10
| |/ | | | | | | | | | | | | | | | | | | Some SPI NOR flashes support 4K erase blocks. 4K erase blocks do not work with UBIFS which needs a minimum erase block size of 15360 bytes. Also bigger sectors are faster to erase. This patch adds a device tree option to use the bigger blocks instead of the default 4K blocks. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2015-09-014-22/+32
|\ \
| * | mci: mmci: Fix status flags checkAlexander Shiyan2015-08-191-9/+9
| | | | | | | | | | | | | | | | | | Data transfer procedures should check _DATA_ flags instead of _CMD_. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: nand: mrvl-nand: create initial empty bbtRobert Jarzmik2015-08-191-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating an initial bad blocks table, create it empty. This is necessary because when the bad block table blocks are not initialized (all ff) while some partitions are, all the blocks which have an OOB data not beginning with 0xff 0xff will be marked as bad blocks in the initial bad blocks scan. As a consequence, any existing blocks are impossible to erase anymore. Fix this by fixing the BBT creation flag. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>