9
0
Fork 0
Commit Graph

3377 Commits

Author SHA1 Message Date
Sebastian Hesselbarth 40827c029f bus: mvebu-mbus: Remove coherency attribute
Marvell Armada 370 and XP have some coherency fabric. We are not
interested in using it, so remove checking for it in mbus driver.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-27 08:09:34 +02:00
Sebastian Hesselbarth 301765846b spi: Add SPI GPIO bitbang driver
This adds a driver for SPI master by GPIO pins.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-27 08:09:34 +02:00
Sebastian Hesselbarth e1eb436242 spi: ath79: move spidelay from spi-bitbang-txrx
Bitbang helpers for SPI require spidelay. This should be set
by the user and not the helper itself. Move it to ath79_spi
instead.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-27 08:09:34 +02:00
Sebastian Hesselbarth 43ba8232ab gpio: Add driver for 74x164 compatible shift-registers
A 74x164 shift register can be seen as a SPI attached GPIO expander.
This adds a driver for those poor-man expanders based on the Linux
driver.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-27 08:09:34 +02:00
Sebastian Hesselbarth a553a4dc73 net: phy: Support Marvell 88E1318S PHY
This adds support for the Marvell 88E1318S Gigabit Ethernet PHY.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-27 08:09:34 +02:00
Marc Kleine-Budde 885a1cf27e of_path: of_find_path(): add possibility to return .bb device
This patch adds a flags argument to the of_find_path() function. The only flag
defined for now is OF_FIND_PATH_FLAGS_BB. When used on NAND devices, the
function returns the bad block aware device (the ".bb" device).

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-23 08:12:28 +02:00
Marc Kleine-Budde 0238fb4c0d ubi: cdev: remove trailing newline from debug messages
This patch removes the trailing newline "\n" from the ubi/cdev.c debug
messages, as the macro ifself already adds a newine.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-23 08:12:28 +02:00
Andrey Smirnov 143eb1d3b4 firmware: socfpga: Fix a bug in fpgamgr_program_write_buf()
Fix a bug in fpgamgr_program_write_buf() where .rbf file whose length
is not a multiple of 4 would cause an integer overflow which would
result in infinite loop.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-23 07:57:56 +02:00
Andrey Smirnov ffbb818808 firmware: socfpga: Add necessary dependency to Kconfig
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-21 14:28:46 +02:00
Sebastian Hesselbarth c0fed5666a gpio: orion: Convert to platform_driver
With support for deferred probing, we can now relax driver
registration for Marvell Orion GPIO driver from postcore_initcall()
to normal platform_driver.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-20 07:00:21 +02:00
Sebastian Hesselbarth 4c5f742c63 led: gpio: Free GPIOs on unregister()
Free requested GPIOs on unregistration of mono-, bi-, and tri-color
GPIO leds.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-20 07:00:21 +02:00
Sascha Hauer 9d309e5a19 led: Fix led_gpio_rgb_unregister prototype
Analog to the other led_unregister prototypes this must take
the LED type specific struct.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-20 07:00:21 +02:00
Antony Pavlov f993f94ae7 i2c: mv64xxx: continue probe when clock-frequency is missing
Based on this linux kernel commit:

    commit 0ce4bc1dbdd911ae1763e2d4ff36bd1b214a59f7
    Author: Chen-Yu Tsai <wens@csie.org>
    Date:   Mon Sep 1 22:28:13 2014 +0800

        i2c: mv64xxx: continue probe when clock-frequency is missing

        The "clock-frequency" DT property is listed as optional, However,
        the current code stores the return value of of_property_read_u32 in
        the return code of mv64xxx_of_config, but then forgets to clear it
        after setting the default value of "clock-frequency". It is then
        passed out to the main probe function, resulting in a probe failure
        when "clock-frequency" is missing.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-17 07:31:35 +02:00
Marc Kleine-Budde 724d8847ed environment: remove unused code
This patch removes the LIST_HEAD of_partition_list and a struct definition from
the code. This was present but unused, since the file was added to barebox.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-17 07:31:35 +02:00
Uwe Kleine-König fd678c4973 drivers/base: Mark (of|platform)_device_id data as constant
There should be no reason to ever change the data pointed to by id_table
or of_compatible. So make this offical by adding some 'const's.

In Linux the corresponding pointers are marked as const, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-17 07:31:35 +02:00
Sascha Hauer f49f067bdd pci: Do not abuse dev->priv for storing data
dev->priv is for private use of the device driver, so do not
use it in the pci core. Instead, introduce a id field in struct
pci_device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2015-04-17 07:31:21 +02:00
Sebastian Hesselbarth 62adc52ed5 led: gpio: Properly deal with deferred probing
GPIO LEDs can suffer from deferred probing due to failing gpio request.
Instead of registering each gpio led independently, pre-allocate an
array of struct gpio_led for all and tear it down properly if probing
of one leds fails. While at it, silence error messages on -EPROBE_DEFER.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-17 07:23:47 +02:00
Sebastian Hesselbarth c6a9698dc1 OF: gpio: Silence error message on -EPROBE_DEFER
With deferred probing, -EPROBE_DEFER is not worth spilling an error.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-17 07:23:47 +02:00
Sebastian Hesselbarth 9744da2e2b gpio: Return -EPROBE_DEFER on gpio_get_num()
GPIO drivers can be registered quite late in registration process
causing dependant devices to fail probing. If we know gpio_get_num
will be called with a non-NULL device, return -EPROBE_DEFER instead
of -ENODEV to allow re-probing later.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-17 07:23:46 +02:00
Sebastian Hesselbarth ab3da15bc1 base: Introduce deferred probing
As expected, we would need deferred probing sooner or later. This is
a first approach to allow devices to return -EPROBE_DEFER and get
sorted into a list of deferred devices that will be re-probed later.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-17 07:23:46 +02:00
Sebastian Hesselbarth 11045f866d USB: xHCI: Sync non-coherent DMA buffers
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>
2015-04-15 14:05:42 +02:00
Marc Kleine-Budde 29abc10d44 habv4: add High Assurance Boot v4
This patch adds the code to check the HAB ROM for failures during development.
Add a cal to "habv4_get_status();" to your board file, to get the current
system state from the ROM.

_NOTE_: On i.MX6 this has to happen before barebox starts the MMU, because the
        HAB ROM vector table is placed at 0x94, which is not accessible after the
	MMU has setup the zero page.

This patch contains code ported from u-boot patches [1][2] by Shaojun Wang [3]
which were found in the "Mx28 Secure Boot" and "Mx6 HAB (High Assurance Boot)"
thread on the freescale community forum [4][5].

[1] https://community.freescale.com/servlet/JiveServlet/download/370047-269174/0001-enable-mx28-u-boot-hab.patch.txt.zip
[1] https://community.freescale.com/servlet/JiveServlet/download/96451-11-266175/0001-u-boot-enable-mx6-hab.patch.zip
[2] https://community.freescale.com/people/ShaojunWang
[3] https://community.freescale.com/thread/317254
[3] https://community.freescale.com/docs/DOC-96451

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-15 07:12:17 +02:00
Antony Pavlov bd3e501134 mtd: m25p80: import ID for Winbond W25Q128FVSSI from linux
Winbond W25Q128FVSSI chip is used in Black Swift board,
(see http://www.black-swift.com for details).

Black Swift can run barebox for TP-LINK MR3020.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-14 20:49:19 +02:00
Andrey Smirnov 16df434592 spi: i.MX: Respect the value of 'cs_change'
Add the code to correctly handle 'cs_change' field in 'struct
spi_transfer'(base on the similar code from altera_spi.c)

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-14 20:47:49 +02:00
Sascha Hauer ee0035e5cc Merge branch 'for-next/state' 2015-04-13 12:57:14 +02:00
Sascha Hauer a76a6bc8fd Merge branch 'for-next/pxa' 2015-04-13 12:57:13 +02:00
Sascha Hauer 9c4cf7d3b6 Merge branch 'for-next/pci' 2015-04-13 12:57:13 +02:00
Sascha Hauer c41b60fe6a Merge branch 'for-next/net' 2015-04-13 12:57:13 +02:00
Sascha Hauer 1ef7837c37 Merge branch 'for-next/imx' 2015-04-13 12:57:13 +02:00
Sascha Hauer 4e1ac4a872 Merge branch 'for-next/driver' 2015-04-13 12:57:12 +02:00
Robert Jarzmik 1e72d3c622 net: smc1111: add a quirk for pxa pxa27x platforms
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>
2015-04-13 09:24:00 +02:00
Robert Jarzmik 6393f1345a net: smc1111: fix platform data initializations
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>
2015-04-13 09:17:40 +02:00
Sebastian Hesselbarth a60d04c247 net: mvneta: Fix transmit errors due to dirty txdesc
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>
2015-04-13 08:42:30 +02:00
Markus Pargmann 4cc0a3d9c5 wdog: imx-wd: Disable watchdog powerdown counter
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>
2015-04-13 08:35:54 +02:00
Markus Pargmann 564a6092ba wdog: imx-wd: Introduce ops struct for imx21/imx1
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>
2015-04-13 08:35:54 +02:00
Lucas Stach da440ab859 pci: make sure to activate devices on the root bus
Commit b8a1bb1dd2 (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>
2015-04-13 08:34:28 +02:00
Sascha Hauer 712da9305d net: Add Intel e1000 driver
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>
2015-04-03 08:03:08 +02:00
Teresa Gámez 394d4acb8d mtd: nand_omap_gpmc: Fix ecc check for bch8 romcode
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>
2015-03-30 19:27:21 +02:00
Teresa Gámez 4ef5f8cf34 mtd: nand_omap_gpmc: Remove unused code
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>
2015-03-30 19:27:21 +02:00
Steffen Trumtrar 5cef8a3670 ARM/MXS/i.MX28: recognize watchdog reset
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>
2015-03-30 19:24:01 +02:00
Lucas Stach b9f4cd150b usb: host: xhci: depend on HAS_DMA
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>
2015-03-26 07:48:03 +01:00
Lucas Stach a5e4aa4875 clk: fractional-divider: fix build with CONFIG_MODULES
Fixes:
error: 'clk_register_fractional_divider' undeclared here

introduced with commit 22a0c31c92 (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>
2015-03-26 07:47:48 +01:00
Wadim Egorov f28ea92181 mci: core: Check return value of dev_add_param_bool
Commit 03b59bdb64 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>
2015-03-19 07:52:24 +01:00
Sascha Hauer f929fab29c pci: Add i.MX6 pcie support
Based on the corresponding kernel driver with changes to make it
work on barebox.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-17 07:36:00 +01:00
Sascha Hauer 467bc67bc3 pci: Add pcie-designware driver
Based on the corresponding kernel driver, only small changes
to make it work on barebox.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-17 07:36:00 +01:00
Sascha Hauer 9a21cc1c2c pci: fix copy-paste bug
Test for the correct resource before derefencing it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-17 07:29:55 +01:00
Sascha Hauer 90b6f60061 pci: Use standard pr_debug
Use pr_debug instead of custom DBG macro.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-17 07:29:42 +01:00
Sascha Hauer 80264a8ac4 driver: Call bus->remove instead of driver->remove
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>
2015-03-17 07:24:55 +01:00
Sascha Hauer e0899dfa3b driver: Call remove function only when available
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>
2015-03-17 07:24:50 +01:00
Sascha Hauer 0f3366ba85 driver: fix device remove order
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>
2015-03-17 07:24:45 +01:00
Lucas Stach a76c62f80d net: mvneta: convert to streaming DMA ops
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>
2015-03-16 05:30:19 +01:00
Lucas Stach eab9e4cdd9 PCI: fix bad bugs in bridge setup code
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>
2015-03-16 05:29:32 +01:00
Sascha Hauer 08a50cd306 clk: clk-divider: fix _get_maxdiv for table based divider
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>
2015-03-12 12:01:17 +01:00
Sascha Hauer 1487e6b9ad state: add framework for persistent state handling
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>
2015-03-12 08:28:31 +01:00
Andrey Panov fb1c0b2380 MMC: dw_mmc: PIO mode fixes
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>
2015-03-09 11:40:20 +01:00
Sascha Hauer fa20ea45e0 Merge branch 'for-next/tegra' 2015-03-09 08:32:26 +01:00
Sascha Hauer 4680b375b9 Merge branch 'for-next/streaming-dma'
Conflicts:
	drivers/mci/dw_mmc.c
2015-03-09 08:32:21 +01:00
Sascha Hauer 55ab01c7ff Merge branch 'for-next/rockchip'
Conflicts:
	arch/arm/Kconfig
2015-03-09 08:30:35 +01:00
Sascha Hauer ac81a0d876 Merge branch 'for-next/misc' 2015-03-09 08:30:24 +01:00
Sascha Hauer 696bd38337 Merge branch 'for-next/imx' 2015-03-09 08:30:24 +01:00
Sascha Hauer 9b133915f6 PWM: i.MX: register successfully without alias
When a PWM does not have an of alias generate a name from the
base address so that we can register it successfully.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-09 06:34:20 +01:00
Sascha Hauer 6bcfcece08 Merge branch 'for-next/sandbox-of' 2015-03-06 08:33:50 +01:00
Sascha Hauer 0e055c254c Merge branch 'for-next/mtd-partitions' 2015-03-06 08:33:43 +01:00
Sascha Hauer 9524e7d0d7 Merge branch 'for-next/mtd' 2015-03-06 08:33:39 +01:00
Lucas Stach 0ba21609c4 usb: host: ohci: convert to streaming DMA ops
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>
2015-03-06 07:53:48 +01:00
Lucas Stach 602d399e63 usb: host: ehci: convert to streaming DMA ops
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>
2015-03-06 07:53:48 +01:00
Lucas Stach 3f1dee9c76 usb: gadget: fsl_udc: convert to streaming DMA ops
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>
2015-03-06 07:53:48 +01:00
Lucas Stach efac9ca5bd net: xgmac: convert to streaming DMA ops
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>
2015-03-06 07:53:48 +01:00
Lucas Stach ece91a7d1d net: rtl8169: convert to streaming DMA ops
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>
2015-03-06 07:53:48 +01:00
Lucas Stach e82daca134 net: orion-gbe: convert to streaming DMA ops
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>
2015-03-06 07:53:48 +01:00
Lucas Stach 25bd3fadfe net: macb: convert to streaming DMA ops
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>
2015-03-06 07:53:48 +01:00
Lucas Stach aaca81b9f5 net: fec: convert to streaming DMA ops
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>
2015-03-06 07:53:48 +01:00
Lucas Stach 5213d76f47 net: designware: convert to streaming DMA ops
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>
2015-03-06 07:53:48 +01:00
Lucas Stach 4c64171ad9 net: davinci_emac: convert to streaming DMA ops
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>
2015-03-06 07:53:48 +01:00
Lucas Stach 575c78c267 net: at91_ether: convert to streaming DMA ops
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>
2015-03-06 07:53:48 +01:00
Lucas Stach d8967a857c net: cpsw: convert to streaming DMA ops
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>
2015-03-06 07:53:47 +01:00
Lucas Stach 2addec7bc3 net: arc-emac: convert to streaming DMA ops
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>
2015-03-06 07:52:02 +01:00
Lucas Stach f777398dc5 MCI: tegra-sdmmc: convert to streaming DMA ops
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>
2015-03-06 07:52:02 +01:00
Lucas Stach e31aa8badc MCI: imx: convert to streaming DMA ops
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>
2015-03-06 07:52:02 +01:00
Lucas Stach 451967e8b9 MCI: dw-mmc: convert to streaming DMA ops
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>
2015-03-06 07:52:02 +01:00
Lucas Stach 3110eed114 AHCI: convert to streaming DMA ops
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>
2015-03-06 07:52:02 +01:00
Lucas Stach 381f034ed6 ARM: move DMA alloc functions to dma.h
This better separates the DMA from the MMU functionality.

Also move all drivers that only depends on asm/mmu.h for the alloc
functions over to the common header.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-06 07:52:02 +01:00
Lucas Stach e05f9586b3 ARM: change dma_alloc/free_coherent to match other architectures
As a lot drivers currently rely on the 1:1 virt->phys mapping on ARM
we define DMA_ADDRESS_BROKEN to mark them. In order to use them on
other architectures with a different mapping they need proper fixing.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-06 07:51:47 +01:00
Lucas Stach 394a3533a8 NIOS2: use dma_addr_t in dma_alloc_coherent
This allows to consolidate the prototype of this function across
architectures. Also guard against calles that pass in NULL as the
dma handle pointer.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-06 07:51:47 +01:00
Andrey Panov 84fcb04367 MMC: dw_mmc: Add support for PIO mode and Rockchip variant of this hardware
Signed-off-by: Andrey Panov <rockford@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-05 15:19:28 +01:00
Andrey Panov 0cc6949870 ARM: Rockchip: Update clk driver from Linux kernel for use with newer DTS
Signed-off-by: Andrey Panov <rockford@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-05 15:19:28 +01:00
Sascha Hauer 85799d1b75 clk: Treat NULL as dummy clocks
NULL pointers should be treated as dummy clocks as done in the kernel.
Using a not fully filled in clk * array for of_clk_add_provider may result
in NULL clks. When these are passed into the clk framework we should not
crash.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-05 15:17:13 +01:00
Andrey Panov d7d86c2a6e NET: arc_emac: Update for newer DTS, support for Rockchip .compatible
Signed-off-by: Andrey Panov <rockford@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-05 09:11:34 +01:00
Andrey Panov 3f1aee7319 CLK: Check and do not allow to register clock twice
Signed-off-by: Andrey Panov <rockford@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-05 09:11:34 +01:00
Andrey Panov e3459c10ab CLK: clk-divider: Respect CLK_DIVIDER_POWER_OF_TWO flag
Signed-off-by: Andrey Panov <rockford@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-05 09:11:34 +01:00
Andrey Panov 5a3a479dae CLK: clk-divider: Introduce clk_divider_alloc() and *_free() routines
Signed-off-by: Andrey Panov <rockford@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-05 09:11:34 +01:00
Andrey Panov 9e3ce4eee6 CLK: clk-divider: Respect CLK_DIVIDER_HIWORD_MASK flag
It is required for Rockchip SoCs where clock settings registers have
write-enable mask in high word.

Signed-off-by: Andrey Panov <rockford@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-05 09:11:34 +01:00
Andrey Panov 7baf7df9fd CLK: clk-mux: Respect CLK_MUX_HIWORD_MASK flag
It is required for Rockchip SoCs where clock settings registers have
write-enable mask in high word.

Signed-off-by: Andrey Panov <rockford@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-05 09:11:34 +01:00
Andrey Panov 22a0c31c92 CLK: Add fractional divider clock support from Linux kernel
Signed-off-by: Andrey Panov <rockford@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-05 09:11:33 +01:00
Andrey Panov 9eb9f00043 CLK: Add support for composite clock from Linux kernel
Signed-off-by: Andrey Panov <rockford@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-05 09:11:33 +01:00
Hubert Feurstein 3d61b7b6a9 led: gpio: add support for default-state dt-property
This patch adds support for the default-state device tree property.

Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-04 11:35:50 +01:00
Lucas Stach 4bb43bf26f mci: tegra: handle mmc aliases
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>
2015-03-04 11:34:08 +01:00
Lucas Stach 35d5ab939f of: make of_alias_get work on all types of DT paths
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>
2015-03-04 11:34:08 +01:00
Lucas Stach 0b6ddeecb5 net: cpsw: prevent stray cache writeback
The cache should be invalidated when transfering ownership of a buffer
to the device. Otherwise the writeback of dirty cache lines can
corrupt the hardware written data.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Tested-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-03 08:37:24 +01:00
Marc Kleine-Budde f6b8bb42ca of/base: fix sparse warning, don't use integer 0 as NULL pointer
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-03 08:25:53 +01:00