Commit Graph

22 Commits

Author SHA1 Message Date
Olof Johansson c8bfea3636 ARM: tegra: cpuidle enhancements
This pull request implements a new "LP2" cpuidle state for Tegra20,
 which makes use of the couple cpuidle feature.
 
 It is based on (most of) the previous pull request, with tag
 tegra-for-3.9-soc-usb.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRCYoCAAoJEMzrak5tbycxB7AP/3CqtxeAR7dhby7p/bNVRSyp
 NJp1Vim7wyM8nW3MW8Ha21ZdEqmeYvEz3d5cPAQwBEN4jc8KRTe06kjiFwlR/9nu
 KKx6X9mHlNAzoi5BHnavhvq1RzUuPxEfptAoEA2w6fUtcfxFlUvo1ToVSUnYd1CC
 0bot9PN6IxbCfrzcwHmcUgB9XLJO/M/RZ+TF+UtOM6bK+7GRtPJoWNzNmTe/uG+d
 qdgvEuX+04Qellbhc/jp8A619T6hGHrpn9N8wxZMfNwfQiwdrv4bAe1oOXIWKYUJ
 Y61R+iPqKeinR6msH7cqALrn+5LlZsFyAv7GRuCq/+4orCoghx+hZXB9kEibXxPu
 PBiHXYVXPYDSWGK8toJ0sEtbE2blzoQDq7HanYX7+HG70mz5dLyLeHLVVO3ekepd
 aPxiOBP7h/zabJ6ptZnOUCIgFjT6hYoUQrA/IeH5mkMQwZn84ivl4xMACMKoyawz
 5icfTLxD9TlJuZWHZ61rAbDCYRiggo1C01b/woke7oMuIXtiN1F6Pudj8n2yYM0Q
 IwStxy2OEiN1TI9PXzbSAYn2+MKp7GPh8/R0uhAODbGnsTi8wNEIHvSBizVNLXU3
 BfyzcF4g7WDuVDYyHPQuDXo+sQdCzBac7U3AbQ3k4JVHY0k3S9U+SzIj5umbxS7I
 s0YjjrNmlTkNeldbij53
 =2BUE
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-3.9-soc-cpuidle' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra into next/soc

From Stephen Warren:
ARM: tegra: cpuidle enhancements

This pull request implements a new "LP2" cpuidle state for Tegra20,
which makes use of the couple cpuidle feature.

It is based on (most of) the previous pull request, with tag
tegra-for-3.9-soc-usb.

* tag 'tegra-for-3.9-soc-cpuidle' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra:
  ARM: tegra20: cpuidle: apply coupled cpuidle for powered-down mode
  ARM: tegra20: flowctrl: add support for cpu_suspend_enter/exit
  clk: tegra20: Implementing CPU low-power function for tegra_cpu_car_ops
  ARM: tegra20: cpuidle: add powered-down state for secondary CPU
  ARM: tegra: add pending SGI checking API

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-02-05 12:46:18 -08:00
Joseph Lo d4b92fb253 ARM: tegra: add pending SGI checking API
The "powered-down" CPU idle mode of Tegra cut off the vdd_cpu rail, it
include the power of GIC. That caused the SGI (Software Generated
Interrupt) been lost. Because the SGI can't wake up the CPU that in
the "powered-down" CPU idle mode. We need to check if there is any
pending SGI when go into "powered-down" CPU idle mode. This is important
especially when applying the coupled cpuidle framework into "power-down"
cpuidle dirver. Because the coupled cpuidle framework may have the
chance that misses IPI_SINGLE_FUNC handling sometimes.

For the PPI or SPI, something like the legacy peripheral interrupt. It
still can be maintained by Tegra legacy interrupt controller. If there
is any pending PPI or SPI when CPU in "powered-down" CPU idle mode. The
CPU can be woken up immediately. So we don't need to take care the same
situation for PPI or SPI.

Signed-off-by: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-01-28 11:20:38 -07:00
Rob Herring 520f7bd733 irqchip: Move ARM gic.h to include/linux/irqchip/arm-gic.h
Now that we have GIC moved to drivers/irqchip and all GIC DT init for
platforms using irqchip_init, move gic.h and update the remaining
includes.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Anton Vorontsov <avorontsov@mvista.com>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: David Brown <davidb@codeaurora.org>
Cc: Daniel Walker <dwalker@fifo99.com>
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: Viresh Kumar <viresh.linux@gmail.com>
Cc: Shiraz Hashim <shiraz.hashim@st.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
2013-01-12 10:47:32 -06:00
Stephen Warren 2be39c079d ARM: tegra: move iomap.h to mach-tegra
Nothing outside mach-tegra uses this file, so there's no need for it to
be in <mach/>.

Since uncompress.h and debug-macro.S remain in include/mach, they need
to include "../../iomap.h" becaue of this change. uncompress.h will soon
be deleted in later multi-platform/single-zImage patches. debug-macro.S
will need to continue to include this header using an explicit relative
path, to avoid duplicating the physical->virtual address mapping that
iomap.h dictates.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
2012-11-05 11:36:06 -07:00
Peter De Schrijver caa4868ee0 ARM: tegra: add support for tegra30 interrupts
Tegra30 has 1 extra legacy interrupt controller. Use the GIC ITLinesNumber
field to determine how many interrupt controllers we have and initialize
appropriately. Also make room for the extra tegra30 interrupts by moving
the GPIO IRQ base. This shouldn't affect existing code as it determines the
correct IRQ number for GPIOs using TEGRA_GPIO_TO_IRQ().

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Colin Cross <ccross@android.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2012-02-06 09:16:14 -08:00
Arnd Bergmann 9cad9a5ff6 Merge branch 'tegra/dt' into next/dt
* tegra/dt:
  arm/tegra: Seaboard: Add GPIO key device tree nodes
  arm/dt: Add ADT7461 to Seaboard
  arm/dt: tegra: Use new compatible value for DVC I2C controller
  arm/tegra: initial device tree for tegra30
  arm/tegra: convert tegra20 to GIC devicetree binding
  arm/dt: tegra: Fix SDHCI nodes to match board files
  arm/dt: tegra: Fix serial nodes to match board files
  arm/dt: tegra: Fix I2C nodes to match board files
  arm/dt: tegra: Remove /chosen node
  arm/dt: tegra: Remove /memreserve/ from device-tree files
  arm/tegra: board-dt: Enable audio-related clocks
  arm/tegra: board-dt: Fix AUXDATA typo
  arm/dt: tegra: add dts file for paz00
  arm/tegra: Add device-tree support for TrimSlice board
  arm/dt: tegra: Clean up I2S and DAS nodes
  USB: ehci-tegra: add probing through device tree
  arm/dt: add basic usb nodes to tegra device trees
  arm/tegra: fix variable formatting in makefile

Conflicts:
	arch/arm/mach-tegra/Makefile
2011-12-27 23:21:16 +00:00
pdeschrijver@nvidia.com 0d4f74792e arm/tegra: convert tegra20 to GIC devicetree binding
Convert tegra20 IRQ intialization to the GIC devicetree binding. Modify the
interrupt definitions in the dts files according to
Documentation/devicetree/bindings/arm/gic.txt

v3 (swarren):
* Moved of_irq_init() call into board-dt.c to avoid ifdef'ing it.
  - Even with a dummy replacement if !CONFIG_OF, the reference from
    tegra_dt_irq_match[] to gic_of_init() would still have to be ifdef'd
  - It's plausible that tegra_dt_irq_match[] may need to contain more
    entries in the future, and defining what they are seems more suitable
    for board-dt.c than irq.c
v2 (swarren):
* Removed some stale GIC init code from board-dt.c
* Undid some accidental 0x -> 0x0 search/replace.

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
[olof: added include of <asm/hardware/gic.h> for compile to pass]
Signed-off-by: Olof Johansson <olof@lixom.net>
2011-12-07 21:20:12 -08:00
pdeschrijver@nvidia.com 103c43a2c6 arm/tegra: remove unused defines
PPI_NR is never used in arch/arm/mach-tegra/irq.c. Remove it.

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2011-12-07 21:16:04 -08:00
Colin Cross 4bd66cfde5 ARM: tegra: irq: Add tegra_eoi
Implement irq_eoi to allow the GIC irq chip flow controller to
be changed to fasteoi.

Signed-off-by: Colin Cross <ccross@android.com>
2011-05-11 16:04:16 +01:00
Colin Cross d1d8c66668 ARM: tegra: irq: Move legacy_irq.c into irq.c
Now that irq.c is just an interface layer between the gic
and legacy_irq.c, move the contents of legacy_irq.c into
irq.c.

Signed-off-by: Colin Cross <ccross@android.com>
2011-05-11 16:04:16 +01:00
Colin Cross 4dda2d384b ARM: tegra: irq: Remove PM support
Tegra PM irq support is being improved, remove it for now
until the rest of the platform gets PM support.

Signed-off-by: Colin Cross <ccross@android.com>
2011-05-11 16:04:16 +01:00
Colin Cross 938fa349fb ARM: tegra: irq: convert to gic arch extensions
Replace the ugly hack that inserts legacy irq controller calls
into the irq call paths by reading and replacing the gic irq
chip with the new gic arch extensions.

Signed-off-by: Colin Cross <ccross@android.com>
2011-05-11 16:04:16 +01:00
Thomas Gleixner f38c02f3b3 arm: Fold irq_set_chip/irq_set_handler
Use irq_set_chip_and_handler() instead. Converted with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:58 +02:00
Thomas Gleixner 6845664a6a arm: Cleanup the irq namespace
Convert to the new function names. Automated with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:57 +02:00
Colin Cross 26d902c0c6 ARM: tegra: irq: Implement retrigger
Signed-off-by: Colin Cross <ccross@android.com>
2011-02-09 22:18:30 -08:00
Colin Cross 3524b70ef3 ARM: tegra: irq: Add support for suspend wake sources
Signed-off-by: Colin Cross <ccross@android.com>
2011-02-09 22:18:21 -08:00
Colin Cross 2ea67fd145 ARM: tegra: Add prototypes for subsystem suspend functions
Signed-off-by: Colin Cross <ccross@android.com>
2011-02-09 21:57:01 -08:00
Colin Cross cc939754db ARM: tegra: irq: Rename gic pointers to avoid conflicts
A future patch will export gic_mask_irq and gic_unmask_irq.
Rename the pointers in arch/arm/mach-tegra/irq.c to avoid
a compile error.

Signed-off-by: Colin Cross <ccross@android.com>
2011-01-26 21:28:06 -08:00
Lennert Buytenhek 37337a8d5e ARM: tegra: irq_data conversion.
Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
2011-01-13 17:19:04 +01:00
Russell King b580b899dd ARM: GIC: provide a single initialization function for boot CPU
Provide gic_init() which initializes the GIC distributor and current
CPU's GIC interface for the boot (or single) CPU.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-12-14 19:21:30 +00:00
Gary King 460907bc26 [ARM] tegra: add suspend and mirror irqs to legacy controller
mirror IRQ enable and disable operations on the legacy PPI system
interrupt controller, since the legacy controller is responsible
for responding to wakeup interrupts when the CPU is in LP2 idle mode

save the irq controller state on suspend and restore on resume

Signed-off-by: Gary King <gking@nvidia.com>
2010-10-21 18:11:31 -07:00
Erik Gilling 5ad36c5f0e [ARM] tegra: Add IRQ support
v2: fixes from Russell King
	- include linux/io.h instead of asm/io.h and mach/io.h

Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Erik Gilling <konkers@android.com>
2010-08-05 14:51:42 -07:00