omap: hwmod: enable clocks before deasserting hardreset

The enable code currently deasserts the hard-reset before
turning on the clocks. These kind of reset lines are limited
only to processor-device like IPs such as DSP or IPU or
IVA, which actually need the clock to be enabled first.

The code that deasserts the hard-reset has therefore been
relocated to execute after the clocks are enabled, to avoid
the hard-deassert traces (failed to hard reset).

Change-Id: Ief7e83dd4f0bdef3c20b986772f723565aa24ee4
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Signed-off-by: Paul Hunt <hunt@ti.com>
Signed-off-by: Oleg Matcovschi <oleg.matcovschi@ti.com>
omap5: bandgap: debug error print

On Omap5 there are 3 bandgap sensors, cpu, gpu and core.
And for cpu and gpu domains, there are governor and cooling
devices identified. But for core domain, currently there are
no governor nor cooling devices. When the core temperature sensor
updates the temperature report for this core domain, thermal framework
returns an error. Since this temperature update happens quite often,
there are many repetitive error messages due to this error debug print.
Hence making this debug statement as pr_err_once, and once the governor and
cooling devices are identified for core, can revert it back to dev_err.

Change-Id: I807cce8817b2a5f5875185c1d1324779687e6ec4
Signed-off-by: Radhesh Fadnis <radhesh.fadnis@ti.com>
TI-TFW: threshold values for governors

The omap_thermal_zone has information about thresholds for
each identified zones. Currently there is a single instance of
this array on which both the governors are acting, which is not
correct. Created separate thermal zone array for each governor
and initialised with default values.

Change-Id: I93110867a7c2dd3eddcddb0e0d5b1834eb2f9551
Signed-off-by: Radhesh Fadnis <radhesh.fadnis@ti.com>
TI-TFW: debugfs: Threshold correction

The governor thermal zone array has information on the
threshold values for various zones. And this array is used
to set the upper and lower threshold limit in omap_enter_zone.
Hence when user change these thresholds using debugfs entries,
need to update the global array as well.

Change-Id: I6a3fa39334217b1e462fb11a111b8cc4746286e3
Signed-off-by: Radhesh Fadnis <radhesh.fadnis@ti.com>
ASoC: dapm: Set bias_level for codecs with no bias handler

Set DAPM context bias level for those CODECs that don't implement
set_bias_level handler. This allows DAPM to keep track of the correct
bias level, otherwise it appears as if target bias level is never
reached and device PM resources of those DAPM contexts get reacquired
every time there is a power state change and never released.

Change-Id: I36511527c379fe013daeee1a8aa1002356cc5c6a
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
ASoC: dapm: Fix widget sname copy/free

Simplify widget stream name allocation and copy with kstrdup().
Free corresponding memory when freeing widgets.

Change-Id: Iea2564241f3a442ab52857831f4c0d0376aa017e
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
ASoC: omap-mcasp: Release mem region

Release memory region during driver remove.

Change-Id: Iccbedf8d088707f729230a44a67272328b715163
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
ASoC: omap-abe-twl6040: Fix FM Capture cpu_dai_name

Fix cpu_dai_name used in "FM Capture" DAI link which uses McBSP2.

Change-Id: Id41e899f56e9b81fa75b36a0ace5ec8856bd7ff9
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
ASoC: OMAP ABE: Fix VXREC/ECHO module init/cleanup redefinition

Create different objects for VXREC and ECHO to fix init_module/
cleanup_module redefiniton error when compiling as modules.

Change-Id: I09e3b9a3bbd1abe7d40e88a6105871887683dbda
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
ASoC: omap-abe-twl6040: tps6130x removal applies only for sdp4430

tps6130x boost supply is used for sdp4430 machines, so its removal
is applicable to those machines only.

Change-Id: I74d968d41e162f12ba342ce0caf73d601b698b79
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Merge branch 'p-linux-omap-3.4' into p-android-omap-3.4

* p-linux-omap-3.4:
  ASoC: omap-abe-twl6040: tps6130x removal applies only for sdp4430
  ASoC: OMAP ABE: Fix VXREC/ECHO module init/cleanup redefinition
  ASoC: omap-abe-twl6040: Fix FM Capture cpu_dai_name
  ASoC: omap-mcasp: Release mem region
  ASoC: dapm: Fix widget sname copy/free
  ASoC: dapm: Set bias_level for codecs with no bias handler
  TI-TFW: debugfs: Threshold correction
  TI-TFW: threshold values for governors
  omap5: bandgap: debug error print
  omap: hwmod: enable clocks before deasserting hardreset

Change-Id: I928ef68fccdeb0d7867cb53975141b8b26922825
Signed-off-by: Dan Murphy <dmurphy@ti.com>
OMAP: UART: fix access to uart wakeup enable/disable

During boot up uart wakeup enable/disable calls happen
which access UART_SYSC register. This access can happen
after UART clocks are disabled resulting in below error:
"L3 custom error: MASTER:MPU TARGET:L4 PER2"

This patch guards this register access with PM runtime
get/put calls to ensure this access error is avoided.

Change-Id: Ifc4049d76e19bb6dd58b9f174554b742c69f2c60
Signed-off-by: Huzefa Kankroliwala <huzefank@ti.com>
OMAP5: UART: sEVM board file: setup platform UARTs

By default serial driver initializes all the UART ports with
default configuration. Provide platform specific configuration
in board file to initialize the UARTs used by platform.
This patch provides a board-omap5evm-serial.c file that sets
up the UART specific data used by the platform.

Change-Id: I33768554c85bfa4bda5bdac797e0fce28d0da2c1
Signed-off-by: Huzefa Kankroliwala <huzefank@ti.com>
Merge branch 'p-linux-omap-3.4' into p-android-omap-3.4

* p-linux-omap-3.4:
  OMAP5: UART: sEVM board file: setup platform UARTs
  OMAP: UART: fix access to uart wakeup enable/disable

Conflicts:
	arch/arm/mach-omap2/Makefile

Change-Id: I159f12e9c9ef5655e89aedaa172085f5c9f34e98
Signed-off-by: Dan Murphy <dmurphy@ti.com>
OMAPDSS: CEC: Physical address discovery form edid

HDMI sink device will set the physical address for
CEC devices

Change-Id: I6419834816978dfc8bcb8ef9a7b6c36276e5792c
Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com>
OMAPDSS: CEC: Add callback to CEC driver on HDMI HPD

Adding support for call back from HDMI to CEC driver
on HPD and HDMI enable.

Change-Id: I9fff9d41d598e5ef375bc03faafb9a559ce7435a
Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com>
OMAPDSS: CEC: Adding HDMI CEC support

Adding CEC driver support for OMAP.

Change-Id: I0b517fa43d269ae812090f58e7785d10ae82d6e0
Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com>
OMAPDSS: CEC: Adding CEC support for OMAP5 IP

Adding CEC support for OMAP5 HDMI IP.

Change-Id: I864ee1cbb7cc270a6784504cfe8b532bd0da7181
Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com>
Input: CEC keyboard driver

Adding support for CEC key board driver in input device.
UI commands received from CEC are mapped to the key buttons
in the linux kernel.

Change-Id: If4136940f28fb4a0c4b9b730aabb8e0fc7837ccf
Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com>
OMAPDSS: CEC: Enable 32KHz clock for CEC

This patch enables 32KHz clock required for CEC IP.

Change-Id: Ifc268753e78f5c58d3a7d83c228c7c14f0f41b66
Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com>