Commit Graph

441715 Commits

Author SHA1 Message Date
Loic Poulain f8fd1b0350 serial: 8250: Fix thread unsafe __dma_tx_complete function
__dma_tx_complete is not protected against concurrent
call of serial8250_tx_dma. it can lead to circular tail
index corruption or parallel call of serial_tx_dma on the
same data portion.

This patch fixes this issue by holding the port lock.

Signed-off-by: Loic Poulain <loic.poulain@intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-24 15:18:02 -07:00
Loic Poulain b08c9c317e 8250_core: Fix unwanted TX chars write
On transmit-hold-register empty, serial8250_tx_chars
should be called only if we don't use DMA.
DMA has its own tx cycle.

Signed-off-by: Loic Poulain <loic.poulain@intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-24 15:18:02 -07:00
Manfred Schlaegl 6a20dbd6ca tty: Fix race condition between __tty_buffer_request_room and flush_to_ldisc
The race was introduced while development of linux-3.11 by
e8437d7ecb and
e9975fdec0.
Originally it was found and reproduced on linux-3.12.15 and
linux-3.12.15-rt25, by sending 500 byte blocks with 115kbaud to the
target uart in a loop with 100 milliseconds delay.

In short:
 1. The consumer flush_to_ldisc is on to remove the head tty_buffer.
 2. The producer adds a number of bytes, so that a new tty_buffer must
	be allocated and added by __tty_buffer_request_room.
 3. The consumer removes the head tty_buffer element, without handling
	newly committed data.

Detailed example:
 * Initial buffer:
   * Head, Tail -> 0: used=250; commit=250; read=240; next=NULL
 * Consumer: ''flush_to_ldisc''
   * consumed 10 Byte
   * buffer:
     * Head, Tail -> 0: used=250; commit=250; read=250; next=NULL
{{{
		count = head->commit - head->read;	// count = 0
		if (!count) {				// enter
			// INTERRUPTED BY PRODUCER ->
			if (head->next == NULL)
				break;
			buf->head = head->next;
			tty_buffer_free(port, head);
			continue;
		}
}}}
 * Producer: tty_insert_flip_... 10 bytes + tty_flip_buffer_push
   * buffer:
     * Head, Tail -> 0: used=250; commit=250; read=250; next=NULL
   * added 6 bytes: head-element filled to maximum.
     * buffer:
       * Head, Tail -> 0: used=256; commit=250; read=250; next=NULL
   * added 4 bytes: __tty_buffer_request_room is called
     * buffer:
       * Head -> 0: used=256; commit=256; read=250; next=1
       * Tail -> 1: used=4; commit=0; read=250 next=NULL
   * push (tty_flip_buffer_push)
     * buffer:
       * Head -> 0: used=256; commit=256; read=250; next=1
       * Tail -> 1: used=4; commit=4; read=250 next=NULL
 * Consumer
{{{
		count = head->commit - head->read;
		if (!count) {
			// INTERRUPTED BY PRODUCER <-
			if (head->next == NULL)		// -> no break
				break;
			buf->head = head->next;
			tty_buffer_free(port, head);
			// ERROR: tty_buffer head freed -> 6 bytes lost
			continue;
		}
}}}

This patch reintroduces a spin_lock to protect this case. Perhaps later
a lock-less solution could be found.

Signed-off-by: Manfred Schlaegl <manfred.schlaegl@gmx.at>
Cc: stable <stable@vger.kernel.org> # 3.11
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-24 15:18:02 -07:00
Arnd Bergmann 1fc52762e3 ARM Versatile Express fixes for 3.15
This series contains straight-forward fixes for different
 Versatile Express infrastructure drivers:
 
 - NULL pointer dereference on the error path in the clk driver
 - out of boundary array access in the dcscb driver
 - broken restart/power off implementation
 - mis-interpreted voltage unit in the spc driver
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQEcBAABAgAGBQJTWTroAAoJEL9jRaJfXa5PHMkIAJB2S6zuqIxn7qRsfeD5YauR
 nz7AHjDaakoVy6YTaMdHQI+dXSK6BPUNvMbrKzW3WWbT4ktJ/r3k/OeeBv/2T93L
 8KW1Bbif7kPfdfITwCCWDs5waTDVXSBC6AGGoXomzQIt4MqghhzoLRc6uvhnuYAL
 R7ZJsTWRa+47LVOJsghVffMyNlwCMj//prW7PBY6RIZXhpcbI+FGYv5Rm1XRITWn
 uL2cSulBmWeqMVCR/gFx8/K5TqZ90q835dD1Ggh+BeB1Vaifu9/cI3D8w0hl/xy9
 nRneKdTaTEpKjgwI3up4vMFbLbMI7brdMphZ9ZeGgK+YuWXFDbKvvdwjvDJ4Tx0=
 =BS4Q
 -----END PGP SIGNATURE-----

Merge tag 'vexpress/fixes-for-3.15' of git://git.linaro.org/people/pawel.moll/linux into fixes

ARM Versatile Express fixes for 3.15

This series contains straight-forward fixes for different
Versatile Express infrastructure drivers:

- NULL pointer dereference on the error path in the clk driver
- out of boundary array access in the dcscb driver
- broken restart/power off implementation
- mis-interpreted voltage unit in the spc driver

* tag 'vexpress/fixes-for-3.15' of git://git.linaro.org/people/pawel.moll/linux:
  ARM: vexpress/TC2: Convert OPP voltage to uV before storing
  power/reset: vexpress: Fix restart/power off operation
  arm/mach-vexpress: array accessed out of bounds
  clk: vexpress: NULL dereference on error path

Includes an update to 3.15-rc2

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 23:46:58 +02:00
Rob Herring 9ec36cafe4 of/irq: do irq resolution in platform_get_irq
Currently we get the following kind of errors if we try to use interrupt
phandles to irqchips that have not yet initialized:

irq: no irq domain found for /ocp/pinmux@48002030 !
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at drivers/of/platform.c:171 of_device_alloc+0x144/0x184()
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.12.0-00038-g42a9708 #1012
(show_stack+0x14/0x1c)
(dump_stack+0x6c/0xa0)
(warn_slowpath_common+0x64/0x84)
(warn_slowpath_null+0x1c/0x24)
(of_device_alloc+0x144/0x184)
(of_platform_device_create_pdata+0x44/0x9c)
(of_platform_bus_create+0xd0/0x170)
(of_platform_bus_create+0x12c/0x170)
(of_platform_populate+0x60/0x98)

This is because we're wrongly trying to populate resources that are not
yet available. It's perfectly valid to create irqchips dynamically, so
let's fix up the issue by resolving the interrupt resources when
platform_get_irq is called.

And then we also need to accept the fact that some irqdomains do not
exist that early on, and only get initialized later on. So we can
make the current WARN_ON into just into a pr_debug().

We still attempt to populate irq resources when we create the devices.
This allows current drivers which don't use platform_get_irq to continue
to function. Once all drivers are fixed, this code can be removed.

Suggested-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Cc: stable@vger.kernel.org # v3.10+
Signed-off-by: Grant Likely <grant.likely@linaro.org>
2014-04-24 21:40:22 +01:00
Grygorii Strashko 2b97789fa2 phy: core: make NULL a valid phy reference if !CONFIG_GENERIC_PHY
This fixes a regression on Keystone 2 platforms caused by patch
57303488cd
"usb: dwc3: adapt dwc3 core to use Generic PHY Framework" which adds
optional support of generic phy in DWC3 core.

On Keystone 2 platforms the USB is not working now because
CONFIG_GENERIC_PHY isn't set and, as result, Generic PHY APIs stubs
return -ENOSYS always. The log shows:
 dwc3 2690000.dwc3: failed to initialize core
 dwc3: probe of 2690000.dwc3 failed with error -38

Hence, fix it by making NULL a valid phy reference in Generic PHY
APIs stubs in the same way as it was done by the patch
04c2facad8 "drivers: phy: Make NULL
a valid phy reference".

Acked-by: Felipe Balbi <balbi@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-24 12:53:38 -07:00
Sergei Shtylyov 743bb387a1 phy: fix kernel oops in phy_lookup()
The kernel oopses in phy_lookup() due to 'phy->init_data' being NULL if we
register PHYs from a device tree probing driver and then call phy_get() on a
device that has no representation in the device tree (e.g. a PCI device).
Checking the pointer before dereferening it and skipping an interation if
it's NULL prevents this kernel oops.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-24 12:53:38 -07:00
Jean Delvare 907aa3aa8d phy: restore OMAP_CONTROL_PHY dependencies
When OMAP_CONTROL_USB was renamed to OMAP_CONTROL_PHY (commit
14da699b), its dependencies were lost in the process. Nothing in the
commit message indicates that this removal was intentional, so I think
it was by accident and the dependencies should be restored.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Acked-by: Roger Quadros <rogerq@ti.com>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-24 12:53:38 -07:00
Arnd Bergmann d1481832f1 phy: exynos: fix building as a module
The top-level phy-samsung-usb2 driver may be configured as a
loadable module, which currently causes link errors because
of the dependency on the exynos{5250,4x12,4210}_usb2_phy_config
symbol. Solving this could be achieved by exporting these
symbols, but as the SoC-specific parts of the driver are not
currently built as modules, it seems better to just link
everything into one module and avoid the need for the export.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-24 12:53:38 -07:00
Johan Hovold 10164c2ad6 USB: serial: fix sysfs-attribute removal deadlock
Fix driver new_id sysfs-attribute removal deadlock by making sure to
not hold any locks that the attribute operations grab when removing the
attribute.

Specifically, usb_serial_deregister holds the table mutex when
deregistering the driver, which includes removing the new_id attribute.
This can lead to a deadlock as writing to new_id increments the
attribute's active count before trying to grab the same mutex in
usb_serial_probe.

The deadlock can easily be triggered by inserting a sleep in
usb_serial_deregister and writing the id of an unbound device to new_id
during module unload.

As the table mutex (in this case) is used to prevent subdriver unload
during probe, it should be sufficient to only hold the lock while
manipulating the usb-serial driver list during deregister. A racing
probe will then either fail to find a matching subdriver or fail to get
the corresponding module reference.

Since v3.15-rc1 this also triggers the following lockdep warning:

======================================================
[ INFO: possible circular locking dependency detected ]
3.15.0-rc2 #123 Tainted: G        W
-------------------------------------------------------
modprobe/190 is trying to acquire lock:
 (s_active#4){++++.+}, at: [<c0167aa0>] kernfs_remove_by_name_ns+0x4c/0x94

but task is already holding lock:
 (table_lock){+.+.+.}, at: [<bf004d84>] usb_serial_deregister+0x3c/0x78 [usbserial]

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-> #1 (table_lock){+.+.+.}:
       [<c0075f84>] __lock_acquire+0x1694/0x1ce4
       [<c0076de8>] lock_acquire+0xb4/0x154
       [<c03af3cc>] _raw_spin_lock+0x4c/0x5c
       [<c02bbc24>] usb_store_new_id+0x14c/0x1ac
       [<bf007eb4>] new_id_store+0x68/0x70 [usbserial]
       [<c025f568>] drv_attr_store+0x30/0x3c
       [<c01690e0>] sysfs_kf_write+0x5c/0x60
       [<c01682c0>] kernfs_fop_write+0xd4/0x194
       [<c010881c>] vfs_write+0xbc/0x198
       [<c0108e4c>] SyS_write+0x4c/0xa0
       [<c000f880>] ret_fast_syscall+0x0/0x48

-> #0 (s_active#4){++++.+}:
       [<c03a7a28>] print_circular_bug+0x68/0x2f8
       [<c0076218>] __lock_acquire+0x1928/0x1ce4
       [<c0076de8>] lock_acquire+0xb4/0x154
       [<c0166b70>] __kernfs_remove+0x254/0x310
       [<c0167aa0>] kernfs_remove_by_name_ns+0x4c/0x94
       [<c0169fb8>] remove_files.isra.1+0x48/0x84
       [<c016a2fc>] sysfs_remove_group+0x58/0xac
       [<c016a414>] sysfs_remove_groups+0x34/0x44
       [<c02623b8>] driver_remove_groups+0x1c/0x20
       [<c0260e9c>] bus_remove_driver+0x3c/0xe4
       [<c026235c>] driver_unregister+0x38/0x58
       [<bf007fb4>] usb_serial_bus_deregister+0x84/0x88 [usbserial]
       [<bf004db4>] usb_serial_deregister+0x6c/0x78 [usbserial]
       [<bf005330>] usb_serial_deregister_drivers+0x2c/0x4c [usbserial]
       [<bf016618>] usb_serial_module_exit+0x14/0x1c [sierra]
       [<c009d6cc>] SyS_delete_module+0x184/0x210
       [<c000f880>] ret_fast_syscall+0x0/0x48

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(table_lock);
                               lock(s_active#4);
                               lock(table_lock);
  lock(s_active#4);

 *** DEADLOCK ***

1 lock held by modprobe/190:
 #0:  (table_lock){+.+.+.}, at: [<bf004d84>] usb_serial_deregister+0x3c/0x78 [usbserial]

stack backtrace:
CPU: 0 PID: 190 Comm: modprobe Tainted: G        W     3.15.0-rc2 #123
[<c0015e10>] (unwind_backtrace) from [<c0013728>] (show_stack+0x20/0x24)
[<c0013728>] (show_stack) from [<c03a9a54>] (dump_stack+0x24/0x28)
[<c03a9a54>] (dump_stack) from [<c03a7cac>] (print_circular_bug+0x2ec/0x2f8)
[<c03a7cac>] (print_circular_bug) from [<c0076218>] (__lock_acquire+0x1928/0x1ce4)
[<c0076218>] (__lock_acquire) from [<c0076de8>] (lock_acquire+0xb4/0x154)
[<c0076de8>] (lock_acquire) from [<c0166b70>] (__kernfs_remove+0x254/0x310)
[<c0166b70>] (__kernfs_remove) from [<c0167aa0>] (kernfs_remove_by_name_ns+0x4c/0x94)
[<c0167aa0>] (kernfs_remove_by_name_ns) from [<c0169fb8>] (remove_files.isra.1+0x48/0x84)
[<c0169fb8>] (remove_files.isra.1) from [<c016a2fc>] (sysfs_remove_group+0x58/0xac)
[<c016a2fc>] (sysfs_remove_group) from [<c016a414>] (sysfs_remove_groups+0x34/0x44)
[<c016a414>] (sysfs_remove_groups) from [<c02623b8>] (driver_remove_groups+0x1c/0x20)
[<c02623b8>] (driver_remove_groups) from [<c0260e9c>] (bus_remove_driver+0x3c/0xe4)
[<c0260e9c>] (bus_remove_driver) from [<c026235c>] (driver_unregister+0x38/0x58)
[<c026235c>] (driver_unregister) from [<bf007fb4>] (usb_serial_bus_deregister+0x84/0x88 [usbserial])
[<bf007fb4>] (usb_serial_bus_deregister [usbserial]) from [<bf004db4>] (usb_serial_deregister+0x6c/0x78 [usbserial])
[<bf004db4>] (usb_serial_deregister [usbserial]) from [<bf005330>] (usb_serial_deregister_drivers+0x2c/0x4c [usbserial])
[<bf005330>] (usb_serial_deregister_drivers [usbserial]) from [<bf016618>] (usb_serial_module_exit+0x14/0x1c [sierra])
[<bf016618>] (usb_serial_module_exit [sierra]) from [<c009d6cc>] (SyS_delete_module+0x184/0x210)
[<c009d6cc>] (SyS_delete_module) from [<c000f880>] (ret_fast_syscall+0x0/0x48)

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-24 12:50:56 -07:00
Thomas Pugliese bd130adaca usb: wusbcore: fix panic in wusbhc_chid_set
If no valid CHID value has previously been set on an HWA, writing a
value of all zeros will cause a kernel panic in uwb_radio_stop because
wusbhc->uwb_rc has not been set.  This patch skips the call to
uwb_radio_stop if wusbhc->uwb_rc has not been initialized.

Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-24 12:45:41 -07:00
Thomas Pugliese 7584f2ebc1 usb: wusbcore: convert nested lock to use spin_lock instead of spin_lock_irq
Nesting a spin_lock_irq/unlock_irq inside a lock that has already
disabled interrupts will enable interrupts before we are ready when
spin_unlock_irq is called.  This patch converts the inner lock to use
spin_lock and spin_unlock instead.

Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-24 12:45:40 -07:00
Thomas Pugliese c996b93791 uwb: don't call spin_unlock_irq in a USB completion handler
This patch converts the use of spin_lock_irq/spin_unlock_irq to
spin_lock_irqsave/spin_unlock_irqrestore in uwb_rc_set_drp_cmd_done
which is called from a USB completion handler.  There are also
whitespace cleanups to make checkpatch.pl happy.

Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-24 12:45:40 -07:00
Peter Chen cd84f009e9 usb: chipidea: coordinate usb phy initialization for different phy type
For internal PHY (like UTMI), the phy clock may from internal pll,
it is on/off on the fly, the access PORTSC.PTS will hang without
phy clock. So, the usb_phy_init which will open phy clock needs to
be called before hw_phymode_configure.
See: http://marc.info/?l=linux-arm-kernel&m=139350618732108&w=2

For external PHY (like ulpi), it needs to configure portsc.pts before
visit viewport, or the viewport can't be visited. so phy_phymode_configure
needs to be called before usb_phy_init.
See: cd0b42c2a6

It may not the best solution, but it can work for all situations.

Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Chris Ruehl <chris.ruehl@gtsys.com.hk>
Cc: shc_work@mail.ru
Cc: denis@eukrea.com
Cc: festevam@gmail.com
Cc: stable <stable@vger.kernel.org> # 3.14
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-24 12:45:40 -07:00
Greg Kroah-Hartman e988f306e7 usb: fixes for v3.15-rc3
Quite a few fixes this time since I lost v3.15-rc2
 window.
 
 Most fixes are MUSB which learned to remove its debugfs directories
 properly, got a fix for PHY handling and now knows that it should
 make sure its clocks aren't gated before trying to access registers.
 
 ffs got a race fix between ffs_epfile_io() and ffs_func_eps_disable().
 
 dwc3 got a fix for system suspend/resume and now only iterates over
 valid endpoints when trying to resize TX fifos.
 
 usb_get_phy() now will properly return an error if try_module_get() fails.
 
 We also have a revert for a NAPI conversion on the ethernet gadget which
 was causing a kernel BUG.
 
 Signed-of-by: Felipe Balbi <balbi@ti.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTVTiZAAoJEIaOsuA1yqREKHAP/ip+Exini4jKaVTnZkOSQkct
 gc+SLRKEt2C+/VmoFJkGa3EzcCr6jNvGO4rrYUjgLti9+nON+/qjWof3AmrP9gIs
 z1ZBXj4I2dOq7gILRlUdfuj5H3UAOg799mn+6DnPkjidR1PqqBlD1EoTFoGqh4Lc
 bqiWout3R9aWoYjmFLYS6eXFQGeDCHdtSloVXUxYjMHsrNRIv4XL9DDGwcY2gGxc
 6qskSCKP5HSCJbwS7jb4pf+J5nCuKASLTAGroSy8mV2cWxfGj+jLXegr4IdjaH0V
 73UkMcufacncvhxA3GTEdjQTy6aBKGnLyZgSEIk30RvDz6C1z4J6v2lffm49bpaa
 wnZ3g4AToagiXSeWUsi50Ri7oaksFnLSxCh6JYZ0CvTrbMhM3b1/R0r+hB/r5xba
 xsjGIZPpp8CCx31cID/FNMP8gxBgtwCAE0WvYl5WlUl5ESXWyt6fQQAlCZLb4kny
 fBgoM1IMuirQXKqNC62gSSKsSqSzZbJVK7dTc+nJFxDjRmmcgdrM1VuQyJMVY8rh
 DklMYmfYTdP1JL410Ee3Z50c0SriUS3FLuDqkGd5pbKhbuGWTvoogPRY5d3pewrQ
 Tq+O4GhYMlluDK9UF8BM4cbXQMu3ov2ddmm9H9ZH71fmVp8CFMdI0s5Q7BZGryh/
 +9aatVH5usptuIiZrRlw
 =aYvY
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-v3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus

Felipe writes:

usb: fixes for v3.15-rc3

Quite a few fixes this time since I lost v3.15-rc2
window.

Most fixes are MUSB which learned to remove its debugfs directories
properly, got a fix for PHY handling and now knows that it should
make sure its clocks aren't gated before trying to access registers.

ffs got a race fix between ffs_epfile_io() and ffs_func_eps_disable().

dwc3 got a fix for system suspend/resume and now only iterates over
valid endpoints when trying to resize TX fifos.

usb_get_phy() now will properly return an error if try_module_get() fails.

We also have a revert for a NAPI conversion on the ethernet gadget which
was causing a kernel BUG.

Signed-of-by: Felipe Balbi <balbi@ti.com>
2014-04-24 12:33:10 -07:00
Linus Torvalds 76429f1ded regulator: Fixes for v3.15
A couple of things here:
 
  - Fixes for pbias that didn't make it in during the merge window due to
    the driver coming in via MMC.  The conversion to use helpers is a
    fix as it implements list_voltage() which the main user (MMC) relies
    on for correct functioning.
  - Change the !REGULATOR stub for optional regulators to return an
    error rather than a dummy; this is more in keeping with the intended
    use of optional regulators and fixes some issues seen MMC where it
    got confused by a dummy being provided.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTWP4ZAAoJELSic+t+oim9D54P/1iF292i/GenPCAHJo/kIV/j
 uoiTcE5igqVoEeEtseqkSOy2Wsf9rukNZvQOyyioT6Pm6f+zOKW7pLPuJZmjqiHk
 9FOJYfQcoiYL7HpDMIAAANl5rSHlmDZPs4T40+pHh3LJB/NTnrig5MA0tfW7tcyi
 TF4PadYavvNwUYivE8NrMJs0qnuzqiXvEFIqZCxR7zm0AYqdVMkI27f4uKTRodcW
 8K8VkQ7F7gDyoCiD8ptviB6v9o2WofnZfLI+9qbxexKmb6TFRrvzTkQ8UdyV9LDs
 pLstzJsef7IGUDD6F/i3joKzB8Dp9Qp0+ykrffIbRfm+2Jo0xWXX+h9Ko10m1jji
 zhzi/dgWp+e7SkXNaWB4hX1mD+jO6KHEg7RRF0GG4Gv6Jql6shDqNwMLHS8TH/s3
 owKHdIaYHoyOx73xTJEePFbHgZTc+7YcC9NPtPe0bN2uheSMV9aHePiLoKuzx832
 ee6dPIqoMU/g8zvY5CPqLqdqx1Z64MNTg52QraGsYhQ7ik9cHf0cArp5QAbMjnKI
 XC7VY0Fulc0rlKkmCQ3KKxs3w+ahRgrdC+Ogne5SHQsB+5eHSGw+t3MIXWq/iiaE
 XwuAQKWIy/DbkG3LgcqQGCA5RgwNWO4lJ13mENtJ4CmYDqO0qDIEdKdZ0lqnLsz+
 5siSNt87fIcj5BpX2ZRm
 =t/Ad
 -----END PGP SIGNATURE-----

Merge tag 'regulator-v3.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "A couple of things here:

   - Fixes for pbias that didn't make it in during the merge window due
     to the driver coming in via MMC.  The conversion to use helpers is
     a fix as it implements list_voltage() which the main user (MMC)
     relies on for correct functioning.
   - Change the !REGULATOR stub for optional regulators to return an
     error rather than a dummy; this is more in keeping with the
     intended use of optional regulators and fixes some issues seen MMC
     where it got confused by a dummy being provided"

* tag 'regulator-v3.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: core: Return error in get optional stub
  regulator: pbias: Convert to use regmap helper functions
  regulator: pbias: Fix is_enabled callback implementation
2014-04-24 12:01:58 -07:00
Linus Torvalds ff1e5b447e spi: Fixes for v3.15
A few driver specific fixes here:
 
  - SH HSPI was dealing with its clocks incorrectly which meant it didn't
    work on some SoCs, fixing this also requires a small fix to one of
    the SoC clock trees to avoid breaking existing users.
  - The SiRF driver appears to have had several quality problems, it's
    fairly new and not widely used so this isn't too worrying.
  - A brute force fix for excessive locking in the Atmel driver, it needs
    further investigation but this deals with the immediate issue.
  - A build fix for the Blackfin driver.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTWPNeAAoJELSic+t+oim9VOYP/1s4R3EsLg/CoO6T3jqDqizZ
 0jnQgqTUi11q8+5ozLdt0zhmGOwmoTaqP3RhNqntwFyMucEWmBjrJcRlcmbfq5ve
 IWAArM++RvzCgUmK2DfnQ+KxvLNbdDzO6Q+DIzUb1lia5T64Ope3JBWUG2CT5YSE
 Yhi1qaktVWP57toZQmuidW+Q48d+fBxdzQ8VIfP1q2GqISwuabALjzp0I+oG5Sa1
 3yd0037WmIYXUM+dKMijPQjNtB4FLJ545RR+Y5s9RXn9Pq/KpLL2aVCaPbDW36Oz
 bK4zO80mS6zfurk9Yi7RiOV1uTCd/dg4G2MLTzrtP5LgdKpqthVElKbLJUv9cv0z
 gZ19wFM0tGe3raxUsXUlcxAyETiNPP+pm6QriS9rgrdazIiS0gP6tvpfU8Szxv3o
 EJMJEQ76ieuVA8LVLskPehNYTl5z4CiISS8SrBUdvV4P96RdyD4rGLdDJw5PDIEL
 GBEpdcg48QFt6twO52xAQEzRx0T98c/C0GGYR38CbRiNFFZCh5IAr0po1iwTY3WC
 vR/2YJw2Lf/+rf6Hu0cNuFd1csaTBQqh6x4JqVHdmL+xIqut2yhP3DLynK9+APR2
 6oIHameZGAY1s0iDpCbeEZoTJF0uJw4+qV3xpCDnSTwiBQoD8whwJUnrFyKb1Mo2
 +T5hNKls3vDpNwVPFueU
 =kM6u
 -----END PGP SIGNATURE-----

Merge tag 'spi-v3.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi fixes from Mark Brown:
 "A few driver specific fixes here:

   - SH HSPI was dealing with its clocks incorrectly which meant it
     didn't work on some SoCs, fixing this also requires a small fix to
     one of the SoC clock trees to avoid breaking existing users.
   - The SiRF driver appears to have had several quality problems, it's
     fairly new and not widely used so this isn't too worrying.
   - A brute force fix for excessive locking in the Atmel driver, it
     needs further investigation but this deals with the immediate
     issue.
   - A build fix for the Blackfin driver"

* tag 'spi-v3.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: atmel: Fix scheduling while atomic bug
  spi: sh-hspi: Do not specifically request shyway_clk clock
  ARM: shmobile: r8a7778: Use clks as MSTP007 parent
  spi: sirf: make GPIO chipselect function work well
  spi: sirf: set SPI controller in RISC IO chipselect mode
  spi: sirf: correct TXFIFO empty interrupt status bit
  spi: bfin5xx: fix build error
2014-04-24 12:01:05 -07:00
Rafael J. Wysocki f66abe92ce ACPI / notify: Do not block unknown type notifications in root handler
Commit 1a699476e2 "ACPI / hotplug / PCI: Hotplug notifications from
acpi_bus_notify()" changed the root notify handler, acpi_bus_notify(),
to block unknown type norifications, but it overlooked the fact that
they might be propagated to drivers via the ->notify() callback.

Fix the problem by allowing drivers to receive unknown type
notifications via ->notify() as before.

Fixes: 1a699476e2 (ACPI / hotplug / PCI: Hotplug notifications from acpi_bus_notify())
Reported-and-tested-by: Mantas Mikulėnas <grawity@gmail.com>
Reported-and-tested-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-04-24 19:27:49 +02:00
Linus Torvalds 92891ed6b1 Merge branch 'fixes_for_v3.15' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping
Pull dma-mapping fix from Marek Szyprowski:
 "A small fix for dma-mapping subsystem for ARM"

* 'fixes_for_v3.15' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
  arm: dma-mapping: Fix mapping size value
2014-04-24 09:58:57 -07:00
Linus Torvalds fdd324aa5f Merge branch 'for-3.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata
Pull libata fixes from Tejun Heo:
 "Dan updated tag allocation to accomodate devices which choke when tags
  jump back and forth.  Quite a few ahci MSI related fixes.  A couple
  config dependency fixes and other misc fixes"

* 'for-3.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
  libata/ahci: accommodate tag ordered controllers
  ahci: Do not receive interrupts sent by dummy ports
  ahci: Use pci_enable_msi_exact() instead of pci_enable_msi_range()
  ahci: Ensure "MSI Revert to Single Message" mode is not enforced
  ahci: do not request irq for dummy port
  pata_samsung_cf: fix ata_host_activate() failure handling
  pata_arasan_cf: fix ata_host_activate() failure handling
  ata: fix i.MX AHCI driver dependencies
  pata_at91: fix ata_host_activate() failure handling
  libata: Update queued trim blacklist for M5x0 drives
  libata: make AHCI_XGENE depend on PHY_XGENE
2014-04-24 09:57:02 -07:00
Punit Agrawal cf2e0a73ca ARM: vexpress/TC2: Convert OPP voltage to uV before storing
The SPC stores voltage in mV while the code assumes it was returning
uV. Convert the returned voltage to uV before storing. Also fix the
comment depicting voltage to uV.

Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
2014-04-24 17:20:50 +01:00
Pawel Moll d08b80373c power/reset: vexpress: Fix restart/power off operation
The restart/power off implementation in the vexpress driver
used to obtain the config function when necessary. This was
wrong in two respects:

1. It required memory allocation with disabled interrupts
(it worked, but lockdep - when enabled - reported warnings).

2. Used jiffies-based timeout, while jiffies are not running
at this stage of system shutdown (therefore a config
transaction error - if happened - would have never be reported).

Fixed by pre-allocating the config function per device
and using mdelay for timeout.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
2014-04-24 17:20:50 +01:00
Rob Herring 82c0f5897a of: selftest: add deferred probe interrupt test
Signed-off-by: Rob Herring <robh@kernel.org>
[grant.likely: fixed failure when root node specifies the interrupt parent]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
2014-04-24 16:58:55 +01:00
Stephen Warren 9ef1af9ea2 dt: tegra: remove non-existent clock IDs
The Tegra124 clock DT binding currently provides 3 clocks that don't
actually exist; 2 for NAND and one for UART5/UARTE. Delete these. While
this is technically an incompatible DT ABI change, nothing could have
used these clock IDs for anything practical, since the HW doesn't exist.

Cc: <stable@vger.kernel.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:37:08 +02:00
Stephen Warren 9ba7170570 clk: tegra: remove non-existent clocks
The Tegra124 clock driver currently provides 3 clocks that don't actually
exist; 2 for NAND and one for UART5/UARTE. Delete these.

Cc: <stable@vger.kernel.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:36:50 +02:00
Stephen Warren 862f0eea38 ARM: tegra: remove UART5/UARTE from tegra124.dtsi
Tegra124 only has 4 UARTs. Parts of the documentation hint at a fifth
UART, but this appears to be left-over from earlier SoC documentation.
Remove the non-existent DT node for UART5.

Cc: <stable@vger.kernel.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:36:40 +02:00
Arnd Bergmann f126776a21 Fixes for omaps, mostly to fix some GPMC, DSS and USB issues for
device tree based booting. And turns out BeagleBoard xM A/B
 needs it's own minimal dts in addition to the related u-boot
 changes. Also few minor documentation and typo fixes are merged
 to get them out of the way.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTWAV8AAoJEBvUPslcq6Vz1+0P/3zagpaCsmh3rqr5u5jLYkS6
 UXqrfjQTScQ9SK4xlwHJzCEI8oA/VvgAhk9RetT3Nd8HX4HFM2T1cCyx0s+01n0L
 SrERzwVn1VxFaX4/xYSwVyt2GLdiltnCgzS2yQGjESN79aPTaKtJSbyhoah7GJQC
 RB+UnE1gpBpQIpjIRSrhIWGCPH4HlLyoAgSY/u3QjBmfbm6DqCsjOx7l7tFx04gR
 xQJ/EueWyQtEsmBjAQIIYJ3vZB14TI/HVAmdwsFMz4/eOcKoCtt+iGigZ0jFIP8w
 6XOfJu5s0Nn2hAJ26KxoX+SXN1DJefAYmnLRsBGgCueWkOpC7v0TgeQ2b0Wr7e//
 eaM5Rnv3xHWvXlv7zzNWOp3n96Mnm4WPNARCuS86Gc2PyvV3+SqK25WDy+HPSGQP
 e9RkGipHG2YKX5HLcq2l2O7pfftB+ZcDEfADuR/8chasDxqSd4zVxsGOsWzWk/fG
 2d9zZifnYeXDo/Tu6PqriXNPIBBD5TDHK5Df28EIvtVig5AqerApay2zBt9zXn/H
 Ux6Yfw06iVCr8okk8s55CYBhYUqQfg9LEZMJLRkXAplErLvGgt46rh2DD2SU7T61
 I4I40tuwRzEhCuIOlG5ztngkCpL+QnKC477sPx9KtQ4i3Rg6yKT8HZc0jSwhr0vB
 sZMVDWxsRJWBxnbZyaoL
 =co/l
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v3.15/fixes-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

Fixes for omaps, mostly to fix some GPMC, DSS and USB issues for
device tree based booting. And turns out BeagleBoard xM A/B
needs it's own minimal dts in addition to the related u-boot
changes. Also few minor documentation and typo fixes are merged
to get them out of the way.

* tag 'omap-for-v3.15/fixes-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: Fix GPMC remap for devices using an offset
  ARM: OMAP2+: Fix oops for GPMC free
  ARM: dts: Add support for the BeagleBoard xM A/B
  ARM: dts: Grammar /that will/it will/
  ARM: dts: Grammar /is uses/ is used/
  ARM: OMAP2+: Fix config name for USB3 PHY
  ARM: dts: am335x: update USB DT references
  ARM: dts: OMAP2+: remove uses of obsolete gpmc,device-nand
  ARM: AM335X: EVM: fix pinmux documentation in devicetree
  ARM: OMAP2+: N900: remove omapdss init for DT boot
  ARM: dts: dra7xx-clocks: Correct mcasp2_ahclkx_mux bit-shift
  ARM: dts: omap5: Add clocks to USB3 PHY node
  ARM: OMAP2+: hwmod: fix missing braces in _init()
  ARM: AM43xx: fix dpll init in bypass mode
  ARM: OMAP3: hwmod data: Correct clock domains for USB modules
  ARM: OMAP3: PM: remove access to PRM_VOLTCTRL register

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:35:58 +02:00
Arnd Bergmann 072c8b3fe2 This is a patch set for some ST-Ericsson devices:
- Updates the Ux500 (U8500) defconfig
 - Selects PARTITION_ADVANCED for Ux500 and U300
 - Configure in IIO sensor drivers for the Ux500
 - Configure in the CW1200 WLAN chip for the Ux500
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTS6ZhAAoJEEEQszewGV1zyokQAJWRYpC5T3uSDOSw/nenLwa2
 5DusWzEDvz7Bip6UxVif1SIvEaPs1gHMnhSquwlDfyVPM1SygvxvsZCD4daKEGru
 zsvMSRAUTaG2tKxo7QeSwErSIdg+HQtJ0rhgHyzSYUajDjQ0QQ/qGc6vIcJ8PvDj
 4uMmc3F0dk7wqSgTXtnMBD/L8/YSqIuUHTAbAmA84s64jLCXicbubgqjv0XNX5IM
 Hzm6RP/HVFE6tcji6dUPZNM54lRrJ0/o6Fg7G3l10JehAgSlUpR7weH+jtm01Cjc
 lkdGl3buOn0ZE6mcJO7GAPlZySzhljNoL7rn8M2APr1MR5v3FLRN6mzVEoTGJBMJ
 EufQlh0tAPuy6vnGroW+pzDZTSyhSXMcT38hnRW50hYRGrOH1B16n2NKLoiw/4X4
 kcxOsPMK1+4RLs0+LbWzCrCJVxBzTsrzFc/z10SLfoePEZPuC0UUczx88GRR02eZ
 gAyO7FtCXvNDbQCh1fv2at0/17yvP3hcNQmC5MruRCJ55HTiUlwkDBbD7GS5bWG9
 pYV+bWENJy7bY4nccXP8XqzIpxqkJ1nO917PycWhvGHFJFFp0dLFbje9ejqFCjY5
 kyBZGRQ8lqN7qTdESbiameazStJCSmZbH+lCDf9uFy3ram30vasmkqlSaEfFDSZA
 PX32S9J2WQgrRq2W60oR
 =Xe+n
 -----END PGP SIGNATURE-----

Merge tag 'ux500-defconfig-for-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into fixes

This is a patch set for some ST-Ericsson devices:
- Updates the Ux500 (U8500) defconfig
- Selects PARTITION_ADVANCED for Ux500 and U300
- Configure in IIO sensor drivers for the Ux500
- Configure in the CW1200 WLAN chip for the Ux500

* tag 'ux500-defconfig-for-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
  ARM: ux500: configure for CW1200 WLAN chip
  ARM: ux500: configure in sensors
  ARM: u300: u300_defconfig: Enable PARTITION_ADVANCED
  ARM: ux500: u8500_defconfig: Enable PARTITION_ADVANCED
  ARM: ux500: update defconfig

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:35:14 +02:00
Arnd Bergmann 6e1ae422c3 Renesas ARM Based SoC Fixes Updates for v3.15
r8a7791 (R-Car M2) based koelsch board
 * Correct renesas,gpios to renesas,groups in sd[012] pfc
 
 8a7790 (R-Car H2) based lager board
 * Correct SND_SOC_DAIFMT_CBx_CFx flags
 
 r8a7740 (R-Mobile A1) SoC
 * Drop address cells from GIC node
 
 r8a7740 (R-Mobile A1) based Armadillo800 EVA board
 * Correct SND_SOC_DAIFMT_CBx_CFx flags
 
 sh73a0 (SH-Mobile AG5) SoC
 * Drop address cells from GIC node
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQIcBAABAgAGBQJTTx5UAAoJENfPZGlqN0++iCIP/AmwtzYsCtUY2oVnjC1eSy8Y
 /xZxIgQskw00In1bUUAjv+6OAgmj+P3njjeFCItWP3QOc41QBaQ32l5FLPfNxK1T
 p4r5m+H8jlgEVZlSaIeUp37xA5DlcGE04TIRhZzp969wMJkRb9SOxhlkqoOao1qJ
 SRN4z8HgTI0sYCRgTmBSjZJC/srBSO08NAmEjB2i3DNFhJWRQP7BTl/SjwgGZKST
 8H6GQoHDZDf5GHsUigZVOMpiLgoa2TXsQzAC+JbULLreH8p/ybbzSco1qd2GqqhS
 rgSBs2uPSKhgyoz1pxi/oe6uNMoB/wbovE26itxD3bT7lTA8e1pZgf+bVyNBCu9D
 lWGVBjf+v4dBKCmCZmtthw29kfxPjQuVKoGCC8SBB/bnQnFrwADr23QWJ2p1g0P+
 EPg4umci4Dm+QV814w/M2IVRU6QIyX2Y4xalrBD3EhjoqY3tERClg67tbW54CDTE
 MyD8QPUpBbJElkcBOBOkP7SabqrjnIq4BdLaJQnkX2UfOcRQVTigMkM+tLwzm/l0
 rARyXVUBRPHLpkuEOHuSwNW+RuoAFbY2GuBwu4Esg1xXOUlYuO9SqXkdHD5x2ccq
 iQP3dZ8lE3ftZ+Z+QdEBzMqzXVBXply07G42FC7WjO0aYiNZ18FnVDNVh/728Kcf
 BSHdtoYqKt0qtECkIoPj
 =x27x
 -----END PGP SIGNATURE-----

Merge tag 'renesas-fixes-for-v3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes

Renesas ARM Based SoC Fixes Updates for v3.15

r8a7791 (R-Car M2) based koelsch board
* Correct renesas,gpios to renesas,groups in sd[012] pfc

8a7790 (R-Car H2) based lager board
* Correct SND_SOC_DAIFMT_CBx_CFx flags

r8a7740 (R-Mobile A1) SoC
* Drop address cells from GIC node

r8a7740 (R-Mobile A1) based Armadillo800 EVA board
* Correct SND_SOC_DAIFMT_CBx_CFx flags

sh73a0 (SH-Mobile AG5) SoC
* Drop address cells from GIC node

* tag 'renesas-fixes-for-v3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: koelsch: correct renesas,gpios to renesas,groups in sd[012] pfc
  ARM: shmobile: r8a7740: drop address cells from GIC node
  ARM: shmobile: sh73a0: drop address cells from GIC node
  ARM: shmobile: armadillo800eva: fixup SND_SOC_DAIFMT_CBx_CFx flags
  ARM: shmobile: lager: fixup SND_SOC_DAIFMT_CBx_CFx flags

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:34:34 +02:00
Arnd Bergmann 8a52a116d1 Fifth Round of Renesas ARM Based SoC DT Updates for v3.15
Correct renesas,groups in SDHI nodes of for r8a7790 (R-Car H2) based
 Lager board.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJTS11TAAoJENfPZGlqN0++Aj8P/0pnafIdmAWgbowAKWiqMc6d
 xWe41o1hOvlq7YI9CjrGWNLtSRfBB3L5ckF/tA68Ra20RS/IlzicpiMWfjbyCtlV
 ZpCOHvLNyc9a6qQ73K3932Fgv0dFolyxJpx29kKNV7Qt+PKiiaBnelwQsA3a66YU
 HLlBpDMkYfP+/Qz1tQ8Jy6jGLjDn+sP2Do4oXWe84zLrf1x7hZxVcMc56KOCnpNt
 Uj0qHRvo5mAmL4OvdQuS4qIpL0FDBOkSetwxhdq8Bn0Fp4w3ioD/Os7axcMscVKS
 2CROkfR5mWbVf2z2IXwZ89RPVYW9c/kPzlXh9ak03Y3dPGoos3NqKu4oOQqAd+IK
 pQs3TO2Aqi31CC/g8jPygIKNMyyudmMhUDd2YIhDQRYZLa6Vh1DyzuDwaFL4Sv7D
 1ouGzYj+yq1sUDzVSXXHS0mJEcAC0yS3DUAvT8LO8LAgiVb7h7DlcQ03eO7uc2k/
 1LGAHNp3d/AW8v34oru8tVFpCFMZeHiTLIzY16B2IMggtijnuL1kLk5cLoj6KnhT
 cYthsw+f0fbaxB4MDUa6bTQj3U9pL1VS+2MpIrUjiTR45IKbsSn+UMqyTzQlQttN
 KB68yVHd/3CJsN39e4rrkBkagdFZJHSGHlYyA+ThNllgczdcvkVR7h97r0Tz8E39
 mADRC9jDGsGKl05qxS/0
 =ANme
 -----END PGP SIGNATURE-----

Merge tag 'renesas-dt5-for-v3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes

Fifth Round of Renesas ARM Based SoC DT Updates for v3.15

Correct renesas,groups in SDHI nodes of for r8a7790 (R-Car H2) based
Lager board.

* tag 'renesas-dt5-for-v3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: lager: correct renesas,gpios to renesas,groups in sd[02] pfc

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:34:00 +02:00
Arnd Bergmann 59209c9a34 Fixing uart-rx pull settings and a copy'n'paste error in a smp message
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABCAAGBQJTTPmsAAoJEPOmecmc0R2BiGgIAIY5YgfTSzKn7Khmko/gtStC
 s3LUiCB3u9exlLLsP41IZYm+TvQ2f+qBHNmANmK3JE48xf0CDFjzRdA8l2epHQj5
 eWcBBnaFH3r9kIijK9af2wnC6EerzPKHejaQqizN7lMMLZlr9YHSZvSp+d8mOZ5A
 jMkWvFnhoht5H2+hj0EHv1S6mdzLM9sYwsegvtEv5mAvtvO7++1WFx1aauteat9a
 4jhgYE+ZPc31yER9bO+j4VQBc10tuwvmUP5LBfgpMMVP2efFzZqY1g5ElAtw5ApN
 HUoCRAsnd29tE5W8pjkFsi6kPlRh5uMmCRnzWudccGgU8MO3nmPbsFQtMj1gGM8=
 =TAVy
 -----END PGP SIGNATURE-----

Merge tag 'v3.15-rockchip-fixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into fixes

Fixing uart-rx pull settings and a copy'n'paste error in a smp message

* tag 'v3.15-rockchip-fixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  ARM: rockchip: fix copy'n'paste error in smp error messages
  ARM: rockchip: rk3188: enable pull-ups on UART RX pins

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:33:31 +02:00
Arnd Bergmann 9dbb7e2451 The i.MX fixes for 3.15:
- A couple of dts changes for the fallout of imx-drm binding update
  - Parent DI clocks to video PLL for better HDMI support
  - PCIe interrupt mapping and GIC node fixes
  - A series of edmqmx6 board fixes
  - Other small and random fixes on imx5 and imx6 dts
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQEcBAABAgAGBQJTTOc9AAoJEFBXWFqHsHzO+S0H+wbYC7IJxwJ8YVRHChFAs6gV
 vUP3MICQV49PUReGxhsc0iJmjnc8fJtXDR4wH7rmzlxQYdrYsnFYBk+yPXO6GhqW
 Js4hkS4V/9CbGmL7v53eGhW9TyTq0yE+vWpKXZTyDoCbKKkfhKrtfRIjZgkdNBZD
 3XAZ4zm3LFwca/GwLN2RSjJ6mdPX24pm+SDnblHqDvz/3KyfBQj2AYUYjRxElide
 YcsUMcXU+/aJD1JTVdriw9lsP7sqJzsemj948j8XakBoU32A+DuoBuB0Dhm9Uv10
 2qydt1R5pR9q2iX1/FYzZyTjs+KOW3ds8/Z36+MbWTytYS9TwzQ6bln0nOCUNhw=
 =eymy
 -----END PGP SIGNATURE-----

Merge tag 'imx-fixes-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes

The i.MX fixes for 3.15:
 - A couple of dts changes for the fallout of imx-drm binding update
 - Parent DI clocks to video PLL for better HDMI support
 - PCIe interrupt mapping and GIC node fixes
 - A series of edmqmx6 board fixes
 - Other small and random fixes on imx5 and imx6 dts

* tag 'imx-fixes-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  ARM: i.MX6: ipu_di_sel clocks can set parent rates
  ARM: imx6q: clk: Parent DI clocks to video PLL via di_pre_sel
  ARM: dts: imx: add required #clock-cells for fixed-clock
  ARM: dts: vybrid: drop address and size cells from GIC node
  ARM: dts: imx6sl-evk: Add an entry for MX6SL_PAD_ECSPI1_SS0__GPIO4_IO11
  ARM: dts: imx53: fix apparent copy/paste error
  ARM: dts: imx6q-gw5xxx: remove dead 'crtcs' property
  ARM: dts: imx53-tx53: add IPU DI ports and endpoints
  ARM: dts: imx6: edmqmx6: add second STMPE
  ARM: dts: imx6: edmqmx6: USB H1 only supports host mode
  ARM: dts: imx6: edmqmx6: Do not use the OTG switch as VBUS regulator
  ARM: dts: imx6: edmqmx6: Fix usbotg id pin
  ARM: dt: microsom: don't set bit 7 for ethernet mux settings
  ARM: imx6q-clk: parent lvds_gate from lvds_sel
  ARM: dts: imx: drop invalid size and address cells properties
  ARM: dts: mx5: fix wrong stmpe-ts bindings
  ARM: dts: imx53-m53evk: Fix memory region description
  ARM: dts: imx53-qsb-common: Fix memory region description
  ARM: dts: imx6: add PCIe interrupt mapping properties

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:30:53 +02:00
Arnd Bergmann 191bcd8120 mvebu DT fixes-non-critical (for v3.15-rc1)
- kirkwood
     - add some missing vendor prefixes to keep checkpatch happy
 
  - mvebu
     - add clock ref to mdio node on 370/XP/38x
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTRp87AAoJEP45WPkGe8ZnQMsP/i34LwsfOeNGtWeZnkPK4Jx1
 jp0RJrlzs2vGJyPrWAhkR+rSAwBVS5BzPTlRmJmuU/r+g6nnYB114dPk4mcGFB3W
 oLATGzJ1To2p5oxODYC0pYTiWZGa2bPt1IOSyN3p77IX7iGjqx2uCuGHGK3eNez3
 hqi8gHy2J6JCHMW60UhP2gBwUNgpOXHaekLdaRdj1zX66d14P4yLGVS2f8YjBTqd
 5L/0/P7SFHsZVFl6F24mWLE6PLSoQHpRsXx0T+N5AJTuFUHBiBHrXL5XiOduWLb4
 AdG//fu39zjbV9pnanktzrb7Y4qFTUXhl0YlvIedx4O3itVtfuvLGnvx9S79yapz
 lb22vjWU3Y1/IkgVSiAD1YdWvFbMJpbFVC1TxTR8mT/23E+bgSJhNOwkLznF7KA3
 +MgZjx0MolRkhPo7eVOVlyc+c4r4+GrU2UjKPImt5imPFtcnAWQIGVScIigURiLF
 OcxJnwAV7qPlQvYHASHcv7Lfrb5kBaxwGNEvn8QzqWPuMjX0owgvXlkf9LotlbTV
 T9PQOGHfBH9Jpyo4aU75hDuhsMpm4zK2cIV3R0E7lLVXUaoth9GgSmUJcaA/GiZa
 likX0g9mNBJdEel4e3WhjHmt6kfbbxhPSB8RJOoEeCx5AY6gUyFQuR0RLaKu+C6A
 1hs/KWDko00WsnWKiOxP
 =cOq9
 -----END PGP SIGNATURE-----

Merge tag 'mvebu-dt-fixes-non-crit-3.15' of git://git.infradead.org/linux-mvebu into fixes

mvebu DT fixes-non-critical (for v3.15-rc1)

 - kirkwood
    - add some missing vendor prefixes to keep checkpatch happy

 - mvebu
    - add clock ref to mdio node on 370/XP/38x

* tag 'mvebu-dt-fixes-non-crit-3.15' of git://git.infradead.org/linux-mvebu:
  ARM: mvebu: ensure the mdio node has a clock reference on Armada 38x
  ARM: mvebu: ensure the mdio node has a clock reference on Armada 370/XP
  ARM: Kirkwood: DT: Add missing vendor prefix
  ARM: Kirkwood: Fix Atmel vendor prefix

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:30:16 +02:00
Paul Bolle cab4d50389 ARM: tegra: remove TEGRA_EMC_SCALING_ENABLE
Commit a7cbe92cef ("ARM: tegra: remove tegra EMC scaling driver")
removed the only user of TEGRA_EMC_SCALING_ENABLE. Remove its Kconfig
entry too.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:29:12 +02:00
Domenico Andreoli af81c08c28 ARM: Tidy up DTB Makefile entries
Few things were out of order:

- removed ARCH_BCM2835 duplicate
- shuffled ARCH_BCM_5301X, ARCH_U8500 and ARCH_U300 around so to keep the
  list sorted

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Olof Johansson <olof@lixom.net>
Signed-by: Domenico Andreoli <domenico.andreoli@linux.com>

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:28:47 +02:00
Rob Herring 6d0add405a ARM: fix missing CLKSRC_OF on multi-platform
In commit ddb902cc34 (ARM: centralize common multi-platform kconfig
options), CLKSRC_OF was removed from some platforms, but not added to
ARCH_MULTIPLATFORM. Fix this.

Reported-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:28:20 +02:00
Alex Elder 1be5f69216 ARM: spear: add __init to spear_clocksource_init()
I get a build warning because spear_clocksource_init() calls
clocksource_mmio_init(), but it doesn't have an __init annotation.
Fix that.

Signed-off-by: Alex Elder <elder@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:28:00 +02:00
Andrea Adami c02b50e90b ARM: pxa: hx4700.h: include "irqs.h" for PXA_NR_BUILTIN_GPIO
hx4700 needs the same fix as in
9705e74671
"ARM: pxa: fix various compilation problems"

Fix build errors. Initial one is:
/linux/arch/arm/mach-pxa/include/mach/hx4700.h:18:32: error:
 'PXA_NR_BUILTIN_GPIO' undeclared here (not in a function)
|  #define HX4700_ASIC3_GPIO_BASE PXA_NR_BUILTIN_GPIO

Cc: stable@vger.kernel.org # v3.13+
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:26:39 +02:00
Guenter Roeck f75d723091 hwmon: (ltc2945) Don't crash the kernel unnecessarily
An implementation error should not crash the kernel if it is avoidable.
Replace BUG() with WARN_ONCE().

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-04-24 06:09:43 -07:00
Daniel Vetter 2b4c36612e drm/tegra: restrict plane loops to legacy planes
In Matt Ropers primary plane series a set of prep patches like

commit af2b653bfb
Author: Matt Roper <matthew.d.roper@intel.com>
Date:   Tue Apr 1 15:22:32 2014 -0700

    drm/i915: Restrict plane loops to only operate on overlay planes (v2)

ensured that all exisiting users of the mode_config->plane_list
wouldn't change behaviour. Unfortunately tegra seems to have fallen
through the cracks. Fix it.

This regression was introduced in

commit e13161af80
Author: Matt Roper <matthew.d.roper@intel.com>
Date:   Tue Apr 1 15:22:38 2014 -0700

    drm: Add drm_crtc_init_with_planes() (v2)

The result was that we've unref'ed the fb for the primary plane twice,
leading to a use-after free bug. This is because the drm core will
already set crtc->primary->fb to NULL and do the unref for us, and the
crtc disable hook is called by the drm crtc helpers for exactly this
case.

Aside: Now that the fbdev helpers clean up planes there's no longer a
need to do this in drivers. So this could probably be nuked entirely
in linux-next.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-24 15:04:30 +02:00
Pawel Moll b2e5411ee2 hwmon: (vexpress) Avoid creating non-existing attributes
The 'label' attribute was always created but returned -ENOENT
if there is no label and such behaviour is undefined from
libsensors' point of view.

Fixed by providing is_visible method in the attributes group,
so the attribute is not created at all when unnecessary.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-04-24 06:02:10 -07:00
Pawel Moll 52feaca5d6 hwmon: (vexpress) Use legal hwmon device names
The driver used to directly us a DT 'compatible' property for
the 'name' attribute of the hwmon devices. Unfortunately it
contains '-' which is illegal in this context. It messes up
libsensors and thus every application using it.

Fixed by providing equivalent (and simpler) name strings.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-04-24 06:01:59 -07:00
Heinrich Schuchardt bb6dd5757c arm/mach-vexpress: array accessed out of bounds
dcscb_allcpus_mask is an array of size 2.

The index variable cluster has to be checked against this limit
before accessing the array.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
2014-04-24 11:41:12 +01:00
Dan Carpenter 6b4ed8b00e clk: vexpress: NULL dereference on error path
If the allocation fails then we dereference the NULL in the error path.
Just return directly.

Fixes: ed27ff1db8 ('clk: Versatile Express clock generators ("osc") driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
2014-04-24 11:39:06 +01:00
Ben Widawsky 0f9dc59db6 drm/i915: Allow full PPGTT with param override
When PPGTT was disabled by default, the patch also prevented the user
from overriding this behavior via module parameter. Being able to test
this on arbitrary kernels is extremely beneficial to track down the
remaining bugs. The patch that prevented this was:

commit 93a25a9e2d
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Thu Mar 6 09:40:43 2014 +0100

    drm/i915: Disable full ppgtt by default

By default PPGTT is set to -1. 0 means off, 1 means aliasing only, 2
means full, all other values are reserved.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2014-04-24 13:34:58 +03:00
Chris Wilson edd586fe70 drm/i915: Discard BIOS framebuffers too small to accommodate chosen mode
If the inherited BIOS framebuffer is smaller than the mode selected for
fbdev, then if we continue to use it then we cause display corruption as
we do not setup the panel fitter to upscale.

Regression from commit d978ef1445
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Fri Mar 7 08:57:51 2014 -0800

    drm/i915: Wrap the preallocated BIOS framebuffer and preserve for KMS fbcon v12

v2: Add a debug message to track the discard of the BIOS fb.
v3: Ville pointed out the difference between ref/unref

Reported-by: Knut Petersen <Knut_Petersen@t-online.de>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77767
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2014-04-24 13:34:37 +03:00
Thomas Hellstrom cbd75e97a5 drm/vmwgfx: Make sure user-space can't DMA across buffer object boundaries v2
We already check that the buffer object we're accessing is registered with
the file. Now also make sure that we can't DMA across buffer object boundaries.

v2: Code commenting update.

Cc: stable@vger.kernel.org
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-04-24 08:45:25 +02:00
Stephane Eranian 9f7ff8931e perf/x86: Fix RAPL rdmsrl_safe() usage
This patch fixes a bug introduced by:

  2422365780 ("perf/x86/intel: Use rdmsrl_safe() when initializing RAPL PMU")

The rdmsrl_safe() function returns 0 on success.
The current code was failing to detect the RAPL PMU
on real hardware  (missing /sys/devices/power) because
the return value of rdmsrl_safe() was misinterpreted.

Signed-off-by: Stephane Eranian <eranian@google.com>
Acked-by: Borislav Petkov <bp@suse.de>
Acked-by: Venkatesh Srinivas <venkateshs@google.com>
Cc: peterz@infradead.org
Cc: zheng.z.yan@intel.com
Link: http://lkml.kernel.org/r/20140423170418.GA12767@quad
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2014-04-24 08:12:41 +02:00
Bjorn Helgaas cb171f7abb PNP: Work around BIOS defects in Intel MCH area reporting
Work around BIOSes that don't report the entire Intel MCH area.

MCHBAR is not an architected PCI BAR, so MCH space is usually reported as a
PNP0C02 resource.  The MCH space was once 16KB, but is 32KB in newer parts.
Some BIOSes still report a PNP0C02 resource that is only 16KB, which means
the rest of the MCH space is consumed but unreported.

This can cause resource map sanity check warnings or (theoretically) a
device conflict if we assigned the unreported space to another device.

The Intel perf event uncore driver tripped over this when it claimed the
MCH region:

  resource map sanity check conflict: 0xfed10000 0xfed15fff 0xfed10000 0xfed13fff pnp 00:01
  Info: mapping multiple BARs. Your kernel is fine.

To prevent this, if we find a PNP0C02 resource that covers part of the MCH
space, extend it to cover the entire space.

References: http://lkml.kernel.org/r/20140224162400.GE16457@pd.tnic
Reported-and-tested-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Borislav Petkov <bp@suse.de>
Acked-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-04-24 02:39:40 +02:00
Linus Torvalds db725c88c7 Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King:
 "Various fixes and post-merge window updates.  Included here are:
   - ensure Kconfig things which should be sorted remain sorted
   - fix three big-endian bugs which crept in during the last merge
     window
   - add the renameat2 syscall
   - fix big.LITTLE switcher initialisation checks
   - fix kdump vmcore for LPAE kernels"

* 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  ARM: add renameat2 syscall
  ARM: keep arch/arm/Kconfig and arch/arm/mm/Kconfig select entries sorted
  ARM: 8033/1: fix big endian __pv_phys_pfn_offset size related issue
  ARM: 8032/1: bL_switcher: fix validation check before its activation
  ARM: 8030/1: ARM : kdump : add arch_crash_save_vmcoreinfo
  ARM: 8027/1: fix do_div() bug in big-endian systems
  ARM: 8026/1: Fix emulation of multiply accumulate instructions
  ARM: 8024/1: Keep DEBUG_UART_{PHYS,VIRT} entries sorted
2014-04-23 16:48:56 -07:00