OMAP4+: Add ability to store reboot reason

Bootloaders need to know when their platforms do a reboot.
The only memory that is retained is SAR ram accross reboots,
provide ability to store the reboot reason in a standard location
in the SAR memory (using the last 0xf bytes in SAR BANK1 ram).

This is now populated with the string "normal" if the reboot
is due to ordinary reboot commands, if the reboot reason is
for other reasons, such as bootloader or recovery as is the
case with Android systems, this stores the same.

NOTE: bootloader should be updated accordingly.

Change-Id: I32d05ef023682a1530b34315dac90fd97bed3265
Signed-off-by: Nishanth Menon <nm@ti.com>

Conflicts:
	arch/arm/mach-omap2/Kconfig
	arch/arm/mach-omap2/Makefile
USB: MUSB: Set USB charger in High impedence mode on VBUS

For DEVICE mode USB Electrical tests, this patch sets the
USB charger module in High impedence mode for VBUS. This
reduces the loading on VBUS and helps in passing the
EL8/9 USB Certification tests.

Change-Id: I808da4d57d42cb08f09ab235401fb2a1733d68e2
Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
usb: musb: Add HSET driver for Host certification

This patch adds the HSET(High Speed Electrical Testing)
driver that is needed to enumerate OPT(OTG Protocol Tester)
required to perform Embedded Host Electrical Tests for MUSB
Host certification of Blaze tablet.

Change-Id: Ie1ad7e6f86e0f5c3305702241ce36ce6bf5ace21
Signed-off-by: Gerard Cauvy <g-cauvy1@ti.com>
Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
omap4-hsmmc: Remove USBC1 PBIAS controls from MMC1

Remove OMAP4_USBC1_ICUSB_PWRDNZ_MASK during enable/disable
for MMC1_PBIAS and associated extended-drain MMC1 I/O cell.
This is in accordance with the control module programming
guide. This fixes a bug where if trying to use gpio_98
or gpio_99 and MMC1 at the same time, the GPIO signal will
be affected by a changing SDMMC1_VDDS

Change-Id: I21da39ba46c1b246e7c5288e5962ee0af094c683
Signed-off-by: Viswanath Puttagunta <vishp@ti.com>
omap4-hsmmc: MMC1 PBIAS handling after card power down

The MMC1 PBIAS and I/O Cells must be kept powered down
after turning the SDMMC1_VDDS down. Since cells are
already powered down before SDMMC1_VDDS is turned down,
we just need to keep the cells turned down.

Change-Id: I679efbc61a326f0793149e46fb131b2cfcdf8a6d
Signed-off-by: Viswanath Puttagunta <vishp@ti.com>
mmc: core: Kill block requests if card is removed

Kill block requests when the host knows that the card is
removed from the slot and is sure that subsequent requests
are bound to fail. Do this silently so that the block
layer doesn't output unnecessary error messages.

This patch implements suggestion from Adrian Hunter,
http://thread.gmane.org/gmane.linux.kernel.mmc/2714/focus=3474

Change-Id: I146299b4acbcce95f9cfac114ee3feb56d1a13bd
Signed-off-by: Sujit Reddy Thumma <sthumma <at> codeaurora.org>
Signed-off-by: David Taylor <x0158378@ti.com>
OMAP4: UART: Revert TX fifo level checking

Reverting the following patch since TX fifo data
size will be changed from 64 bytes to 16 bytes:

OMAP4: UART: HACK: Eliminated TX fifo level checking

Reverting the following patch to remove "HACK" from
the patch subject

OMAP4: UART: HACK: scr register usage added

Change-Id: I120faa4365ad85c94033b873b248d8cc88844f68
Signed-off-by: Leed Aguilar <leed.aguilar@ti.com>
Revert "tty: serial: omap-serial: fix tx fifo writes"

Fill the TX FIFO with 16 bytes instead of 64 bytes to avoid
FIFO overruns.

This reverts commit 56b0c634c4ca2dc8da7a159cc8db68c9d3652f82.
Signed-off-by: Leed Aguilar <leed.aguilar@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>
usb: gadget: android: Reset next_string_id before enable

Reset next_string_id to 0 before enabling the gadget driver. Otherwise,
after a large number of enable/disable cycles, bind will fail
because we cannot allocate new string ids. String ids cannot be larger
than 254 per USB spec.

Change-Id: I44f5fece45008b7a0a18c025d4eb5ce842585c28
Signed-off-by: Benoit Goby <benoit@android.com>
ASoC: OMAP ABE: Update ports in order to support 44.1 KHz

With new ABE release the driver can support now 44.1 on MM DL
and TONES DL port. For MM DL port a true interpolation is done.
For TONES DL the ratio 12/11 is used.

Change-Id: Ic433e1576e7c86b1477c1854816caf5cefdceeed
Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>
Signed-off-by: Chris Kelly <c-kelly@ti.com>
ASoC: McPDM: Update ABE OPP constraint for McPDM

With ABE release 09.50 both UL and DL task for McPDM are at OPP 25
So we just need to set the constrain to OPP 25 instead of 50.

Change-Id: Ic250678085d0b763993d3be8f540bc0cf836924e
Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>
Signed-off-by: Chris Kelly <c-kelly@ti.com>
OMAP4: UART: Add UART init at boot for DEBUG_LL on Tablet

Makes DEBUG_LL on OMAP4 recognize omap_tabletblaze machine.

Change-Id: I9c815703f81df9f6d13feaa17af4b85dad771cc9
Signed-off-by: Eduard Popkov <eduard.popkov@globallogic.com>
Signed-off-by: Taras Kondratiuk <taras@ti.com>

Conflicts:
	arch/arm/plat-omap/include/plat/uncompress.h
[Blaze] ASoC: OMAP4: Add SND_OMAP_SOC dependency for Blaze/Panda

Update Kconfig so Blaze/Panda depends on SND_OMAP_SOC.

Change-Id: Ia887cb567599f4c2ab18e01821d1c8edca886dcd
Signed-off-by: Chris Kelly <c-kelly@ti.com>
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
ASoC: SDP4430: Add Blaze Tablet mach to dependency list

Include Blaze Tablet machine to the dependency list for
SND_OMAP_SOC_SDP4430, since the SDP4430 machine driver also
supports Blaze Tablet boards.

Change-Id: I075f78f6637778262654fe07e5da2749a8674b1b
Signed-off-by: Misael Lopez Cruz <misael.lopez@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>
OMAP3: xSI: add RX/TX transfer ongoing function

New functions to check if HSI or SSI controller, port or channel has
a read or write pending.

Change-Id: Id0bad5e359de6aaeddc517d3d92d0db795d55cc1
Signed-off-by: Djamil Elaidi <d-elaidi@ti.com>
OMAP: DSS: Add device latency constraint

Request a latency constraint on PM framework for DSS before
cutting module clocks.
Release the request upon enabling the clocks.

Change-Id: If257218a3cb8c3ea0d8451421f87e0a9ba199bb5
Signed-off-by: Gilles-Arnaud Bleu-Laine <gilles@ti.com>

Conflicts:
	drivers/video/omap2/dss/dispc.c
OMAP4: SMC: Fix two compiler warnings in security/smc/tf_comm.c

security/smc/tf_comm.c: In function 'tf_fill_descriptor_table':
security/smc/tf_comm.c:835: warning: ISO C90 forbids mixed
	declarations and code
security/smc/tf_comm.c:918: warning: 'error' may be used uninitialized
	in this function
security/smc/tf_comm.c:645: note: 'error' was declared here

Moved declaration of "struct page *page" to beginning of functional block.

Ensure 'error' gets set correctly and never reports a false negative.

Change-Id: Icbb10298eb5da9b455ede587195a0a7a16feef13
Signed-off-by: Bryan Buckley <bryan.buckley@ti.com>
Revert "OMAP4: SMC: remove group id check within SMC driver"

This reverts commit ac5b3e5e80118f26c56d73b277f9c63c916f9a48.