summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* of: Add missing includeSascha Hauer2016-05-241-1/+1
| | | | | | | drivers/of/device.c has the implementation for of_match_device(), so also include the header which has the prototype. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ATA: platform_ide: Fix resource allocationAlexander Shiyan2016-05-231-9/+5
| | | | | | | | | | | Fixes: 3bd69ad driver: replace dev_request_mem_region with dev_request_mem_resource The driver trying to use memory resource, then IO resource. The ALT register is optional. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb: fastboot: Fix oem exec supportSascha Hauer2016-05-101-1/+1
| | | | | | | | | Fixes: b1374a6 usb: fastboot: drop CONFIG_COMMAND_SUPPORT dependency The correct config option to depend on is CONFIG_COMMAND_SUPPORT, not CONFIG_COMMAND. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ubiformat'Sascha Hauer2016-05-092-7/+16
|\
| * usb: fastboot: drop CONFIG_COMMAND_SUPPORT dependencySascha Hauer2016-04-262-1/+5
| | | | | | | | | | | | | | fastboot can run without command support. In this case we cannot execute oem commands. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: fastboot: Use C API for ubiformatSascha Hauer2016-04-261-5/+11
| | | | | | | | | | | | | | | | This makes it possible to compile the fastboot gadget without command support. While at it bail out when ubiformat is not compiled in. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/pci'Sascha Hauer2016-05-093-109/+168
|\ \
| * | PCI: imx6: Add DT bindings to configure PHY Tx driver settingsAndrey Smirnov2016-05-031-3/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The settings in GPR8 are dependent upon the particular layout of the hardware platform. As such, they should be configurable via the device tree. Look up PHY Tx driver settings from the device tree. Fall back to the original hard-coded values if they are not specified in the device tree. [Andrey Smirnov: port to Barebox codebase] Signed-off-by: Justin Waters <justin.waters@timesys.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Acked-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PCI: imx6: Remove broken Gen2 workaroundAndrey Smirnov2016-05-031-16/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the remnants of the workaround for erratum ERR005184 which was never completely implemented. The checks alone don't carry any value as we don't act properly on the result. A workaround should be added to the lane speed change in establish_link later. [Andrey Smirnov: port to Barebox codebase] Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PCI: imx6: Move PHY reset into imx6_pcie_establish_link()Andrey Smirnov2016-05-031-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the PHY reset into a common error path of imx6_pcie_establish_link(), deduplicating some of the debug prints. Also reduce the severity of the "no-link" message in the one place where it is expected to be hit when no peripheral is attached. [Andrey Smirnov: port to Barebox codebase] Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PCI: imx6: Move imx6_pcie_reset_phy() near other PHY handling functionsAndrey Smirnov2016-04-281-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move imx6_pcie_reset_phy() near the other PHY related functions in the file. This is a cosmetic change, but also allows to do the following changes without introducing needless forward declarations. [Andrey Smirnov: port to Barebox codebase] Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PCI: imx6: Simplify a trivial if-return sequenceFabio Estevam2016-04-281-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify a trivial if-return sequence by combining it with a preceding function call. The semantic patch that makes this change is available in scripts/coccinelle/misc/simple_return.cocci. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PCI: imx6: Rename imx6_pcie_start_link() to imx6_pcie_establish_link()Andrey Smirnov2016-04-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename imx6_pcie_start_link() to imx6_pcie_establish_link() to follow the convention of other DesignWare-based host drivers. No functional change. [Andrey Smirnov: port to BB codebase] Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Pratyush Anand <pratyush.anand@gmail.com> Acked-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PCI: imx6: Add proper i.MX6+ reset sequenceAndrey Smirnov2016-04-281-29/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I.MX6+ version of the silicon exposed PCIe core's reset signal as a bit in one of the control registers. As a result using old, pre-i.MX6+, reset sequence on i.MX6+ leads to Barebox hanging during startup. Using exposed reset bit instead solves the problem. This commit is based on portions of commit c34068d48273e24d392d9a49a38be807954420ed in http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Acked-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | OF: Port of_match_device() and of_device_get_match_data()Andrey Smirnov2016-04-282-1/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | Port of_match_device() and of_device_get_match_data() from Linux kernel code. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Acked-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PCI: imx6: Simplify imx6_pcie_remove()Andrey Smirnov2016-04-281-18/+1
| |/ | | | | | | | | | | | | | | | | | | Instead of manualy flipping the bits call imx6_pcie_assert_core_reset() to give the code, executing after BB, a clean slate. This also makes the function match similar code in Linux kernel driver. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Acked-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mtd'Sascha Hauer2016-05-092-57/+42
|\ \
| * | mtd: nand: omap_gpmc: Fix bitflips in empty pageTeresa Remmet2016-04-121-20/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using BCH8 decoding, bitflips in an empty page are not checked. This can cause issues if UBI/UBIFS are used. Extend the omap_correct_bch() function to check for them. Code is based on linux mainline mtd/nand/omap2.c driver. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: nand: omap_gpmc: Remove BCH4 supportTeresa Remmet2016-04-122-38/+1
| | | | | | | | | | | | | | | | | | | | | This has no users and seems to be untested. Removed it. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2016-05-0912-55/+174
|\ \ \
| * | | net: phy: Add fixed link supportSascha Hauer2016-05-091-8/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some network devices, especially when connected to a switch, are connected via a fixed link. This patch adds support for a fixed phy configured through device tree. TODO: Add support for the "speed" and "full-duplex" properties. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Wjatscheslaw Stoljarski <wjatscheslaw.stoljarski@kiwigrid.com>
| * | | ATA: Implement a hook for 'devinfo'Andrey Smirnov2016-04-281-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement simple adapter function to serve as a hook for 'devinfo' command. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | of: fix of_tree_for_each_node_from() macroBoris Brezillon2016-04-281-32/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of_tree_for_each_node_from() is supposed to iterate over all DT nodes after the one pointed by the from parameter, but with the current of_next_node() implementation we cannot access the root node. Patch of_next_node() to point to root_node when from is NULL. Doing that also simplifies users of of_tree_for_each_node_from() which were duplicating the logic to point to the root_node when from is NULL. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | state: Fix Kconfig dependenciesSascha Hauer2016-04-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | State support does not need OF_BAREBOX_DRIVERS and never did, so drop the dependency there. It's the state driver which needs of_find_path(), since this symbol now is always enabled when OF is enabled, we don't have to add the dependency to the state driver, but instead can depend on OFDEVICE. We could depend on OF instead, but compiling the state driver without OFDEVICE makes no sense. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | drivers/of: Always compile of_path.c with OF supportSascha Hauer2016-04-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | of_find_path() is a OF specific library function, so always compile it when OF support is enabled. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | of: preserve /memreserve/ entriesSascha Hauer2016-04-251-6/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some dts files for the Kernel specify a reserved memory area using the /memreserve/ dtc directive. These entries get lost during unflattening/flattening the device tree and are never passed to the Kernel. This patch fixes this behaviour. This is done by copying the entries into a /memreserve node in the unflattened tree and moving them back during flattening the tree. The entries added by barebox dynamically are appended to the static entries from the original dtb. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | whole tree: remove trailing whitespacesDu Huanpeng2016-04-214-4/+4
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: mxs: add support for dt aliases to name devicesUwe Kleine-König2016-04-121-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While changing there, reformat the comment and use ; instead of , after the previous call. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | pinctrl: mxs: add raw value from device tree to debug outputUwe Kleine-König2016-04-121-2/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | Not sure this is of general interest, but it helped me matching pin configs from a static table to device tree entries. 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/include-pdata'Sascha Hauer2016-05-0911-11/+11
|\ \ \
| * | | include: Move ide platform_data to include/platform_dataSascha Hauer2016-04-152-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | include: Move smc911x eth platform_data to include/platform_dataSascha Hauer2016-04-151-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | include: Move dm9000 eth platform_data to include/platform_dataSascha Hauer2016-04-151-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | include: Move ns16550 serial platform_data to include/platform_dataSascha Hauer2016-04-151-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | include: Move fec eth platform_data to include/platform_dataSascha Hauer2016-04-152-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | include: Move davinci emac platform_data to include/platform_dataSascha Hauer2016-04-151-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | include: Move designware eth platform_data to include/platform_dataSascha Hauer2016-04-151-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | include: Move smc91111 eth platform_data to include/platform_dataSascha Hauer2016-04-151-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | include: Move ep93xx eth platform_data to include/platform_dataSascha Hauer2016-04-151-1/+1
| |/ / | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/include-cleanup'Sascha Hauer2016-05-0937-56/+65
|\ \ \
| * | | stdio: rename getc to getcharSascha Hauer2016-04-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The function we have implemented as getc has the semantics of the standard function getchar, so rename it accorgingly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | string: Fix (v)asprintf prototypesSascha Hauer2016-04-1534-54/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our asprintf and vasprintf have different prototypes than the glibc functions. This causes trouble when we want to share barebox code with userspace code. Change the prototypes for (v)asprintf to match the glibc prototypes. Since the current (v)asprintf are convenient to use change the existing functions to b(v)asprintf. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | include: move crc specific stuff to crc.hSascha Hauer2016-04-152-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We have a crc.h, so move our crc function prototypes there to further cleanup common.h. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | include: move run_command prototype to command.hSascha Hauer2016-04-151-0/+1
| |/ / | | | | | | | | | | | | | | | run_command fits much better into command.h, move it there. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/imx'Sascha Hauer2016-05-091-0/+14
|\ \ \
| * | | mci: imx-esdhc: implement reset quirks for i.MX6 DualLite/SoloStefan Christ2016-05-091-0/+14
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First of all the reset values of MMC interfaces are differently between Quad and DualLite/Solo SoM. Register VEND_SPEC2(0xC8) Quad: 0x0 DualLite: 0x00000006 default: 0x00000006 (from i.MX6 Reference Manual) Furthermore the ROM Code of Quad and DualLite uses the MMC interfaces differently when it loads the bootloader from that device: Register DLL_CTRL(0x60) Bit 25 FBCLK_SEL (0x48) Quad: 0x0 0 DualLite: 0x01000021 1 Since the linux kernel and barebox driver doesn't reset all registers, the MMC interface is in an inconsistent state, which leads to boot failures for some eMMC devices on the i.MX6 DualLite SoM. The errors look like: mmcblk3: error -110 sending stop command, original cmd response 0x900, card status 0x400900 mmcblk3: error -84 transferring data, sector 24578, nr 2, cmd response 0x900, card status 0x0 mmcblk3: retrying using single block read mmcblk3: error -84 transferring data, sector 24578, nr 2, cmd response 0x900, card status 0x0 blk_update_request: I/O error, dev mmcblk3, sector 24578 It's sufficient to reset register DLL_CTRL and bit FBCLK_SEL. Register VEND_SPEC2 has no effect. Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/arm'Sascha Hauer2016-05-091-0/+9
|\ \ \
| * | | serial_auart: make dt awareUwe Kleine-König2016-04-271-0/+9
| |/ / | | | | | | | | | | | | | | | | | | | | | This allows to instantiate devices from an oftree and so allows to select the console using /chosen/stdout-path. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | / sata-imx: Fix a typoAndrey Smirnov2016-04-281-1/+1
| |/ |/| | | | | | | | | | | | | It looks like comma operator was accidentaly used instead of regular semicolon. Fix this to avoid confusing future readers of the code. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | fix erasing/protecting flashes with unspecified sizeSascha Hauer2016-04-192-3/+3
|/ | | | | | | | | | | | | | | | | fixes: 81737c1 mtd: Fix erasing of devices >4GiB Several places erased a complete flash partition passing ~0 as count to erase(). With the above commit count to erase was changed from an unsigned type to a signed type, so the (count > f->size - offset) check in erase() no longer triggers and the ~0 count is no longer adjusted to the whole device size. Among other things this results in saveenv failures on NOR flashes. This patch fixes this by introducing an explicit macro for erasing the whole device which is tested for in erase(). All other negative values are rejected. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reported-by: Giorgio <giorgio.nicole@arcor.de>