pandora-kernel.git
9 years agoMerge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git...
Ingo Molnar [Mon, 8 Dec 2014 10:45:15 +0000 (11:45 +0100)]
Merge tag 'perf-urgent-for-mingo' of git://git./linux/kernel/git/acme/linux into perf/urgent

Pull perf/urgent fix from Arnaldo Carvalho de Melo:

  - Do not stop processing when out of order events are detected, just count them
    and notify the user about it after processing all events. (Jiri Olsa)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
9 years agosched: Add missing rcu protection to wake_up_all_idle_cpus
Andy Lutomirski [Sat, 29 Nov 2014 16:13:51 +0000 (08:13 -0800)]
sched: Add missing rcu protection to wake_up_all_idle_cpus

Locklessly doing is_idle_task(rq->curr) is only okay because of
RCU protection.  The older variant of the broken code checked
rq->curr == rq->idle instead and therefore didn't need RCU.

Fixes: f6be8af1c95d ("sched: Add new API wake_up_if_idle() to wake up the idle cpu")
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Reviewed-by: Chuansheng Liu <chuansheng.liu@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/729365dddca178506dfd0a9451006344cd6808bc.1417277372.git.luto@amacapital.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
9 years agox86/ticketlock: Fix spin_unlock_wait() livelock
Oleg Nesterov [Mon, 1 Dec 2014 21:34:17 +0000 (22:34 +0100)]
x86/ticketlock: Fix spin_unlock_wait() livelock

arch_spin_unlock_wait() looks very suboptimal, to the point I
think this is just wrong and can lead to livelock: if the lock
is heavily contended we can never see head == tail.

But we do not need to wait for arch_spin_is_locked() == F. If it
is locked we only need to wait until the current owner drops
this lock. So we could simply spin until old_head !=
lock->tickets.head in this case, but .head can overflow and thus
we can't check "unlocked" only once before the main loop.

Also, the "unlocked" check can ignore TICKET_SLOWPATH_FLAG bit.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Paul E.McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Waiman Long <Waiman.Long@hp.com>
Link: http://lkml.kernel.org/r/20141201213417.GA5842@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
9 years agomfd: rtsx: Add func to split u32 into register
Micky Ching [Fri, 5 Dec 2014 05:54:26 +0000 (13:54 +0800)]
mfd: rtsx: Add func to split u32 into register

Add helper function to write u32 to registers, if we want to put u32
value to 4 continuous register, this can help us reduce tedious work.

Signed-off-by: Micky Ching <micky_ching@realsil.com.cn>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agolocking/lglocks: Add documentation of current lglocks implementation
Nicholas Mc Guire [Mon, 8 Dec 2014 08:33:26 +0000 (09:33 +0100)]
locking/lglocks: Add documentation of current lglocks implementation

Local/global locks are currently not documented anywhere other
than in an somewhat out-of-date LWN article - this is an attempt
to document the current state of lglocks.

This patch is against linux-next 3.18.0-rc6

Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Carsten Emde <c.emde@osadl.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20141208083326.GA29895@opentech.at
Signed-off-by: Ingo Molnar <mingo@kernel.org>
9 years agommc: sdhci-msm: Convert to mmc_send_tuning()
Ulf Hansson [Fri, 5 Dec 2014 11:59:41 +0000 (12:59 +0100)]
mmc: sdhci-msm: Convert to mmc_send_tuning()

Instead of having a local hack taking care of sending the tuning
command and as well to verify the response pattern, let's convert to
the common mmc_send_tuning() API instead.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Georgi Djakov <gdjakov@mm-sol.com>
Acked-by: Georgi Djakov <gdjakov@mm-sol.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
9 years agommc: sdhci-esdhc-imx: Convert to mmc_send_tuning()
Ulf Hansson [Fri, 5 Dec 2014 11:59:40 +0000 (12:59 +0100)]
mmc: sdhci-esdhc-imx: Convert to mmc_send_tuning()

Instead of having a local function taking care of sending the tuning
command, let's use the common mmc_send_tuning() API provided by the mmc
core. In this way the request will be handled as any other request by
sdhci core.

As an effect of this change, the pm_runtime_get_sync() call at
esdhc_prepare_tuning() isn't needed any more.

This patch will also introduce another change in behavior, since before
the response pattern to the tuning command wasn't verified by
sdhci-esdhc-imx. The mmc_send_tuning() does that.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Dong Aisheng <b29396@freescale.com>
Acked-by: Dong Aisheng <b29396@freescale.com>
9 years agommc: core: Let mmc_send_tuning() to take struct mmc_host* as parameter
Ulf Hansson [Fri, 5 Dec 2014 10:31:22 +0000 (11:31 +0100)]
mmc: core: Let mmc_send_tuning() to take struct mmc_host* as parameter

To be able to use mmc_send_tuning() prior the struct mmc_card has been
allocated, let's convert it to take the struct mmc_host* as parameter
instead.

Suggested-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Dong Aisheng <b29396@freescale.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
9 years agoMerge tag 'perf-core-for-mingo-2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Ingo Molnar [Mon, 8 Dec 2014 06:45:45 +0000 (07:45 +0100)]
Merge tag 'perf-core-for-mingo-2' of git://git./linux/kernel/git/acme/linux into perf/core

Pull perf/core improvements from Arnaldo Carvalho de Melo:

User visible changes:

  - Support handling complete branch stacks as histograms (Andi Kleen)

Infrastructure changes:

  - Prep work for supporting per-pkg and snapshot counters in 'perf stat' (Jiri Olsa)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
9 years agoMerge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git...
Ingo Molnar [Mon, 8 Dec 2014 06:44:38 +0000 (07:44 +0100)]
Merge tag 'perf-core-for-mingo' of git://git./linux/kernel/git/acme/linux into perf/core

Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:

User visible changes:

  - Callchain improvements from Andi Kleen including:
    * Enable printing the srcline in the history
    * Make get_srcline fall back to sym+offset

  - Allow to force redirect pr_debug to stderr. (Andi Kleen)

  - TUI hist_entry browser fixes, including showing missing overhead
    value for first level callchain. Detected comparing the output of
    --stdio/--gui (that matched) with --tui, that had this problem. (Namhyung Kim)

  - Fix segfault due to invalid kernel dso access (Namhyung Kim)

Infrastructure changes:

  - Move bfd_demangle stubbing to its only user (Arnaldo Carvalho de Melo)

  - 'perf stat' refactorings, moving stuff from it to evsel.c to use in
    per-pkg/snapshot format changes (Jiri Olsa)

  - Add per-pkg format file parsing (Matt Fleming)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
9 years agonios2: Make NIOS2_CMDLINE_IGNORE_DTB depend on CMDLINE_BOOL
Tobias Klauser [Mon, 24 Nov 2014 08:40:04 +0000 (16:40 +0800)]
nios2: Make NIOS2_CMDLINE_IGNORE_DTB depend on CMDLINE_BOOL

If NIOS2_CMDLINE_IGNORE_DTB is selected but CMDLINE_BOOL isn't and thus
CONFIG_CMDLINE is not defined, the build fails with the following error:

arch/nios2/kernel/setup.c: In function 'nios2_boot_init':
arch/nios2/kernel/setup.c:131:30: error: 'CONFIG_CMDLINE' undeclared
(first use in this function)
   strncpy(boot_command_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE);

This can be reproduced using randconfig with KCONFIG_SEED=0xE5B8749E, i.e.
'make KCONFIG_SEED=0xE5B8749E ARCH=nios2 randconfig'.

Fix this by letting NIOS2_CMDLINE_IGNORE_DTB depend on CMDLINE_BOOL, so we
actually have a default kernel command string to fall back to.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: Add missing NR_CPUS to Kconfig
Tobias Klauser [Mon, 24 Nov 2014 08:13:39 +0000 (16:13 +0800)]
nios2: Add missing NR_CPUS to Kconfig

kernel/time/Kconfig expects that NR_CPUS is defined.

This fixes the following config warning:
"kernel/time/Kconfig:163:warning: range is invalid"

Follow 4cbbbb43d666 ("microblaze: Fix missing NR_CPUS in menuconfig")

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: asm-offsets: Remove unused definition TI_TASK
Tobias Klauser [Mon, 24 Nov 2014 07:52:55 +0000 (15:52 +0800)]
nios2: asm-offsets: Remove unused definition TI_TASK

TI_TASK is not used in nios2 assembly code, so remove it.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: Remove write-only struct member from nios2_timer
Tobias Klauser [Mon, 24 Nov 2014 07:48:20 +0000 (15:48 +0800)]
nios2: Remove write-only struct member from nios2_timer

The irq member of struct nios2_timer is only written to but
never read, thus it can be removed.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: Remove unused extern declaration of shm_align_mask
Tobias Klauser [Mon, 24 Nov 2014 07:44:30 +0000 (15:44 +0800)]
nios2: Remove unused extern declaration of shm_align_mask

shm_align_mask is not defined/used on nios2, thus there is no need to
declare it.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: include linux/type.h in io.h
Ley Foon Tan [Thu, 20 Nov 2014 11:01:43 +0000 (19:01 +0800)]
nios2: include linux/type.h in io.h

This is require for __iomem definition.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: move include asm-generic/io.h to end of file
Ley Foon Tan [Thu, 20 Nov 2014 11:04:41 +0000 (19:04 +0800)]
nios2: move include asm-generic/io.h to end of file

Move asm-generic/io.h to end of file to override functions like
phys_to_virt, virt_to_phys in asm-generic/io.h.
This is due to recent commit 9216efaf introduced new way to
override functions by checking for the existence of a macro with the
same of the function.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: remove include asm-generic/iomap.h from io.h
Ley Foon Tan [Thu, 20 Nov 2014 10:52:04 +0000 (18:52 +0800)]
nios2: remove include asm-generic/iomap.h from io.h

Don't need asm-generic/iomap.h and asm-generic/io.h added
default ioread8/16/32 iowrite8/16/32 implementation.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: remove unnecessary space before define
Ley Foon Tan [Thu, 20 Nov 2014 10:44:56 +0000 (18:44 +0800)]
nios2: remove unnecessary space before define

Remove extra space between # and define.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: fix error handling of irq_of_parse_and_map
Dmitry Torokhov [Mon, 17 Nov 2014 10:36:23 +0000 (18:36 +0800)]
nios2: fix error handling of irq_of_parse_and_map

Return value of irq_of_parse_and_map() is unsigned int, with 0
indicating failure, so testing for negative result never works.

Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: Use IS_ENABLED instead of #ifdefs to check config symbols
Tobias Klauser [Mon, 17 Nov 2014 10:30:37 +0000 (18:30 +0800)]
nios2: Use IS_ENABLED instead of #ifdefs to check config symbols

Make the checking for div/mul/mulx instruction config symbols easier to
read by using IS_ENABLED instead of #ifdefs.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: Build infrastructure
Ley Foon Tan [Thu, 6 Nov 2014 07:20:19 +0000 (15:20 +0800)]
nios2: Build infrastructure

This patch adds Makefile and Kconfig files required for building a
nios2 kernel.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agoDocumentation: Add documentation for Nios2 architecture
Ley Foon Tan [Thu, 6 Nov 2014 07:20:15 +0000 (15:20 +0800)]
Documentation: Add documentation for Nios2 architecture

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agoMAINTAINERS: Add nios2 maintainer
Ley Foon Tan [Thu, 6 Nov 2014 07:20:14 +0000 (15:20 +0800)]
MAINTAINERS: Add nios2 maintainer

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: ptrace support
Ley Foon Tan [Thu, 6 Nov 2014 07:20:13 +0000 (15:20 +0800)]
nios2: ptrace support

Add ptrace support for nios2.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: Module support
Ley Foon Tan [Thu, 6 Nov 2014 07:20:11 +0000 (15:20 +0800)]
nios2: Module support

This patch adds support for loadable modules.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: Nios2 registers
Ley Foon Tan [Thu, 6 Nov 2014 07:20:10 +0000 (15:20 +0800)]
nios2: Nios2 registers

This file contains constants for the instruction macros, cpu registers,
fields and bits.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: Miscellaneous header files
Ley Foon Tan [Thu, 6 Nov 2014 07:20:09 +0000 (15:20 +0800)]
nios2: Miscellaneous header files

This patch introduces a few nios2-specific header files.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: Cpuinfo handling
Ley Foon Tan [Thu, 6 Nov 2014 07:20:06 +0000 (15:20 +0800)]
nios2: Cpuinfo handling

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: Time keeping
Ley Foon Tan [Thu, 6 Nov 2014 07:20:04 +0000 (15:20 +0800)]
nios2: Time keeping

Add time keeping code for nios2.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
9 years agonios2: Device tree support
Ley Foon Tan [Thu, 6 Nov 2014 07:20:03 +0000 (15:20 +0800)]
nios2: Device tree support

Add device tree support to arch/nios2.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: Library functions
Ley Foon Tan [Thu, 6 Nov 2014 07:20:00 +0000 (15:20 +0800)]
nios2: Library functions

Add optimised library functions for nios2.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: Signal handling support
Ley Foon Tan [Thu, 6 Nov 2014 07:19:59 +0000 (15:19 +0800)]
nios2: Signal handling support

This patch adds support for signal handling.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: System calls handling
Ley Foon Tan [Thu, 6 Nov 2014 07:19:57 +0000 (15:19 +0800)]
nios2: System calls handling

This patch adds support for system calls from userspaces. It uses the
asm-generic/unistd.h definitions with architecture spcific syscall.
The sys_call_table is just an array defined in a C file and it contains
pointers to the syscall functions.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: ELF definitions
Ley Foon Tan [Thu, 6 Nov 2014 07:19:55 +0000 (15:19 +0800)]
nios2: ELF definitions

This patch adds definitions for the ELF format

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agoAdd ELF machine define for Nios2
Ley Foon Tan [Thu, 6 Nov 2014 07:19:54 +0000 (15:19 +0800)]
Add ELF machine define for Nios2

Signed-off-by: Ley Foon Tan <lftan@altera.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
9 years agonios2: DMA mapping API
Ley Foon Tan [Thu, 6 Nov 2014 07:19:53 +0000 (15:19 +0800)]
nios2: DMA mapping API

This patch adds support for the DMA mapping API.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: Interrupt handling
Ley Foon Tan [Thu, 6 Nov 2014 07:19:52 +0000 (15:19 +0800)]
nios2: Interrupt handling

This patch adds the support for IRQ handling.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
9 years agonios2: TLB handling
Ley Foon Tan [Thu, 6 Nov 2014 07:19:50 +0000 (15:19 +0800)]
nios2: TLB handling

This patch adds the TLB maintenance functions.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: Cache handling
Ley Foon Tan [Thu, 6 Nov 2014 07:19:48 +0000 (15:19 +0800)]
nios2: Cache handling

This patch adds functionality required for cache maintenance.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: Process management
Ley Foon Tan [Thu, 6 Nov 2014 07:19:47 +0000 (15:19 +0800)]
nios2: Process management

This patch adds support for thread creation and context switching.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: Page table management
Ley Foon Tan [Thu, 6 Nov 2014 07:19:45 +0000 (15:19 +0800)]
nios2: Page table management

This patch adds support for page table management.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: MMU Fault handling
Ley Foon Tan [Thu, 6 Nov 2014 07:19:44 +0000 (15:19 +0800)]
nios2: MMU Fault handling

This patch adds support for the handling of the MMU faults (exception
entry code introduced by a previous patch, kernel/entry.S).

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: I/O Mapping
Ley Foon Tan [Thu, 6 Nov 2014 07:19:42 +0000 (15:19 +0800)]
nios2: I/O Mapping

This patch adds several definitions for I/O accessors and ioremap().

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: Memory management
Ley Foon Tan [Thu, 6 Nov 2014 07:19:41 +0000 (15:19 +0800)]
nios2: Memory management

This patch contains the initialisation of the memory blocks, MMU
attributes and the memory map.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: Traps exception handling
Ley Foon Tan [Thu, 6 Nov 2014 07:19:40 +0000 (15:19 +0800)]
nios2: Traps exception handling

This patch contains traps exception handling.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: Exception handling
Ley Foon Tan [Thu, 6 Nov 2014 07:19:38 +0000 (15:19 +0800)]
nios2: Exception handling

This patch contains the exception entry code (kernel/entry.S) and
misaligned exception.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: Kernel booting and initialization
Ley Foon Tan [Thu, 6 Nov 2014 07:19:37 +0000 (15:19 +0800)]
nios2: Kernel booting and initialization

This patch adds the kernel booting and the initial setup code.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: Assembly macros and definitions
Ley Foon Tan [Thu, 6 Nov 2014 07:19:36 +0000 (15:19 +0800)]
nios2: Assembly macros and definitions

This patch add assembly macros and definitions used in
the .S files across arch/nios2/ and together with asm-offsets.c.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
9 years agoasm-generic: add generic futex for !CONFIG_SMP
Ley Foon Tan [Thu, 6 Nov 2014 07:19:34 +0000 (15:19 +0800)]
asm-generic: add generic futex for !CONFIG_SMP

Follow m68k futex implementation for !CONFIG_SMP.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
9 years agoLinux 3.18
Linus Torvalds [Sun, 7 Dec 2014 22:21:05 +0000 (14:21 -0800)]
Linux 3.18

9 years agogenirq: Move irq_chip_write_msi_msg() helper to core
Thomas Gleixner [Sat, 6 Dec 2014 20:20:20 +0000 (21:20 +0100)]
genirq: Move irq_chip_write_msi_msg() helper to core

No point to expose this to the world. The only legitimate user is the
core code.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
9 years agoMerge branch 'for-3.18-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj...
Linus Torvalds [Sun, 7 Dec 2014 20:00:14 +0000 (12:00 -0800)]
Merge branch 'for-3.18-fixes' of git://git./linux/kernel/git/tj/libata

Pull libata fixes from Tejun Heo:
 "Three libata fixes for v3.18.  Nothing too interesting.  PCI ID ID and
  quirk additions to ahci and an error handling path fix in sata_fsl"

* 'for-3.18-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
  ahci: disable MSI on SAMSUNG 0xa800 SSD
  sata_fsl: fix error handling of irq_of_parse_and_map
  AHCI: Add DeviceIDs for Sunrise Point-LP SATA controller

9 years agoMerge git://www.linux-watchdog.org/linux-watchdog
Linus Torvalds [Sat, 6 Dec 2014 19:27:25 +0000 (11:27 -0800)]
Merge git://www.linux-watchdog.org/linux-watchdog

Pull watchdog fix from Wim Van Sebroeck:
 "Fix the watchdog mask bit offset for Exynos7"

* git://www.linux-watchdog.org/linux-watchdog:
  watchdog: s3c2410_wdt: Fix the mask bit offset for Exynos7

9 years agoMerge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Sat, 6 Dec 2014 19:26:01 +0000 (11:26 -0800)]
Merge branch 'i2c/for-current' of git://git./linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
 "Here are two more driver bugfixes for I2C which would be good to have"

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: cadence: Set the hardware time-out register to maximum value
  i2c: davinci: generate STP always when NACK is received

9 years agowatchdog: s3c2410_wdt: Fix the mask bit offset for Exynos7
Abhilash Kesavan [Fri, 17 Oct 2014 16:12:53 +0000 (21:42 +0530)]
watchdog: s3c2410_wdt: Fix the mask bit offset for Exynos7

The watchdog mask bit offset listed for Exynos7 is incorrect.
Fix this.

Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Acked-by: Naveen Krishna Chatradhi <naveenkrishna.ch@gmail.com
Reviewd-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
9 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 5 Dec 2014 18:47:19 +0000 (10:47 -0800)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 fixes from Thomas Gleixner:
 "Two final fixlets for 3.18:
   - Prevent microcode reload wreckage on 32bit
   - Unbreak cross compilation"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, microcode: Limit the microcode reloading to 64-bit for now
  x86: Use $(OBJDUMP) instead of plain objdump

9 years agoMerge tag 'sound-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Fri, 5 Dec 2014 18:39:49 +0000 (10:39 -0800)]
Merge tag 'sound-3.18' of git://git./linux/kernel/git/tiwai/sound

Pull sound fixlet from Takashi Iwai:
 "Just one commit for adding a copule of HD-audio quirk entries"

* tag 'sound-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda/realtek - Add headset Mic support for new Dell machine

9 years agoARM: dts: rk3288: add arm,cpu-registers-not-fw-configured
Sonny Rao [Tue, 25 Nov 2014 18:54:00 +0000 (10:54 -0800)]
ARM: dts: rk3288: add arm,cpu-registers-not-fw-configured

This will enable use of physical arch timers on rk3288, where each
core comes out of reset with a different virtual offset.  Using
physical timers will help with SMP booting on coreboot and older
u-boot and should also allow suspend-resume and cpu-hotplug to work on
all firmwares.

Firmware which does initialize the cpu registers properly at boot and
cpu-hotplug can remove this property from the device tree.

Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agohwmon: (lm75) Strengthen detect function
Guenter Roeck [Thu, 4 Dec 2014 17:58:15 +0000 (09:58 -0800)]
hwmon: (lm75) Strengthen detect function

A chip returning 0x00 in all registers is erroneously detected
as LM75. Check hysteresis and temperature limit registers and
abort if both are 0 to reduce the likelyhood for this to happen.

Reviewed-by: Rob Coulson <rob.coulson@gmail.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
9 years agoARM: omap2plus_defconfig: enable ECAP and EHRPWM
Felipe Balbi [Tue, 18 Nov 2014 18:07:03 +0000 (12:07 -0600)]
ARM: omap2plus_defconfig: enable ECAP and EHRPWM

Many of AM335x and AM437x hook backlight to
one of these two devices. By enabling their
drivers we make sure pwm-backlight can do
its thing.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoARM: omap2plus_defconfig: enable XHCI
Felipe Balbi [Tue, 18 Nov 2014 18:07:02 +0000 (12:07 -0600)]
ARM: omap2plus_defconfig: enable XHCI

AM437x devices have a DWC3 IP inside of them.

The host side implementation of DWC3 is XHCI
compliant. By enabling XHCI driver, we get
the USB host port on AM437x Starter Kit working
out of the box.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoARM: omap2plus_defconfig: enable AM33XX SoC sound
Felipe Balbi [Tue, 18 Nov 2014 18:07:01 +0000 (12:07 -0600)]
ARM: omap2plus_defconfig: enable AM33XX SoC sound

Without this, sound on AM437x Starter Kit will
not work.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoARM: omap2plus_defconfig: enable EDT FT5X06 touchscreen
Felipe Balbi [Tue, 18 Nov 2014 18:07:00 +0000 (12:07 -0600)]
ARM: omap2plus_defconfig: enable EDT FT5X06 touchscreen

AM437x Starter Kit ships with EDT FT5306 touchscreen
device. By enabling the driver we make sure touchscreen
will work out of the box.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoARM: omap2plus_defconfig: remove unwanted ethernet drivers
Felipe Balbi [Tue, 18 Nov 2014 18:06:59 +0000 (12:06 -0600)]
ARM: omap2plus_defconfig: remove unwanted ethernet drivers

None of these drivers are known to be used on
any platform supported by omap2plus_defconfig,
by removing them we get a slight smaller kernel.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoarm64: remove the unnecessary arm64_swiotlb_init()
Ding Tianhong [Fri, 5 Dec 2014 08:39:46 +0000 (08:39 +0000)]
arm64: remove the unnecessary arm64_swiotlb_init()

The commit 3690951fc6d42f3a0903987677d0e592c49dd8db
(arm64: Use swiotlb late initialisation)
switches the DMA mapping code to swiotlb_tlb_late_init_with_default_size(),
the arm64_swiotlb_init() will not used anymore, so remove this function.

Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
9 years agoMerge remote-tracking branches 'regulator/topic/sky81452' and 'regulator/topic/stub...
Mark Brown [Fri, 5 Dec 2014 11:14:43 +0000 (11:14 +0000)]
Merge remote-tracking branches 'regulator/topic/sky81452' and 'regulator/topic/stub' into regulator-next

9 years agoMerge remote-tracking branches 'regulator/topic/rn5t618', 'regulator/topic/rpm',...
Mark Brown [Fri, 5 Dec 2014 11:14:40 +0000 (11:14 +0000)]
Merge remote-tracking branches 'regulator/topic/rn5t618', 'regulator/topic/rpm', 'regulator/topic/rt5033', 'regulator/topic/s2mpa01' and 'regulator/topic/s2mps11' into regulator-next

9 years agoMerge remote-tracking branches 'regulator/topic/max77686', 'regulator/topic/max77693...
Mark Brown [Fri, 5 Dec 2014 11:14:37 +0000 (11:14 +0000)]
Merge remote-tracking branches 'regulator/topic/max77686', 'regulator/topic/max77693', 'regulator/topic/max77802', 'regulator/topic/power-off' and 'regulator/topic/rk808' into regulator-next

9 years agoMerge remote-tracking branches 'regulator/topic/anatop', 'regulator/topic/disable...
Mark Brown [Fri, 5 Dec 2014 11:14:35 +0000 (11:14 +0000)]
Merge remote-tracking branches 'regulator/topic/anatop', 'regulator/topic/disable', 'regulator/topic/dummy' and 'regulator/topic/gpio' into regulator-next

9 years agoMerge remote-tracking branch 'regulator/topic/core' into regulator-next
Mark Brown [Fri, 5 Dec 2014 11:14:34 +0000 (11:14 +0000)]
Merge remote-tracking branch 'regulator/topic/core' into regulator-next

9 years agoMerge remote-tracking branch 'regulator/fix/da9063' into regulator-linus
Mark Brown [Fri, 5 Dec 2014 11:14:33 +0000 (11:14 +0000)]
Merge remote-tracking branch 'regulator/fix/da9063' into regulator-linus

9 years agoMerge branch 'topic/suspend' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Mark Brown [Fri, 5 Dec 2014 11:06:18 +0000 (11:06 +0000)]
Merge branch 'topic/suspend' of git://git./linux/kernel/git/broonie/regulator into regulator-sky81452

Conflicts:
drivers/regulator/sky81452-regulator.c

9 years agommc: queue: Improve error handling during allocation of bounce buffers
Bhuvanesh Surachari [Mon, 1 Dec 2014 07:23:02 +0000 (02:23 -0500)]
mmc: queue: Improve error handling during allocation of bounce buffers

Allocation of previous bounce buffer in mmc_init_queue when the current
bounce buffer allocation fails was leading to a crash later in
__blk_segment_map_sg. Error handling is improved by allocating previous
bounce buffer only if the current bounce buffer allocation succeeds.

Signed-off-by: Bhuvanesh Surachari <bhuvanesh_surachari@mentor.com>
Signed-off-by: Harish Jenny K N <harish_kandiga@mentor.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
9 years agoRevert "ARM: dts: rockchip: temporarily disable smp on rk3288"
Olof Johansson [Fri, 5 Dec 2014 07:33:38 +0000 (23:33 -0800)]
Revert "ARM: dts: rockchip: temporarily disable smp on rk3288"

We now have the physical-timers patches lined up as a dependency in this same
branch, so we can revert the temporary disablement.

This reverts commit b77d43943ea83997c6c37b8831d1561981d499c5.

Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoMerge branch 'clocksource/physical-timers' into next/dt
Olof Johansson [Fri, 5 Dec 2014 07:33:16 +0000 (23:33 -0800)]
Merge branch 'clocksource/physical-timers' into next/dt

These are a pre-req to get rk3288 SMP to work with some firmwares, so merge
it in here as well as in next/drivers.

* clocksource/physical-timers:
  clocksource: arch_timer: Allow the device tree to specify uninitialized timer registers
  clocksource: arch_timer: Fix code to use physical timers when requested

9 years agoMerge branch 'clocksource/physical-timers' into next/drivers
Olof Johansson [Fri, 5 Dec 2014 07:32:16 +0000 (23:32 -0800)]
Merge branch 'clocksource/physical-timers' into next/drivers

* clocksource/physical-timers:
  clocksource: arch_timer: Allow the device tree to specify uninitialized timer registers
  clocksource: arch_timer: Fix code to use physical timers when requested

9 years agoclocksource: arch_timer: Allow the device tree to specify uninitialized timer registers
Doug Anderson [Wed, 8 Oct 2014 07:33:47 +0000 (00:33 -0700)]
clocksource: arch_timer: Allow the device tree to specify uninitialized timer registers

Some 32-bit (ARMv7) systems are architected like this:

* The firmware doesn't know and doesn't care about hypervisor mode and
  we don't want to add the complexity of hypervisor there.

* The firmware isn't involved in SMP bringup or resume.

* The ARCH timer come up with an uninitialized offset (CNTVOFF)
  between the virtual and physical counters.  Each core gets a
  different random offset.

* The device boots in "Secure SVC" mode.

* Nothing has touched the reset value of CNTHCTL.PL1PCEN or
  CNTHCTL.PL1PCTEN (both default to 1 at reset)

On systems like the above, it doesn't make sense to use the virtual
counter.  There's nobody managing the offset and each time a core goes
down and comes back up it will get reinitialized to some other random
value.

This adds an optional property which can inform the kernel of this
situation, and firmware is free to remove the property if it is going
to initialize the CNTVOFF registers when each CPU comes out of reset.

Currently, the best course of action in this case is to use the
physical timer, which is why it is important that CNTHCTL hasn't been
changed from its reset value and it's a reasonable assumption given
that the firmware has never entered HYP mode.

Note that it's been said that on ARMv8 systems the firmware and
kernel really can't be architected as described above.  That means
using the physical timer like this really only makes sense for ARMv7
systems.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoclocksource: arch_timer: Fix code to use physical timers when requested
Sonny Rao [Mon, 24 Nov 2014 07:02:44 +0000 (23:02 -0800)]
clocksource: arch_timer: Fix code to use physical timers when requested

This is a bug fix for using physical arch timers when
the arch_timer_use_virtual boolean is false.  It restores the
arch_counter_get_cntpct() function after removal in

0d651e4e "clocksource: arch_timer: use virtual counters"

We need this on certain ARMv7 systems which are architected like this:

* The firmware doesn't know and doesn't care about hypervisor mode and
  we don't want to add the complexity of hypervisor there.

* The firmware isn't involved in SMP bringup or resume.

* The ARCH timer come up with an uninitialized offset between the
  virtual and physical counters.  Each core gets a different random
  offset.

* The device boots in "Secure SVC" mode.

* Nothing has touched the reset value of CNTHCTL.PL1PCEN or
  CNTHCTL.PL1PCTEN (both default to 1 at reset)

One example of such as system is RK3288 where it is much simpler to
use the physical counter since there's nobody managing the offset and
each time a core goes down and comes back up it will get reinitialized
to some other random value.

Fixes: 0d651e4e65e9 ("clocksource: arch_timer: use virtual counters")
Cc: stable@vger.kernel.org
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoARM: imx6: fix bogus use of irq_get_irq_data
Marc Zyngier [Tue, 2 Dec 2014 16:05:26 +0000 (16:05 +0000)]
ARM: imx6: fix bogus use of irq_get_irq_data

The imx6 PM code seems to be quite creative in its use of irq_data,
using something that is very much a hardware interrupt number where
we expect a virtual one.  Yes, it worked so far, but that's only
luck, and it will definitely explode in 3.19.

Fix it by using a pair of helper functions that deal with the
actual hardware.

Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoARM: imx: irq: fix buggy usage of irq_data irq field
Marc Zyngier [Tue, 2 Dec 2014 16:05:25 +0000 (16:05 +0000)]
ARM: imx: irq: fix buggy usage of irq_data irq field

mach-imx directly references to the irq field in
struct irq_data, and uses this to directly poke hardware register.

But irq is the *virtual* irq number, something that has nothing
to do with the actual HW irq (stored in the hwirq field). And once
we put the stacked domain code in action, the whole thing explodes,
as these two values are *very* different.

Just replacing all instances of irq with hwirq fixes the issue.

Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoMerge tag 'bcm5301x-dt-2014-12-04' of https://github.com/hauke/linux into next/dt
Olof Johansson [Fri, 5 Dec 2014 07:19:08 +0000 (23:19 -0800)]
Merge tag 'bcm5301x-dt-2014-12-04' of https://github.com/hauke/linux into next/dt

Merge "ARM: BCM5301X: DT changes for v3.19 #2" from Hauke Mehrtens:

ARM: BCM5301X: dts updates

This adds the IRQ number to the main dts file and some new dts files
for newly added devices.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* tag 'bcm5301x-dt-2014-12-04' of https://github.com/hauke/linux:
  ARM: BCM5301X: Add DT for Buffalo WZR-600DHP2
  ARM: BCM5301X: Add DT for Asus RT-N18U
  ARM: BCM5301X: Add DT for Buffalo WZR-1750DHP
  ARM: BCM5301X: Add DT for Netgear R6300 V2
  ARM: BCM5301X: Add buttons for Netgear R6250
  ARM: BCM5301X: Add IRQs to Broadcom's bus-axi in DTS file

Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoARM: multi_v7_defconfig: enable MAX77686 PMIC drivers for exynos4412-prime based...
Tyler Baker [Thu, 4 Dec 2014 21:24:24 +0000 (13:24 -0800)]
ARM: multi_v7_defconfig: enable MAX77686 PMIC drivers for exynos4412-prime based SoCs

This patch enables the MAX77686 PMIC drivers in the multi_v7_defconfig used
on exynos4412-prime family of SoCs [1]. The exynos4412-prime based boards
are producing the following runtime errors only on the multi_v7_defconfig [2]:

kern.err: deviceless supply vdd_arm not found, using dummy regulator
kern.err: exynos-cpufreq exynos-cpufreq: failed to set cpu voltage to 1287500
kern.err: cpufreq: __target_index: Failed to change cpu frequency: -22

I reviewed the exynos_defconfig, which does not produce these runtime
errors. It was obvious that the exynos_defconfig has the PMIC drivers
enabled, whereas the multi_v7_defconfig does not. This patch has been tested
on a odroid-u2 and a odroid-u3 board. It has resolved the runtime errors.
Therefore, I purpose we enabled these drivers in the multi_v7_defconfig.

[1] http://www.hardkernel.com/main/products/prdt_info.php?g_code=G135270682824
[2] http://storage.armcloud.us/kernel-ci/mainline/v3.18-rc7-48-g7cc78f8/arm-multi_v7_defconfig/lab-tbaker-00/boot-exynos4412-odroidu3.html

Signed-off-by: Tyler Baker <tyler.baker@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Fri, 5 Dec 2014 06:39:37 +0000 (22:39 -0800)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm intel fixes from Dave Airlie:
 "Two intel stable fixes, that should be it from me for this round"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/i915: Unlock panel even when LVDS is disabled
  drm/i915: More cautious with pch fifo underruns

9 years agoMerge tag 'pm+acpi-3.18-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Fri, 5 Dec 2014 01:48:13 +0000 (17:48 -0800)]
Merge tag 'pm+acpi-3.18-rc8' of git://git./linux/kernel/git/rafael/linux-pm

Pull ACPI backlight fix from Rafael Wysocki:
 "This is a simple fix for an ACPI backlight regression introduced by a
  recent commit that overlooked a corner case which should have been
  taken into account"

* tag 'pm+acpi-3.18-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI / video: update condition to check if device is in _DOD list

9 years agoMerge tag 'drm-intel-fixes-2014-12-04' of git://anongit.freedesktop.org/drm-intel...
Dave Airlie [Fri, 5 Dec 2014 01:12:29 +0000 (11:12 +1000)]
Merge tag 'drm-intel-fixes-2014-12-04' of git://anongit.freedesktop.org/drm-intel into drm-fixes

Silence some pch fifo underrun reports and panel locking backtraces,
both cc: stable.

* tag 'drm-intel-fixes-2014-12-04' of git://anongit.freedesktop.org/drm-intel:
  drm/i915: Unlock panel even when LVDS is disabled
  drm/i915: More cautious with pch fifo underruns

9 years agoMerge tag 'media/v3.18-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Fri, 5 Dec 2014 00:06:02 +0000 (16:06 -0800)]
Merge tag 'media/v3.18-rc8' of git://git./linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:
 "A core fix and some driver fixes:
   - regression fix in Remote Controller core affecting RC6 protocol
     handling
   - fix video buffer handling in cx23885
   - race fix in solo6x10
   - fix image selection in smiapp
   - fix reported payload size on s2255drv
   - two updates for MAINTAINERS file"

* tag 'media/v3.18-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] rc-core: fix toggle handling in the rc6 decoder
  MAINTAINERS: Update mchehab's addresses
  [media] cx23885: use sg = sg_next(sg) instead of sg++
  [media] s2255drv: fix payload size for JPG, MJPEG
  [media] Update MAINTAINERS for solo6x10
  [media] solo6x10: fix a race in IRQ handler
  [media] smiapp: Only some selection targets are settable

9 years agouapi: fix to export linux/vm_sockets.h
Masahiro Yamada [Thu, 4 Dec 2014 22:42:25 +0000 (14:42 -0800)]
uapi: fix to export linux/vm_sockets.h

A typo "header=y" was introduced by commit 7071cf7fc435 ("uapi: add
missing network related headers to kbuild").

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agoregulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing
Seung-Woo Kim [Thu, 4 Dec 2014 10:17:17 +0000 (19:17 +0900)]
regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing

After freeing pin from regulator_ena_gpio_free, loop can access
the pin. So this patch fixes not to access pin after freeing.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoARM: BCM5301X: Add DT for Buffalo WZR-600DHP2
Rafał Miłecki [Thu, 4 Dec 2014 09:24:02 +0000 (10:24 +0100)]
ARM: BCM5301X: Add DT for Buffalo WZR-600DHP2

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
9 years agoARM: BCM5301X: Add DT for Asus RT-N18U
Rafał Miłecki [Thu, 4 Dec 2014 09:23:33 +0000 (10:23 +0100)]
ARM: BCM5301X: Add DT for Asus RT-N18U

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
9 years agoARM: BCM5301X: Add DT for Buffalo WZR-1750DHP
Rafał Miłecki [Thu, 4 Dec 2014 09:22:58 +0000 (10:22 +0100)]
ARM: BCM5301X: Add DT for Buffalo WZR-1750DHP

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
9 years agoARM: BCM5301X: Add DT for Netgear R6300 V2
Rafał Miłecki [Thu, 4 Dec 2014 09:22:02 +0000 (10:22 +0100)]
ARM: BCM5301X: Add DT for Netgear R6300 V2

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
9 years agoARM: BCM5301X: Add buttons for Netgear R6250
Rafał Miłecki [Sun, 30 Nov 2014 17:28:29 +0000 (18:28 +0100)]
ARM: BCM5301X: Add buttons for Netgear R6250

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
9 years agohwmon: (gpio-fan) Add a shutdown handler to poweroff the fans
Nishanth Menon [Thu, 4 Dec 2014 16:58:56 +0000 (10:58 -0600)]
hwmon: (gpio-fan) Add a shutdown handler to poweroff the fans

Poweroff the fans when shutting down the system. Else,
echo '1' > /sys/class/hwmon/hwmon0/fan1_target; poweroff leaves the
fan running if the System power off does not drive the gpio expander
which might control the fan power supply.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
9 years agohwmon: (gpio-fan) Allow usage of gpio operations that may sleep
Nishanth Menon [Thu, 4 Dec 2014 16:58:47 +0000 (10:58 -0600)]
hwmon: (gpio-fan) Allow usage of gpio operations that may sleep

Certain I2C based GPIO expanders could be used in sleepable context,
this results in:
[  115.890569] ------------[ cut here ]------------
[  115.895422] WARNING: CPU: 0 PID: 1115 at drivers/gpio/gpiolib.c:1370 gpiod_set_raw_value+0x40/0x4c()
[  115.905024] Modules linked in:
[  115.908229] CPU: 0 PID: 1115 Comm: sh Tainted: G        W      3.18.0-rc7-next-20141203-dirty #1
[  115.917461] Hardware name: Generic DRA74X (Flattened Device Tree)
[  115.923876] [<c0015368>] (unwind_backtrace) from [<c00119f4>] (show_stack+0x10/0x14)
[  115.932013] [<c00119f4>] (show_stack) from [<c05b78e8>] (dump_stack+0x78/0x94)
[  115.939594] [<c05b78e8>] (dump_stack) from [<c003de28>] (warn_slowpath_common+0x7c/0xb4)
[  115.948094] [<c003de28>] (warn_slowpath_common) from [<c003de7c>] (warn_slowpath_null+0x1c/0x24)
[  115.957315] [<c003de7c>] (warn_slowpath_null) from [<c03461e8>] (gpiod_set_raw_value+0x40/0x4c)
[  115.966457] [<c03461e8>] (gpiod_set_raw_value) from [<c04866f4>] (set_fan_speed+0x4c/0x64)
[  115.975145] [<c04866f4>] (set_fan_speed) from [<c04868a8>] (set_rpm+0x98/0xac)
[  115.982742] [<c04868a8>] (set_rpm) from [<c039fb4c>] (dev_attr_store+0x18/0x24)
[  115.990426] [<c039fb4c>] (dev_attr_store) from [<c01b0a28>] (sysfs_kf_write+0x4c/0x50)
[  115.998742] [<c01b0a28>] (sysfs_kf_write) from [<c01afe1c>] (kernfs_fop_write+0xbc/0x19c)
[  116.007333] [<c01afe1c>] (kernfs_fop_write) from [<c0148cc4>] (vfs_write+0xb0/0x1a0)
[  116.015461] [<c0148cc4>] (vfs_write) from [<c0148fbc>] (SyS_write+0x44/0x84)
[  116.022881] [<c0148fbc>] (SyS_write) from [<c000e5c0>] (ret_fast_syscall+0x0/0x48)
[  116.030833] ---[ end trace 3a0b636123acab82 ]---

So, switch over to sleepable GPIO operations as there is no mandatory
need for non-sleepable gpio operations in the fan driver.

This allows the fan driver to be used with i2c based gpio expanders such
as palmas_gpio.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
9 years agohwmon: (tmp401) Bail out from tmp401_probe() in case of write errors
Bartosz Golaszewski [Thu, 4 Dec 2014 16:45:53 +0000 (17:45 +0100)]
hwmon: (tmp401) Bail out from tmp401_probe() in case of write errors

The return value of i2c_smbus_read_byte_data() is checked in
tmp401_init_client(), but only a warning is printed and the device is
registered anyway. This leads to devices being registered even if they
cannot be physically detected.

Bail out from probe in case of write errors and notify the user.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
9 years agohwmon: (tmp401) Add support for TI TMP435
Patrick Titiano [Thu, 4 Dec 2014 16:45:51 +0000 (17:45 +0100)]
hwmon: (tmp401) Add support for TI TMP435

Signed-off-by: Patrick Titiano <ptitiano@baylibre.com>
[Bartosz Golaszewski: prepared for submission, code review fixes]
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
[Guenter Roeck: Merged two patches into one]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
9 years agoi2c: cadence: Set the hardware time-out register to maximum value
Vishnu Motghare [Wed, 3 Dec 2014 12:35:25 +0000 (18:05 +0530)]
i2c: cadence: Set the hardware time-out register to maximum value

Cadence I2C controller has bug wherein it generates invalid read transactions
after timeout in master receiver mode. This driver does not use the HW
timeout and this interrupt is disabled but the feature itself cannot be
disabled. Hence, this patch writes the maximum value (0xFF) to this register.
This is one of the workarounds to this bug and it will not avoid the issue
completely but reduces the chances of error.

Signed-off-by: Vishnu Motghare <vishnum@xilinx.com>
Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
9 years agoi2c: davinci: generate STP always when NACK is received
Grygorii Strashko [Mon, 1 Dec 2014 15:34:04 +0000 (17:34 +0200)]
i2c: davinci: generate STP always when NACK is received

According to I2C specification the NACK should be handled as follows:
"When SDA remains HIGH during this ninth clock pulse, this is defined as the Not
Acknowledge signal. The master can then generate either a STOP condition to
abort the transfer, or a repeated START condition to start a new transfer."
[I2C spec Rev. 6, 3.1.6: http://www.nxp.com/documents/user_manual/UM10204.pdf]

Currently the Davinci i2c driver interrupts the transfer on receipt of a
NACK but fails to send a STOP in some situations and so makes the bus
stuck until next I2C IP reset (idle/enable).

For example, the issue will happen during SMBus read transfer which
consists from two i2c messages write command/address and read data:

S Slave Address Wr A Command Code A Sr Slave Address Rd A D1..Dn A P
<--- write -----------------------> <--- read --------------------->

The I2C client device will send NACK if it can't recognize "Command Code"
and it's expected from I2C master to generate STP in this case.
But now, Davinci i2C driver will just exit with -EREMOTEIO and STP will
not be generated.

Hence, fix it by generating Stop condition (STP) always when NACK is received.

This patch fixes Davinci I2C in the same way it was done for OMAP I2C
commit cda2109a26eb ("i2c: omap: query STP always when NACK is received").

Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reported-by: Hein Tibosch <hein_tibosch@yahoo.es>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org