i2c: use usleep_range to wait instead of msleep

according to the docs msleep(1) means wait up 20ms. i2c bus probably
doesn't need to wait that long. Potential performance boost.

Conflicts:

	drivers/i2c/busses/i2c-omap.c
I2C: OMAP: NACK without STP

On OMAP4 OMAP_I2C_STAT_NACK is causing a timeout on the next access.
The isr cleans all flags in OMAP_I2C_CON_REG by setting OMAP_I2C_CON_STP
OMAP_I2C_CON_STP is also set in omap_i2c_xfer_msg on the last message.

According to the TI TSR the sequence for OMAP_I2C_STAT_NACK and
OMAP_I2C_STAT_AL are nearly the same.
Removing the OMAP_I2C_CON_STP part in the isr fix the problem.
Tested on OMAP4430 and OMAP3530 (here NACK was not a problem)
Fixes also booting on 2430sdp.

[Picked from http://patches.linaro.org/1899/]

Change-Id: I9bdeba8853ced27659770ad9390bd1b4be573155
Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
OMAP4: correct CPU Idle settings for exit latency and thresholds

------------------------------------------------------------------------------------
Cstates					exit_latency	thresholds
OMAP4430	CPUs	MPU	Core		us		us	SystemClock
------------------------------------------------------------------------------------
C1		WFI	ON	ON		4		4		ON
------------------------------------------------------------------------------------
C2		OFF	INA	INA		300		300		ON
------------------------------------------------------------------------------------
C3		OFF	CSWR	OSWR		5000		10000		OFF
------------------------------------------------------------------------------------
C4		OFF	OSWR	OSWR		5200		35000		OFF
------------------------------------------------------------------------------------

------------------------------------------------------------------------------------
Cstates					exit_latency	thresholds
OMAP4460	CPUs	MPU	Core		us		us	SystemClock
------------------------------------------------------------------------------------
C1		WFI	ON	ON		4		4		ON
------------------------------------------------------------------------------------
C2		OFF	INA	INA		300		1800		ON
------------------------------------------------------------------------------------
C3		OFF	CSWR	OSWR		4000		4000		OFF
------------------------------------------------------------------------------------
C4		OFF	OSWR	OSWR		4200		4200		OFF
------------------------------------------------------------------------------------

------------------------------------------------------------------------------------
Cstates					exit_latency	thresholds
OMAP4470	CPUs	MPU	Core		us		us	SystemClock
------------------------------------------------------------------------------------
C1		WFI	ON	ON		4		4		ON
------------------------------------------------------------------------------------
C2		OFF	INA	INA		500		1200		ON
------------------------------------------------------------------------------------
C3		OFF	CSWR	OSWR		5300		5300		OFF
------------------------------------------------------------------------------------
C4		OFF	OSWR	OSWR		5500		15000		OFF
------------------------------------------------------------------------------------

Change-Id: I6f9046db4273b10cecd7bf896c1a8488774e0d5b
Signed-off-by: Andrii Tseglytskyi <andrii.tseglytskyi@ti.com>

Patch Set 3

Conflicts:

	arch/arm/mach-omap2/cpuidle44xx.c
arm: vfp: Fix memory corruption on PM suspend

Commit 36af2a47 ("ARM: vfp: Always save VFP state in vfp_pm_suspend")
introduced a potential use-after-free bug. On SMP systems,
vfp_current_hw_state might hold dangling pointers in case a task which
used the VFP last migrates to another CPU and then exits. If
vfp_pm_suspend is called while vfp_current_hw_state still holds a
pointer to the freed thread_info, that memory location will be written,
potentially overwriting a new object allocated there.

The original problem is only relevant to UP systems in which the VFP
state is stored lazily.

Fix this by only storing the VFP state on UP systems, and avoid doing so
on SMP ones.

Change-Id: I8f7026eb735b340fcef4cf12fbd12b9a0ea08d3f
Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Colin Cross <ccross@android.com>
Fixed-dumb-conflict-introduced-by-faux123
Conflicts:

	arch/arm/vfp/vfpmodule.c
OMAPDSS: DSSCOMP: Fix klocworks errors

Change-Id: If2ed914c738e28c9b5b19b67353bd367d612e91b
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
net: wireless: bcmdhd: Fix division by 0 if dhd_watchdog_ms is 0

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
OMAPDSS: DISPC: Fix rounding error in scaling decision

When checking if we are downscaling by more than a factor,
we were dividing the source dimensions instead of multiplying
back the target dimensions.  This allowed downscaling by
slightly more than the max supported downscaling, resulting
in out-of-range register settings and ultimately SYNC_LOST.

Change-Id: Ic039789c5011d64da870121eeb227a803af1fa83
Signed-off-by: Lajos Molnar <lajos@ti.com>
OMAP4: PM: errata: Wkup clk recycling needed after warm reset.

As W/A the call to omap4_trigger_ioctrl() has been added
at PM initialization time for I/O pads daisy chain reseting.

TI EID: i612; IMPACTED: OMAP4430 all revisions

Change-Id: Ifff5cf4ed79e15bbeed97dd2b1cc7d7cf19d2387
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
OMAP4: PM: Add errata id for handling Errata i736

The errata handler is present in kernel 3.0. The patch adds the
Errata id for simplification of search in the kernel sources

Change-Id: I346ac0e1262fdb3fcfd1e38879619baa02ebf4cb
Signed-off-by: Eugen Mandrenko <ievgen.mandrenko@ti.com>
OMAP4: PM: Add errata id for handling Errata i745

The errata handler is present in kernel 3.0. The patch adds the
Errata id for simplification of search in the kernel sources

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

Conflicts:

	arch/arm/mach-omap2/pm44xx.c