Merge branch 'platform-ti-linux-3.14.y' into pm-ti-linux-3.14.y

Conflicts:
	arch/arm/boot/dts/dra72x.dtsi
	arch/arm/boot/dts/dra74x.dtsi

Signed-off-by: Tero Kristo <t-kristo@ti.com>
ARM: OMAP2+: AM43XX: Add PRCM int16 as the wake up source

Add PRCM int16 as the wake up source.

Signed-off-by: Keerthy <j-keerthy@ti.com>
ARM: OMAP4+: PRM: fix omap4 version of prm_save_and_clear_irqen

This was incorrectly saving the irq status registers, instead of the
irq enable.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
ARM: OMAP4: PRM: Add nr_irqs check to extend support to single core SOCs.

Add nr_irqs check to extend support to single core SOCs.

Signed-off-by: Keerthy <j-keerthy@ti.com>
ARM: OMAP4: PRM: Remove hardcoding of PRM_IO_PMCTRL_OFFSET register

PRM_IO_PMCTRL_OFFSET need not be same for all SOCs hence
remove hardcoding and use the value provided by the omap_prcm_irq_setup
structure.

Signed-off-by: Keerthy <j-keerthy@ti.com>
ARM: AM43XX: PRM: Add IO Wake up support

Add IO wake up support. The patch reuses the omap4 based
IO wake up support and enables the same on AM43XX.

Signed-off-by: Keerthy <j-keerthy@ti.com>
ARM: OMAP2: sleep43xx: Use correct address for MPU Clockdomain

Patch 95306a5: ARM: OMAP2: sleep43xx: Set MPU Clockdomain to HW_AUTO
after suspend attempted to set MPU clockdomain to HW_AUTO but was
writing to the virtual address rather than physical address after
resume. Correct code to use physical address as the MMU has not yet been
turned on.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
remoteproc: wkup_m3_rproc: Move aux_data region

Move auxdata region in wkup_m3 dmem to take over first 0x100 bytes of
logbuf region. Otherwise i2c sequences get overwritten occasionally.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
cpufreq: cpufreq-cpu0: Use cpufreq_generic_suspend()

Use suspend support present in cpufreq core to set suspend frequency
and configure suspend frequency to first defined OPP.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
ARM: OMAP2: pm33xx: Fix race condition between cpuidle and suspend

CPUIdle does not get disabled until noirq suspend, but am33xx_pm_enter
is called early in the suspend sequence, which configures the wkup_m3
for deep sleep before waiting for the m3_irq2 interrupt. On AM43xx, this
interrupt is triggerred by a WFI instruction with MPU clockdomain set to
HW_AUTO and SCU set to low power state, which is the same condition present
in cpuidle state.

If system attempts to enter cpuidle c-state during
suspend path (happens very rarely) the system will hang because it will
gate the MPU clock and pass control to wkup_m3 which attempts to put
system in DeepSleep when it is not actually prepared.

By using cpu_idle_poll_ctrl we can prevent cpuidle from entering
c-states during the suspend path and prevent this hang. Also useful on
AM33xx to prevent suspend from failing without a hang due to cpuidle
reconfiguring the wkup_m3 during suspend for mpu pll bypass only rather
than deep sleep.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
ARM: OMAP2: pm33xx: Bump firmware version requirement to 0x189

Bump pm firmware minimum version requirement to 0x189 to include support
for wkup_m3_rproc auxdata and IO daisy chain wake.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
HACK: ARM: DRA7: PM: Disable CPUIDLE

NOTE: We will not support CPUIDLE for DRA7 for the current release.

It does seem that allowing MPU to hit CSWR in the middle of active
usecase causes DSS to generate underflows, Audio to generate glitches.

Initially, it was suspected to be 'CDDS: OMAP5430-2.0BUG00954'
(OMAPS00292300)
Description:
(note: this is regularization of a problem open since 29-Jun-12)
We are observing that when we enabled cpuidle (where MPU can hit
CSWR state), we are observing DSS FIFO underflow error. After some
debugging we found that if we enable DSS->EMIF static dependency
(OR disable emif HW_AUTO), we no longer see this issue. This is a
temporary hack to work around the problem and definitely cannot be a
solution.

WA:
At OPP_NOM use fast_lock=0 and keep MDLL clock always on (clock gating
disabled)

But, it was quickly determined that even after deny_idle of EMIF or
applying DSS to EMIF static dependency, this issue is not resolved.

Further, on J6eco: Why does hitting the 0x4d000000 address range on
j6eco appears to clean the underflows up? We dont have clear answers or
a root cause yet.

So, disabling CPU_IDLE for now. revert this hack after rootcause. Also
note a related side effect of not having CPUIDLE is marked here:
http://marc.info/?l=linux-omap&m=141046424815199&w=2
Which is also valid for DRA7 and OMAP5 and is under investigation.

See bugs: D-01233, D-01739  s/w discussions.

Signed-off-by: Nishanth Menon <nm@ti.com>
ARM: AM43xx: PM: save and restore some misc PRM registers during rtc-only

Save/restore of these registers is needed so that certain features
like PRCM io-chain will still function properly after rtc-only mode.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Merge branch 'pm-ti-linux-3.14.y' of git://git.ti.com/~kristo/ti-linux-kernel/pm-linux-feature-tree into ti-linux-3.14.y

TI-Feature: power_management_base
TI-Tree: git://git.ti.com/~kristo/ti-linux-kernel/pm-linux-feature-tree.git
TI-Branch: pm-ti-linux-3.14.y

* 'pm-ti-linux-3.14.y' of git://git.ti.com/~kristo/ti-linux-kernel/pm-linux-feature-tree:
  ARM: AM43xx: PM: save and restore some misc PRM registers during rtc-only
  HACK: ARM: DRA7: PM: Disable CPUIDLE
  ARM: OMAP2: pm33xx: Bump firmware version requirement to 0x189
  ARM: OMAP2: pm33xx: Fix race condition between cpuidle and suspend
  cpufreq: cpufreq-cpu0: Use cpufreq_generic_suspend()
  remoteproc: wkup_m3_rproc: Move aux_data region
  ARM: OMAP2: sleep43xx: Use correct address for MPU Clockdomain
  ARM: AM43XX: PRM: Add IO Wake up support
  ARM: OMAP4: PRM: Remove hardcoding of PRM_IO_PMCTRL_OFFSET register
  ARM: OMAP4: PRM: Add nr_irqs check to extend support to single core SOCs.
  ARM: OMAP4+: PRM: fix omap4 version of prm_save_and_clear_irqen
  ARM: OMAP2+: AM43XX: Add PRCM int16 as the wake up source

Conflicts:
	arch/arm/boot/dts/dra72x.dtsi
	arch/arm/boot/dts/dra74x.dtsi
	arch/arm/mach-omap2/prcm43xx.h

Signed-off-by: Dan Murphy <DMurphy@ti.com>