SDIO: Add support for CCCR version 3.0 and SDIO revision 3.0

Add CCCR structure version 3 define in sdio.h and using it for check
in API sdio_read_cccr

Also added SDIO Revision number 3.0 in sdio.h which is referenced by the TI WiLink driver

Change-Id: I309439a00d67b1ca97b11c332bc0ca5a54415356
Signed-off-by: Pradeep Gurumath <pradeepgurumath@ti.com>
Signed-off-by: Panduranga Mallireddy <panduranga_mallireddy@ti.com>
DRIVERS: MISC: move DC from misc to thermal_framework

We have special place for thermal framework. Duty cycle was placed
to separate place. The patch moves DC to thermal_framework place.

Change-Id: Id1e85d853df2fbbd597a5dd87e658fce58e4ae24
Signed-off-by: Eugen Mandrenko <ievgen.mandrenko@ti.com>

Conflicts:
	drivers/misc/Makefile
Thermal Governor: Added duty cycle governor

Add the OMAP duty cycle governor to the thermal framework.
This component will impose the policy for the PCB temp
sensor in case ondie sensor is absent.

Change-Id: I05f7272445567cf74be6f0932d7024f0d9d34dee
Signed-off-by: Eugen Mandrenko <ievgen.mandrenko@ti.com>

Conflicts:
	arch/arm/mach-omap2/board-4430sdp.c
DRIVERS: MISC: change the DC cpufreq control to TF control

Duty cycle uses sys fs to control cpufreq. It is not safe.
The user(overclocker) can burn the device using simple script that
changes max_frequency. The thermal framework has own mechanism for
this and the patch changes the duty cycle mechanism to thermal
framework variant of cpufreq control.

Change-Id: Ifc0f8b81addb7524eb67d116e4780978739a67f3
Signed-off-by: Eugen Mandrenko <ievgen.mandrenko@ti.com>

Conflicts:
	arch/arm/mach-omap2/omap2plus-cpufreq.c
gccore : disable suspend/resume

Change-Id: Id4517f327358294770b63319ce98a6a01a158997
Signed-off-by: Dima Svetlov <svetlov@ti.com>
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
gccore: move clk structure acquisition to gccore init

find_context isn't an appropriate place to acquire the clk struct for
the bb2d functional clock. Move this to the init function.

This also performs a clk_put() in the __exit of gccore and ensures
that no action is taken at exit for 4470.

Change-Id: I08f9eec9ef0631a784495291de405fc327b41035
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
gccore: have gc_set_power disable clocks last

Change-Id: Iaae49adb95ba79856ff33755c951e2066ae4349f
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
gccore: don't turn on clocks to program mmu

This is a reduction of the original patch to attempt to safely
handle enter OFF mode via a suspend handler.

reset mmu after function clock disabled

Currently the suspend handler is disabled but we have the
functionality to reset the MMU here.

Change-Id: I8322aefa9d2b561596d33fc69b8e0725a0fafb3f
Signed-off-by: Alexei Shlychkov <ashlychkov@vivantecorp.com>
Signed-off-by: David Sin <davidsin@ti.com>
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
[gcx] Remove unused duplicate copy of gcreg.h

Change-Id: I7662d3dd7435e8b399f93556410ed649238626ae
Signed-off-by: Craig Stout <craig.stout@ti.com>
GPS: GPS Char Driver for Texas Instrument's Connectivity Chip.

This enables the GPS driver for TI BT/FM/GPS combo devices.
It will provide a character device for the TI GPS host software to
access the GPS core.

Change-Id: I7ee0c058a649d19f83e603db89961b5daca26b33
Signed-off-by: Satish Chandra <x0141690@ti.com>
RTC: twl6030: correct usage of static register while reading RTC

RTC stores time and date in several registers. Due to the fact that
these registers can't be read momentary there is a chance that reading
from counting registers gives an error of one minute, one hour,
one day, etc. To address the issue the RTC has hardware that can copy
the counting registers to static shadowed registers. However, while
re-using driver code for twl6030, the feature wasn't correctly
implemented. So wrong time was read one - two times per 300000 readings.
This patch corrects usage of RTC registers for twl6030.

Change-Id: Iab1a9afd381e2a3de3b6b381ebf9bb8b798a6e18
Signed-off-by: Konstantin Shlyakhovoy <x0155534@ti.com>
OMAP4: Regulator: Correct LDOs state in STATE_MEM

All regulators have state_mem settings with flags 'enabled'
and 'disabled'. If both flags have the same value (true or
false) LDOs have incorrect setting and there are some
warnings before entering the device to the sleep-mode.
This patch correct settings for the LDO6, LDOLN and SYSEN
for the TWL6032.

Change-Id: I50b29ae503954826363279225b13967139106507
Signed-off-by: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@ti.com>
OMAPDSS:DSS: Add write back support.

Port write back support from 2.6.35.

Support for mem2mem mode with overlay/mgr as
input will be added later.

Change-Id: I17efea1d9897f8f9cd2ed8f9623198e0a63c8fba
Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Rohit Choraria <rohitkc@ti.com>
Signed-off-by: Sreenidhi Koti <sreenidhi@ti.com>
OMAPDSS:DSSCOMP: Support for WB capture mode

Implementation of WB capture mode (i.e. output of
overlay manager captured using WB) added. The support
for WB mem2mem mode to be added later.

Change-Id: Ibf3c07770e22638284da8844894fbe2266a2a249
Signed-off-by: Rohit Choraria <rohitkc@ti.com>
omap: remoteproc: correct the rproc data for dsp clkdm

The clock domain name used for dsp in remoteproc data does
not match the one used in the OMAP4 clock data files. The
clkdm field in the rproc data has been updated to use the
correct name for OMAP4.

Change-Id: Ic48f04b36ed8ef1f07eeb0de5902611348c347c2
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
omap: remoteproc: set the load boot address in activate function

This is needed because the register holding the boot address may
lose context if a deep c-state is reached (either during Device
OFF or during suspend) by the power domain where the register
resides.

Save the extracted bootaddr and then populate the boot address
register before taking the remoteproc out of reset in the activate
function to cover both rproc_start and resume paths.

Change-Id: I0ab3a70268877bcf55d053c9144e3fb834b58939
Signed-off-by: Miguel Vadillo <vadillo@ti.com>
rpmsg: omx: use different name for each rproc in device id_table

The rpmsg omx driver currently uses the same name to match a
device during its probe. The cdevs exposed by the driver are
simply created sequentially in the prone based on the discovery
of each device. The devices can be created in a random order
when multiple remote processors are involved, and is merely a
factor of when the remote processor has come up and published
its OMX service.

Userspace is assuming that the second cdev registered is always
for ipu_c1 (/dev/rpmsg-omx1). This is valid only as long as
ipu is the only remote processor being used. ipu_c1 always gets
created second today due to the boot-up sequence of the ipu
cores and the images they are executing, but this may not be
valid always. When dsp is being used, the rpmsg channel devices
for dsp and ipu can be created in any order. This would break
any existing userspace libraries/applications that may be
communicating with different remote processors.

The device id table is updated now to match specific names to
specific processors, so that they always remain the same
irrespective of the boot sequence.
 "rpmsg-omx0"    ipu_c0
 "rpmsg-omx1"    ipu_c1
 "rpmsg-omx2"    dsp

Change-Id: Ia75f944c87b6dffa982ee208dcaadb48f79da42a
Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Thermal Governor: OMAP4: cancel work task while suspending.

Cancel work task while going to suspend and re-schedule after
resume.

Fixes:
	[  331.767303] CPU1: shutdown
	[  331.768310] Resume caused by I/O pad:
	CONTROL_PADCONF_WAKEUPEVENT_4[2]
	[  331.768310]    PD_CORE curr=ON prev=ON logic=ON
	[  331.768310]    PD_L4_PER curr=ON prev=ON logic=ON
	[  331.768310]          I2C1 mode=ENABLED idlest=ON

Change-Id: Ie69f404305e678e93c7b32ddff6ca536b0c9eed3
Tested-by: Ramajayam S <ramajayam.samudi@ti.com>
Signed-off-by: Ambresh K <ambresh@ti.com>
TI Thermal Governor: Updated the parameters for OMAP hot spot extrapolation

Due to a different OMAP die size between OMAP4460 and OMAP4470, the parameters
used to extrapolate the hot spot temperature from
the on-die sensor and the PCB sensor are different between 4460 and 4470.
When running thermal simulations, it appears that current parameters used on
OMAP4460 are not optimal.

This patch adds the capability to select the slope/const parameters according
to the OMAP44xx silicon revision and aligns these parameters with latest thermal
simulations (28th March 2012).

Change-Id: I828291504f6a23a1640c589af2d4913cf00f9745
Signed-off-by: Sebastien Sabatier <s-sabatier1@ti.com>
OMAP4: USB: Update EHCI TLL errata i640

The workaround for EHCI TLL i640 errata has a critical timing window between
clearing the FPR bit in the PORTSC register and cutting the TLL clock. The
register writes to clear the FPR bit and cut the TLL clock need to occur in
back to back instructions otherwise we could still experience a disconnect
as described in the original errata. The ehci_writel function will cause a
L2 cache flush and so when compile takes multiple instructions. Instead of
using ehci_writel use __raw_readl.

Change-Id: Iaacf6987e37a1096b9d1c59fb3e71eb0f1c7aac3
Signed-off-by: Jon Hunter <jon-hunter@ti.com>