OMAP4: EMIF: Add processing of memory overheating.

We need to turn the device off if memory is overheated.
This patch makes shutdown device if memory overheated in run-time
and makes reboot if memory overheated during booting.
In last case bootloader should process overheating

Change-Id: I28a0bfcd79a4018a628ffc099e3715b17b7034c1
Signed-off-by: Dan Murphy <dmurphy@ti.com>
ARM: OMAP4: Do not allow freq scaling when suspending

Do not allow the frequency to scale when trying to suspend

Change-Id: I9f3c8e99c36f1cf014cb9125c85530bc78038e4a
Signed-off-by: Dan Murphy <dmurphy@ti.com>
ARM: OMAP4: Don't allow CPU throttling until ready

Don't allow CPU temp throttling until absolutely ready

Change-Id: I0fac652ad531b2b49fabdccd9709aba11e68a145
Signed-off-by: Dan Murphy <dmurphy@ti.com>
OMAP4: SMC: Fix compiler warning for l4_secure_clkdm in omap4-common.c

arch/arm/mach-omap2/omap4-common.c:42: warning: 'l4_secure_clkdm'
	defined but not used

If SMC is defined, we use a different omap4_secure_dispatcher and
l4_secure_clkdm was being defined but not used in omap4-common.c. The
solution here is to wrap the declaration in same #ifdef as
omap4_secure_dispatcher.

Change-Id: Idd0a7c144c78f30d2ea7269390cad9112e218659
Signed-off-by: Bryan Buckley <bryan.buckley@ti.com>
OMAP4+: reboot-reason: handle wdt trigger

consider a scenario where one does a adb reboot-bootloader
the SAR memory is populated with "bootloader", and fastboot
reboot. If the bootloader does not cleanup the SAR memory
and a wdt triggers, the normal arch reset path is not
taken, instead bootloader will startup and detect the
previous string, which is wrong. kernel should be able
to recover as much as possible any miscoded bootloaders.

Change-Id: Icec723287415511b7733955c47f8931e0b43d3c5
Signed-off-by: Nishanth Menon <nm@ti.com>
OMAP4: PRM: fix RSTTIME and RSTST offsets

RSTTIME is offset 0x8 and RSTST is offset 0x04 for OMAP4430 and
OMAP4460.

Change-Id: I6626f4f0a5b1704b755181635d47a5eb5cbf6254
Signed-off-by: Nishanth Menon <nm@ti.com>
OMAP: uart: enable wer configuration per port

Moved the WER initalization from the omap_uart_idle_init() to
omap_serial_init_port().

Initialized the omap_serial_default_info.wer field with the
power on reset value of the wer i.e. 0x7f.

Initialize the port data wer from the default info wer value.

Deleted 2 board specific #defines namely
        OMAP4_UART_WER_MOD_WKUP
        OMAP2_UART_WER_MOD_WKUP

Change-Id: I4980617df5b4ceb65487c3be4861a7d5fd59ae9e
Signed-off-by: Ruchika Kharwar <ruchika@ti.com>
OMAP4: USB: Fixed tshut reboot issue

Wakeup enable was set for usbb1_ulpitll_dir.usbb1_ulpiphy_dir. This is also
muxed with gpio 86. When a wakeup event was detected as part of the
gpio runtime resume, it set the gpio 86 event causing a tshut irq event.
We now rely on the wakeup from pin usbb1_ulpitll_dat0.usbb1_ulpiphy_dat0 for
USB wakeup events.

Change-Id: Ic32a976118944e45b91c0bdce6099ab090da3ae7
Signed-off-by: Huzefa Kankroliwala <huzefank@ti.com>
Signed-off-by: Ruchika Kharwar <ruchika@ti.com>
OMAP4: early mux initialization for EHCI

after adapting to hwmod mux framework, devices connected to the EHCI port
is not getting detected randomly. This patch does early initialization
of mux settings to get EHCI working properly.

Change-Id: I3277ff9db723a80ea1a1b986d06f783613217686
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
plat-omap: mcbsp: Move WAKEUPEN configuration to omap_mcbsp_config

Configure the WAKEUPEN register at the same time we configure the rest of
the McBSP registers.
In case of OMAP2+, if the sysclock has been reconfigured we are going to
disable McBSP for the duration of the clock change, which will reset the
McBSP registers. The WAKEUPEN register need to be configured later, so
the changes will be effective during runtime.

Change-Id: I4085feb2c73a71856aaca47f3ecce06518ffb401
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
OMAP4: UART: scr register usage added

The SCR register is set to enable TX interrupts only
when the FIFO is empty. This prevents a large number
of spurious interrupts.

Change-Id: I730a1ccb56c7d43dbae45bcd5226587d8d29863f
Signed-off-by: Ruchika Kharwar <ruchika@ti.com>
omap: uart: wer restoration

The WER value for a uart port is restored properly in
either case
Case 1:
The port is started, the device enters off mode and
resumes. In this case wer is restored with the
intended board defined value.

Case 2:
The port is started, shutdown, the device enters off
mode and resumes. In this case wer is restored with zero.
This prevents events from being registered in the uart
hardware which will not be handled by a port that is not
started in software.

Change-Id: I5dd426b2cdb8925404f6ba7fc83569b49bda1695
Signed-off-by: Ruchika Kharwar <ruchika@ti.com>
Serial: OMAP: external API to control uart

Add external API to control UART from client devices.
This API can be used by any external client
peripherals connected to uart to wakeup uart.

Change-Id: Ibcc55553d3976ea3bde93175e2af918a9d5ca5c3
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
[Tablet2] Add OMAP_BLAZE mach type

Add the OMAP_BLAZE machine type.  This is reserved in
the arm community already.

Change-Id: I04635c7e68c7ec44acc10e68ac46e3bbc3bc87f2
Signed-off-by: Dan Murphy <dmurphy@ti.com>