Commit Graph

779 Commits

Author SHA1 Message Date
Linux Build Service Account
9193e5fcb0 Merge "ARM: 7068/1: process: change from __backtrace to dump_stack in show_regs" into msm-3.0 2012-03-31 04:33:15 -07:00
Laura Abbott
0a80147e1c ARM: 7068/1: process: change from __backtrace to dump_stack in show_regs
Currently, show_regs calls __backtrace which does
nothing if CONFIG_FRAME_POINTER is not set. Switch to
dump_stack which handles both CONFIG_FRAME_POINTER and
CONFIG_ARM_UNWIND correctly.

__backtrace is now superseded by dump_stack in general
and show_regs was the last caller so remove __backtrace
as well.

Change-Id: I396677df8bc22bf28e4486f2bfb155c516a3d452
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2012-03-30 08:14:36 -07:00
Sathish Ambley
2f27a173d0 msm: board-dt: ARM generic timer DT support
The ARM generic timer now supports DT routines to parse the
device tree and populate its members, so remove this from
the board file and invoke the DT routine exposed from the
ARM generic timer.

Change-Id: Id383aff8f5f2c8fdb541f1df72242f8938229784
Signed-off-by: Sathish Ambley <sambley@codeaurora.org>
2012-03-25 20:52:14 -07:00
Marc Zyngier
df590ccd9d ARM: local timers: Add A15 architected timer support
Add support for the A15 generic timer and clocksource.
As the timer generates interrupts on a different PPI depending
on the execution mode (normal or secure), it is possible to
register two different PPIs.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>

Conflicts:
        [Integrate to the recent patch which has changes to
         local timer registration mechanism.

         This fixes the crash seen during hotplug operations
         where after a secondary CPU is brought back online,
         the clock event device setup was happening as part
         of the online notification mechanism which was too
         late. With this change in the local timer mechanims,
         the clock event device is now setup as part of the
         secondary CPU boot initialization making it available
         early enough for use.

         Update the board file with the appropriate changes in
         the argument for timer registration.]
	arch/arm/Kconfig
	arch/arm/include/asm/arch_timer.h
	arch/arm/kernel/arch_timer.c

Change-Id: I0bc80097c145fb2aac2150db0c5dff3c5e215a58
Signed-off-by: Sathish Ambley <sambley@codeaurora.org>
2012-03-25 20:52:13 -07:00
Marc Zyngier
483e483620 ARM: local timers: introduce a new registration interface
In order to switch to a runtime selectable local timer,
add a registration interface that timer drivers can use to
register to the core.

local_timer_setup() and local_timer_stop() are made weak symbols
in order not to break existing setups.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Sathish Ambley <sambley@codeaurora.org>
2012-03-15 13:42:16 -07:00
Rabin Vincent
6de5581531 ARM: 7325/1: fix v7 boot with lockdep enabled
Bootup with lockdep enabled has been broken on v7 since b46c0f74657d
("ARM: 7321/1: cache-v7: Disable preemption when reading CCSIDR").

This is because v7_setup (which is called very early during boot) calls
v7_flush_dcache_all, and the save_and_disable_irqs added by that patch
ends up attempting to call into lockdep C code (trace_hardirqs_off())
when we are in no position to execute it (no stack, MMU off).

Fix this by using a notrace variant of save_and_disable_irqs.  The code
already uses the notrace variant of restore_irqs.

Change-Id: I9453f2f278c715a0480d4962f9cbbea65a43ac39
Reviewed-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2012-02-17 23:35:53 -08:00
Laura Abbott
9fba2a57b6 msm: rtb: Macroize more of the readl/writel code
Most of the readl/writel macros for logging to the RTB
very similar. Create a dedicated macro to use for all of them
to make the code more readable and easier to maintain.

Change-Id: I6d8e7bc6bde7de6ad6cb53107362512d083b7423
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2012-02-14 18:32:01 -08:00
Rohit Vaswani
26e44869e1 arm: gic: Configure the GIC to run in secure mode
Configure the GIC to run in secure mode and handle
secure as well as non-secure interrupts. This patch
adds an API to configure an IRQ as a secure IRQ so that
it can be treated as an FIQ in the secure mode.

Change-Id: Ic3321e76c95a4c10d6287ba418e84623e7004cb1
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: Sathish Ambley <sambley@codeaurora.org>
2012-02-07 19:27:36 -08:00
Laura Abbott
0f9c776713 arm: log readl/writel accesses
Log readl/writel accesses in the small uncached buffer.
readl/writel are typically used for reading from memory
mapped registers, which can cause hangs if accessed
unclocked. Log this information in a buffer to aid in
debugging.

Change-Id: Id72da6b028a3faf5d0d8e069e14d90e4671e3564
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2012-02-02 11:57:52 -08:00
Rohit Vaswani
eb81fb3bde arm: fiq: Provide empty stubs for fiq functions
A driver using fiq functions should be usable on targets
with or without CONFIG_FIQ enabled. Instead of making code
dependent on #ifdef CONFIG_FIQ, add empty stubs for the fiq
functions.

Change-Id: Ie8b1905ba53664d99bd707be3c83291c97eb1066
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2012-01-31 18:04:13 -08:00
Subhash Jadavani
933e6a6abb mmc: msm_sdcc: vote against IDLE power collapse
During the SDCC DMA transfer, if DMA transfer time is
long enough to do IDLE power collapse then system may
go into IDLE power collapse and once SDCC DMA transfer
is completed, system wakes up from Idle Power Collapse
due to SDCC DMA interrupt. But delay for waking up
from Idle Power collapse could be as large as 5 ms which
really degrades the overall read & write throughputs
for SD/eMMC/SDIO cards.

For example, following are the performance numbers with
eMMC card on MSM8960 platform with and without Idle Power
Collapse.

Idle Power collapse enabled:
	LMDD Read throughput = ~14 MB/s
	LMDD Write throughput = ~6 MB/s

Idle Power Collapse disabled:
	LMDD Read throughput = ~25 MB/s
	LMDD Write throughput = ~8 MB/s

So this change votes against the Idle power collapse by registering
with PM QOS about it's acceptable DMA latency when SDCC transfer is
active. This latency value is one more than the latency of SWFI
which means system can go into SWFI but not in any of the other
low power modes (including Idle power collapse).

CRs-fixed: 327751
Change-Id: Iae5e12cade383544243f17c448346dd5d0faa60e
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2012-01-29 02:03:03 +05:30
Michael Bohan
0bb2b56f70 arm: irq: Allow for specification of no preallocated irqs
For cases with SPARSE_IRQ enabled, irqs preallocated with
arch_probe_nr_irqs() are already marked as allocated in the
allocated_irqs bitmap. As a consequence, irq chip drivers that
allocate irqs will feel one of two behaviors:

1. An allocation will succeed with the starting irq_base one
more than the preallocated irqs. This will thus waste the
preceeding interrupt resources that were preallocated, unless a
legacy chip driver happens to assume ownership of these by some
platform definition. The GIC driver is a typical primary chip
driver, and abides to the allocation APIs. So this can be a
problem in many trivial usecases.

2. An allocation will fail with < 0. This can also happen in the
GIC driver, which interprets this value as meaning the irq_descs
are already preallocated. But in Device Tree configurations, the
fallback irq_base is -1. This results in an invalid irq_base
value.

Looking forward, we are moving towards a world where preallocation
of irqs is no longer necessary. irq_domain is scoped to handle all
irq_desc allocations in the future. Thus, we should support
configurations where the platform wants to preallocate no irqs.

One easy way to achieve this is to allow for
machine_desc->nr_irqs < 0, which indicates not to preallocate any
interrupts.

Change-Id: Ie793932c58de72c1b91b6e039b77a8e5d64ecc75
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
2012-01-19 12:26:40 -08:00
Michael Bohan
d428ab26cf arm: irq: Remove check for hardirq mask size
SPARSE_IRQ gives the freedom to use high, discontiguous IRQ
numbers at very low memory costs. But even with SPARSE_IRQ, the
highest interrupt number of the system is limited by NR_IRQS,
since NR_IRQS defines the number of IRQ_BITMAP_BITS.

NR_IRQS is currently limited to 1024 on ARM, as of the following
commit:

commit 5a5fb7dbe8
Author: Steven Rostedt <srostedt@redhat.com>
Date:   Thu Feb 12 10:53:37 2009 -0500

    preempt-count: force hardirq-count to max of 10

This implies that architectures having more than 1024 interrupts
cannot manage. Let's remove the constraint on nesting level,
since as the commit above mentions, we're probably bound by stack
size at that point, anyways.

Change-Id: Ic4af331874a8fda66e2c94ef80ad73314badd74d
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
2012-01-13 18:57:52 -08:00
Marc Zyngier
181621e591 ARM: GIC: Add global gic_handle_irq() function
Provide the GIC code with a low level handler that can be used
by platforms using CONFIG_MULTI_IRQ_HANDLER.

Change-Id: Ib0eb0e9968dc1708e4232f7c306359344025f80a
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
2011-12-29 13:52:39 +05:30
Jamie Iles
0fd86293bb ARM: 7115/4: move __exception and friends to asm/exception.h
The definition of __exception_irq_entry for
CONFIG_FUNCTION_GRAPH_TRACER=y needs linux/ftrace.h, but this creates a
circular dependency with it's current home in asm/system.h. Create
asm/exception.h and update all current users.

v4:	- rebase to rmk/for-next
v3:	- remove redundant includes of linux/ftrace.h
v2:	- document the usage restricitions of __exception*

Change-Id: I9efdb6a621bb915ad00b9a133ec93e98182fd483
Cc: Zoltan Devai <zdevai@gmail.com>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
[tsoni@codeaurora.org: Merge fixes]
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
2011-12-29 13:52:38 +05:30
Marc Zyngier
680392ba05 ARM: gic: allow GIC to support non-banked setups
The GIC support code is heavily using the fact that hardware
implementations are exposing banked registers. Unfortunately, it
looks like at least one GIC implementation (EXYNOS) offers both
the distributor and the CPU interfaces at different addresses,
depending on the CPU.

This problem is solved by allowing the distributor and CPU interface
addresses to be per-cpu variables for the platforms that require it.
The EXYNOS code is updated not to mess with the GIC internals while
handling interrupts, and struct gic_chip_data is back to being private.
The DT binding for the gic is updated to allow an optional "cpu-offset"
value, which is used to compute the various base addresses.

Finally, a new config option (GIC_NON_BANKED) is used to control this
feature, so the overhead is only present on kernels compiled with
support for EXYNOS.

Tested on Origen (EXYNOS4) and Panda (OMAP4).

Change-Id: I4c4adf1b3009dd20c7e6942b1d3e8d63999dd667
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
[tsoni@codeaurora.org: MSM specific merge fixes]
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
2011-12-29 13:52:37 +05:30
Rob Herring
050113e2fe ARM: gic: fix irq_alloc_descs handling for sparse irq
Commit "ARM: gic: add irq_domain support" (b49b6ff) breaks SPARSE_IRQ
on platforms with GIC. When SPARSE_IRQ is enabled, all NR_IRQS or
mach_desc->nr_irqs will be allocated by arch_probe_nr_irqs(). This caused
irq_alloc_descs to allocate irq_descs after the pre-allocated space.

Make irq_alloc_descs search for an exact irq range and assume it has
been pre-allocated on failure. For DT probing dynamic allocation is used.
DT enabled platforms should set their nr_irqs to NR_IRQ_LEGACY and have all
irq_chips allocate their irq_descs with irq_alloc_descs if SPARSE_IRQ is
enabled.

gic_init irq_start param is changed to be signed with negative meaning do
dynamic Linux irq assigment.

Change-Id: I05b83bd8b72471233c0ea23bc9e8af2916e6b0fa
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
2011-12-26 15:48:04 +05:30
Rob Herring
0fc0d946d6 ARM: gic: add OF based initialization
This adds ARM gic interrupt controller initialization using device tree
data.

The initialization function is intended to be called by of_irq_init
function like this:

const static struct of_device_id irq_match[] = {
	{ .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
	{}
};

static void __init init_irqs(void)
{
	of_irq_init(irq_match);
}

Change-Id: I722c5f7acf2426dac7937f53d3a0bf5a1d1fbae6
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Reviewed-by: Jamie Iles <jamie@jamieiles.com>
Tested-by: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
[tsoni@codeaurora.org: Fix merge conflicts]
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
2011-12-26 15:48:02 +05:30
Rob Herring
c383e04b54 ARM: gic: add irq_domain support
Convert the gic interrupt controller to use irq domains in preparation
for device-tree binding and MULTI_IRQ. This allows for translation between
GIC interrupt IDs and Linux irq numbers.

The meaning of irq_offset has changed. It now is just the number of skipped
GIC interrupt IDs for the controller. It will be 16 for primary GIC and 32
for secondary GICs.

Change-Id: Ie94f443aedea16036a6d2c30ff5ea4b3e4cfe9e1
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Jamie Iles <jamie@jamieiles.com>
Tested-by: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
[tsoni@codeaurora.org: Fix merge conflicts]
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
2011-12-26 15:48:01 +05:30
Trilok Soni
eecb28c590 ARM: gic: Consolidate PPI handling with request_percpu_irq() API
The commit 292b293 creates the MSM boot failures, so squash
the commit 28af690 with it to avoid such failures. The commit ddd847
and 0c1991 are required to keep the watchdog and Copper targets working.

commit 292b293ceef2eda1f96f0c90b96e954d7bdabd1c
Author: Marc Zyngier <marc.zyngier@arm.com>
Date:   Wed Jul 20 16:24:14 2011 +0100

    ARM: gic: consolidate PPI handling

    PPI handling is a bit of an odd beast. It uses its own low level
    handling code and is hardwired to the local timers (hence lacking
    a registration interface).

    Instead, switch the low handling to the normal SPI handling code.
    PPIs are handled by the handle_percpu_devid_irq flow.

    This also allows the removal of some duplicated code.

    Cc: Kukjin Kim <kgene.kim@samsung.com>
    Cc: David Brown <davidb@codeaurora.org>
    Cc: Bryan Huntsman <bryanh@codeaurora.org>
    Cc: Tony Lindgren <tony@atomide.com>
    Cc: Paul Mundt <lethal@linux-sh.org>
    Cc: Magnus Damm <magnus.damm@gmail.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Acked-by: David Brown <davidb@codeaurora.org>
    Tested-by: David Brown <davidb@codeaurora.org>
    Tested-by: Shawn Guo <shawn.guo@linaro.org>
    Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>

commit 28af690a284dfcb627bd69d0963db1c0f412cb8c
Author: Marc Zyngier <marc.zyngier@arm.com>
Date:   Fri Jul 22 12:52:37 2011 +0100

    ARM: gic, local timers: use the request_percpu_irq() interface

    This patch remove the hardcoded link between local timers and PPIs,
    and convert the PPI users (TWD, MCT and MSM timers) to the new
    *_percpu_irq interface. Also some collateral cleanup
    (local_timer_ack() is gone, and the interrupt handler is strictly
    private to each driver).

    PPIs are now useable for more than just the local timers.

    Additional testing by David Brown (msm8250 and msm8660) and
    Shawn Guo (imx6q).

    Cc: David Brown <davidb@codeaurora.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Acked-by: David Brown <davidb@codeaurora.org>
    Tested-by: David Brown <davidb@codeaurora.org>
    Tested-by: Shawn Guo <shawn.guo@linaro.org>
    Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>

commit ddd8478d68f8cf75ee9771667c0cbe2a9d1caeb9
Author: Trilok Soni <tsoni@codeaurora.org>
Date:   Tue Dec 6 00:56:01 2011 +0530

    msm: watchdog: Use request_percpu_irq() interface

    Change-Id: I7c319344f6a7f7a7c70682ac87f5c385e56d130c
    Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
    Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>

commit 0c19915e092214a4c17a9920c4c1f3d78610217d
Author: Sathish Ambley <sambley@codeaurora.org>
Date:   Fri Dec 9 17:07:37 2011 +0530

    arm: arch_timer: Use request_percpu_irq() API

    Change-Id: Iee9b218d538f315cd884a47d95bcc0dcc49b0fe1
    Signed-off-by: Sathish Ambley <sambley@codeaurora.org>

Change-Id: I7bbba706b1f2e55814be5891ed76063725c2bfb1
Signed-off-by: Ravi Kumar <kumarrav@codeaurora.org>
[tsoni@codeaurora.org: MSM specific fixes]
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
2011-12-23 18:05:10 -07:00
Krishna Konda
360aa42a66 mmc: msm_sdcc: Handle SD card detection based on polarity
SD card detect GPIO line can be ACTIVE HIGH or ACTIVE LOW based on the way
the board is designed. This change will allow the polarity information to
be used when determining if a card was inserted or removed for a given
board.

CRs-fixed: 318036
Change-Id: I30b96e840a28030af3141fd722383722a24089c8
Signed-off-by: Krishna Konda <kkonda@codeaurora.org>
2011-12-17 04:23:03 -07:00
Simon Glass
d3dc306beb ARM: 7017/1: Use generic BUG() handler
ARM uses its own BUG() handler which makes its output slightly different
from other archtectures.

One of the problems is that the ARM implementation doesn't report the function
with the BUG() in it, but always reports the PC being in __bug(). The generic
implementation doesn't have this problem.

Currently we get something like:

kernel BUG at fs/proc/breakme.c:35!
Unable to handle kernel NULL pointer dereference at virtual address 00000000
...
PC is at __bug+0x20/0x2c

With this patch it displays:

kernel BUG at fs/proc/breakme.c:35!
Internal error: Oops - undefined instruction: 0 [#1] PREEMPT SMP
...
PC is at write_breakme+0xd0/0x1b4

This implementation uses an undefined instruction to implement BUG, and sets up
a bug table containing the relevant information. Many versions of gcc do not
support %c properly for ARM (inserting a # when they shouldn't) so we work
around this using distasteful macro magic.

v1: Initial version to replace existing ARM BUG() implementation with something
more similar to other architectures.

v2: Add Thumb support, remove backtrace whitespace output changes. Change to
use macros instead of requiring the asm %d flag to work (thanks to
Dave Martin <dave.martin@linaro.org>)

v3: Remove old BUG() implementation in favor of this one.
Remove the Backtrace: message (will submit this separately).
Use ARM_EXIT_KEEP() so that some architectures can dump exit text at link time
thanks to Stephen Boyd <sboyd@codeaurora.org> (although since we always
define GENERIC_BUG this might be academic.)
Rebase to linux-2.6.git master.

v4: Allow BUGS in modules (these were not reported correctly in v3)
(thanks to Stephen Boyd <sboyd@codeaurora.org> for suggesting that.)
Remove __bug() as this is no longer needed.

v5: Add %progbits as the section flags.

Change-Id: I9f588a06ddd739138fddfa6a5bf67079796e68eb
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Tested-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2011-12-14 15:47:55 -08:00
Colin Cross
692c3e2538 ARM: gic: Use cpu pm notifiers to save gic state
When the cpu is powered down in a low power mode, the gic cpu
interface may be reset, and when the cpu cluster is powered
down, the gic distributor may also be reset.

This patch uses CPU_PM_ENTER and CPU_PM_EXIT notifiers to save
and restore the gic cpu interface registers, and the
CPU_CLUSTER_PM_ENTER and CPU_CLUSTER_PM_EXIT notifiers to save
and restore the gic distributor registers.

Change-Id: Ifad58fe6c9068d48b0515e444ae528619e036125
Original-author: Gary King <gking@nvidia.com>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-and-Acked-by: Shawn Guo <shawn.guo@linaro.org>
Tested-by: Vishwanath BS <vishwanath.bs@ti.com>
[kumarrav@codeaurora.org: fixup gic.h merge conflict]
Signed-off-by: Ravi Kumar <kumarrav@codeaurora.org>
2011-12-09 16:15:33 +05:30
Thomas Gleixner
450ea485b0 locking, ARM: Annotate low level hw locks as raw
Annotate the low level hardware locks which must not be preempted.

In mainline this change documents the low level nature of
the lock - otherwise there's no functional difference. Lockdep
and Sparse checking will work as usual.

Change-Id: I1c73fd5472b9ab356173637a7819095394004ebf
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
[kumarrav@codeaurora.org: fixup gic.c and cache-l2x0.c merge conflict]
Signed-off-by: Ravi Kumar <kumarrav@codeaurora.org>
2011-12-06 00:39:13 +05:30
Linux Build Service Account
1d2d6d20e4 Merge changes I79bc950f,Idfe44bb8,I9832f0ff into msm-3.0
* changes:
  arm: common: Makefile: Add cpaccess
  ARM: cpaccess: write-enables kernel space for write
  mm: add wrapper function for writing word to kernel text space
2011-12-03 19:45:06 -08:00
Linux Build Service Account
5f0bc5c1eb Merge "msm: Remove msm specific implementation of io_remap_pfn_range." into msm-3.0 2011-12-02 21:29:05 -08:00
Linux Build Service Account
a9a5be958f Merge changes Ica870d27,Ibaddc7f1 into msm-3.0
* changes:
  ARM: architected timers: Add A15 specific sched_clock implementation
  ARM: local timers: Add A15 architected timer support
2011-12-01 15:09:41 -08:00
Naveen Ramaraj
179c22f1a2 msm: Remove msm specific implementation of io_remap_pfn_range.
The msm specific implementation of io_remap_pfn_range is no
longer applicable to current generation of msm targets.

Remove the implementation to avoid any potential remapping
to a wrong memory type.

Change-Id: I5cd5e0459c594e240f138dcdb37aef7c4698bea1
Signed-off-by: Naveen Ramaraj <nramaraj@codeaurora.org>
2011-12-01 12:00:26 -08:00
Neil Leeder
32942757bd mm: add wrapper function for writing word to kernel text space
Adds a function to encapsulate the locking, removal of write-protection,
word write, cache flush and invalidate and restoration
of write protection. This is a convenience function for callers
needing to update a word in kernel text space.

Change-Id: I9832f0ff659ddc62c55819af5318c94b70f5c11c
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
2011-11-30 10:38:39 -05:00
Linux Build Service Account
8f6490befb Merge "ARM: GIC: move gic_chip_data structure declaration to header" into msm-3.0 2011-11-23 14:51:07 -08:00
Marc Zyngier
f5b3b2b2a4 ARM: local timers: Add A15 architected timer support
Add support for the A15 generic timer and clocksource.
As the timer generates interrupts on a different PPI depending
on the execution mode (normal or secure), it is possible to
register two different PPIs.

Change-Id: Ibaddc7f174bc168cef579b66ab06b966878ae155
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Sathish Ambley <sambley@codeaurora.org>
2011-11-23 10:39:45 -08:00
Linux Build Service Account
ac9270d0d0 Merge "ARM: Fix bank_pfn_end macro overflow" into msm-3.0 2011-11-23 03:25:06 -08:00
Changhwan Youn
2252d0fae5 ARM: GIC: move gic_chip_data structure declaration to header
Since Samsung EXYNOS4210 cannot support register banking in GIC,
so needs to update CPU interface base address.
The 'gic_chip_data' is used for it, this patch moves gic_chip_data
structure declaraton to arch/arm/include/asm/hardware/gic.h to use
it.

Change-Id: I3adb614a72de3fd64f523f03795ae67ee38e9968
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Changhwan Youn <chaos.youn@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
[kumarrav@codeaurora.org: Add back internal QuIC changes to gic_chip_data]
Signed-off-by: Ravi Kumar <kumarrav@codeaurora.org>
2011-11-23 16:03:20 +05:30
Olav Haugan
b40b91eb81 ARM: Fix bank_pfn_end macro overflow
bank_pfn_end macro overflows when physical memory space
configuration ends at 0xFFFFFFFF.

The macro adds start and size together before converting
to a page frame number. Change the macro to convert start
and size first and then add them together.

Change-Id: If091fd860e6cc94f2221164bd79bf34415819e66
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2011-11-17 08:15:40 -08:00
Bryan Huntsman
d074fa2796 Merge remote-tracking branch 'common/android-3.0' into msm-3.0
* common/android-3.0: (570 commits)
  misc: remove kernel debugger core
  ARM: common: fiq_debugger: dump sysrq directly to console if enabled
  ARM: common: fiq_debugger: add irq context debug functions
  net: wireless: bcmdhd: Call init_ioctl() only if was started properly for WEXT
  net: wireless: bcmdhd: Call init_ioctl() only if was started properly
  net: wireless: bcmdhd: Fix possible memory leak in escan/iscan
  cpufreq: interactive governor: default 20ms timer
  cpufreq: interactive governor: go to intermediate hi speed before max
  cpufreq: interactive governor: scale to max only if at min speed
  cpufreq: interactive governor: apply intermediate load on current speed
  ARM: idle: update idle ticks before call idle end notifier
  input: gpio_input: don't print debounce message unless flag is set
  net: wireless: bcm4329: Skip dhd_bus_stop() if bus is already down
  net: wireless: bcmdhd: Skip dhd_bus_stop() if bus is already down
  net: wireless: bcmdhd: Improve suspend/resume processing
  net: wireless: bcmdhd: Check if FW is Ok for internal FW call
  tcp: Don't nuke connections for the wrong protocol
  ARM: common: fiq_debugger: make uart irq be no_suspend
  net: wireless: Skip connect warning for CONFIG_CFG80211_ALLOW_RECONNECT
  mm: avoid livelock on !__GFP_FS allocations
  ...

Conflicts:
	arch/arm/mm/cache-l2x0.c
	arch/arm/vfp/vfpmodule.c
	drivers/mmc/core/host.c
	kernel/power/wakelock.c
	net/bluetooth/hci_event.c

Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2011-11-16 13:52:50 -08:00
Linux Build Service Account
e53c201ff9 Merge changes I1f7824c9,Ib8f02b76 into msm-3.0
* changes:
  ARM: perf: add support for the Cortex-A15 PMU
  ARM: perf: add support for the Cortex-A5 PMU
2011-11-16 10:00:17 -08:00
Will Deacon
903bfa5765 ARM: perf: add support for the Cortex-A15 PMU
This patch adds support for the Cortex-A15 PMU to the ARMv7
perf-event backend.

Change-Id: I1f7824c901a8c70bf66bdbb3976b506f5addeb6f
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2011-11-16 10:48:30 +05:30
Will Deacon
acdc46fdb6 ARM: perf: add support for the Cortex-A5 PMU
This patch adds support for the Cortex-A5 PMU to the ARMv7 perf-event
backend.

Change-Id: Ib8f02b766145cedf59656adcc0cb8fec47bebe6e
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2011-11-16 10:48:29 +05:30
Pratibhasagar V
1c11da6ef9 mmc: msm_sdcc: Use MCI_VERSION to identify the Controller's version
With SDCC4, MCI_VERSION register holds the specific version information.
This information can be used to identify the controller version instead
of maintaining platform data in the board files.

CRs-Fixed: 313620
Change-Id: Ib745e83a52ba9e2e5b38d0989abd579d0e748c81
Signed-off-by: Pratibhasagar V <pratibha@codeaurora.org>
2011-11-15 19:13:08 -07:00
Will Deacon
bffe6920a3 ARM: hwcaps: add new HWCAP defines for ARMv7-A
Modern ARMv7-A cores can optionally implement these new hardware
features:

- VFPv4:
    The latest version of the ARMv7 vector floating-point extensions,
    including hardware support for fused multiple accumulate. D16 or D32
    variants may be implemented.

- Integer divide:
    The SDIV and UDIV instructions provide signed and unsigned integer
    division in hardware. When implemented, these instructions may be
    available in either both Thumb and ARM, or Thumb only.

This patch adds new HWCAP defines to describe these new features. The
integer divide capabilities are split into two bits for ARM and Thumb
respectively. Whilst HWCAP_IDIVA should never be set if HWCAP_IDIVT is
clear, separating the bits makes it easier to interpret from userspace.

Change-Id: I05216fce45adf90b5a507b534146b28be0e1b7a0
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2011-11-10 14:06:07 +05:30
Will Deacon
70c80d8be9 ARM: hwcaps: use shifts instead of hardcoded constants
The HWCAP numbers are defined as constants, each one being a power of 2.
This has become slightly unwieldy now that we have reached 32k.

This patch changes the HWCAP defines to use (1 << n) instead of coding
the constant directly. The values remain unchanged.

Change-Id: I2037d3bc8a3b928f8175736d459764020f4e4a9c
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2011-11-10 14:05:08 +05:30
Neil Leeder
f06ab97f06 arm: mm: add functions to temporarily allow write to kernel text
STRICT_MEMORY_RWX write-protects the kernel text section. This
is a problem for tools such as kprobes which need write access
to kernel text space.

This patch introduces a function to temporarily make part of the
kernel text space writeable and another to restore the original state.
They can be called by code which is intentionally writing to
this space, while still leaving the kernel protected from
unintentional writes at other times.

Change-Id: I879009c41771198852952e5e7c3b4d1368f12d5f
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
2011-11-04 19:01:04 -06:00
Krishna Konda
fea6018299 msm: 9615: Use gpio-regulator driver for SDC1
Instead of controlling the GPIO that powers up SD/MMC cards
in SDC1 slot from the board file, make use of the gpio-regulator
driver and control the regulator from the SD/MMC driver.

Change-Id: I820ac334f69fb41a79a074eddfe38930a0d30bb3
Signed-off-by: Krishna Konda <kkonda@codeaurora.org>
2011-11-02 23:18:20 -07:00
Linux Build Service Account
7cac2e4868 Merge "arm: support very early callback into board functions" into msm-3.0 2011-10-28 18:35:26 -07:00
Colin Cross
2bb3e31015 Merge commit 'v3.0.8' into android-3.0 2011-10-27 15:01:19 -07:00
Linux Build Service Account
16a5b1f91f Merge "ARM: 7123/1: smp: Add an IPI handler callable from C code" into msm-3.0 2011-10-26 17:20:32 -07:00
Dima Zavin
f4aea2122a ARM: common: fiq_debugger: add suspend/resume handlers
Change-Id: If6eb75059fdf4867eb9a974d60b9d50e5e3350d4
Signed-off-by: Dima Zavin <dima@android.com>
2011-10-25 22:05:50 -07:00
Dima Zavin
efde655c8c ARM: common: fiq_debugger: add uart_enable/disable platform callbacks
This allows the platform specific drivers to properly enable
and disable the uart at the appropriate times. On some platforms, just
managing the clock is not enough.

Change-Id: I5feaab04cfe313a4a9470ca274838676b9684201
Signed-off-by: Dima Zavin <dima@android.com>
2011-10-25 22:05:49 -07:00
Larry Bassel
f81fb5655a arm: support very early callback into board functions
Due to changes of the order of initialization of
the ARM-specfic memory management code in 3.0, it
is necessary to create a way to call platform specific
code earlier than is currently possible.

Change-Id: I77dae10c85085358f7240889a50b78b07d5af6d1
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
2011-10-25 14:33:46 -07:00
Shawn Guo
93699402ab ARM: 7123/1: smp: Add an IPI handler callable from C code
In order to be able to handle IPI directly from C code instead of
assembly code, introduce handle_IPI(), which is modeled after handle_IRQ().

Change-Id: I5f6ff150899dc05e7935b07a3287f7c7e7804884
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2011-10-25 16:39:04 +05:30