ARM: OMAP3xxx: clockdomain: fix software supervised wakeup/sleep

Commit 4da71ae6 ("OMAP: clockdomain: Arch specific funcs for
clkdm_clk_enable/disable") called the OMAP2xxx-specific functions for
clockdomain wakeup and sleep.  This would probably have broken
software-supervised clockdomain wakeup and sleep on OMAP3.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Jon Hunter <jon-hunter@ti.com>
Acked-by: Rajendra Nayak <rnayak@ti.com>
[steven@steven676.net: make apply to p-android-omap3-3.0]
ARM: OMAP2+: clockdomain/hwmod: add workaround for EMU clockdomain idle problems

The idle status of the IP blocks and clocks inside the EMU clockdomain
isn't taken into account by the PRCM hardware when deciding whether
the clockdomain is idle.  Add a workaround flag in the clockdomain
code, CLKDM_MISSING_IDLE_REPORTING, to deal with this problem, and add
the code necessary to support it.

If CLKDM_MISSING_IDLE_REPORTING is set on a clockdomain, the
clockdomain will be forced active whenever an IP block inside that
clockdomain is in use, even if the clockdomain supports
hardware-supervised idle.  When the kernel indicates that the last
active IP block inside the clockdomain is no longer used, the
clockdomain will be forced idle, or, if that mode is not supported in
the hardware, it will be placed into hardware-supervised idle.

This patch is an equal collaboration with Jon Hunter
<jon-hunter@ti.com>.  Ming Lei <ming.lei@canonical.com>, Will Deacon
<will.deacon@arm.com>, Madhav Vij <mvij@ti.com>, Kevin Hilman
<khilman@ti.com>, Benoît Cousson <b-cousson@ti.com>, and Santosh
Shilimkar <santosh.shilimkar@ti.com> all made essential contributions
to the understanding of EMU clockdomain power management on OMAP.

[steven@steven676.net: squash in cf956d9 ("ARM: OMAP3: fix workaround
for EMU clockdomain")]

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Jon Hunter <jon-hunter@ti.com>
Cc: Ming Lei <ming.lei@canonical.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Madhav Vij <mvij@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Benoît Cousson <b-cousson@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Jon Hunter <jon-hunter@ti.com>
[steven@steven676.net: backport to p-android-omap3-3.0]
GPIO: OMAP: Fix the sequence to clear the IRQ status

The recommended way to clear the GPIO IRQ status is to:

- Enable the IRQ
- clear the status

If this above sequence is not followed, i.e., if the status
is cleared after disabling the IRQ then sWAKEUP will not be
cleared and gates the module transition.

Change-Id: I8bd1b820ac8be70530cd6430f26ce541bfd3f9d9
Signed-off-by: Huzefa Kankroliwala <huzefank@ti.com>
Signed-off-by: Girish S G <girishsg@ti.com>
Signed-off-by: Andrii Anisov <andrii.anisov@ti.com>
OMAP3: abort suspend if omap2_gpio_prepare_for_idle() reports failure

Otherwise, since d40caba... ("ARM: omap4: gpio: abort suspend if a level
wake interrupt is pending") and 05647ea... ("OMAP3: PM: Fix compile
after gpio wakeup API change"), we end up going into suspend with GPIOs
in an inconsistent state.
Update arch/arm/boot/compressed/.gitignore for XZ compression changes

These were part of the upstream patch a7f464f... ("ARM: 7001/2: Wire up
support for the XZ decompressor"), but somehow didn't make it into our
kernel.