ASoC: OMAP ABE: Fix TONES_DL 44.1kHz task settings

Back port of change-id: I0361bc6a1ae2bbc4fa0155e92c9d9c21cff7dfea

C_ABE_FW_TASK_IO_TONES_DL task wasn't scheduled for TONES_DL port at
44.1kHz which introduced noise.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Change-Id: I8972f1dd4524fe04a522fff4d5928886a8f94ad3
usb: omap4: add HSIC support

The OMAP4 HS USB host subsystem supports the configurations
with two HSIC interfaces. This patch adds the ability
to use both of them

Change-Id: I95478563e07bba6811fed56abe442e640ccd71e4
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
Revert "HACK: fix ehci suspend/resume failure"

This reverts commit 4288c066b40204f8b3b09e5b8c9c2754ce92c5d9.

Conflicts:

	drivers/usb/host/ehci-hub.c

Revert this hack for implementing new SW WA in correct place

Change-Id: I958271dfb454801437065299977228be76d0b956
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
usb: ehci-omap: reimplement workaround for errata i693

The OMAP4 EHCI controller has the following defect (errata ID i693):

Title:
	USB HOST EHCI - Port Resume Fails On Second Resume Iteration

Description:
	When entering USB suspend mode, the EHCI will automatically
	ask the PHY to enter low power mode (PHY function control
	register bit suspendM is reset).
	The PHY will then cut the ULPI_CLK after a minimum of 5
	clock cycles.(no maximum specified). On the other hand,
	the EHCI embeds a counter counting up to 18 before cutting
	the internal clock after suspend signal is asserted. Since
	the PHY cuts the clock prematurely, the counter is not
	reaching 18. However, the first suspend and resume will work
	correctly. At the second suspend sequence, since the counter
	has maintained the value (thanks to retention flops),
	the counter reaches 18 and cuts the clock internally.
	As a consequence, the internal state machine does not
	transition to the correct state causing the next resume to fail.
	Both host initiated resume and remote wakeup are impacted
	by this issue.

Workaround
	After setting the suspend bit, switch the internal clock
	supply from the external ULPI_CLK provided by the PHY to
	the internal 60 MHz clock. This will allow the internal
	counter to reach 18. Then after 1ms, switch back to
	the external ULPI_CLK. This switch can be done thanks
	to the CM_L3INIT_HSUSBHOST_CLKCTRL[25:24]:CLKSEL_UTMI_P1/2 bits.
	During the application of the WA, the
	CM_L3INIT_HSUSBHOST_CLKCTRL[9:8]OPTFCLKEN_UTMI_P1/2_CLK
	optional clocks need to be enabled.

All OMAP4430 devices are impacted.

Change-Id: Ifb127cf86a8aeaa10a996403cf8f4e2a68d1ab23
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
gpio/omap: fix _set_gpio_irqenable implementation

This function should be capable of both enabling and disabling interrupts
based upon the *enable* parameter. Right now the function only enables
the interrupt and *enable* is not used at all. So add the interrupt
disable capability also using the parameter.

Change-Id: I9b902184cabe8990205c9d488d261d79a84b94d4
Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
usb: core: add disconnect-reconnect functionality

Added sysfs entries and related functions for
handling disconnet-reconnect from userspace

Change-Id: Ief2a286085b0132ee74ca717d0b13d945dda4abb
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
Revert "OMAP4: early mux initialization for EHCI"

This reverts commit 5a2e0ba0863d099bbb454a303e8927b54d4f22bf.

Reverted commit does USB Host muxes initialization too early.
In case of HSIC connection, this generates IDLE state on the
line before USB Host initialization. But HSIC Device generates
CONNECT on the bus as soon as detects IDLE. However, since USB Host
is initialized later, it misses this event.

Change-Id: I90219bce6d55bc828ea5b76f6cf9efa272f28e0b
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
mfd: omap: remove hardcoding in usbhs

Change-Id: If4b4b9365424282abb623329d094706a52bc777f
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
OMAPRPC: Updates to OMAPRPC from 3.4 Kernel tree changes.

This patch contains fixes from
* lindent
* checkPatch
* sparse
* comments from 3.4 fixes in offline email
* moved code from drivers/staging/omaprpc to drivers/rpmsg/omaprpc
* Fixes for offset length checking in ION case
* made debugging verboseness switchable from kernel boot args if supplied.

An RPMSG driver that exposes the Remote Procedure Call API to
user space, in order to allow applications to distribute
remote calls to more power-efficient remote processors on OMAP systems.
Like DOMX it uses the existing RPMSG driver.
Used for Distributed Vision Processing.

3.4 branch commit : 34b5939f30e1d5c0c0f2742b4a080b700d01df6f

Change-Id: Ib428e7a346ce11db371b578a2ff41239db7db483
Signed-off-by: Erik Rainey <erik.rainey@ti.com>
Enable the ARM security extension when compiling some files

Change-Id: I5704b5b0edc55b66d4917352198d921f246ad404
Signed-off-by: Jason Simmons <jsimmons@google.com>
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
Net: Initialize link state at boot

I noticed a problem where the SMC95xx was reporting the wrong link
state via netlink on boot.  With no cable attached (and thus no link),
it would still report that there was a link present.  I believe this is
because of how netdevice no carrier is defined (it's a bit in the state
member called __LINK_STATE_NOCARRIER and is initially set to 0 by a
memset/kzalloc of the struct).  Nothing sets this flag currently until
a link_reset() is called (on plug) so the initial state is left wrong.

I added a call to mii_check_media() (what link_reset() does to set
carrier state) in the bind() routine to initialize the link state.
Tests shows this corrects the problem.

Change-Id: I4ffb350a9a75ef4385469ab2fde61502dcf80107
Signed-off-by: Mike J. Chen <mjchen@google.com>
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
Fix mach-omap2/omap-iommu.c to prevent NULL pointer deref and fix a warning.

Change-Id: Iee7790cd529d8823b8c0606a3e4e614e94df0a77
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
ARM: omap2: Fix compile error on pm34xx.c

Recently, a call to omap_pm_apply_min_bus_tput was added to
pm34xx.c.  This caused the following compile error:
  arch/arm/mach-omap2/pm34xx.c: In function 'omap3_pm_init':
  arch/arm/mach-omap2/pm34xx.c:926: error: implicit declaration of function 'omap_pm_apply_min_bus_tput'

Adding an include of plat/omap-pm.h fixes this.

Change-Id: Ia12054a1fb32ef007ab2470f42e19e190c726ee0
Signed-off-by: Scott Anderson <saa@google.com>
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
ARM: omap2: fiq_debugger: ifdef local_timer_irqs in dump_irqs()

The local_timer_irqs field is surrounded by #ifdef
CONFIG_LOCAL_TIMERS in the irq_cpustat_t structure.  Do the same
for its usage in dump_irqs() so fiq_debugger can compile on
non-SMP systems.

Change-Id: Ie212d39b8c705f6815e00d86569bdb92b0c1e4c1
Signed-off-by: Scott Anderson <saa@google.com>
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
OMAP: DMA: Set thread reservation for high-priority channels

Reserve one thread for write and one for read for high-priority
channels. This configuration helps latency critical synchronized
transfers: memory-peripheral and/or peripheral-memory.

Change-Id: Ib8ecf32db126937820b1da04b183568c44143d64
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: John Grossman <johngro@google.com>
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
bcmdhd/include/linuxver.h used semaphores but didn't include header.

Change-Id: Iacab8c5d538849b46d3b906de93a2762173a427a
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
ARM: OMAP: USB: Fix compiler warnings

Change-Id: I871e4429da55cfc79a6e1b01ffc1029032c14ef9
Signed-off-by: Mike J. Chen <mjchen@google.com>
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
OMAPRPC: Ask tiler for pa in buffer lookups

For buffer lookups where no valid handle is available
(either PVR or ion) ask tiler for the physical address
in case there are valid virtual maps for the virtual
address in question.

Change-Id: I7f5d47223a38bef96e2d4aaf52534e6fc7e8f743
Signed-off-by: Alberto Aguirre <a-aguirre@ti.com>
[OMAPRPC] Fix locking mutex twice

Fix calling mutex_lock twice.

Change-Id: I687c2785a6ffc00428bc3975a9bd637df36de8b0
Signed-off-by: Alberto Aguirre <a-aguirre@ti.com>
rpmsg: omaprpc: Fix omaprpc_release hang

omaprpc_release can hang due to an uninterruptible
wait for an ack from the remote core.

Change wait to be interruptible.

Change-Id: Iaf449119b5525db131c536434c84ea296f6e8a95
Signed-off-by: Alberto Aguirre <a-aguirre@ti.com>