mfd: tps65218: Add driver for the TPS65218 PMIC

commit 44b4dc616365d7897808555d415099330e3af9df upstream.

The TPS65218 chip is a power management IC for Portable Navigation Systems
and Tablet Computing devices. It contains the following components:

 - Regulators.
 - Over Temperature warning and Shut down.

This patch adds support for tps65218 mfd device. At this time only
the regulator functionality is made available.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
mfd: tps65218: Terminate of match table

commit 8320513e8b4c815206b5cc60f92a71c9ca5c439e upstream.

Failure to terminate this match table can lead to boot failures
depending on where the compiler places the match table.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
ARM: dts: am4372: let boards access all nodes through labels

commit 08ecb28a7047d4431b61b73ebf9b216de6b29444 upstream.

By providing labels for rtc, wdt, cpu and dispc nodes,
boards can access them to add board-specific data.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Tested-by: Franklin Cooper Jr. <fcooper@ti.com>
Tested-by: Tom Rini <trini@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
ARM: dts: add support for AM437x StarterKit

commit 4a45787dec8a15b211110be807b4f4aad2828385 upstream.

Add support for TI's AM437x StarterKit Evaluation
Module.

Cc: Josh Elliot <jelliott@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Tested-by: Franklin Cooper Jr. <fcooper@ti.com>
Tested-by: Tom Rini <trini@ti.com>
Tested-by: Darren Etheridge <detheridge@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
dmaengine: omap-dma: use devm_kzalloc() to allocate omap_dmadev.

[Upstream commit 104fce73fdbd174eb08a493eeb2920fd59e6d3f4 ]

Use devm_kzalloc() to allocate omap_dmadev() so that we don't need
complex error cleanup paths.

Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
dmaengine: omap-dma: provide a hook to get the underlying DMA platform ops

[ Upstream commit 1b416c4b41351c3eb8fc42dbb4cd8eba463c0813 ]

Provide and use a hook to obtain the underlying DMA platform operations
so that omap-dma.c can access the hardware more directly without
involving the legacy DMA driver.

Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
dmaengine: omap-dma: program hardware directly

[ Upstream commit b9e97822da374f52aaf99cb502f531ff2184b8f5 ]

Program the transfer parameters directly into the hardware, rather
than using the functions in arch/arm/plat-omap/dma.c.

Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
dmaengine: omap-dma: consolidate writes to DMA registers

[ Upstream commit 913a2d0c6952283bc9323cb9152af87f792ff4c4 ]

There's no need to keep writing registers which don't change value in
omap_dma_start_sg().  Move this into omap_dma_start_desc() and merge
the register updates together.

Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
dmaengine: omap-dma: control start/stop directly

[ Upstream commit fa3ad86ae0576b2c721800cc4d46864aa6d31ffd ]

Program the non-cyclic mode DMA start/stop directly, rather than via
arch/arm/plat-omap/dma.c.

Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
dmaengine: omap-dma: move reading of dma position to omap-dma.c

[ Upstream commit 3997cab391b38e126f217e36ad7bdc9672c9fb4d ]

Read the current DMA position from the hardware directly rather than via
arch/arm/plat-omap/dma.c.

Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
dmaengine: omap-dma: consolidate setup of CSDP

[ Upstream commit 2f0d13bdf6440906bb52fe94681ce7927145f4d7 ]

Consolidate the setup of the channel source destination parameters
register.  This way, we calculate the required CSDP value when we setup
a transfer descriptor, and only write it to the device registers once
when we start the descriptor.

Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
dmaengine: omap-dma: consolidate setup of CCR

[ Upstream commit 3ed4d18f39bcd8cb8d8218c0a5f89a4d81ba8730 ]

Consolidate the setup of the channel control register.  Prepare the
basic value in the preparation of the DMA descriptor, and write it into
the register upon descriptor execution.

Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
dmaengine: omap-dma: provide register definitions

[ Upstream commit 9043826d88467091543c1d3ab06eb4afeed34789 ]

Provide our own set of more complete register definitions; this allows
us to get rid of the meaningless 1 << n constants scattered throughout
this code.

Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
dmaengine: omap-dma: move CCR buffering disable errata out of the fast path

[ Upstream commit 49ae0b29439446cff81c32bf01fb7b7cce195373 ]

Since we record the CCR register in the dma transaction, we can move the
processing of the iframe buffering errata out of the omap_dma_start().
Move it to the preparation functions.

Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
dmaengine: omap-dma: consolidate clearing channel status register

[ Upstream commit 470b23f7308dd2af25bd075d14a724f8ccd93985 ]

Consolidate clearing of the channel status register, rather than open
coding the same functionality in two places.

Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
dmaengine: omap-dma: improve efficiency loading C.SA/C.EI/C.FI registers

[Upstream commit 893e63e301e37cd3be7afb55c95eb8ef6ead304b ]

The only thing which changes is which registers are written, so put this
in local variables instead.  This results in smaller code.

Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
dmaengine: omap-dma: move clnk_ctrl setting to preparation functions

[ Upstream commit 965aeb4df1f2142f5a6407c6d40b7196be719582 ]

Move the clnk_ctrl setup to the preparation functions, saving its
value in the omap_desc.  This only needs to be set once per descriptor,
not for each segment, so set it in omap_dma_start_desc() rather than
omap_dma_start().

Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
dmaengine: omap-dma: move barrier to omap_dma_start_desc()

[ Upstream commit 59871902703c47acc730555be41bd9cb36d3700c ]

We don't need to issue a barrier for every segment of a DMA transfer;
doing this just once per descriptor will do.

Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
dmaengine: omap-dma: use cached CCR value when enabling DMA

[ Upstream commit 45da7b0451b1fe15e882b08c79be58458cbe7a2f ]

We don't need to read-modify-write the CCR register; we already know
what value it should contain at this point.  Use the cached CCR value
when setting the enable bit.

Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
dmaengine: omap-dma: provide register read/write functions

[ Upstream commit c5ed98b6ae79545284b7855a07ded32934865a6d ]

Provide a pair of channel register accessors, and a pair of global
accessors for non-channel specific registers.

Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>