Tony Lindgren [Tue, 10 Jul 2012 08:13:19 +0000 (01:13 -0700)]
Linux-omap rebuilt: Updated with final patches for v3.6 merge window
$ git checkout -b tmp-rebuild-
1341907986 linus
$ git merge -m "Merge fixes fixes-non-critical testing-misc tmp-merge testing-board cbus" fixes fixes-non-critical testing-misc tmp-merge testing-board cbus
$ git merge -s ours master
$ git checkout master
$ git merge tmp-rebuild-
1341907986
To view the changes since the last rebuild, please do
$ git diff
c3662bf17922301ea80aa301c38cf9a64e68d656..
e918d4f4ef66026f176940da7a4e82b43216e089 arch/arm/*omap*/
Tony Lindgren [Tue, 10 Jul 2012 08:13:08 +0000 (01:13 -0700)]
Merge fixes fixes-non-critical testing-misc tmp-merge testing-board cbus
Tony Lindgren [Tue, 10 Jul 2012 08:12:50 +0000 (01:12 -0700)]
Merge branch 'i2c-embedded/for-next' of git://git.pengutronix.de/git/wsa/linux into tmp-merge
Tony Lindgren [Tue, 10 Jul 2012 08:12:35 +0000 (01:12 -0700)]
Merge remote-tracking branch 'rmk/for-next' into tmp-merge
Tony Lindgren [Tue, 10 Jul 2012 07:45:25 +0000 (00:45 -0700)]
Merge branch 'devel-omap5' into tmp-merge
Conflicts:
Documentation/devicetree/bindings/arm/omap/omap.txt
arch/arm/mach-omap2/Makefile
Tony Lindgren [Tue, 10 Jul 2012 07:42:58 +0000 (00:42 -0700)]
Merge branch 'devel-am33xx-data' into tmp-merge
Tony Lindgren [Tue, 10 Jul 2012 07:42:24 +0000 (00:42 -0700)]
Merge tag 'omap-cleanup-part2-for-v3.6' into tmp-merge
This branch contains more clean-up like changes and minor fixes for making
it easier to support new omap SoCs, such as omap5 and am33xx.
This branch has dependencies to earlier clean-up in omap-cleanup-for-v3.6
and omap-devel-dmtimer-for-v3.6 branches, and also depends on the
omap-devel-am33xx-for-v3.6 branch, and are based on a merge of these
branches.
Conflicts:
arch/arm/mach-omap2/prm2xxx_3xxx.h
Tony Lindgren [Tue, 10 Jul 2012 07:38:53 +0000 (00:38 -0700)]
Merge branch 'devel-board' into tmp-merge
Conflicts:
arch/arm/mach-omap2/common-board-devices.c
Tony Lindgren [Tue, 10 Jul 2012 07:34:24 +0000 (00:34 -0700)]
Merge branch 'devel-dt' into tmp-merge
Tony Lindgren [Tue, 10 Jul 2012 07:34:03 +0000 (00:34 -0700)]
Merge tag 'omap-devel-am33xx-for-v3.6' into tmp-merge
Here are changes to add support for am33xx processors for the
clock, power, and voltagedomains.
Tony Lindgren [Tue, 10 Jul 2012 07:33:56 +0000 (00:33 -0700)]
Merge tag 'omap-devel-pm-for-v3.6' into tmp-merge
Here are some omap PM changes that reimplement omap PRCM I/O chain
code for wake-ups, and improve idle latencies for cpuidle.
Tony Lindgren [Tue, 10 Jul 2012 07:33:49 +0000 (00:33 -0700)]
Merge tag 'omap-devel-driver-for-v3.6' into tmp-merge
Here are omap driver changes for v3.6 that were agreed to be merged
via the omap tree. These changes convert omap HDQ1W driver to use
runtime PM, and finally move omap SmartReflex driver from arch/arm
to live under drivers.
Tony Lindgren [Tue, 10 Jul 2012 07:33:42 +0000 (00:33 -0700)]
Merge tag 'omap-devel-dmtimer-for-v3.6' into tmp-merge
Here are some omap dmtimer changes to make it easier to add
device tree support for dmtimer by simplifying the platform
data structure used by dmtimr.
Tony Lindgren [Tue, 10 Jul 2012 07:33:31 +0000 (00:33 -0700)]
Merge tag 'omap-cleanup-for-v3.6' into tmp-merge
Here is some more omap clean-up. The biggest changes are
hwmod, clock, and System Control Module cleanup, and the removal
of the last instance of omap_read/write usage for omap2+ with
the removal of unused USB OHCI Full Speed driver support. The
removed OHCI is only currently used for omap1 as the actively
used omap2+ boards have either MUSB or another instance of
OHCI+EHCI that's more usable.
Conflicts:
arch/arm/mach-omap2/clockdomains3xxx_data.c
Tony Lindgren [Tue, 10 Jul 2012 07:33:05 +0000 (00:33 -0700)]
Merge tag 'omap-fixes-non-critical-for-v3.6' into tmp-merge
This branch contains fixes that were too intrusive or not
critical enough for the 3.5 -rc cycle. The biggest changes are
fixes for the am35xx clock and hwmod data, and the removal of dead
code for the 730 and 850 headers.
Tony Lindgren [Tue, 10 Jul 2012 06:22:24 +0000 (23:22 -0700)]
ARM: OMAP3: Fix omap3evm randconfig error introduced by VBUS support
Commit
cb8ca5897 (ARM: omap3evm: enable VBUS switch for EHCI tranceiver)
added a new randconfig error if TWL4030_CORE is not selected:
arch/arm/mach-omap2/board-omap3evm.c:368: undefined reference to `twl_i2c_read_u8'
arch/arm/mach-omap2/board-omap3evm.c:370: undefined reference to `twl_i2c_write_u8'
Signed-off-by: Tony Lindgren <tony@atomide.com>
Russell King [Mon, 9 Jul 2012 16:44:50 +0000 (17:44 +0100)]
Merge branches 'audit', 'delay', 'dmaengine', 'fixes', 'misc' and 'sta2x11' into for-next
Will Deacon [Fri, 6 Jul 2012 14:50:14 +0000 (15:50 +0100)]
ARM: 7456/1: ptrace: provide separate functions for tracing syscall {entry,exit}
The syscall_trace on ARM takes a `why' parameter to indicate whether or
not we are entering or exiting a system call. This can be confusing for
people looking at the code since (a) it conflicts with the why register
alias in the entry assembly code and (b) it is not immediately clear
what it represents.
This patch splits up the syscall_trace function into separate wrappers
for syscall entry and exit, allowing the low-level syscall handling
code to branch to the appropriate function.
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Will Deacon [Fri, 6 Jul 2012 14:49:27 +0000 (15:49 +0100)]
ARM: 7455/1: audit: move syscall auditing until after ptrace SIGTRAP handling
When auditing system calls on ARM, the audit code is called before
notifying the parent process in the case that the current task is being
ptraced. At this point, the parent (debugger) may choose to change the
system call being issued via the SET_SYSCALL ptrace request, causing
the wrong system call to be reported to the audit tools.
This patch moves the audit calls after the ptrace SIGTRAP handling code
in the syscall tracing implementation.
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Will Deacon [Fri, 6 Jul 2012 14:48:50 +0000 (15:48 +0100)]
ARM: 7454/1: entry: don't bother with syscall tracing on ret_from_fork path
ret_from_fork is setup for a freshly spawned child task via copy_thread,
called from copy_process. The latter function clears TIF_SYSCALL_TRACE
and also resets the child task's audit_context to NULL, meaning that
there is little point invoking the system call tracing routines.
Furthermore, getting hold of the syscall number is a complete pain and
it looks like the current code doesn't even bother.
This patch removes the syscall tracing checks from ret_from_fork.
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Will Deacon [Fri, 6 Jul 2012 14:48:16 +0000 (15:48 +0100)]
ARM: 7453/1: audit: only allow syscall auditing for pure EABI userspace
The audit tools support only EABI userspace and, since there are no
AUDIT_ARCH_* defines for the ARM OABI, it makes sense to allow syscall
auditing on ARM only for EABI at the moment.
Cc: Eric Paris <eparis@redhat.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Will Deacon [Fri, 6 Jul 2012 14:47:17 +0000 (15:47 +0100)]
ARM: 7452/1: delay: allow timer-based delay implementation to be selected
This patch allows a timer-based delay implementation to be selected by
switching the delay routines over to use get_cycles, which is
implemented in terms of read_current_timer. This further allows us to
skip the loop calibration and have a consistent delay function in the
face of core frequency scaling.
To avoid the pain of dealing with memory-mapped counters, this
implementation uses the co-processor interface to the architected timers
when they are available. The previous loop-based implementation is
kept around for CPUs without the architected timers and we retain both
the maximum delay (2ms) and the corresponding conversion factors for
determining the number of loops required for a given interval. Since the
indirection of the timer routines will only work when called from C,
the sa1100 sleep routines are modified to branch to the loop-based delay
functions directly.
Tested-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Will Deacon [Fri, 6 Jul 2012 14:46:45 +0000 (15:46 +0100)]
ARM: 7451/1: arch timer: implement read_current_timer and get_cycles
This patch implements read_current_timer using the architected timers
when they are selected via CONFIG_ARM_ARCH_TIMER. If they are detected
not to be usable at runtime, we return -ENXIO to the caller.
Furthermore, if read_current_timer is exported then we can implement
get_cycles in terms of it for use as both an entropy source and for
implementing __udelay and friends.
Tested-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Will Deacon [Fri, 6 Jul 2012 14:46:08 +0000 (15:46 +0100)]
ARM: 7450/1: dcache: select DCACHE_WORD_ACCESS for little-endian ARMv6+ CPUs
DCACHE_WORD_ACCESS uses the word-at-a-time API for optimised string
comparisons in the vfs layer.
This patch implements support for load_unaligned_zeropad for ARM CPUs
with native support for unaligned memory accesses (v6+) when running
little-endian.
Reviewed-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Will Deacon [Fri, 6 Jul 2012 14:45:39 +0000 (15:45 +0100)]
ARM: 7449/1: use generic strnlen_user and strncpy_from_user functions
This patch implements the word-at-a-time interface for ARM using the
same algorithm as x86. We use the fls macro from ARMv5 onwards, where
we have a clz instruction available which saves us a mov instruction
when targetting Thumb-2. For older CPUs, we use the magic 0x0ff0001
constant. Big-endian configurations make use of the implementation from
asm-generic.
With this implemented, we can replace our byte-at-a-time strnlen_user
and strncpy_from_user functions with the optimised generic versions.
Reviewed-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Will Deacon [Fri, 6 Jul 2012 14:45:00 +0000 (15:45 +0100)]
ARM: 7448/1: perf: remove arm_perf_pmu_ids global enumeration
In order to provide PMU name strings compatible with the OProfile
user ABI, an enumeration of all PMUs is currently used by perf to
identify each PMU uniquely. Unfortunately, this does not scale well
in the presence of multiple PMUs and creates a single, global namespace
across all PMUs in the system.
This patch removes the enumeration and instead uses the name string
for the PMU to map onto the OProfile variant. perf_pmu_name is
implemented for CPU PMUs, which is all that OProfile cares about anyway.
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Will Deacon [Fri, 6 Jul 2012 14:44:13 +0000 (15:44 +0100)]
ARM: 7447/1: rwlocks: remove unused branch labels from trylock routines
The ARM arch_{read,write}_trylock implementations include unused
backwards branch labels, since we don't retry the locking operation
if the exclusive store fails.
This patch removes the labels.
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Will Deacon [Fri, 6 Jul 2012 14:43:41 +0000 (15:43 +0100)]
ARM: 7446/1: spinlock: use ticket algorithm for ARMv6+ locking implementation
Ticket spinlocks ensure locking fairness by introducing a FIFO-like
nature to the granting of lock acquisitions and also reducing the
thundering herd effect when spinning on a lock by allowing the cacheline
to remain in a shared state amongst the waiting CPUs. This is especially
important on systems where memory-access times are not necessarily
uniform when accessing the lock structure (for example, on a
multi-cluster platform where the lock is allocated into L1 when a CPU
releases it).
This patch implements the ticket spinlock algorithm for ARM, replacing
the simpler implementation for ARMv6+ processors.
Reviewed-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Will Deacon [Fri, 6 Jul 2012 14:43:03 +0000 (15:43 +0100)]
ARM: 7445/1: mm: update CONTEXTIDR register to contain PID of current process
This patch introduces a new Kconfig option which, when enabled, causes
the kernel to write the PID of the current task into the PROCID field
of the CONTEXTIDR on context switch. This is useful when analysing
hardware trace, since writes to this register can be configured to emit
an event into the trace stream.
The thread notifier for writing the PID is deliberately kept separate
from the ASID-writing code so that we can support newer processors using
LPAE, where the ASID is stored in TTBR0. As such, the switch_mm code is
updated to perform a read-modify-write sequence to ensure that we don't
clobber the PID on CPUs using the classic 2-level page tables.
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Lorenzo Pieralisi [Fri, 6 Jul 2012 10:06:49 +0000 (11:06 +0100)]
ARM: 7444/1: kernel: add arch-timer C3STOP feature
When a CPU is shutdown its architected timer comparators registers are
lost. Within CPU idle, before processors enter shutdown they enter
clock events broadcast mode through the
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, cpuid);
function where the local timers are emulated by a global always-on timer.
On CPU resume, the per-CPU tick device normal mode is restored by exiting
broadcast mode through
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, cpuid);
In order for this mechanism to function, architected timers should add to
their feature C3STOP, which means that they are not able to function when the
CPU is in off-mode.
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Paul Bolle [Sun, 8 Jul 2012 21:51:44 +0000 (22:51 +0100)]
ARM: 7460/1: remove asm/locks.h
Commit
64ac24e738823161693bf791f87adc802cf529ff ("Generic semaphore
implementation") removed the last include of this header. Apparently it
was just an oversight to keep this header. It can safely be removed now.
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Nicolas Pitre [Wed, 4 Jul 2012 03:58:12 +0000 (04:58 +0100)]
ARM: 7439/1: head.S: simplify initial page table mapping
Let's map the initial RAM up to the end of the kernel .bss instead of
the strict kernel image area. This simplifies the code as the kernel
image only needs to be handled specially in the XIP case. That covers
the legacy ATAG location as well.
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Genoud Richard [Tue, 26 Jun 2012 15:37:59 +0000 (16:37 +0100)]
ARM: 7437/1: zImage: Allow DTB command line concatenation with ATAG_CMDLINE
This patch allows the ATAG_CMDLINE provided by the bootloader to be
concatenated to the bootargs property of the device tree.
This is useful to merge static values defined in the device tree
with the boot loader's (possibly) more dynamic values, such as
startup reasons and more.
The bootloader should use the device tree to pass those values to
the kernel, but that's not always simple (old bootloader or very
small one).
The behaviour is the same as the one introduced by Victor Boivie in
4394c1244249198c6b85093d46935b761b36ae05 by extending the CONFIG_CMDLINE.
Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Catalin Marinas [Mon, 25 Jun 2012 13:59:38 +0000 (14:59 +0100)]
ARM: 7436/1: Do not map the vectors page as write-through on UP systems
The vectors page has been traditionally mapped as WT on UP systems but
this creates a mismatched alias with the directly mapped RAM that is
using WB attributes. On newer processors like Cortex-A15 this has
implications on the data/instructions coherency at the point of
unification (usually L2).
This patch removes such restriction.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Rabin Vincent [Fri, 15 Jun 2012 09:23:32 +0000 (10:23 +0100)]
ARM: 7424/1: update die handler from x86
Robustify ARM's die() handling with improvements from x86:
- Fix for a deadlock (before panic in the case of panic_on_oops) if we
oops under a spinlock which is also used from interrupt handler,
since the old code was unconditionally enabling interrupts.
- Usage of arch spinlock so lockdep etc doesn't get involved while
we're trying to dump out oopses.
- Deadlock prevention in the unlikely event that die() recurses.
The changes all touch the same few lines of code, so they're done
together in one patch.
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King [Mon, 11 Jun 2012 19:24:44 +0000 (20:24 +0100)]
ARM: MSM: use SGI0 to wake secondary CPUs
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King [Mon, 11 Jun 2012 19:24:07 +0000 (20:24 +0100)]
ARM: OMAP: use SGI0 to wake secondary CPUs
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King [Mon, 11 Jun 2012 19:23:20 +0000 (20:23 +0100)]
ARM: Realview: use SGI0 to wake secondary CPUs
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Arnd Bergmann [Sat, 7 Jul 2012 19:00:18 +0000 (20:00 +0100)]
ARM: 7459/1: irda/pxa: use readl_relaxed() to access OSCR register
After
c00184f9ab4 "ARM: sa11x0/pxa: convert OS timer registers to IOMEM",
magician_defconfig and a few others fail to build because the OSCR
register is accessed by the drivers/net/irda/pxaficp_ir.c but has turned
into a pointer that needs to be read using readl.
There are other registers in the same driver that eventually should
be converted, and it's unclear whether we would want a better interface
to access the OSCR from a device driver.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King [Wed, 6 Jun 2012 10:42:36 +0000 (11:42 +0100)]
ARM: sa11x0/pxa: convert OS timer registers to IOMEM
Make the OS timer registers have IOMEM like properities so they can
be passed to readl_relaxed/writel_relaxed() et.al. rather than being
straight volatile dereferences. Add linux/io.h includes where
required.
linux/io.h includes added to arch/arm/mach-sa1100/cpu-sa1100.c,
arch/arm/mach-sa1100/jornada720_ssp.c, arch/arm/mach-sa1100/leds-lart.c
drivers/input/touchscreen/jornada720_ts.c, drivers/pcmcia/sa1100_shannon.c
from Arnd.
This fixes these warnings:
arch/arm/mach-sa1100/time.c: In function 'sa1100_timer_init':
arch/arm/mach-sa1100/time.c:104: warning: passing argument 1 of 'clocksource_mmio_init' discards qualifiers from pointer target type
arch/arm/mach-pxa/time.c: In function 'pxa_timer_init':
arch/arm/mach-pxa/time.c:126: warning: passing argument 1 of 'clocksource_mmio_init' discards qualifiers from pointer target type
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Stephen Boyd [Fri, 6 Jul 2012 21:03:42 +0000 (22:03 +0100)]
ARM: 7457/1: smp: Fix suspicious RCU originating from cpu_die()
While running hotplug tests I ran into this RCU splat
===============================
[ INFO: suspicious RCU usage. ]
3.4.0 #3275 Tainted: G W
-------------------------------
include/linux/rcupdate.h:729 rcu_read_lock() used illegally while idle!
other info that might help us debug this:
RCU used illegally from idle CPU!
rcu_scheduler_active = 1, debug_locks = 0
RCU used illegally from extended quiescent state!
4 locks held by swapper/2/0:
#0: ((cpu_died).wait.lock){......}, at: [<
c00ab128>] complete+0x1c/0x5c
#1: (&p->pi_lock){-.-.-.}, at: [<
c00b275c>] try_to_wake_up+0x2c/0x388
#2: (&rq->lock){-.-.-.}, at: [<
c00b2860>] try_to_wake_up+0x130/0x388
#3: (rcu_read_lock){.+.+..}, at: [<
c00abe5c>] cpuacct_charge+0x28/0x1f4
stack backtrace:
[<
c001521c>] (unwind_backtrace+0x0/0x12c) from [<
c00abec8>] (cpuacct_charge+0x94/0x1f4)
[<
c00abec8>] (cpuacct_charge+0x94/0x1f4) from [<
c00b395c>] (update_curr+0x24c/0x2c8)
[<
c00b395c>] (update_curr+0x24c/0x2c8) from [<
c00b59c4>] (enqueue_task_fair+0x50/0x194)
[<
c00b59c4>] (enqueue_task_fair+0x50/0x194) from [<
c00afea4>] (enqueue_task+0x30/0x34)
[<
c00afea4>] (enqueue_task+0x30/0x34) from [<
c00b0908>] (ttwu_activate+0x14/0x38)
[<
c00b0908>] (ttwu_activate+0x14/0x38) from [<
c00b28a8>] (try_to_wake_up+0x178/0x388)
[<
c00b28a8>] (try_to_wake_up+0x178/0x388) from [<
c00a82a0>] (__wake_up_common+0x34/0x78)
[<
c00a82a0>] (__wake_up_common+0x34/0x78) from [<
c00ab154>] (complete+0x48/0x5c)
[<
c00ab154>] (complete+0x48/0x5c) from [<
c07db7cc>] (cpu_die+0x2c/0x58)
[<
c07db7cc>] (cpu_die+0x2c/0x58) from [<
c000f954>] (cpu_idle+0x64/0xfc)
[<
c000f954>] (cpu_idle+0x64/0xfc) from [<
80208160>] (0x80208160)
When a cpu is marked offline during its idle thread it calls
cpu_die() during an RCU idle period. cpu_die() calls complete()
to notify the killing process that the cpu has died. complete()
calls into the scheduler code and eventually grabs an RCU read
lock in cpuacct_charge().
Mark complete() as RCU_NONIDLE so that RCU pays attention to this
CPU for the duration of the complete() function even though it's
in idle.
Suggested-by: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tony Lindgren [Mon, 9 Jul 2012 14:18:08 +0000 (07:18 -0700)]
Linux-omap rebuilt: Updated to -rc6
$ git checkout -b tmp-rebuild-
1341843475 linus
$ git merge -m "Merge fixes fixes-non-critical testing-misc tmp-merge testing-board cbus" fixes fixes-non-critical testing-misc tmp-merge testing-board cbus
$ git merge -s ours master
$ git checkout master
$ git merge tmp-rebuild-
1341843475
To view the changes since the last rebuild, please do
$ git diff
2db863ff368f5922e3f1398fa6b4c20d5ed1d888..
fbbd584ca197cda99a5fb5e25e0dfe7e945e8809 arch/arm/*omap*/
Tony Lindgren [Mon, 9 Jul 2012 14:17:57 +0000 (07:17 -0700)]
Merge fixes fixes-non-critical testing-misc tmp-merge testing-board cbus
Tony Lindgren [Mon, 9 Jul 2012 14:17:25 +0000 (07:17 -0700)]
Merge branch 'i2c-embedded/for-next' of git://git.pengutronix.de/git/wsa/linux into tmp-merge
Tony Lindgren [Mon, 9 Jul 2012 14:16:58 +0000 (07:16 -0700)]
Merge remote-tracking branch 'rmk/for-next' into tmp-merge
Tarun Kanti DebBarma [Thu, 26 Apr 2012 13:01:17 +0000 (18:31 +0530)]
ARM: Kconfig update to support additional GPIOs in OMAP5
OMAP5 has 8 GPIO banks so that there are 32x8 = 256 GPIOs.
In order for the gpiolib to detect and initialize these
additional GPIOs and other TWL GPIOs, ARCH_NR_GPIO is set
to 512 instead of present 256.
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Cousson, Benoit <b-cousson@ti.com>
Reported-by: Govindraj.R <govindraj.raja@ti.com>
Tested-by: Govindraj.R <govindraj.raja@ti.com>
Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
R Sricharan [Tue, 3 Apr 2012 09:24:58 +0000 (14:54 +0530)]
ARM: OMAP5: Add the build support
Adding the build support required for OMAP5 soc
in to omap2+ config.
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: R Sricharan <r.sricharan@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
R Sricharan [Thu, 10 May 2012 14:16:00 +0000 (19:46 +0530)]
arm/dts: OMAP5: Add omap5 dts files
Adding the minimum device tree files required for
OMAP5 to boot.
Reviewed-by: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: R Sricharan <r.sricharan@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
R Sricharan [Wed, 9 May 2012 18:04:56 +0000 (23:34 +0530)]
ARM: OMAP5: board-generic: Add device tree support
Adding the minimal support for OMAP5 evm board
with device tree.
Reviewed-by: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: R Sricharan <r.sricharan@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
R Sricharan [Tue, 5 Jun 2012 11:01:06 +0000 (16:31 +0530)]
ARM: omap2+: board-generic: clean up the irq data from board file
Move the irq_match arrays and the irq init functions of OMAP 2,3
and 4 based boards out of board-generic.c file and also rename the
irq init function to match the interrupt controller present in
the SOCs.
This is a preparatory patch to add the OMAP5 evm board's irq init
support with device tree.
Signed-off-by: R Sricharan <r.sricharan@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Santosh Shilimkar [Mon, 19 Mar 2012 13:59:41 +0000 (19:29 +0530)]
ARM: OMAP5: Add SMP support
Add OMAP5 SMP boot support using OMAP4 SMP code. The relevant code paths
are runtime checked using cpu id
Signed-off-by: R Sricharan <r.sricharan@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Santosh Shilimkar [Wed, 9 May 2012 15:08:35 +0000 (20:38 +0530)]
ARM: OMAP5: Add the WakeupGen IP updates
OMAP4 and OMAP5 share same WakeupGen IP with below few udpates on OMAP5.
- Additional 32 interrupt support is added w.r.t OMAP4 design.
- The AUX CORE boot registers are now made accessible from non-secure SW.
- SAR offset are changed and PTMSYNC* registers are removed from SAR.
Patch updates the WakeupGen code accordingly.
Signed-off-by: R Sricharan <r.sricharan@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
R Sricharan [Fri, 4 Nov 2011 10:22:59 +0000 (15:52 +0530)]
ARM: OMAP5: l3: Add l3 error handler support for omap5
The l3 interconnect ip is same for OMAP4 and OMAP5.
So reuse the l3 error handler error code for OMAP5
as well. Also a few targets has been newly added for
OMAP5. So updating the driver for that here.
Signed-off-by: R Sricharan <r.sricharan@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
R Sricharan [Thu, 19 Apr 2012 12:33:02 +0000 (18:03 +0530)]
ARM: OMAP5: gpmc: Update gpmc_init()
GPMC module is the same as in OMAP4.
Just update the base address and irq number.
Signed-off-by: R Sricharan <r.sricharan@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
R Sricharan [Wed, 2 May 2012 07:37:12 +0000 (13:07 +0530)]
ARM: OMAP5: timer: Add clocksource, clockevent support
Adding the Initialisaton for clocksource and clockevent device
on OMAP5 Socs.
Signed-off-by: R Sricharan <r.sricharan@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
R Sricharan [Tue, 5 Jun 2012 10:51:32 +0000 (16:21 +0530)]
ARM: OMAP5: Add minimal support for OMAP5430 SOC
OMAP5430 is Texas Instrument's SOC based on ARM Cortex-A15 SMP
architecture. It's a dual core SOC with GIC used for interrupt
handling and with an integrated L2 cache controller.
OMAP5432 is another variant of OMAP5430, with a
memory controller supporting DDR3 and SATA.
Patch includes:
- The machine specific headers and sources updates.
- Platform header updates.
- Minimum initialisation support for serial.
- IO table init
Signed-off-by: R Sricharan <r.sricharan@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
R Sricharan [Thu, 19 Apr 2012 12:12:19 +0000 (17:42 +0530)]
ARM: OMAP5: id: Add cpu id for ES versions
Adding the OMAP5 ES1.0, 2.0 and OMAP5432 cpu revision
detection support.
Signed-off-by: R Sricharan <r.sricharan@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
R Sricharan [Thu, 10 May 2012 08:47:22 +0000 (14:17 +0530)]
ARM: OMAP: counter-32k: Select the CR register offset using the IP scheme
OMAP socs has a legacy and a highlander version of the
32k sync counter IP. The register offsets vary between the
highlander and the legacy scheme. So use the 'SCHEME'
bits(30-31) of the revision register to distinguish between
the two versions and choose the CR register offset accordingly.
Signed-off-by: R Sricharan <r.sricharan@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
R Sricharan [Thu, 10 May 2012 15:57:20 +0000 (21:27 +0530)]
ARM: OMAP2+: Move stubbed secure_sram_reserve function to a common.c and call it __weak
omap_secure_ram_reserve_memblock is stubbed for OMAP1,2 only builds using a
ifdef check. But this results in adding CONFIG_ARCH_OMAPxx checks for
future socs that use the real function. So move this to common.c file and
call it __weak.
Signed-off-by: R Sricharan <r.sricharan@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Fabio Estevam [Fri, 6 Jul 2012 18:31:32 +0000 (15:31 -0300)]
i2c: i2c-imx: Adapt the clock name to the new clock framework
With the new i.mx clock framework the i2c clock is registered as:
clk_register_clkdev(clk[i2c1_ipg_gate], NULL, "imx-i2c.0")
So we do not need to pass "i2c_clk" string and can use NULL instead.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
[wsa: rebased on top of the devm-conversion]
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Tony Lindgren [Mon, 9 Jul 2012 12:38:13 +0000 (05:38 -0700)]
Merge branch 'devel-am33xx-data' into tmp-merge
Tony Lindgren [Mon, 9 Jul 2012 12:37:42 +0000 (05:37 -0700)]
Merge branch 'devel-board' into tmp-merge
Conflicts:
arch/arm/mach-omap2/common-board-devices.c
Tony Lindgren [Mon, 9 Jul 2012 12:37:21 +0000 (05:37 -0700)]
Merge branch 'devel-dt' into tmp-merge
Peter Ujfalusi [Fri, 8 Jun 2012 14:02:05 +0000 (17:02 +0300)]
arm/dts: New dts file for PandaBoardES (4460)
The 4430 and 4460 version of PandaBoard mostly the same with
exception at least in audio setup.
Use the omap4-panda.dts file as a base and only override the differences
between the revisions.
For audio it is the name of the sound card and the routing information.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Peter Ujfalusi [Fri, 8 Jun 2012 14:02:04 +0000 (17:02 +0300)]
arm/dts: omap4-panda: Audio support for PandaBoard 4430
PandaBoard uses twl6040 connected via McPDM for audio.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Peter Ujfalusi [Fri, 8 Jun 2012 14:02:03 +0000 (17:02 +0300)]
arm/dts: omap4-sdp: Enable audio support via device tree
On OMAP4 SDP the audio setup includes the twl6040 codec and digital
microphones.
Since OMAP4 SDP is a reference board it has all possible audio interfaces
connected. This information is passed via the ti,audio-routing
property.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Peter Ujfalusi [Fri, 8 Jun 2012 14:02:02 +0000 (17:02 +0300)]
arm/dts: omap4-sdp: Add support for twl6040
The twl6040 provides the audio and vibra support on OMAP4 SDP boards.
It is connected to i2c1 bus with 0x4b address.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Peter Ujfalusi [Fri, 8 Jun 2012 14:02:01 +0000 (17:02 +0300)]
arm/dts: omap4-sdp: Add fixed regulator to represent VBAT
There are devices connected to VBAT.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Peter Ujfalusi [Fri, 8 Jun 2012 14:02:00 +0000 (17:02 +0300)]
arm/dts: omap4: Add entry for OMAP DMIC IP
DMIC IP is used to connect up to 6 digital microphones directly to OMAP.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Peter Ujfalusi [Fri, 8 Jun 2012 14:01:59 +0000 (17:01 +0300)]
arm/dts: omap4: Add entry for OMAP McPDM IP
McPDM is used on OMAP4 based boards to communicate with an external audio
codec (twl6040).
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Tony Lindgren [Mon, 9 Jul 2012 12:32:28 +0000 (05:32 -0700)]
Merge branch 'cleanup-part2' into tmp-merge
Conflicts:
arch/arm/mach-omap2/prm2xxx_3xxx.h
Linus Walleij [Tue, 12 Jun 2012 17:33:30 +0000 (19:33 +0200)]
i2c: stu300: use clk_prepare/unprepare
Make sure we prepare/unprepare the clock for the ST U300
I2C driver as is required by the clk API especially if you
use common clock.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Peter Ujfalusi [Fri, 6 Jul 2012 13:19:12 +0000 (15:19 +0200)]
ARM: OMAP: board-omap4panda: MUX configuration for sys_nirq2
The sys_nirq2 is used for twl6040, make sure the pin is configured
correctly.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Peter Ujfalusi [Fri, 6 Jul 2012 13:19:11 +0000 (15:19 +0200)]
ARM: OMAP: board-4430sdp: MUX configuration for sys_nirq2
The sys_nirq2 is used for twl6040, make sure the pin is configured
correctly.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Marc Kleine-Budde [Sun, 1 Jul 2012 21:34:30 +0000 (23:34 +0200)]
i2c: mxs: mxs_i2c_finish_read: mute flase positive uninitialized var
This patch mutes the false positive compiler warning:
drivers/i2c/busses/i2c-mxs.c: In function 'mxs_i2c_xfer_msg':
drivers/i2c/busses/i2c-mxs.c:206:8: warning: 'data' may be used uninitialized in this function [-Wuninitialized]
drivers/i2c/busses/i2c-mxs.c:196:6: note: 'data' was declared here
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Virupax Sadashivpetimath [Mon, 25 Jun 2012 12:26:07 +0000 (17:56 +0530)]
i2c-nomadik: Add 10-bit addressing support
Signed-off-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com>
Signed-off-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Alessandro Rubini [Mon, 11 Jun 2012 20:56:49 +0000 (22:56 +0200)]
i2c-nomadik: depend on ARM_AMBA, not PLAT_NOMADIK
The gateware device has been used outside of the Nomadik world, using
the pci-amba bridge driver, so loosen the dependencies.
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@st.com>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Alessandro Rubini [Mon, 11 Jun 2012 20:56:38 +0000 (22:56 +0200)]
i2c-nomadik: turn the platform driver to an amba driver
The i2c-nomadik gateware is really a PrimeCell APB device. By hosting
the driver under the amba bus we can access it more easily, for
example using the generic pci-amba driver. The patch also fixes the
mach-ux500 users, so they register an amba device instead than a
platform device.
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@st.com>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Alessandro Rubini [Mon, 11 Jun 2012 20:56:26 +0000 (22:56 +0200)]
i2c-nomadik: move header to <linux/platform_data/i2c-nomadik.h>
The header and driver are only used by arm/mach-u8500 (and potentially
arm/mach-nomadik), but the STA2X11 I/O Hub exports on PCIe a number of
devices, including i2c-nomadik. This patch allows compilation of the
driver under x86.
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@st.com>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Afzal Mohammed [Wed, 4 Jul 2012 12:30:37 +0000 (18:00 +0530)]
arm/dts: am33xx wdt node
Add am33xx wdt node.
Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
AnilKumar Ch [Mon, 9 Jul 2012 06:24:09 +0000 (11:54 +0530)]
arm/dts: remove MMC/SD and SPI related entries from am33xx.dtsi
The MMC/SD and SPI entries in this file are not tested yet. They
inadvertently came into the patch because of some work in progress
stuff I had in my repo.
These entries should not have been sent out in the first place and
I am sorry for the trouble and will be extra careful in future.
Since the offending commit is not sent upstream yet, I hope this can
be merged into the commit
5fc0b42a98556bd9f01cecc6a64fcbd15ec363f0
(arm/dts: Add initial DT support for AM33XX SoC family) on the devel-dt
branch of linux-omap tree.
Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Xiao Jiang [Fri, 1 Jun 2012 04:44:16 +0000 (12:44 +0800)]
watchdog: omap_wdt: add device tree support
Add device table for omap_wdt to support dt.
Signed-off-by: Xiao Jiang <jgq516@gmail.com>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Xiao Jiang [Fri, 1 Jun 2012 04:44:15 +0000 (12:44 +0800)]
ARM: OMAP: avoid build wdt platform device if with dt support
If provided dt support, then skip add wdt platform device as usual.
Signed-off-by: Xiao Jiang <jgq516@gmail.com>
Reviewed-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Xiao Jiang [Fri, 1 Jun 2012 04:44:14 +0000 (12:44 +0800)]
arm/dts: add wdt node for omap3 and omap4
Add wdt node to support dt.
Signed-off-by: Xiao Jiang <jgq516@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Santosh Shilimkar [Fri, 6 Jul 2012 09:25:42 +0000 (14:55 +0530)]
ARM: OMAP: sdrc: Fix the build break for OMAP4 only builds
OMAP4 only build breaks with below error
arch/arm/mach-omap2/sdrc.c:135: error: redefinition of 'omap2_sdrc_init'
arch/arm/plat-omap/include/plat/sdrc.h:130: note: previous definition of 'omap2_sdrc_init' was here
make[1]: *** [arch/arm/mach-omap2/sdrc.o] Error 1
Fix the same by using newly introduced CONFIG_SOC_HAS_OMAP2_SDRC marco.
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Kevin Hilman [Fri, 6 Jul 2012 18:20:28 +0000 (11:20 -0700)]
ARM: OMAP2+: omap2plus_defconfig: EHCI driver is not stable, disable it
The EHCI driver is not stable enough to be enabled by default. In v3.5,
it has at least the following problems:
- warning dump during bootup
- hang during suspend
- prevents CORE powerdomain from entering retention during idle (even
when no USB devices connected.)
This demonstrates that this driver has not been thoroughly tested and
therfore should not be enabled in the default defconfig.
In addition, the problems above cause new PM regressions which need be
addressed before this driver should be enabled in the default
defconfig.
Signed-off-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Richard Zhao [Mon, 4 Jun 2012 11:04:25 +0000 (19:04 +0800)]
i2c: imx: convert to use managed functions
- convert to use devm_request_and_ioremap, devm_kzalloc, devm_clk_get,
devm_request_irq.
- clean up unused variables.
Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Reviewed-by: Shubhrajyoti D <Shubhrajyoti@ti.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Laxman Dewangan [Wed, 13 Jun 2012 10:12:39 +0000 (15:42 +0530)]
i2c: tegra: make all resource allocation through devm_*
Use the devm_* for the memory region allocation, interrupt request,
clock handler request.
By doing this, it does not require to explicitly free it and hence
saving some code.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Laxman Dewangan [Wed, 13 Jun 2012 10:12:38 +0000 (15:42 +0530)]
i2c: tegra: support for I2C_M_NOSTART functionality
Adding support for functionality I2C_M_NOSTART.
When multiple message transfer request made through i2c
and if any message is flagged with I2C_M_NOSTART then
it will not send the start/repeat-start and address of
that message i.e. sends data directly.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Laxman Dewangan [Wed, 13 Jun 2012 10:12:37 +0000 (15:42 +0530)]
i2c: tegra: add PROTOCOL_MANGLING as supported functionality.
The Tegra i2c driver supports the I2C_M_IGNORE_NAK and hence
returning I2C_FUNC_PROTOCOL_MANGLING as supported functionality.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Laxman Dewangan [Wed, 13 Jun 2012 10:12:36 +0000 (15:42 +0530)]
i2c: tegra: make sure register writes completes
The Tegra PPSB (an peripheral bus) queues writes transactions.
In order to guarantee that writes have completed before a
certain time, a read transaction to a register on the same
bus must be executed.
This is necessary in situations such as when clearing an
interrupt status or enable, so that when returning from an
interrupt handler, the HW has already de-asserted its
interrupt status output, which will avoid spurious interrupts.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Neil Brown [Tue, 29 May 2012 10:56:23 +0000 (16:26 +0530)]
I2C: OMAP: Fix timeout problem during suspend.
On a board with OMAP3 processor and TWL4030 Power management,
we need to talk to the TWL4030 during late suspend but cannot
because the I2C interrupt is disabled (as late suspend disables
interrupt).
e.g. I get messages like:
[ 62.161102] musb-omap2430 musb-omap2430: LATE power domain suspend
[ 63.167205] omap_i2c omap_i2c.1: controller timed out
[ 63.183044] twl: i2c_read failed to transfer all messages
[ 64.182861] omap_i2c omap_i2c.1: controller timed out
[ 64.198455] twl: i2c_write failed to transfer all messages
[ 65.198455] omap_i2c omap_i2c.1: controller timed out
[ 65.203765] twl: i2c_write failed to transfer all messages
The stack shows omap2430_runtime_suspend calling twl4030_set_suspend
which tries to power-down the USB PHY (twl4030_phy_suspend ->
twl4030_phy_power -> __twl4030_phy_power which as a nice WARN_ON
that helps).
Then we get the same in resume:
[ 69.603912] musb-omap2430 musb-omap2430: EARLY power domain resume
[ 70.610473] omap_i2c omap_i2c.1: controller timed out
[ 70.626129] twl: i2c_write failed to transfer all messages
etc.
So don't disable interrupts for I2C.
Acked-by: Kevin Hilman <khilman@ti.com>
Tested-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Shubhrajyoti D [Tue, 29 May 2012 10:56:22 +0000 (16:26 +0530)]
I2C: OMAP: Rename the 1p153 to the erratum id i462
The section number in the recent errata document has changed.
Rename the erratum 1p153 to the unique id i462 instead, so that
it is easier to reference. Also change the function name and comments
to reflect the same.
Cc: Jon Hunter <jon-hunter@ti.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Shubhrajyoti D [Tue, 29 May 2012 10:56:21 +0000 (16:26 +0530)]
I2C: OMAP: Do not set the XUDF(Transmit underflow) if the underflow is not reached
Currently in the 1.153 errata handling, while waiting for transmitter
underflow, if NACK is got the XUDF(Transmit underflow) flag is also set.
Fix this by setting the XUDF(Transmit underflow) flag after wait for the
condition is over.
Cc: Alexander Shishkin <virtuoso@slind.org>
Acked-by: Moiz Sonasath <m-sonasath@ti.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Tasslehoff Kjappfot [Tue, 29 May 2012 10:56:20 +0000 (16:26 +0530)]
I2C: OMAP: prevent the overwrite of the errata flags
i2c_probe set the dev->errata flag, but omap_i2c_init cleared the flag again.
Prevent the overwrite of the errata flags.Move the errata handling to a unified
place in probe to prevent such errors.
Reviewed-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Tasslehoff Kjappfot <tasskjapp@gmail.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Shubhrajyoti D [Tue, 29 May 2012 10:56:19 +0000 (16:26 +0530)]
I2C: OMAP: Handle error check for pm runtime
If PM runtime get_sync fails return with the error
so that no further reads/writes goes through the interface.
This will avoid possible abort. Add a error message in case
of failure with the cause of the failure.
Reviewed-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Shubhrajyoti D [Tue, 29 May 2012 10:56:18 +0000 (16:26 +0530)]
I2C: OMAP: Fix the crash in i2c remove
In omap_i2c_remove we are accessing the I2C_CON register without
enabling the clocks. Fix the same by ensure device is accessible by calling
pm_runtime_get_sync before accessing the registers and calling pm_runtime_put
after accessing.
This fixes the following crash.
[ 154.723022] ------------[ cut here ]------------
[ 154.725677] WARNING: at arch/arm/mach-omap2/omap_l3_noc.c:112 l3_interrupt_handler+0x1b4/0x1c4()
[ 154.725677] L3 custom error: MASTER:MPU TARGET:L4 PER2
[ 154.742614] Modules linked in: i2c_omap(-)
[ 154.746948] Backtrace:
[ 154.746948] [<
c0013078>] (dump_backtrace+0x0/0x110) from [<
c026c158>] (dump_stack+0x18/0x1c)
[ 154.752716] r6:
00000070 r5:
c002c43c r4:
df9b9e98 r3:
df9b8000
[ 154.764465] [<
c026c140>] (dump_stack+0x0/0x1c) from [<
c0041a2c>] (warn_slowpath_common+0x5c/0x6c)
[ 154.768341] [<
c00419d0>] (warn_slowpath_common+0x0/0x6c) from [<
c0041ae0>] (warn_slowpath_fmt+0x38/0x40)
[ 154.776153] r8:
00000180 r7:
c0361594 r6:
c0379b48 r5:
00080003 r4:
e0838b00
[ 154.790771] r3:
00000009
[ 154.791778] [<
c0041aa8>] (warn_slowpath_fmt+0x0/0x40) from [<
c002c43c>] (l3_interrupt_handler+0x1b4/0x1c4)
[ 154.803710] r3:
c0361598 r2:
c02ef74c
[ 154.807403] [<
c002c288>] (l3_interrupt_handler+0x0/0x1c4) from [<
c0085f44>] (handle_irq_event_percpu+0x58/0
[ 154.818237] r8:
0000002a r7:
00000000 r6:
00000000 r5:
df808054 r4:
df8893c0
[ 154.825378] [<
c0085eec>] (handle_irq_event_percpu+0x0/0x188) from [<
c00860b8>] (handle_irq_event+0x44/0x64)
[ 154.835662] [<
c0086074>] (handle_irq_event+0x0/0x64) from [<
c0088ec0>] (handle_fasteoi_irq+0xa4/0x10c)
[ 154.845458] r6:
0000002a r5:
df808054 r4:
df808000 r3:
c034a150
[ 154.846466] [<
c0088e1c>] (handle_fasteoi_irq+0x0/0x10c) from [<
c0085ed0>] (generic_handle_irq+0x30/0x38)
[ 154.854278] r5:
c034aa48 r4:
0000002a
[ 154.862091] [<
c0085ea0>] (generic_handle_irq+0x0/0x38) from [<
c000fd38>] (handle_IRQ+0x60/0xc0)
[ 154.874450] r4:
c034ea70 r3:
000001f8
[ 154.878234] [<
c000fcd8>] (handle_IRQ+0x0/0xc0) from [<
c0008478>] (gic_handle_irq+0x20/0x5c)
[ 154.887023] r7:
ffffff40 r6:
df9b9fb0 r5:
c034e2b4 r4:
0000001a
[ 154.887054] [<
c0008458>] (gic_handle_irq+0x0/0x5c) from [<
c000ea80>] (__irq_usr+0x40/0x60)
[ 154.901153] Exception stack(0xdf9b9fb0 to 0xdf9b9ff8)
[ 154.907104] 9fa0:
beaf1f04 4006be00 0000000f 0000000c
[ 154.915710] 9fc0:
4006c000 00000000 00008034 ffffff40 00000007 00000000 00000000 0007b8d7
[ 154.916778] 9fe0:
00000000 beaf1b68 0000d23c 4005baf0 80000010 ffffffff
[ 154.931335] r6:
ffffffff r5:
80000010 r4:
4005baf0 r3:
beaf1f04
[ 154.937316] ---[ end trace
1b75b31a2719ed21 ]--
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Linux PM list <linux-pm@vger.kernel.org>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Shubhrajyoti D [Tue, 29 May 2012 10:56:17 +0000 (16:26 +0530)]
I2C: OMAP: Don't check if wait_for_completion_timeout() returns less than zero
By definition, wait_for_completion_timeout() returns an unsigned value and
therefore, it is not necessary to check if the return value is less than zero
as this is not possible.
This is based on a patch from Jon Hunter <jon-hunter@ti.com>
Changes from his patch
- Declare a long as the wait_for_completion_timeout returns long.
Original patch is
http://git.omapzoom.org/?p=kernel/omap.git;a=commitdiff;h=
ea02cece7b0000bc736e60c4188a11aaa74bc6e6
Reviewed-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Shubhrajyoti D [Tue, 29 May 2012 10:56:16 +0000 (16:26 +0530)]
I2C: OMAP: Prevent the register access after pm_runtime_put in probe
Currently in probe
pm_runtime_put(dev->dev);
...
/* i2c device drivers may be active on return from add_adapter() */
adap->nr = pdev->id;
r = i2c_add_numbered_adapter(adap);
if (r) {
dev_err(dev->dev, "failure adding adapter\n");
goto err_free_irq;
}
...
return 0;
err_free_irq:
free_irq(dev->irq, dev);
err_unuse_clocks:
omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0);
pm_runtime_put(dev->dev);
This may access the i2c registers without the clocks in the error cases.
Fix the same by moving the pm_runtime_put after the error check.
Reviewed-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Shubhrajyoti D [Tue, 29 May 2012 10:56:15 +0000 (16:26 +0530)]
I2C: OMAP: Fix the interrupt clearing in OMAP4
On OMAP4 we were writing 1 to IRQENABLE_CLR which cleared only
the arbitration lost interrupt. The patch intends to fix the same by writing 0
to the IE register clearing all interrupts.
This is based on the work done by Vikram Pandita <vikram.pandita@ti.com>.
The changes from the original patch ...
- Does not use the IRQENABLE_CLR register to clear as it is not mentioned
to be legacy register IRQENABLE_CLR helps in atomically
setting/clearing specific interrupts, instead use the OMAP_I2C_IE_REG as we
are clearing all interrupts.
Cc: Vikram Pandita <vikram.pandita@ti.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>