Merge branch 'platform-ti-linux-3.14.y' of git://git.ti.com/~rrnayak/ti-linux-kernel/platform-linux-feature-tree into mailbox-linux-3.14.y

Resync with the latest platform base code.

* 'platform-ti-linux-3.14.y' of git://git.ti.com/~rrnayak/ti-linux-kernel/platform-linux-feature-tree: (32 commits)
  clk: ti: add "ti,gpio-gate-clock" controlled clock
  ARM: DTS: dra72-evm: Rename mmc2_3v3 regulator to the board level power name
  ARM: DTS: dra7-evm: Rename mmc2_3v3 regulator to the board level power name
  clk: ti: set CLK_SET_RATE_NO_REPARENT for ti,mux-clock
  clk: ti: fix clk_init retry logic with generic of_clk_init use
  clk: ti: change clock init to use generic of_clk_init
  arm: dts: dra7: Change the total dma-req numbers to crossbar channels
  arm: dra: Enable dma crossbar support on dra7xx
  arm: dts: dra: Add dma-request crossbar phandle to dma-spec
  arm: dts: dra: Add dma crossbar node
  drivers: dma: Add dma crossbar driver
  drivers: omap-dma: Add crossbar line as a resource to omap_chan structure
  drivers: dma: omap-dma: Add a seperate xlate function to get router data
  drivers: dma: of-dma: Add support for dma-request line routers
  drivers: dma: omap-dma: Avoid hard-coding of the dma-request channels
  ARM: dts: DRA7: DMM: Fix interrupts property
  ARM: dts: DRA7: hwspinlock: Remove interrupts property
  ARM: DRA7: hwmod: Fix RNG hwmod flags
  ARM: dts: dra7xx-clocks: Fix the l3 and l4 clock rates
  ARM: dts: dra72-evm: Mark TPS as wakeup capable pin
  ...

Signed-off-by: Suman Anna <s-anna@ti.com>
ARM: dts: AM33xx: Add PRU mboxes to mailbox node

The mailbox DT node data is updated with additional mbox data to
communicate with the PRU0 (User Id 1) and PRU1 (User Id 2) cores
within the PRU-ICSS subsystem. The following are the assignments
of mailbox fifos between MPU and the remote PRU cores:

		MPU Tx/PRU Rx	MPU Rx/PRU Tx
	PRU0	2		3
	PRU1	4		5

Signed-off-by: Suman Anna <s-anna@ti.com>
ARM: dts: AM4372: Add PRUSS1 PRU mboxes to mailbox node

The mailbox DT node data is updated with additional mbox data to
communicate with the PRU0 (User Id 1) and PRU1 (User Id 2) cores
within the PRU-ICSS1 subsystem. The following are the assignments
of mailbox fifos between MPU and the remote PRU cores:

            MPU Tx/PRU Rx   MPU Rx/PRU Tx
    PRU0    2               3
    PRU1    4               5

This assignment is identical to the assignment of mailboxes for
the PRU-ICSS subsystem in AM33xx.

Signed-off-by: Suman Anna <s-anna@ti.com>
Merge branch 'mailbox-linux-3.14.y' of git://git.ti.com/rpmsg/mailbox into rproc-linux-3.14.y

Pull in the updated mailbox feature branch into the remoteproc tree for
adding support to the PRU-ICSS PRU cores in AM33xx and AM43xx SoCs. The
merge also pulls in the latest platform base tree.

* 'mailbox-linux-3.14.y' of git://git.ti.com/rpmsg/mailbox:
  ARM: dts: AM4372: Add PRUSS1 PRU mboxes to mailbox node
  ARM: dts: AM33xx: Add PRU mboxes to mailbox node
  clk: ti: add "ti,gpio-gate-clock" controlled clock
  ARM: DTS: dra72-evm: Rename mmc2_3v3 regulator to the board level power name
  ARM: DTS: dra7-evm: Rename mmc2_3v3 regulator to the board level power name
  clk: ti: set CLK_SET_RATE_NO_REPARENT for ti,mux-clock
  clk: ti: fix clk_init retry logic with generic of_clk_init use
  clk: ti: change clock init to use generic of_clk_init
  arm: dts: dra7: Change the total dma-req numbers to crossbar channels
  arm: dra: Enable dma crossbar support on dra7xx
  arm: dts: dra: Add dma-request crossbar phandle to dma-spec
  arm: dts: dra: Add dma crossbar node
  drivers: dma: Add dma crossbar driver
  drivers: omap-dma: Add crossbar line as a resource to omap_chan structure
  drivers: dma: omap-dma: Add a seperate xlate function to get router data
  drivers: dma: of-dma: Add support for dma-request line routers
  drivers: dma: omap-dma: Avoid hard-coding of the dma-request channels
  ARM: dts: DRA7: DMM: Fix interrupts property
  ARM: dts: DRA7: hwspinlock: Remove interrupts property
  ARM: DRA7: hwmod: Fix RNG hwmod flags

Signed-off-by: Suman Anna <s-anna@ti.com>

Conflicts:
	arch/arm/boot/dts/dra7-evm.dts
	arch/arm/boot/dts/dra72-evm.dts
remoteproc: add support to handle device specific resource types

The remoteproc framework handles a fixed set of resource table entries
today. To make it scalable across multiple platforms, it makes sense
for the framework to provide a way for the device specific implementation
to define and handle custom resource types. These resource types would
be very specific to a implementation instance that it does not make sense
for the framework to handle it.

For instance, a remoteproc implementation might want timers information
embedded in the resource table so that the driver could parse the binary
and enable accordingly. Another example would be hwspinlocks that it
is using, to properly share system wide resources.

This patch adds a function pointer to the list of rproc_ops for the
driver implementation to handle such custom resources.

Signed-off-by: Suman Anna <s-anna@ti.com>
remoteproc/core: add a rproc ops for performing address translation

The rproc_da_to_va API is currently used to perform any device to
kernel address translations to meet the different needs of the remoteproc
core/drivers (eg: loading). The functionality is achieved within the
remoteproc core, and is limited only for carveouts allocated within the
core or to internal memories published through the resource table.

A new rproc ops, da_to_va, is added to provide flexibility to platform
implementations to perform the address translation themselves when the
above conditions cannot be met by the implementations. The rproc_da_to_va()
is expanded to take in an additional flags field and invoke this ops if
present, and fallback to regular processing if the platform implementation
cannot provide the translation.

Signed-off-by: Suman Anna <s-anna@ti.com>
Documentation: dt: add PRUSS remoteproc bindings

This patch adds the bindings for the Programmable Real-Time Unit and
Industrial Communication Subsystem (PRU-ICSS) present on various TI
SoCs (that are adapted for DT boot). The binding uses standard DT
properties without introducing any specific properties.

Signed-off-by: Suman Anna <s-anna@ti.com>
ARM: dts: AM33xx: Add the PRUSS DT node

Add the DT node for the PRU-ICSS on AM33xx family of SoCs.
The DT node uses all standard properties. The regs property
defines the addresses for various modules within the PRUSS,
including all the Data RAMs, the Instruction RAM per core,
the INTC, CFG, Debug and Control sub-modules.

The two PRU cores within the PRUSS are represented as child
nodes (so platform devices themselves) of the PRUSS parent
node.

Signed-off-by: Suman Anna <s-anna@ti.com>
remoteproc/pruss: define platform data for PRU remoteproc

The PRUSS has a PRCM reset line associated with the IP. The reset
needs to be programmed properly before accessing any of the internal
registers in the PRUSS. This functionality is achieved through the
omap_device layer, which is not exposed outside of mach-omap2 layer.
Define a platform data structure for PRUSS so that this API can be
invoked through platform data ops from the driver.

Signed-off-by: Suman Anna <s-anna@ti.com>
ARM: OMAP2+: use pdata quirks for PRUSS reset lines on AM335x

The omap_device API is needed to perform the reset management for
any IP instances with PRCM RSTCTRL registers (hard reset lines).
This API is limited to the mach-omap2 layer, and cannot be exposed
to drivers layer directly. So use platform data ops and pdata quirks
for the PRUSS IP in AM335x SoCs to plumb the required omap_device
API. The PRUSS remoteproc driver can then use these pdata ops to
achieve the required reset functionality.

This is being implemented this way as there is no separate reset
driver at the moment.

Signed-off-by: Suman Anna <s-anna@ti.com>
remoteproc/core: introduce post loading handler

PRU custom resource handler for interrupts requires the event channel
information to be loaded into device memory, but the current core
code has the firmware segments loaded only after handling of the
loading handlers. Introduce a post loading handler, and process the
custom resource handler in this.

TODO: We may have to introduce the ability to process a custom resource
both before and after loading segments, as it really depends on what
is implemented within these handlers.

Signed-off-by: Suman Anna <s-anna@ti.com>
remoteproc/pruss: add a remoteproc driver for PRUSS in TI SoCs

The Programmable Real-Time Unit Subsystem (PRUSS) consists of
dual 32-bit RISC cores (Programmable Real-Time Units, or PRUs),
shared, data and instruction memories, some internal peripheral
modules, and an interrupt controller. The programmable nature
of the PRUs provide flexibility to implement custom peripheral
interfaces, fast real-time responses, or specialized data handling.

The PRUSS is present on various TI SoCS such as AM335x or AM437x.
A new remoteproc module is added to perform the device management
of the PRU cores. The module is implemented as two platform
drivers - one dealing with the overall PRUSS, and the other for
the individual PRU RISC cores. This design provides flexibility
in representing the different modules of PRUSS accordingly, and
at the same time allowing the PRUSS driver to add certain driver
specific platform data like PRU Id, firmware name etc. The parent
driver handles creating the platform devices for the PRUs.

The PRU remoteproc driver expects the firmware names to be
rproc-pru0-fw and rproc-pru1-fw, and uses the standard remoteproc
core ELF loader. The PRUs does not have a unified address space,
(has an Instruction RAM and a primary Data RAM at both 0x0) and
leverage an added .da_to_va ops to use the standard ELF loader.
This remoteproc driver is also designed to work with virtio, and
uses a mailbox for performing the virtio signalling.

The driver currently supports the AM335x SoC, and can be easily
scaled to support other TI SoCs.

Signed-off-by: Suman Anna <s-anna@ti.com>
remoteproc/pruss: add pru-specific debugfs support

The remoteproc core driver creates certain standard debugfs
entries, that does not give a whole lot of useful information
for the PRUs. The PRU remoteproc driver is enhanced to add
additional debugfs entries for PRU. These will be auto-cleaned
up when the parent rproc debug directory is removed.

The added debugfs support adds two new entries: 'regs' and
'single_step'. The 'regs' dumps out the useful CTRL sub-module
registers as well as 32 registers each of the GPREGs and CT_REGs.
The GPREGs and CT_REGs though are printed only when the PRU is
halted and accessible as per the IP design.

The 'single_step' utilizes the single-step execution of the PRU
cores. Writing a non-zero value performs a single step, and a
zero value restores the PRU to execute in the same as mode as
before the first single step. (note: if the PRU is halted
because of a halt instruction, then no change occurs).

Signed-off-by: Suman Anna <s-anna@ti.com>
ARM: dts: AM4372: Add the PRU-ICSS1 DT node

Add the DT node for the PRU-ICSS1 on AM437x family of SoCs.
The DT node uses all standard properties. The regs property
defines the addresses for various modules within the PRUSS,
including all the Data RAMs, the Instruction RAM per core,
the INTC, CFG, Debug and Control sub-modules.

The two PRU cores within the PRUSS are represented as child
nodes (so platform devices themselves) of the PRUSS parent
node.

The PRU-ICSS1 on AM437x is very similar to the PRUSS in AM33xx,
except for variations in the RAM sizes and the number of
interrupts coming into the MPU INTC.

Signed-off-by: Suman Anna <s-anna@ti.com>
ARM: OMAP2+: extend pruss pdata-quirks to AM4372

The omap_device API is needed to perform the reset management for
any IP instances with PRCM RSTCTRL registers (hard reset lines).
This API is limited to the mach-omap2 layer, and cannot be exposed
to drivers layer directly.

AM4372 requires the same functional reset management with PRUSS
as on AM33xx, so extend the AM33xx pruss pdata quirks to AM4372
as well. AM33xx relied on pdata quirks and platform data ops for
the PRUSS IP, to plumb the required omap_device API with the PRUSS
remoteproc driver using the pdata ops to achieve the required reset
functionality. This was implemented in this fashion as there is no
separate reset driver at the moment.

Signed-off-by: Suman Anna <s-anna@ti.com>
remoteproc/pruss: add support for PRU-ICSS1 on AM437x SoCs

Enhance the PRUSS remoteproc driver to support the PRU-ICSS1
sub-system on the AM437x family of SoCs. AM437x has two PRU-ICSS
instances, and support has been added only for PRU-ICSS1 at the
moment. PRU-ICSS1 on AM437x is very similar to the PRU-ICSS on
AM33xx except for few minor differences - increased Instruction
RAM, increased Shared Data RAM2, and 1 less interrupt towards
the MPU INTC.

Signed-off-by: Suman Anna <s-anna@ti.com>
Merge branch 'rproc-linux-3.14.y' of git://git.ti.com/rpmsg/remoteproc into rpmsg-ti-linux-3.14.y

Pull in the updated remoteproc feature branch that adds the support for a
new PRUSS remoteproc driver to load the PRU cores on the PRU-ICSS subsystem
on AM335x and PRU-ICSS1 subsystem on AM437x SoCs respectively.

* 'rproc-linux-3.14.y' of git://git.ti.com/rpmsg/remoteproc: (32 commits)
  remoteproc/pruss: add support for PRU-ICSS1 on AM437x SoCs
  ARM: OMAP2+: extend pruss pdata-quirks to AM4372
  ARM: dts: AM4372: Add the PRU-ICSS1 DT node
  remoteproc/pruss: add pru-specific debugfs support
  remoteproc/pruss: add a remoteproc driver for PRUSS in TI SoCs
  remoteproc/core: introduce post loading handler
  ARM: OMAP2+: use pdata quirks for PRUSS reset lines on AM335x
  remoteproc/pruss: define platform data for PRU remoteproc
  ARM: dts: AM33xx: Add the PRUSS DT node
  Documentation: dt: add PRUSS remoteproc bindings
  remoteproc/core: add a rproc ops for performing address translation
  remoteproc: add support to handle device specific resource types
  ARM: dts: AM4372: Add PRUSS1 PRU mboxes to mailbox node
  ARM: dts: AM33xx: Add PRU mboxes to mailbox node
  clk: ti: add "ti,gpio-gate-clock" controlled clock
  ARM: DTS: dra72-evm: Rename mmc2_3v3 regulator to the board level power name
  ARM: DTS: dra7-evm: Rename mmc2_3v3 regulator to the board level power name
  clk: ti: set CLK_SET_RATE_NO_REPARENT for ti,mux-clock
  clk: ti: fix clk_init retry logic with generic of_clk_init use
  clk: ti: change clock init to use generic of_clk_init
  ...

Signed-off-by: Suman Anna <s-anna@ti.com>
Merge branch 'rpmsg-ti-linux-3.14.y' of git://git.ti.com/rpmsg/rpmsg into ti-linux-3.14.y

TI-Feature: rpmsg
TI-Tree: git://git.ti.com/rpmsg/rpmsg.git
TI-Branch: rpmsg-ti-linux-3.14.y

* 'rpmsg-ti-linux-3.14.y' of git://git.ti.com/rpmsg/rpmsg:
  remoteproc/pruss: add support for PRU-ICSS1 on AM437x SoCs
  ARM: OMAP2+: extend pruss pdata-quirks to AM4372
  ARM: dts: AM4372: Add the PRU-ICSS1 DT node
  remoteproc/pruss: add pru-specific debugfs support
  remoteproc/pruss: add a remoteproc driver for PRUSS in TI SoCs
  remoteproc/core: introduce post loading handler
  ARM: OMAP2+: use pdata quirks for PRUSS reset lines on AM335x
  remoteproc/pruss: define platform data for PRU remoteproc
  ARM: dts: AM33xx: Add the PRUSS DT node
  Documentation: dt: add PRUSS remoteproc bindings
  remoteproc/core: add a rproc ops for performing address translation
  remoteproc: add support to handle device specific resource types
  ARM: dts: AM4372: Add PRUSS1 PRU mboxes to mailbox node
  ARM: dts: AM33xx: Add PRU mboxes to mailbox node

Conflicts:
	arch/arm/boot/dts/dra72-evm.dts
	arch/arm/mach-omap2/pdata-quirks.c

Signed-off-by: Dan Murphy <DMurphy@ti.com>
TI-Integration: Fix build break after rpmsg merge

There was an API change that occured in the power
management domain branch that was not available on the
rpmsg domain branch.  This caused the following error

drivers/remoteproc/wkup_m3_rproc.c: In function ‘wkup_m3_copy_aux_data’:
drivers/remoteproc/wkup_m3_rproc.c:240:12: error: too few arguments to function ‘rproc_da_to_va’
In file included from drivers/remoteproc/wkup_m3_rproc.c:34:0:
drivers/remoteproc/remoteproc_internal.h:71:7: note: declared here

Therefore per the rpmsg maintainer there needed to be 0 passed in as the
last argument.  This patch makes that change

Reported-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Dan Murphy <DMurphy@ti.com>
OMAPDSS: panel-tlc59108: fix module unload

The panel-tlc59108 has an empty module_exit() function, so module unload
can not work.

Use module_i2c_driver() to fix the module unload.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>