slimlogic:omap4-android.git
6 years agoASoc: twl6040: enable FIR in EAR DAC
Francois Mazard [Fri, 24 Jun 2011 13:28:00 +0000 (15:28 +0200)]
ASoc: twl6040: enable FIR in EAR DAC

Change-Id: Ifc55ddbd7e870b02c4c1fa588098c98bd37e2be9
Signed-off-by: Francois Mazard <f-mazard@ti.com>
6 years agoASoC: twl6040: Add digital mute for Earpiece
Misael Lopez Cruz [Mon, 13 Jun 2011 07:46:38 +0000 (02:46 -0500)]
ASoC: twl6040: Add digital mute for Earpiece

Add digital mute for Earpiece output. It allows to set earpiece gain
to its min value when audio stream is closed and set it back to saved
gain when stream is preparing, in order to reduce pop noise.

Change-Id: I814c055d4288e10d983b8d9ae580f40bc8e69292
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
6 years agoASoC: twl6040: Apply mute per DAI
Misael Lopez Cruz [Mon, 13 Jun 2011 07:16:14 +0000 (02:16 -0500)]
ASoC: twl6040: Apply mute per DAI

Digital mute callback should distinguish between DAIs, otherwise
when multiple DAIs are used, muting one DAI could mute involuntarily
another DAI.

Change-Id: I73918921967d6f63c6f1e6e93164b211f3ac9e53
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
6 years agoOMAP4:STE: Remove pull-down on GPIO_92 (Modem SERVICEn)
Cedric Poignet [Mon, 9 May 2011 12:40:14 +0000 (14:40 +0200)]
OMAP4:STE: Remove pull-down on GPIO_92 (Modem SERVICEn)

Modem SERVICEn signal is now programmed to 0, as expected by the modem.
So a pull down is no longer necessary.

Change-Id: I188de4e096e54d4627de2f87cd5e8f207fb0e075
Signed-off-by: Cedric Poignet <c-poignet@ti.com>
6 years agoOMAP4:STE: Set SERVICEn and ONSWA signals at boot
Philippe Mazet [Mon, 7 Feb 2011 11:10:55 +0000 (12:10 +0100)]
OMAP4:STE: Set SERVICEn and ONSWA signals at boot

SERVICEn and ONSWA signals need to output a 0 level to allow a
clean STE M57xx boot.

The MID need to use these signals from user space after kernel
initialization.
GPIO API can't be used in this case because we need to keep it
requested to keep the GPIO at the requested value and as a
consequence it cannot be used later.

We need to use basic inl/outl macro to set register values.

Change-Id: Ic46cd46da2380c01640e732c84bc055c3faaee90
Signed-off-by: Cedric Poignet <c-poignet@ti.com>
Signed-off-by: Ruslan Bilovol <x0155540@ti.com>
6 years ago[OMAP] Add runtime check for the 4430 in the duty cycle
Dan Murphy [Wed, 29 Jun 2011 13:57:44 +0000 (08:57 -0500)]
[OMAP] Add runtime check for the 4430 in the duty cycle

Add a check for the omap4_duty_cycle to only init this module
for 4430 ICs.

This caused a regression on 4460.

Change-Id: I63b4161194b7e085caf79ea4a7d32c112d70e638
Signed-off-by: Dan Murphy <dmurphy@ti.com>
6 years agoOMAP4: HDMI S3D - Fix deadlock when enabling S3D mode.
Alberto Aguirre [Fri, 3 Jun 2011 01:09:05 +0000 (20:09 -0500)]
OMAP4: HDMI S3D - Fix deadlock when enabling S3D mode.

Fix deadlock due to double locking mutexes.

Change-Id: I05c1557d48670a90bd5ba68b178ae620148395c2
Signed-off-by: Alberto Aguirre <a-aguirre@ti.com>
6 years agoS3D V4L2: Do not return error when trying to disable alpha blender
Pavel Nedev [Thu, 9 Jun 2011 14:26:28 +0000 (17:26 +0300)]
S3D V4L2: Do not return error when trying to disable alpha blender

As alpha blender is made to be always enabled in manager.c for OMAP4
do not return error when trying to disable it but simply give warning.

Change-Id: Ide2e967f17316484592d72a4f1dc836e0eff476d
Signed-off-by: Pavel Nedev <pnedev@mm-sol.com>
6 years agoS3D V4L2: Window size setting fixes
Pavel Nedev [Thu, 9 Jun 2011 08:38:26 +0000 (11:38 +0300)]
S3D V4L2: Window size setting fixes

Display 3D mode switching is now possible only if streaming is disabled.
Window size is reset to display size when display is changed.
Display resolution is checked when switching 3D mode and if it has
changed the window size is reset to the new display size. Bug in window
size setting for OVER-UNDER and SIDE-BY-SIDE 3D display types is fixed.

Change-Id: I655d3bb995ecfa43604b2a1955f084449b90ab98
Signed-off-by: Pavel Nedev <pnedev@mm-sol.com>
6 years agoDSS: Several debug messages in overlay changed to error ones
Pavel Nedev [Thu, 9 Jun 2011 08:36:17 +0000 (11:36 +0300)]
DSS: Several debug messages in overlay changed to error ones

Change-Id: I8ae18a81a1ecb74b067cbb33986c42ec16abee57
Signed-off-by: Pavel Nedev <pnedev@mm-sol.com>
6 years agoS3D V4L2: Fixed problem with vidioc_qbuf()
Pavel Nedev [Thu, 26 May 2011 14:39:34 +0000 (17:39 +0300)]
S3D V4L2: Fixed problem with vidioc_qbuf()

The condition under which to give new buffer to the overlays
in vidioc_qbuf() is changed. The idea was to send buffer to
the overlays in case of manually updated display and empty
buffer queue. If s3d_overlay_isr() is triggered between the
condition check and actual sending of the new buffer this
decision might get compromised as the buffer queue status
might have changed.

Change-Id: I1413067c26a0e9e41402200731a3269821c4baf1
Signed-off-by: Pavel Nedev <pnedev@mm-sol.com>
6 years agoOMAP4: HSI: SW WA for HSR in dead state after SW reset with pending errors
Djamil Elaidi [Tue, 28 Jun 2011 09:25:12 +0000 (11:25 +0200)]
OMAP4: HSI: SW WA for HSR in dead state after SW reset with pending errors

SW WA for HSI-C1BUG00088 "OMAP4430 HSI : No recovery from SW reset
under specific circumstances"

Description of issue:
It seems that in certain cases after some errors are detected by
HSR (frame timeout and/or tailing bit error and/or overrun), writing
the SW reset bit (SYSCONFIG.SOFTERESET to 1) may put the HSI in a
"dead" state in which it does not answer anymore to L4 OCP commands.
It seems that in certain cases after some errors are detected by HSR
(frame timeout and/or tailing bit error and/or overrun), writing the
SW reset bit (SYSCONFIG.SOFTERESET to 1) may put the HSI in a "dead"
state in which it does not answer anymore to L4 OCP commands.

Workaround is:
* Set HSR_MODE_P1.MODE_VAL = sleep and HSR_MODE_P2.MODE_VAL = sleep
* Acknowledge all errors (do not care if there is any) by writing
  HSR_ERRORACK_P1 and HSR_ERRORACK_P2
* Set SW reset

HW fix will be available for OMAP5430

Other changes:
* Removed write to Read only register HSI_HSR_BREAK_REG

Change-Id: I023d0fc8656808a8c294d7cfaec1bf3cb46da93f
Signed-off-by: Djamil Elaidi <d-elaidi@ti.com>
6 years agoOMAP4 : DSSCOMP : (HACK) fixed kernel crash while entering suspend during video playback
Andrii Guriev [Wed, 29 Jun 2011 14:40:07 +0000 (17:40 +0300)]
OMAP4 : DSSCOMP : (HACK) fixed kernel crash while entering suspend during video playback

DSS enters suspend mode before the app. app still sends IOCTLs
DSSCOMP_SETUP_MGR, DSSCOMP_CHECK_OVL after the driver entered suspend mode.
This change fix the driver from executing these IOCTLs after it entered
suspend mode.

Change-Id: I6afe3a62a6d4017095eacdec7a161f6a7711e93a
Signed-off-by: Andrii Guriev <x0160204@ti.com>
6 years agoASoC: DMIC: Get PM resources during DMIC_CTRL access
Misael Lopez Cruz [Wed, 18 May 2011 22:00:44 +0000 (17:00 -0500)]
ASoC: DMIC: Get PM resources during DMIC_CTRL access

When disabling DMIC lines while request is ongoing, DMIC driver was
accessing DMIC_CTRL register without properly acquiring/releasing
PM resources. Adding corresponding PM runtime calls around this
section ensures that it's safe to access DMIC_CTRL register.

Change-Id: I8a0290b80506e00c79bf5a7a8c8860236b121948
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Axel Castaneda Gonzalez <x0055901@ti.com>
6 years agoOMAP4: clock: Keep GPMC clocks always enabled and hardware managed.
Santosh Shilimkar [Mon, 27 Jun 2011 23:30:26 +0000 (16:30 -0700)]
OMAP4: clock: Keep GPMC clocks always enabled and hardware managed.

On OMAP4, CPU accesses on unmapped addresses are redirected to GPMC by
L3 interconnect. Because of CPU speculative nature, such accesses are possible
which can lead to indirect access to GPMC and if it.s clock is not running,
it can result in hang/abort on the platform.

Above makes access to GPMC unpredictable during the execution, so it's
module mode needs to be kept under hardware control instead of software control.
Since the auto gating is supported for GPMC, there is't a power impact because
of this change.

The issue was un-covered with security middleware running along with HLOS.
In this case GPMC had a valid MMU descriptor on secure side where as HLOS
didn't map the GMPC because it isn't being used.

Change-Id: If1641d30d6ad4c4429b2a5a8c613853a4ed325c1
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Volodymyr Riazantsev <x0153367@ti.com>
6 years agoWorkaround: ASoC: ABE DSP: Always reload firmware during restoring context if CONFIG_...
Sergii Postulga [Thu, 23 Jun 2011 17:20:33 +0000 (20:20 +0300)]
Workaround: ASoC: ABE DSP: Always reload firmware during restoring context if CONFIG_PM_DEBUG defined.

This workaround fix crashes during starting Audio or Video recording.
It needed because in current implementation we have no way to get
right information about context/memory lost.

Change-Id: I45cabcbf3097d14f9a3b3b40f071978d260f8a5c
Signed-off-by: Sergii Postulga <x0153364@ti.com>
6 years agoOMAP4:PM:CPUIDLE enable all c-states by default
Volodymyr Riazantsev [Mon, 20 Jun 2011 18:11:12 +0000 (13:11 -0500)]
OMAP4:PM:CPUIDLE enable all c-states by default

Enabling all CPU c-states by default in idle path.

echo 1 > /sys/devices/system/cpu/cpu0/cpuidle/enable_state --> enables
echo 0 > /sys/devices/system/cpu/cpu0/cpuidle/enable_state --> disables

Change-Id: I0b64a1dce229063e86736cf60489850b1946c914
Signed-off-by: Volodymyr Riazantsev <x0153367@ti.com>
6 years agoOMAP4: HSI: SW WA for hardcoded wakeup dependency from HSI to DSP
Djamil Elaidi [Thu, 9 Jun 2011 18:11:48 +0000 (20:11 +0200)]
OMAP4: HSI: SW WA for hardcoded wakeup dependency from HSI to DSP

Due to HW bug, same SWakeup signal is used for both MPU and DSP. Thus Swakeup will
unexpectedly wakeup the DSP domain even if nothing runs on DSP.
Since MPU is faster to process SWakeup, it acknowledges the Swakeup to HSI before the DSP has completed its
domain transition. This leaves the DSP Power Domain in INTRANSITION state forever, and prevents the
DEVICE-OFF mode.

Workaround consists in :
when a SWakeup is asserted from HSI to MPU (and DSP) :
- force a DSP SW wakeup
- wait for DSP power domain to finish ongoing transition
- force a DSP SW sleep

Note : condition to detect that Swakeup is asserted to MPU/DSP :
HSI interrupt is received
AND
HSI module was previously IDLE

HW Bug ref is HSI-C1BUG00106 : dsp swakeup generated by HSI same as mpu swakeup

Change-Id: I1dba1f1ad04756f8b97b16f41a9691f644204abf
Signed-off-by: Djamil Elaidi <d-elaidi@ti.com>
6 years agowireless: Add WEXT_GEM configuration option
Vishal Mahaveer [Wed, 22 Jun 2011 19:43:43 +0000 (13:43 -0600)]
wireless: Add WEXT_GEM configuration option

Add WEXT_GEM configuration for supporting this feature
with MAC80211 solution on wl12xx.

Also, enable the feature in android_4430_defconfig.

Signed-off-by: Guy Eilam <guy@wizery.com>
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
Change-Id: I5c333fb39e3a7ccb944be03bb7d0e3672ce3d1cc
Signed-off-by: Ruslan Bilovol <x0155540@ti.com>
6 years agoSGX-KM: Add NV12/Tiler support for EGL Image External
Vasu Ramachandraiah [Thu, 9 Jun 2011 21:20:58 +0000 (16:20 -0500)]
SGX-KM: Add NV12/Tiler support for EGL Image External

This patch adds support to wrap NV12 Tiler buffer used for EGL Image External.
This patch needs Change-Id: I80fe1f3bf014ffbc94a07fd97f9836e20fe80930 which
increases SGX heap size.

Change-Id: Id0dcadca394fda2f9a657ac9ef89bd60d597d122
Signed-off-by: Vasu Ramachandraiah <vasu.rama@ti.com>
6 years agopanda_defconfig: Add CONFIG_TIWLAN_127x for selecting WL127x chip
Abhijit [Mon, 27 Jun 2011 05:47:24 +0000 (11:17 +0530)]
panda_defconfig: Add CONFIG_TIWLAN_127x for selecting WL127x chip

Defined the flag CONFIG_TIWLAN_127x which will select WL127x if the board
supports WL127x device.CONFIG_TIWLAN_127x should be set to y in specific
defconfig file.

Change-Id: If402d56203a80573f53c8626d4d3cbb1f0928111
Signed-off-by: Abhijit <x0112741@ti.com>
6 years agoradio: wl128x: Add support for FM TX RDS
Manjunatha Halli [Tue, 3 May 2011 12:39:58 +0000 (18:09 +0530)]
radio: wl128x: Add support for FM TX RDS

This patch adds the support for FM TX RDS through V4L2
extended ioctls. following are the features suported,
 1. Set FM TX Radio Text
 2. Set FM TX PS Name
 3. Set FM TX PTY

Also, this patch corrects the way set power level and
set preemphasis value ioctls are handled.

Change-Id: I2dfc18153b6ca12b3590326aacdd54e5d136f5d9
Signed-off-by: Manjunatha Halli <x0130808@ti.com>
6 years agoOMAP4: HSI: fix frame corruption due to race condition in mixed mode CPU copy/DMA
Djamil Elaidi [Wed, 25 May 2011 07:15:49 +0000 (09:15 +0200)]
OMAP4: HSI: fix frame corruption due to race condition in mixed mode CPU copy/DMA

A spurious phantom frame can be reported when the following use case occurs :
1) CPU copy
* hsi_read(1 frame) is requested, so RX interrupt is enabled
* one frame is received, RX interrupt is generated and interrupt handler is called
* before HSI RX interrupt handler (tasklet in fact) can disable the RX int, 3 other
frames are received and interrupt status bit is set
* HSI RX interrupt handler acknowledge the first frame read by clearing the status bit and disabling the interrupt
* status bit is immediatly set again because of pending frames in the FIFO
* At this point RX int is disabled, but status bit is set because there are 3 frames pending in the FIFO
2) DMA copy
* Later, a DMA is programmed to read the 3 frames, which are extracted from the FIFO
* At this point RX int is disabled, but status bit is still set but there are NO frames pending in the FIFO
3) CPU copy again
* hsi_read(1 frame) is requested, so RX interrupt is enabled
* as RX interrupt was already pending, RX interrupt is generated immediatly and interrupt handler is called
* but as no valid frame is in the FIFO, the HSI driver reports a garbage frame

Fix is:
When responding to a RX interrupt, always check the number of frames in the FIFO before reading the FIFO.
If there is no valid frame, then simply ack the interrupt and keep the RX int enable to allow another frame
to be received.

Change-Id: Id7e754a15635c17b02ed8863af903eddaf02c2e1
Signed-off-by: Djamil Elaidi <d-elaidi@ti.com>
6 years agoHSI: fix compilation error with HSI deactivated
Sebastien Jan [Thu, 23 Jun 2011 08:32:47 +0000 (10:32 +0200)]
HSI: fix compilation error with HSI deactivated

Change-Id: Iefe4e88033565c5aa181820b700ff8d182fc1c5f
Signed-off-by: Sebastien Jan <s-jan@ti.com>
6 years agoTSL2771 Driver:Proximity trigging lenght correction
Andrii Danylov [Tue, 21 Jun 2011 11:47:24 +0000 (14:47 +0300)]
TSL2771 Driver:Proximity trigging lenght correction

Change proximity trigging distance of about 3 cm.

Change-Id: I43aa68e8a3c12962b28413d29105826f311b01a9
Signed-off-by: Andrii Danylov <x0158318@ti.com>
6 years agoboard44xx_tablet.c: Increase USB OTG power.
Andrii Danylov [Tue, 21 Jun 2011 14:35:55 +0000 (17:35 +0300)]
board44xx_tablet.c: Increase USB OTG power.

TWL6030 perform 200mA instead of 100mA used before.

Change-Id: If92bea4be0b15bb5c27faee1855128cc0f9cf06f
Signed-off-by: Andrii Danylov <x0158318@ti.com>
6 years agoTWL:BATTERY:Stop USB power consumption when no battery/AC suppply
Moiz Sonasath [Wed, 15 Jun 2011 21:53:36 +0000 (16:53 -0500)]
TWL:BATTERY:Stop USB power consumption when no battery/AC suppply

This patch prevents the USB current consumption when there is
no battery or AC power-supply present. When no battery detected,
put teh USB in High Impedence (HZ) mode, This will allow the board
to power-off as per the USB power test for self-powered device.

Change-Id: I1c56b41b3c2fbf7ec2e45c1e56a8fb79b7633d09
Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
6 years agoUSB: MUSB: Ignore any SESSREQ interrupt if musb is B-device
Heikki Krogerus [Wed, 15 Jun 2011 21:38:27 +0000 (16:38 -0500)]
USB: MUSB: Ignore any SESSREQ interrupt if musb is B-device

This will ignore any SESSREQ interrupt if musb is B-device.
Charger detection may cause spurious SESSREQ interrupts.

Change-Id: Ib3aefa6fa15c57ea87b916335b925dbcdc8f94c5
Signed-off-by: Heikki Krogerus <ext-heikki.krogerus@xxxxxxxxx>
Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
6 years agoMUSB Charger Type Detection: Fix DCP detect during boot.
Viswanath Puttagunta [Wed, 15 Jun 2011 19:56:24 +0000 (14:56 -0500)]
MUSB Charger Type Detection: Fix DCP detect during boot.

For some reason, the charger detection mechanism
(Bit 30 of CONTROL_USB2PHYCORE) is getting
disabled during boot up if a DCP (Dedicated charging port)
is connected before device is powered on. This patch
enables charger type detection each time the charger type
wants to be detected.

Change-Id: I4bd9d3a37e5a0f2959ad63b96e95fbf63a9cb9a9
Signed-off-by: Viswanath Puttagunta <vishp@ti.com>
Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
6 years agoMUSB: OMAP: choose ULPI 12 pin for correct charger detection
Balaji T K [Fri, 3 Jun 2011 12:28:38 +0000 (17:58 +0530)]
MUSB: OMAP: choose ULPI 12 pin for correct charger detection

Do not depend on HW reset value of OTG_INTERFSEL for charger
detection. U-boot/ROM code might reconfigure it. Otherwise
PC/DCP/CDP will not be detected correctly on bootup

Change-Id: I1d063a5bfd2dd18a89f5fa7570406c1146b0588e
Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
6 years agoOTG: TWL6030: Fix missing USB_EVENT_NONE case
Balaji T K [Fri, 3 Jun 2011 12:27:00 +0000 (17:57 +0530)]
OTG: TWL6030: Fix missing USB_EVENT_NONE case

Fix missing USB_EVENT_NONE on VBUS disconnect
when charger detected failed, prev_vbus is not
updated.

Change-Id: Ia65c2d961df3cf9e9abd4f57534e9d15e6a42b85
Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
6 years agoOMAP4: TWL6030: Add USB charger detection feature
Balaji T K [Wed, 15 Jun 2011 21:29:17 +0000 (16:29 -0500)]
OMAP4: TWL6030: Add USB charger detection feature

Add USB charger detection, limit input current based
on charger detected and state of USB connection.

Setting OTG_INTERFSEL to UTMI interferes with charger
detection results in incorrect detection of charger type.
Configure OTG_INTERFSEL to ULPI before charger detection.
After the charger module detects the type of charger,
send notification to MUSB where OTG_INTERFSEL is selected
to UTMI in case of PC or Charging Downstream Port.

Change-Id: Ibfdda25aab0a1ac6a284628c0fba99809867742a
Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Partha Basak <p-basak2@ti.com>
Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
6 years agodrivers/staging/ti-st: Replaced non blocking memory allocation flag GFP_ATOMIC with...
satish [Thu, 23 Jun 2011 05:55:33 +0000 (11:25 +0530)]
drivers/staging/ti-st: Replaced non blocking memory allocation flag GFP_ATOMIC with GFP_KERNEL in GPS driver.

Replaced non blocking memory allocation flag GFP_ATOMIC with GFP_KERNEL,
as memory allocation for skb should not fail.

Change-Id: I5c6d5ae38294bc132194597b8aec76c89a353d62
Signed-off-by: satish <x0141690@ti.com>
6 years agoboard-omap4panda.c: Disable power saving for Panda+WL1271
Abhijit [Mon, 20 Jun 2011 07:39:46 +0000 (13:09 +0530)]
board-omap4panda.c: Disable power saving for Panda+WL1271

When the power saving is set to True for MMC5, we observe issue in WLAN i.e. if
WLAN is ON and the system goes to suspend state, after wake up any of the WLAN
operation will panic the system. When compared to other platforms like
OMAP4+1283 the power saving variable is never set.

Change-Id: Ie212beadfff2d61ec0ce84209c9e1669def729f6
Signed-off-by: Abhijit <x0112741@ti.com>
6 years agohsmmc: Change the clock speed for WL127x
Abhijit [Thu, 23 Jun 2011 09:38:57 +0000 (15:08 +0530)]
hsmmc: Change the clock speed for WL127x

WL127x device doesn't support the 48MHz clock. Hence the clock should be changed to 24MHz.

Change-Id: Icfc32e0761e75bfdc72c9692c633b7de03ed19a4
Signed-off-by: Abhijit <x0112741@ti.com>
6 years agoboard-omap4panda.c: Bluetooth platform changes
Abhijit [Mon, 20 Jun 2011 09:57:05 +0000 (15:27 +0530)]
board-omap4panda.c: Bluetooth platform changes

Added changes required to register the Bluetooth WiLink driver to the platform.

Change-Id: Id42d7f619b51c8de4e406b772241b8b4ecb2dd0b
Signed-off-by: Abhijit <x0112741@ti.com>
6 years agoCONFIG_WIFI_CONTROL_FUNC for MACH_OMAP4_PANDA
Abhijit [Mon, 20 Jun 2011 08:35:35 +0000 (14:05 +0530)]
CONFIG_WIFI_CONTROL_FUNC  for MACH_OMAP4_PANDA

This will enable wireless_ext and other config flags for buidling WiFi
driver on Panda.

Change-Id: I3737fdce8b8ae18f79f0277c8c98af03a0c84182
Signed-off-by: srinivas <x0145110@ti.com>
Signed-off-by: Panduranga Mallireddy <panduranga_mallireddy@ti.com>
Signed-off-by: Abhijit <x0112741@ti.com>
6 years agoOMAP4:WLAN: Add WLAN PowerEnable GPIO for Panda
Abhijit [Wed, 22 Jun 2011 11:21:41 +0000 (16:51 +0530)]
OMAP4:WLAN: Add WLAN PowerEnable GPIO for Panda

changes for adding WLAN PowerEnable GPIO pin for Panda.

Change-Id: I1023dca7c4c6dc0faa7e65ad6a4204b76f97bef5
Signed-off-by: Xavier Boudet <x-boudet@ti.com>
Signed-off-by: Panduranga Mallireddy <panduranga_mallireddy@ti.com>
Signed-off-by: srinivas <x0145110@ti.com>
Signed-off-by: Abhijit <x0112741@ti.com>
6 years agoUSB: MUSB: Fix device enumeration issue if connected during boot.
Hema HK [Wed, 15 Jun 2011 21:41:31 +0000 (16:41 -0500)]
USB: MUSB: Fix device enumeration issue if connected during boot.

If the devices are connected during boot,the device enumerations
were failed when OMAP as host in OTG mode. There were mistakes
in writing to few registers. There was interchange in the
parameters being passed to twl6030_writeb().

Change-Id: I17eb0e227269e68d09f2a2ba044c0347beeb79ea
Signed-off-by: Hema HK <hemahk@ti.com>
Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
6 years agoOMAP4: TWL6030 configurations for MPU VDD scalling to Zero volts in OFF mode
Rajeev Kulkarni [Tue, 21 Jun 2011 06:58:46 +0000 (01:58 -0500)]
OMAP4: TWL6030 configurations for MPU VDD scalling to Zero volts in OFF mode

This patch does following actions:
1> Executes ACT2SLP and SLP2ACT sleep sequence.
2> SYSEN must be only associated to APE resource group.
3> For 4460 Disassociate VMEM and VCORE3 from all power group.
    VMEM and VCORE3 not populated for 4460.

Change-Id: I7b328252980c6004dcdde7dd0922471af0217d84
Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Avinash.H.M <avinashhm@ti.com>
Signed-off-by: Rajeev Kulkarni <rajeevk@ti.com>
6 years agoMerge "[OMAP4] omap_tps6236x.c: max voltage for 1.5GHz" into p-android-omap-2.6.35
Ruslan Bilovol [Wed, 22 Jun 2011 16:15:33 +0000 (11:15 -0500)]
Merge "[OMAP4] omap_tps6236x.c: max voltage for 1.5GHz" into p-android-omap-2.6.35

6 years ago[OMAP4] omap_tps6236x.c: max voltage for 1.5GHz
Oleksandr [Fri, 17 Jun 2011 14:35:30 +0000 (09:35 -0500)]
[OMAP4] omap_tps6236x.c: max voltage for 1.5GHz

Maximum voltage supply level was not enough for working at 1.5GHz.
It was set at 0x3F (1.13 V). The max voltage now is set at 1.38 V.

Change-Id: Idcf43990c8baf47587cd6371448bd5bc4ef1cd34
Signed-off-by: Oleksandr <oleksandr.kozaruk@ti.com>
6 years agoSGX-KM: Support full cache ops on large buffers
Hemant Hariyani [Tue, 26 Apr 2011 20:58:37 +0000 (15:58 -0500)]
SGX-KM: Support full cache ops on large buffers

This patch adds support to use full cache operations if a buffer
is larger than a defined threshold.

Change-Id: I2e1366fbdf2d67a0fcdc8382b28451dd8f399f4b
Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
6 years agocache: Add outer_clean_all and outer_flush_all support
Santosh Shilimkar [Tue, 26 Apr 2011 21:07:03 +0000 (16:07 -0500)]
cache: Add outer_clean_all and outer_flush_all support

This patch adds outer_clean_all and outer_flush_all.

Author:    Santosh Shilimkar <santosh.shilimkar@ti.com>
Change-Id: Iba4bac0ff02e0957dd7993d193cedce0c04ab945
Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
Signed-off-by: Ruslan Bilovol <x0155540@ti.com>
6 years agoOMAP4-SGX-KM: Upgrading SGX DDK to version 1.7.17.4828
Hemant Hariyani [Tue, 7 Jun 2011 21:37:45 +0000 (16:37 -0500)]
OMAP4-SGX-KM: Upgrading SGX DDK to version 1.7.17.4828

This patch upgrades the DDK from version 1.7.17.4403 to
version 1.7.17.4828

Change-Id: Ia298d2a607fd4c1d65321461c9f798b970f32559
Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
6 years agodrivers/staging/ti-st:Resolve possible memory leak issue in GPS driver.
satish [Wed, 22 Jun 2011 05:24:31 +0000 (10:54 +0530)]
drivers/staging/ti-st:Resolve possible memory leak issue in GPS driver.

This patch aims to resolve a possible memory leak issue in case
st_unregister fails.

Change-Id: I623d49ff3ae58fc5abff66dd7a4b065cb0fe327b
Signed-off-by: satish <x0141690@ti.com>
6 years agoandroid_4430_defconfig: Enable MAC80211 support for WL12xx solution
Vishal Mahaveer [Wed, 15 Jun 2011 16:20:40 +0000 (10:20 -0600)]
android_4430_defconfig: Enable MAC80211 support for WL12xx solution

Changes to android_4430_defconfig for enabling MAC80211 support
for WL12xx chipset

Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
Change-Id: Ib2fb89a70187496114d1f765e98e7e4e640ebc65

6 years agoOMAP4 - WLAN: MAC80211 and MCP driver coexist in same kernel
Vishal Mahaveer [Tue, 14 Jun 2011 22:08:09 +0000 (16:08 -0600)]
OMAP4 - WLAN: MAC80211 and MCP driver coexist in same kernel

The changes in this patch will allow support for MAC80211 based
WLAN solution for Tablet platform and Properietary stack based
solution for Blaze co-exist in the same kernel image.

This was needed because we use the same kernel image for both
tablet and blaze.

Change-Id: I7973c92ba28649e40d0df4a2b0678a95f60948b5
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
6 years agoboard44xx_tablet.c: Backlight recalculation.
Leonid Iziumtsev [Mon, 20 Jun 2011 19:13:47 +0000 (22:13 +0300)]
board44xx_tablet.c: Backlight recalculation.

Change backlight brightness calculation to make it more bright
on small brightness values.

Change-Id: I258a0322ce1d1e2293913d8e72ad7a1d9aedb0e2
Signed-off-by: Leonid Iziumtsev <x0153368@ti.com>
6 years agoOMAP:DSS:DSSCOMP: Add DSS composition module to build/config system
Lajos Molnar [Wed, 15 Jun 2011 20:48:08 +0000 (15:48 -0500)]
OMAP:DSS:DSSCOMP: Add DSS composition module to build/config system

This patch links in the DSS composition (dsscomp) module into the
build and configuration system. DSS composition is enabled by default.

Change-Id: Id00e7581456a89a7ed7ce4bcac622f6904ed8e56
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
6 years agoMerge "OMAP:DSS:DSSCOMP: New composition module" into p-android-omap-2.6.35
Ruslan Bilovol [Mon, 20 Jun 2011 13:07:07 +0000 (08:07 -0500)]
Merge "OMAP:DSS:DSSCOMP: New composition module" into p-android-omap-2.6.35

6 years agoOMAP:DSS:DSSCOMP: New composition module
LajosMolnar [Wed, 15 Jun 2011 20:45:18 +0000 (15:45 -0500)]
OMAP:DSS:DSSCOMP: New composition module

This patch implements a new DSS composition module.

DSSCOMP allows specifying a whole composition for a DSS display:

1. set overlay information for all overlays on a manager
2. reroute the overlays to the manager (overlay must be disabled
just as when using sysfs)
3. set manager information
4. optionally call manager->apply() that programs the DISPC
4. optionally do an update (after a sync call)

DSS already implements coordinated updates by separating overlay
information setting from the applicaion of those settings (which
happens only in manager->apply()). However current users of DSS
call manager->apply() for each change, which make coordinated
change impossible.

This API also implements auto cropping of all layers to the display
region. This makes switching displays and handling display resolution
changes easier (without getting "failed to setup overlay" messages.)

DSSCOMP operates on 3 levels.

base.c contains the basic DSS operations, such as setting DSS overlay
and managers using DSSCOMP's setting structures. Theoretically,
DSSCOMP could be used via only these operations.

queue.c contains the queuing mechanism. This module maintains
compositions queued to each overlay manager (the basic DSS composition
entity). Each composition is referred to by a unique sync-id.
Queueing operations consist of creating a composition, setting/getting
manager/overlay information for the composition, applying the
composition to the display (which also displays it on manually
updated panels), waiting on various states of a composition.

For now the basic queuing mechanism of DSSCOMP is "queue and forget".
Therefore, it is not necessary to dequeue each frame queued. A
consequence of this methodology is that if one applies a composition
to a display, any prior unapplied compositions will be dropped.

The queuing interface tracks which overlay is assigned to which
manager. This is done at the DSS programming level, as that is the
most reliable place to monitor overlay ownership. Nonetheless,
the device interface uses overlay information to verify overlay
ownership - which may be slightly out of sync. The user of
DSSCOMP should maintain overlay ownership to ensure flawless
sharing of overlays between managers. (E.g. should not use an
overlay on a new manager, until the overlay has been disabled on
the previous manager, and that composition has been programmed.)

device.c contains the device hooks to operating system, and the file
interface (via /dev/dsscomp's ioctls). /dev/dsscomp works on top of
the queueing mechanism.

There are 3 levels of header files.

linux/dsscomp.h: basic dsscomp structures and ioctls
plat/dsscomp.h: kernel dsscomp interface (on top of linux/dsscomp.h)
local dsscomp.h: common implementation structures and shared methods

Note: plat/dsscomp.h defines a handle typedef that causes a
checkpatch warning. I feel that the creation of a handle typedef
is warranted.

Limitations:
- no WB support
- cannot get overlay/manager information on a composition without
first having set it
- there is a race condition in dsscomp's callback as we cannot
lock our mutex (callback is called from ISR sometimes). This will
be fixed in a later patch consistent with k39 version.

Change-Id: Ib681443d7dadae83ff9a4f4004e07a6e9a518866
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
Signed-off-by: Oleksandr Lugovyk <x0158320@ti.com>
6 years agoOMAP4:GPIO: Fix missing IRQ during wakeup from IOPAD
Ambresh K [Fri, 17 Jun 2011 09:15:31 +0000 (11:15 +0200)]
OMAP4:GPIO: Fix missing IRQ during wakeup from IOPAD

If gpio pins from bank[2-5] are marked as wakeup enable and if the wake is
through gpio IO pad wakeup, then that wakeup gpio interrupt is lost.

In the current implementation, GPIO driver stores the context of DATAIN of
all the gpio in the bank. During GPIO resuming, it checks DATAIN with wakeup
enabled pins of gpio bank. If there is status change, then manually toggle
GPIO_LEVELDETECT to generate pseudo interrupt.

Change-Id: I37f73d034c59e388ed4b34aece587cdc4dded797
Reported-by: Philippe Mazet <p-mazet@ti.com>
Tested-by: Philippe Mazet <p-mazet@ti.com>
Signed-off-by: Ambresh K <ambresh@ti.com>
6 years agooma4430: duty cycle: Set hard coded default values
Eduardo Valentin [Fri, 17 Jun 2011 06:34:34 +0000 (09:34 +0300)]
oma4430: duty cycle: Set hard coded default values

This patch defines default values for the duty cycle thermal policy.
Now, it should get up and running without changes in user space.

Change-Id: If176498708b5fcb37451a53765a12ffcf64ef0e6
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
6 years agoMerge "ASoC: McPDM: Link control of UL and DL channels for Downlink streams" into...
Ruslan Bilovol [Fri, 17 Jun 2011 17:03:55 +0000 (12:03 -0500)]
Merge "ASoC: McPDM: Link control of UL and DL channels for Downlink streams" into p-android-omap-2.6.35

6 years agoOMAP4: HSI: optimize IO wakeup latency
Djamil Elaidi [Wed, 8 Jun 2011 12:02:55 +0000 (14:02 +0200)]
OMAP4: HSI: optimize IO wakeup latency

Context:
When an IO daisy chain wakeup is detected for CAWAKE line, PRCM interrupt handler checks
if wakeup source is HSI. If it is the case, then we schedule a tasklet which will
take care of processing HSI event. But for this we need a pointer onto the HSI controller, which
is set when HSI driver is initialized.

Problem:
Searching for this pointer was made at every wakeup, thus a waste of time and a increased wakeup latency.
Search could be made only once, then use stored result for subsequent searches.

Fix:
Do the search only for the first wakeup, then store the result and use it for all subsequent wakeups.

Change-Id: I8cb6f8d20f6dc78c6256773316d5a540d6199ca4
Signed-off-by: Djamil Elaidi <d-elaidi@ti.com>
6 years agoOMAP3+: xSI: kill tasklet on HSI module unload
Djamil Elaidi [Wed, 1 Jun 2011 15:24:35 +0000 (17:24 +0200)]
OMAP3+: xSI: kill tasklet on HSI module unload

When HSI driver was unloaded, the tasklets were only disabled, but not killed.
Fixed this to use the correct API.

Change-Id: I3cf8389aeb0c485ebc8bbac4ae2e0cf0bab6dc8a
Signed-off-by: Djamil Elaidi <d-elaidi@ti.com>
6 years agoOMAP4: HSI: Abort driver registration when bus registration fails
Djamil Elaidi [Wed, 25 May 2011 13:04:45 +0000 (15:04 +0200)]
OMAP4: HSI: Abort driver registration when bus registration fails

Exit the HSI driver init method when HSI bus registration fails.

+ aligned pr_err and pr_debug to have same keyword before each trace.

Change-Id: I923cb6876004235f9781d7aaf624d86af9f5231a
Signed-off-by: Djamil Elaidi <d-elaidi@ti.com>
6 years agoboard-44xxtablet.c: Cleanup: delete Blaze board code
Sergii Postulga [Fri, 17 Jun 2011 09:53:46 +0000 (12:53 +0300)]
board-44xxtablet.c: Cleanup: delete Blaze board code

- Delete backlight functionality for secondary display
- Delete using GPIO_59 in code, except DP501 part.

Change-Id: Ieaf41dda8053e17c9f521dfcbee5cf9dbbc1c48c
Signed-off-by: Sergii Postulga <x0153364@ti.com>
6 years agoOMAP3+: xSI: added char driver support for GET_CAWAKE ioctl
Djamil Elaidi [Thu, 19 May 2011 13:03:48 +0000 (15:03 +0200)]
OMAP3+: xSI: added char driver support for GET_CAWAKE ioctl

Despite the fact that API was present to get the CAWAKE line status, it was
not exported up to HSI char driver.
This is now fixed, and HSI char driver has a IOCTL to read the CAWAKE value.
Also changed the function names to include the direction (ac/ca) in the name.

Change-Id: Ia853215b7e86b8b0c96efc6e2ca6a017c8dbd10b
Signed-off-by: Djamil Elaidi <d-elaidi@ti.com>
6 years agoOMAP4: HSI: implement PM suspend/resume ops
Djamil Elaidi [Mon, 16 May 2011 13:22:39 +0000 (15:22 +0200)]
OMAP4: HSI: implement PM suspend/resume ops

* Moved HSI omap_hsi_prepare_suspend function from PRCM code to generic suspend_noirq function
* Added platform hooks to be used by driver before/after suspend
* Removed unused omap_hsi_prepare_idle function
* Removed unneeded hsi_ctrl parameter to platform functions
* Removed spam trace after modem wakeup

Change-Id: I3c304890bca70f5ddd35fe3c507f000f36bfaf42
Signed-off-by: Djamil Elaidi <d-elaidi@ti.com>
6 years agoOMAP3+: xSI: fix for IRQ request flags
Djamil Elaidi [Fri, 18 Mar 2011 16:38:58 +0000 (17:38 +0100)]
OMAP3+: xSI: fix for IRQ request flags

The HSI IRQ (DMA and PORT) flags were not reflecting the correct trigger (level high).

Change-Id: Id141a10df2635b05e3a1db1475ef6230020f4706
Signed-off-by: Djamil Elaidi <d-elaidi@ti.com>
6 years agoOMAP:DSS: Expose overlay checking DISPC methods
Sunita Nadampalli [Wed, 15 Jun 2011 20:39:05 +0000 (15:39 -0500)]
OMAP:DSS: Expose overlay checking DISPC methods

DSS composition needs to determine if an overlay will be displayable
ahead of time. This needs exposing the relevant DISPC methods.

Change-Id: I08904292e51efcaf92bf4093af4d26072801a7ff
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
6 years agoOMAP: DSS2: Add callback for tracking overlay/manager changes
Sunita Nadampalli [Wed, 15 Jun 2011 20:35:12 +0000 (15:35 -0500)]
OMAP: DSS2: Add callback for tracking overlay/manager changes

This patch allows tracking when a particular overlay or manager
change has taken place, and when it is eclipsed (no longer used).

In DSS2 overlay/manager information travels through 4 stages:
1: (software) overlay/manager info
2: (software) cache (on manager->apply())
3: (hardware) shadow registers (on configure())
4: (hardware) DISPC (on vsync or go/enable)

Callback information for each settings can be passed as part of
the info structure (info->cb), which is the following struct:

struct omapdss_ovl_cb {
void (*fn)(void *data, int id, int status);
void *data;
};

id contains to the overlay/manager index.

If fn is NULL, no callback will take place. Otherwise, callbacks
will be generated on programming (when settings get into the
DISPC), when the settings are displayed, and on eclipse (when settings
are overwritten by newer settings). Depending on the stage where the
eclipse happens, a different callback is generated.

Status is one of the DSS_COMPLETION_... enum values specifying the event.

DSS_COMPLETION_ECLIPSED_SET - info was overwritten at stage 1
DSS_COMPLETION_ECLIPSED_CACHE - info was overwritten at stage 2
DSS_COMPLETION_ECLIPSED_SHADOW - info was overwritten at stage 3
DSS_COMPLETION_RELEASED - info was overwritten at stage 4 (after successfully
being displayed)
DSS_COMPLETION_TORN - info was overwritten at stage 4 (before it was
successfully displayed)

DSS_COMPLETION_PROGRAMMED - info moved from stage 3 to stage 4 (this follows
the prior info's callback of DSS_COMPLETION_RELEASED/TORN)

DSS_COMPLETION_DISPLAYED - info in stage 4 has been successfully displayed.
This callback is received on every frame refresh. If only the first display
is required, it needs to be filtered out in the callback.

You can use the DSS_COMPLETION_RELEASED flag to see if an info has been
eclipsed (so you don't have to check for all 5 values).

There is a fundamental issue with tracking DSS settings in the current
DSS2 framework. Pipeline/manager settings are programmed first into
an info structure that stays around. These settins can be modified
piece-by-piece - as they are done using the sysfs framework. Theoretically,
these cause the old settings to be eclipsed by the new settings. However,
sysfs interface is used to augment the other DSS2 users that would register
for these callbacks. Therefore, we need to treat these partial updates
specially. For now - if the callback function and data are the same -
a different status is used: DSS_COMPLETION_CHANGED_SET.

Now these auxiliary interfaces also apply the changes automatically, so a
similar method needs to be used at level 2. (DSS_COMPLETION_CHANGED_CACHE)
This, however, causes callback info to stay around at the level 1
interface making it not useful for tracking the status. We cannot
guarantee that the information is tracked from setting to release/eclipse
if future settings may end up reusing (ignorantly) the same callback info.

For now the callback info is cleared at level 1 when transferred to
level 2. If other - callback unaware - DSS2 users modify overlay/manager
settings, (e.g. using sysfs controls in any way), they will not reset
the callback. We err on the side of sysfs, and we will not treat a
settings application (transferring level 1 info to level 2) as eclipsed
if the level-1 callback method is empty. This works for sysfs changes,
but we will be a missed callback if V4L2 or FB is changing the base
address, and we are using the callbacks to track buffer usage.

The other issue is using sysfs to enable/disable an overlay. We may
get a RELEASED event on disable, but no usage callback is done on
subsequent enable because sysfs will not request a callback.

Change-Id: I7b840219efa502bf4dde64ffa362c8f9f70bddb5
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
6 years agoRevert "OMAP:DSS: HWC structures and kernel APIs"
Sunita Nadampalli [Wed, 15 Jun 2011 20:31:23 +0000 (15:31 -0500)]
Revert "OMAP:DSS: HWC structures and kernel APIs"

This reverts commit e0c80e1ed9ca7ed63f375fea2a66300a4e297efe.

Change-Id: Icd58ab86bdd1bf2423352fb104e4b4268a05f308
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
6 years agoRemove the existing omapdss comp changes.
Sunita Nadampalli [Wed, 15 Jun 2011 20:22:10 +0000 (15:22 -0500)]
Remove the existing omapdss comp changes.
These are replaced by DSSCOMP.

Change-Id: Ibcfa1bfe8e05696cfc92dd06ff79e28f32aab18e
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
6 years agoOMAP: DEFCONFIG: enable duty cycle by default for android
Axel Haslam [Thu, 16 Jun 2011 22:22:57 +0000 (17:22 -0500)]
OMAP: DEFCONFIG: enable duty cycle by default for android

This patch enables duty cycle managment by default
for android builds.

Signed-off-by: Axel Haslam <axelhaslam@ti.com>
6 years agommc: fix division by zero in MMC core
Linus Walleij [Tue, 4 Jan 2011 23:44:32 +0000 (00:44 +0100)]
mmc: fix division by zero in MMC core

The card is not always clocked and the clock frequency zero is perfectly
legal, thus this code in mmc_set_data_timeout() may cause a division by
zero. It will be triggered more often if you're using software clock
gating but can be triggered under other conditions too.

Change-Id: Ic843cc0f0034c2a5578a03ad5a24f2d30899f860
Reported-by: Pierre Tardy <tardyp@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Reviewed-by: Chris Ball <cjb@laptop.org>
Cc: <stable@kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
6 years agoomap_hsmmc: declare MMC_PM_KEEP_POWER capability
Eliad Peller [Thu, 3 Feb 2011 11:29:59 +0000 (13:29 +0200)]
omap_hsmmc: declare MMC_PM_KEEP_POWER capability

declare support for keeping power on while host is suspended.

for wl12xx acting as AP, we will want the mmc to keep its power
up during system suspend.

Change-Id: I15a28f6585c9787358206005544cf273612fc737
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
6 years agoboard-4430sdp.c, board-44xxtablet.c: set wakeup enable for WLAN IRQ
Eliad Peller [Wed, 27 Apr 2011 07:17:46 +0000 (10:17 +0300)]
board-4430sdp.c, board-44xxtablet.c: set wakeup enable for WLAN IRQ

Update MUX config for WLAN IRQ to be Wakeup enabled

Change-Id: Ib646260bf3301df45b41817c3f3be70d649ed080
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
6 years agommc: clear MMC_PM_KEEP_POWER flag on resume
Eliad Peller [Mon, 7 Feb 2011 18:20:31 +0000 (20:20 +0200)]
mmc: clear MMC_PM_KEEP_POWER flag on resume

Since the MMC_PM_KEEP_POWER flag should be set in each suspend,
we should also clear it each time.

When resuming, we have to know if power was kept
(for re-initialization, etc.), so clear it just after that.

Change-Id: I8003de2ad7583b06d1d52377089220d7f54e166b
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
6 years agommc: do not switch to 1-bit mode if not required
Ohad Ben-Cohen [Tue, 4 Jan 2011 21:10:00 +0000 (23:10 +0200)]
mmc: do not switch to 1-bit mode if not required

6b5eda36 followed SDIO spec part E1 section 8, which states that
in case SDIO interrupts are being used to wake up a suspended host,
then it is required to switch to 1-bit mode before stopping the clock.

Before switching to 1-bit mode (or back to 4-bit mode on resume),
make sure that SDIO interrupts are really being used to wake the host.

This is helpful for devices which have an external irq line (e.g.
wl1271), and do not use SDIO interrupts to wake up the host.

In this case, switching to 1-bit mode (and back to 4-bit mode on resume)
is not necessary.

Change-Id: I48ec7550fd61395e386873a4445349a5fb6e62a8
Reported-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
6 years agommc: mmc_card_keep_power cleanups
Ohad Ben-Cohen [Thu, 30 Dec 2010 22:25:10 +0000 (00:25 +0200)]
mmc: mmc_card_keep_power cleanups

mmc_card_is_powered_resumed is a mouthful; instead, simply use
mmc_card_keep_power, which also better explains the purpose of
the macro.

Employ mmc_card_keep_power() where possible.

Change-Id: Ia55c110d4e8b89fe0f19bfc449f42bb6ea99ac9c
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
6 years agommc: fix CONFIG_MMC_UNSAFE_RESUME regression
Ohad Ben-Cohen [Tue, 8 Mar 2011 21:32:02 +0000 (23:32 +0200)]
mmc: fix CONFIG_MMC_UNSAFE_RESUME regression

30201e7f3 ("mmc: skip detection of nonremovable cards on rescan")
allowed skipping detection of nonremovable cards on mmc_rescan().
The intention was to only skip detection of hardwired cards that
cannot be removed, so make sure this is indeed the case by directly
checking for (lack of) MMC_CAP_NONREMOVABLE, instead of using
mmc_card_is_removable(), which is overloaded with
CONFIG_MMC_UNSAFE_RESUME semantics.

The user-visible symptom of the bug this patch fixes is that no
"mmc: card XXXX removed" message appears in dmesg when a card is
removed and CONFIG_MMC_UNSAFE_RESUME=y.

Change-Id: Ieadf49741402fd9656575e3b539e3f738ffc14e4
Reported-and-tested-by: Dmitry Shmidt <dimitrysh@google.com>
Reported-and-tested-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
6 years agowl12xx: update wl12xx_platform_data struct
Eliad Peller [Wed, 18 May 2011 15:55:15 +0000 (18:55 +0300)]
wl12xx: update wl12xx_platform_data struct

(without this patch both the kernel and compat compilations
will succeed, but the wl12xx driver will use uninitialized
memory for the platform quirks...)

Change-Id: Ia8b20f2589f3eb4fb557b6a5900f79995ed61c82
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
6 years agoOMAP4 DSS V4L2: Remove incorrect check for fbuf flags
Sunita Nadampalli [Mon, 13 Jun 2011 21:07:48 +0000 (16:07 -0500)]
OMAP4 DSS V4L2: Remove incorrect check for fbuf flags

Description# The incorrect check for alpha blend and
gfx-destination inside s_fbuf method is removed.
OMAP4 does support alpha blending and graphix destination
color key simultaneously.

Change-Id: I997dfcb0493fc374d944af22b6c32f0858db040e
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
6 years ago [ARM] board-4430sdp.c FM Tx and modem audio.
Oleksandr [Wed, 15 Jun 2011 02:43:01 +0000 (21:43 -0500)]
[ARM] board-4430sdp.c FM Tx and modem audio.

    FM Tx and modem audio doesn't work after enabling USB host support.
    USB initialization function reconfigures pins used for FM Tx and
    modem audio. This patch set this pins unused for usb.

Change-Id: I0a502870ba4335feb26c98f09fa68bf78117ca1a
Signed-off-by: Oleksandr <oleksandr.kozaruk@ti.com>
6 years agoPower/Reset Manager debug state display needed OMAP4 update
David Taylor [Wed, 15 Jun 2011 14:28:15 +0000 (09:28 -0500)]
Power/Reset Manager debug state display needed OMAP4 update

/d/pm_debug/registers/current displays debug state
of OMAP CM/PRM registers & needed update for OMAP4

[DR]
OMAPS00240549

Change-Id: Iac7632ebac637243c7b25be8250d863530ae7ed2
Signed-off-by: David Taylor <x0158378@ti.com>
6 years agoOMAP4: PM: Trace for device-off status at wakeup
Djamil Elaidi [Mon, 16 May 2011 13:35:28 +0000 (15:35 +0200)]
OMAP4: PM: Trace for device-off status at wakeup

Added a trace to know if DEVICE-OFF was hit or not during last suspend state.
Number of DEVICE-OFF hits is also displayed.

Change-Id: I208d775071a91a2ef15f6b2308e574d1210237f2
Signed-off-by: Djamil Elaidi <d-elaidi@ti.com>
6 years agoOMAP4: Allow device off mode on OMAP4460 GP devices.
Rajeev Kulkarni [Mon, 13 Jun 2011 08:37:45 +0000 (03:37 -0500)]
OMAP4: Allow device off mode on OMAP4460 GP devices.

On OMAP4460 GP devices, device off mode bug is fixed and hence
allow the device off mode on it.

Change-Id: Ia7641255a670ace0021941457ca32812f7237082
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Rajeev Kulkarni <rajeevk@ti.com>
6 years agoOMAP4460: Workaround for ROM bug because of CA9 r2pX gic control register change
Rajeev Kulkarni [Mon, 13 Jun 2011 08:44:29 +0000 (03:44 -0500)]
OMAP4460: Workaround for ROM bug because of CA9 r2pX gic control register change

GIC distributor control register has changed between CortexA9 r1pX and r2pX.
The Control Register secure banked version is now composed of 2 bits:
     bit 0 == Secure Enable
     bit 1 == Non-Secure Enable
The Non-Secure banked register has not changed. Since the ROM Code is
based on the r1pX GIC, the CPU1 GIC restoration will cause a problem
to CPU0 Non-Secure SW.
The workaround must be:
     1) Before doing the CPU1 wakeup, CPU0 must disable
        the GIC distributor
     2) CPU1 must re-enable the GIC distributor on
        it's wakeup path.

With this procedure, the GIC configuration done between the
CPU0 wakeup and CPU1 wakeup will not be lost but during this
short windows, the CPU0 will not receive interrupts

Change-Id: I133c07065af2999f50ca9df8886de440829dff4c
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Rajeev Kulkarni <rajeevk@ti.com>
6 years agoOMAP4: Program zero volts for all the VDD's in OFF mode
Rajeev Kulkarni [Thu, 9 Jun 2011 13:13:57 +0000 (08:13 -0500)]
OMAP4: Program zero volts for all the VDD's in OFF mode

Program zero volts for all the VDD's [MPU/CORE/IVA] in OFF mode.

Change-Id: Ifff739aca4ce31250f912561272481f2238e1395
Signed-off-by: Rajeev Kulkarni <rajeevk@ti.com>
6 years agoOMAP4460: SAR: Update SAR layout for 4460
Rajeev Kulkarni [Wed, 8 Jun 2011 08:53:58 +0000 (03:53 -0500)]
OMAP4460: SAR: Update SAR layout for 4460

Update SAR layout for 4460. This was missing in Delta TRM.

Change-Id: I133069eb10ca13fd659dd604e77fdf298f5755c2
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Rajeev Kulkarni <rajeevk@ti.com>
6 years agoOMAP4 - board-4430sdp.c, board-44xxtablet.c: MMC5 info cleanup
Vishal Mahaveer [Tue, 31 May 2011 15:27:51 +0000 (09:27 -0600)]
OMAP4 - board-4430sdp.c, board-44xxtablet.c: MMC5 info cleanup

MMC info for MMC5 has wrong value for gpio_wp.

MMC5 on blaze platform is connected to wl1283 chip and gpio_wp
field does not apply.

Change-Id: I0b3d32caacf493757b85c347e53501ef7d247b2f
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
6 years agoOMAP4430: Thermal: Add thermal control on 4430
Eduardo Valentin [Tue, 10 May 2011 23:35:39 +0000 (02:35 +0300)]
OMAP4430: Thermal: Add thermal control on 4430

This patch introduces a duty cycle based policy to control
the usage of 1.2GHz to avoid overheating.

The idea is to limit the time we spend at 1.2GHz, and after
every cycle at 1.2GHz, we spend some time cooling at a lower
OPP. The state machine will be triggered based on cpufreq
notification of frequency change.

There are few parameters that can be change.
In this case, it is possible to choose:
- nitro_rate: the nitro OPP, in this case, 1.2GHz
- cooling_rate: the cooling OPP, right now 1.0GHz, but can be modified
- nitro_interval: the time window which the duty cycle will operate
- nitro_percentage: the percentage of time window that we will be at 1.2GHz.

There are sysfs knobs to change the policy parameters.
This can be used to change the amount of time spent at
1.2GHz, based on some input (PCB temperature for instance).

Change-Id: Id3b1c1f2214cbea660dab9aafca16c04260a8897
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
6 years agocpu-omap: Report the old and new frequencies correctly
Eduardo Valentin [Wed, 4 May 2011 18:08:11 +0000 (21:08 +0300)]
cpu-omap: Report the old and new frequencies correctly

This patch fixes the notifications sent by the omap
cpufreq driver, while changing frequencies.
The issue happens on OMAP3 and OMAP4 devices.

Change-Id: Ib89c6b76544af1f0bcf7e9f33d93056b400b3806
Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
6 years agocpufreq: hotplug: Allow safe usage of cpufreq_update_policy
Eduardo Valentin [Tue, 31 May 2011 16:08:49 +0000 (19:08 +0300)]
cpufreq: hotplug: Allow safe usage of cpufreq_update_policy

With the current implementation of hotplug do_dbs_timer,
the usage of cpufreq standard API cpufreq_update_policy
may generate lockups.

The scenario is like this -
1. thread A --
   |__ cpufreq_update_policy()  --> calls lock_policy_rwsem_write()
        |__ __cpufreq_set_policy()
             |__ __cpufreq_governor() --> with CPUFREQ_GOV_STOP
                  |__ cpufreq_governor_dbs()
                        |__mutex_lock(&this_dbs_info->timer_mutex);

2. CPU1 boot up thread --
do_dbs_timer() --> mutex_lock(&dbs_info->timer_mutex);
   |__ dbs_check_cpu()
        |__ cpu_up(1)
             |__ _cpu_up()
                  |__ cpu_notify() --
                      |__ cpufreq_cpu_callback()
                           |__ cpufreq_add_dev()  --> lock_policy_rwsem_write()

The function call graph shows that the do_dbs_timer from hotplug governor
does locking sequence exactly in the opposite order as the
cpufreq_update_policy does. This may cause a deadlock if both threads
are scheduled in the middle of each lock call, just to highlight one
possibility.

What this patch does is to defer the cpu_up and cpu_down operations,
removing them from the locking of the timer_mutex.

Change-Id: I59dacde1e84459037d13ed045539fd58041db191
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
6 years agoTWL: Correct VSEL formula to get the right HEX value.
Axel Haslam [Mon, 4 Apr 2011 14:44:18 +0000 (09:44 -0500)]
TWL: Correct VSEL formula to get the right HEX value.

The formula to convert to mV to the correct volatage
for SMPS is:
 12.66*(HEX2DEC(mV)+1)+ 709

The formula works for values up to 0x39 (1417mv)

This patch corrects omap_twl_uv_to_vsel and
omap_twl_vsel_to_uv to return the correct hex
value.

Change-Id: I7bb4b64df0407a18aa654877d056002c0ea5e556
Signed-off-by: Axel Haslam <axelhaslam@ti.com>
6 years agoOMAP4: introduce 1.2Ghz MPU OPP
Axel Haslam [Tue, 29 Mar 2011 22:50:50 +0000 (17:50 -0500)]
OMAP4: introduce 1.2Ghz MPU OPP

This patch introduces a new OPP for MPU at 1.2Ghz.

We use FUSE_OPP_VDD_MPU_3 to detirme if the
silicon has been validated for this speed,
and enable the corresponding OPP.

Voltage at 1.2Gz is the same as 1.0Gz.
Since  increasing by 1 the value in the voltage
table results in the next 12.5mV voltage step
being set, we reduce voltage for 1.0Gz, and
set that volatge to 1.2G.  Both OPP's
operate at the same 12.5mV Voltage window.

Signed-off-by: Axel Haslam <axelhaslam@ti.com>
Change-Id: Ic9e363a53e383e62144b270c97320b71d0b0cd34

6 years agoARM Errata 754322: possible fault MMU translations following an ASID switch
Will Deacon [Mon, 16 May 2011 16:46:10 +0000 (11:46 -0500)]
ARM Errata 754322: possible fault MMU translations following an ASID switch

From fcbdc5fe6ebe07d502c9b652cb63376bcc4227ac Mon Sep 17 00:00:00 2001
From: Will Deacon <will.deacon@arm.com>
Date: Mon, 28 Feb 2011 18:15:16 +0100
Subject: [PATCH]
ARM: 6772/1: errata: possible fault MMU translations following an ASID switch

On the r2p* and r3p* versions of the Cortex-A9, a speculative memory
access may cause a page table walk which starts prior to an ASID switch
but completes afterwards. This can populate the micro-TLB with a stale
entry which may be hit with the new ASID.

This workaround places two dsb instructions in the mm switching code so
that no page table walks can cross the ASID switch.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Change-Id: I5e3b225d41ebe813f8f3415169bc8e5361773d83
Signed-off-by: David Taylor <x0158378@ti.com>
6 years agoTWL6030: USB: Fix enabling of VUSB regulator twice
Maulik Mankad [Thu, 26 May 2011 12:40:28 +0000 (18:10 +0530)]
TWL6030: USB: Fix enabling of VUSB regulator twice

When USB cable is connected at boot up, the IRQ that is faked
from probe, will cause the enabling of the regulator.

One more IRQ will be triggered when otg_set_irq() is called
from MUSB layer. This causes imbalance in the VUSB regulator
use_count.

Remove call to twl6030_enable_irq() from probe as this is
taken care in the MUSB layer.

Change-Id: I5aa24a739ef09a4d95f2185cceda6318af1cb252
Signed-off-by: Maulik Mankad <maulik@ti.com>
6 years agoTWL6030: Return correct regulator state for SLEEP(STANDBY) mode
Saquib Herman [Tue, 17 May 2011 06:43:39 +0000 (12:13 +0530)]
TWL6030: Return correct regulator state for SLEEP(STANDBY) mode

twl6030reg_is_enabled() is returning incorrect value of "0" in
REGULATOR_MODE_STANDBY mode. In both REGULATOR_MODE_NORMAL and
REGULATOR_MODE_STANDBY modes, regulator is enabled and should return "1".

Returning incorrect regulator state can impact the callers of this function.
E.g MMC driver using regulator_is_enabled(), when returned 0 in
REGULATOR_MODE_STANDBY mode interprets the regulator state as disabled,
increases the count and re-enables the regulator, resulting in wrong sequence.

This patch fixes the issue in twl6030reg_is_enabled() function by returning 1
for both REGULATOR_MODE_NORMAL and REGULATOR_MODE_STANDBY modes as expected.

Change-Id: Iacd8886ee52f798cc6106af06825e44c8d2bfd53
Signed-off-by: Saquib Herman <saquib@ti.com>
6 years agomisc: twl6040-vib: Add errata for false overcurrent detection
Misael Lopez Cruz [Wed, 4 May 2011 01:09:50 +0000 (20:09 -0500)]
misc: twl6040-vib: Add errata for false overcurrent detection

It's possible to have false overcurrent detection when vibrator drivers
are enabled. TWL6040 reacts to the overcurrent detection event by
disabling vibrator outputs and generates a vibrator interrupt VIBINT.
To prevent false overcurrent detection, overcurrent protection is disabled
for at least 2.5ms to allow vibrator driver to stabilize. The period of
time overcurrent detection is disabled is very short and the probability
for an actual overcurrent is negligible.

Change-Id: I9ab7d05572b58c69e033edc6821277764b6250c6
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Axel Castaneda Gonzalez <x0055901@ti.com>
6 years agoMerge "misc: twl6040-vib: Enable vibrator overcurrent detection" into p-android-omap...
Taras Kondratiuk [Wed, 8 Jun 2011 01:36:42 +0000 (20:36 -0500)]
Merge "misc: twl6040-vib: Enable vibrator overcurrent detection" into p-android-omap-2.6.35

6 years agoOMAP4: DSS HDMI: HDMI cable unplug issue on video playback
x0158321 [Mon, 6 Jun 2011 14:10:56 +0000 (17:10 +0300)]
OMAP4: DSS HDMI: HDMI cable unplug issue on video playback

Patch will fix HDMI cable unplug issue during video playback.
Issue looks like Ducati crash.

Ducati crash during video playback might be caused by two reasons below:
1) Too late call to the hdmi_lib_stop_acr_wa()
2) Receiving by Ducati two HDMI ACR WA notify events with payload=0.
This patch will fix both.

Change-Id: Ibcc8ca0b1d7cf3c851627af31a0c89b1290c56e7
Signed-off-by: Anatolii Shuba <x0158321@ti.com>
Signed-off-by: Taras Kondratiuk <x0153363@ti.com>
6 years ago[ARM] board-44xxtablet.c and board-4430sdp.c: ti-st chip enable & disable
Sergii Postulga [Mon, 6 Jun 2011 16:43:09 +0000 (19:43 +0300)]
[ARM] board-44xxtablet.c and board-4430sdp.c: ti-st chip enable & disable

Add ti-st chip enable and disable to Tablet board file.
And make them static in both board files.

Change-Id: I9de3f7d32a3f090efd496d8346ecb45bfd5dd6f9
Signed-off-by: Sergii Postulga <x0153364@ti.com>
Signed-off-by: Taras Kondratiuk <x0153363@ti.com>
6 years agoARM: mm: fix racy ASID rollover broadcast on SMP platforms
Will Deacon [Fri, 20 May 2011 11:19:58 +0000 (12:19 +0100)]
ARM: mm: fix racy ASID rollover broadcast on SMP platforms

If ASID rollover is detected on a CPU in an SMP system, a synchronous
IPI call is made to force the secondaries to reallocate their current
ASIDs.

There is a problem where a CPU may be interrupted in the cpu_switch_mm
code with the context ID held in r1. After servicing the IPI, the
context ID register will be updated with an ASID from the previous
generation, polluting the TLB for when that ASID becomes valid in the
new generation.

This patch disables interrupts during cpu_switch_mm for SMP systems,
preventing incoming rollover broadcasts from being serviced while the
register state is inconsistent. Additionally, the context resetting code
is modified to call cpu_switch_mm, rather than setting the context ID
register directly, so that the TTBR always agrees with the ASID.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Android-porting
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
Change-Id: I9c90d71beb0de73a36ba33428c86d00d0bf24e6c

6 years agoARM: cache: ensure MVA is cacheline aligned in flush_kern_dcache_area
Will Deacon [Fri, 20 May 2011 11:19:55 +0000 (12:19 +0100)]
ARM: cache: ensure MVA is cacheline aligned in flush_kern_dcache_area

The v6 and v7 implementations of flush_kern_dcache_area do not align
the passed MVA to the size of a cacheline in the data cache. If a
misaligned address is used, only a subset of the requested area will
be flushed. This has been observed to cause failures in SMP boot where
the secondary_data initialised by the primary CPU is not cacheline
aligned, causing the secondary CPUs to read incorrect values for their
pgd and stack pointers.

This patch ensures that the base address is cacheline aligned before
flushing the d-cache.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
6 years agoOMAP4: TEMP_SENSOR: Gate the clocks in idle path
Moiz Sonasath [Thu, 2 Jun 2011 21:22:49 +0000 (16:22 -0500)]
OMAP4: TEMP_SENSOR: Gate the clocks in idle path

This patch will gate the temp sensor clocks in
the idle path and hence allow CORE to hit low
power states RET/OFF in idle path.

Change-Id: I15823b970cf1de9ef281c7f9b1fef4f756cab762
Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
6 years agoOMAP4460 Temp sensor: Add debug capabilities
Dan Murphy [Thu, 2 Jun 2011 15:31:31 +0000 (10:31 -0500)]
OMAP4460 Temp sensor: Add debug capabilities

Add sysfs entries to the temp sensor driver so that we
can excersize the user space daemon

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