summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* mtd: partition: Fix OF partition fixupSascha Hauer2015-04-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To get the number of address cells and size cells we have to use the newly created partition node, not the parent device node. The parent device node returns the address/size cells of the controller node, not the partition node. On an am335x machine this fixes the device tree passed to Linux. The situation there is: ... gpmc@50000000 { ... #address-cells = <0x2>; #size-cells = <0x1>; ranges = <0x0 0x0 0x8000000 0x10000000>; ... nand@0,0 { reg = <0x0 0x0 0x0>; #address-cells = <0x1>; #size-cells = <0x1>; ... partition@7 { label = "system"; reg = <0x220000 0x7de0000>; }; }; }; and without this patch barebox passes three bytes for partition@7's reg property instead of only two which naturally confuses Linux and yields to the system partition to start at 0 with a size of 0x220000. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
* USB: xHCI: Sync non-coherent DMA buffersSebastian Hesselbarth2015-04-151-1/+22
| | | | | | | | | | When working with non-coherent transfer buffers, we have to sync device and cpu for outgoing and incoming buffers. Fix the driver where non-coherent buffers are used in device context. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/state'Sascha Hauer2015-04-133-0/+86
|\
| * state: add framework for persistent state handlingSascha Hauer2015-03-123-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a framework to describe, access, store and restore a set of variables. A state variable set can be fully described in a devicetree node. This node could be part of the regular devicetree blob or it could be an extra devicetree solely for the state. The state variable set contains variables of different types and a place to store the variable set. For more information see: Documentation/devicetree/bindings/barebox/barebox,state.rst Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/pxa'Sascha Hauer2015-04-131-0/+29
|\ \
| * | net: smc1111: add a quirk for pxa pxa27x platformsRobert Jarzmik2015-04-131-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As hinted in the linux kernel driver, pxa platforms such as mainstone, stargate and idp have a broken design, where half-word writes not aligned to a word address are not working. This patch is a taking back the half-word write accessor for this specific case from the linux kernel. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/pci'Sascha Hauer2015-04-136-20/+1275
|\ \ \
| * | | pci: Add i.MX6 pcie supportSascha Hauer2015-03-173-0/+620
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on the corresponding kernel driver with changes to make it work on barebox. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | pci: Add pcie-designware driverSascha Hauer2015-03-174-0/+639
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on the corresponding kernel driver, only small changes to make it work on barebox. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | pci: fix copy-paste bugSascha Hauer2015-03-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Test for the correct resource before derefencing it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | pci: Use standard pr_debugSascha Hauer2015-03-171-19/+15
| | | | | | | | | | | | | | | | | | | | | | | | Use pr_debug instead of custom DBG macro. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/net'Sascha Hauer2015-04-134-0/+6557
|\ \ \ \
| * | | | net: Add Intel e1000 driverSascha Hauer2015-04-034-0/+6557
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the Intel e1000 driver from U-Boot. The driver looks in parts quite similar to the kernel driver, I don't know whether one is derived from the other or if they both just have the same origin. Many coding style related issues are fixed, the code is simplified in several places. All features of the original driver should still be there, only fiber support is disabled since it's quite unlikely that this is used in barebox. The driver has been tested with the i.MX6 PCIe driver and a I210 e1000 device (0x8086:0x1533) Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/imx'Sascha Hauer2015-04-132-12/+56
|\ \ \ \
| * | | | wdog: imx-wd: Disable watchdog powerdown counterMarkus Pargmann2015-04-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable the watchdog powerdown counter at start. Otherwise this may trigger a reset or poweroff over the WDOG_B line to a PMIC. This counter is set to 16 seconds after poweron. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | wdog: imx-wd: Introduce ops struct for imx21/imx1Markus Pargmann2015-04-131-12/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the set_timeout function in the device platform data by an ops struct which stores a set_timeout and init function. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM/MXS/i.MX28: recognize watchdog resetSteffen Trumtrar2015-03-301-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a watchdog timeout is set in the linux kernel, the FORCE_UPDATE bit is set. Use this to recognize a system reset that was triggered by the watchdog. Since only the wdt part of the kernel driver sets this bit, this is a safe distinguishing feature. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/driver'Sascha Hauer2015-04-136-9/+15
|\ \ \ \ \ | |_|_|/ / |/| | | |
| * | | | driver: Call bus->remove instead of driver->removeSascha Hauer2015-03-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In devices_shutdown we should call the busses remove function which in turn calls the drivers remove function. Otherwise for example PCI devices never get removed since they do not have a remove function but a pcidev->remove function instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | driver: Call remove function only when availableSascha Hauer2015-03-175-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bus implementations currently call the drivers remove hook unconditionally, but this hook is seldomly populated. Only call it when it's actually populated. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | driver: fix device remove orderSascha Hauer2015-03-171-2/+3
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The active list is supposed to collect active devices in the opposite order they are probed. This is used to remove the devices in the correct order in devices_shutdown. The order is wrong though when in a drivers probe function other devices are registered. To get the order right we have to add the new device to the active list before it is probed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | net: smc1111: fix platform data initializationsRobert Jarzmik2015-04-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The configuration and control setup introduced in commit "extend the driver for 91c94 and 91c96 support" suffers from a typo defect, which makes the commit broken. The typo happens to be in barebox tree, while it's not in the tested patches I had, and there was a mismatch in my former submission, which is fixed by this patch. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | net: mvneta: Fix transmit errors due to dirty txdescSebastian Hesselbarth2015-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Marvell Neta's transmit descriptor (txdesc) is allocated by dma_alloc_coherent() but not zeroed before calling mvneta_send the first time. This can cause spurious transmit errors due to improperly set bits in txdesc's cmd_sts field. Fix initial transmit errors by always writing whole cmd_sts field instead of ORing the bits. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | pci: make sure to activate devices on the root busLucas Stach2015-04-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit b8a1bb1dd215 (pci: defer device registration until after bridge setup) changed the activation order of devices, so that bridges above the devices could be configured properly before activating the devices below. This commit failed to acknowledge that there may be devices located directly on the root bus without any bridge in between and so those devices would never get enabled. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
* | | | mtd: nand_omap_gpmc: Fix ecc check for bch8 romcodeTeresa Gámez2015-03-301-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bch8 romcode was only checked and corrected for the first 512 bytes of a 2048 byte page. Set interation counter and eccsizes correct for the different bch types. Tested OMAP_ECC_BCH8_CODE_HW and OMAP_ECC_BCH8_CODE_HW_ROMCODE. Reported-by: Gabor Janak <g.janak@agilion.de> Signed-off-by: Teresa Gámez <t.gamez@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | mtd: nand_omap_gpmc: Remove unused codeTeresa Gámez2015-03-301-68/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The ecc layout structs are not used anywhere. Signed-off-by: Teresa Gámez <t.gamez@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | usb: host: xhci: depend on HAS_DMALucas Stach2015-03-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver needs the dma coherent function and thus can only work on architectures implementing them. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | clk: fractional-divider: fix build with CONFIG_MODULESLucas Stach2015-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: error: 'clk_register_fractional_divider' undeclared here introduced with commit 22a0c31c9265 (CLK: Add fractional divider clock support from Linux kernel) Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | mci: core: Check return value of dev_add_param_boolWadim Egorov2015-03-191-1/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 03b59bdb64e83ebcdb9111681775117ebce0e03b changed the return values of dev_add_param_* to ERR_PTR(-ENOSYS) and broke a few boards. We have now to care about the return value of dev_add_param_bool() in mci_register(). Also set the ret variable when dev_add_param_bool() fails. Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | net: mvneta: convert to streaming DMA opsLucas Stach2015-03-161-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | PCI: fix bad bugs in bridge setup codeLucas Stach2015-03-161-2/+4
|/ / | | | | | | | | | | | | | | Add the required brackets, so that we don't write unused registers with potentially bogus values. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / clk: clk-divider: fix _get_maxdiv for table based dividerSascha Hauer2015-03-121-0/+13
|/ | | | | | | The divider lacks the code for calculating the maximum divider for table based dividers. Add it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MMC: dw_mmc: PIO mode fixesAndrey Panov2015-03-091-73/+56
| | | | | | | | | | Simplify PIO mode routines. Fix a bug when IO is possibly performed twice because of using old interrupt status. Support for slow-speed card writes. Signed-off-by: Andrey Panov <rockford@yandex.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/tegra'Sascha Hauer2015-03-092-4/+7
|\
| * mci: tegra: handle mmc aliasesLucas Stach2015-03-041-0/+3
| | | | | | | | | | | | | | | | This allows to have fixed device names for the SDMMC controllers. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: make of_alias_get work on all types of DT pathsLucas Stach2015-03-041-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | of_alias_get assumed that a DT path is always the full node path, whic is not necessarily the case, as there are other valid path descriptions. All of them are handled by of_find_node_by_path. As there is already a preparsed list with all DT aliases that handles this case properly we can simply reuse that one. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/streaming-dma'Sascha Hauer2015-03-0935-171/+264
|\ \ | | | | | | | | | | | | Conflicts: drivers/mci/dw_mmc.c
| * | usb: host: ohci: convert to streaming DMA opsLucas Stach2015-03-061-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: host: ehci: convert to streaming DMA opsLucas Stach2015-03-061-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: gadget: fsl_udc: convert to streaming DMA opsLucas Stach2015-03-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: xgmac: convert to streaming DMA opsLucas Stach2015-03-061-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: rtl8169: convert to streaming DMA opsLucas Stach2015-03-062-17/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: orion-gbe: convert to streaming DMA opsLucas Stach2015-03-061-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: macb: convert to streaming DMA opsLucas Stach2015-03-061-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: fec: convert to streaming DMA opsLucas Stach2015-03-061-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: designware: convert to streaming DMA opsLucas Stach2015-03-061-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: davinci_emac: convert to streaming DMA opsLucas Stach2015-03-061-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: at91_ether: convert to streaming DMA opsLucas Stach2015-03-061-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: cpsw: convert to streaming DMA opsLucas Stach2015-03-061-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: arc-emac: convert to streaming DMA opsLucas Stach2015-03-061-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>