ata: delete non-required instances of include <linux/init.h>

[ Upstream commit 1bc18086231c130895b87ec049be8ddcdab552b8 ]

None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>.  Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Cc: linux-ide@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Dan Murphy <DMurphy@ti.com>
libahci: Allow drivers to override start_engine

[ Upstream commit 039ece38da45f5e6a94be3aa7611cf3634bc2461 ]

Allwinner A10 and A20 ARM SoCs have an AHCI sata controller which needs a
special register to be poked before starting the DMA engine.

This register gets reset on an ahci_stop_engine call, so there is no other
place then ahci_start_engine where this poking can be done.

This commit allows drivers to override ahci_start_engine behavior for use by
the Allwinner AHCI driver (and potentially other drivers in the future).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Dan Murphy <DMurphy@ti.com>
ahci-platform: Add support for devices with more then 1 clock

[ Upstream commit 156c5887948cd191417f18026aab9ce26e5a95da ]

The allwinner-sun4i AHCI controller needs 2 clocks to be enabled and the
imx AHCI controller needs 3 clocks to be enabled.

tj: Minor comment formatting updates.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Dan Murphy <DMurphy@ti.com>
ahci-platform: Add support for an optional regulator for sata-target power

[ Upstream commit 4b3e603a298db26c6c37e8b08adcce24d014df13 ]

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Dan Murphy <DMurphy@ti.com>
ahci-platform: Add enable_ / disable_resources helper functions

[ Upstream commit 96a01ba52c60fdd74dd6e8cf06645d06515b1396 ]

tj: Minor comment formatting updates.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Dan Murphy <DMurphy@ti.com>
ahci-platform: "Library-ise" ahci_probe functionality

[ Upstream commit 23b07d4cb3c0c850055cf968af44019b8da185fb ]

ahci_probe consists of 3 steps:
1) Get resources (get mmio, clks, regulator)
2) Enable resources, handled by ahci_platform_enable_resouces
3) The more or less standard ahci-host controller init sequence

This commit refactors step 1 and 3 into separate functions, so the platform
drivers for AHCI implementations which need a specific order in step 2,
and / or need to do some custom register poking at some time, can re-use
ahci-platform.c code without needing to copy and paste it.

Note that ahci_platform_init_host's prototype takes the 3 non function
members of ahci_platform_data as arguments, the idea is that drivers using
the new exported utility functions will not use ahci_platform_data at all,
and hopefully in the future ahci_platform_data can go away entirely.

tj: Minor comment formatting updates.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Dan Murphy <DMurphy@ti.com>
ahci-platform: "Library-ise" suspend / resume functionality

[ Upstream commit 648cb6fd83b97f0f772db783a280af300fa9f2bc ]

Split suspend / resume code into host suspend / resume functionality and
resource enable / disabling phases, and export the new suspend_ / resume_host
functions.

tj: Minor comment formatting updates.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Dan Murphy <DMurphy@ti.com>
ARM: sunxi: Add support for Allwinner SUNXi SoCs sata to ahci_platform

[ Upstream commit c5754b5220f01e8722799d35c04a76e82c62d7d8 ]

This patch adds support for the ahci sata controler found on Allwinner A10
and A20 SoCs to the ahci_platform driver.

Orignally written by Olliver Schinagl using the approach of having a platform
device which probe method creates a new child platform device which gets
driven by ahci_platform.c, as done by ahci_imx.c .

Refactored by Hans de Goede to add most of the non sunxi specific functionality
to ahci_platform.c and use a platform_data pointer from of_device_id for the
sunxi specific bits.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Dan Murphy <DMurphy@ti.com>
ahci-imx: Port to library-ised ahci_platform

[ Upstream commit 90870d79d4f28711610dd2e72d8fa616c922d110 ]

This avoids the ugliness of creating a nested platform device from probe.

While moving it around anyways, move the mk6q phy init code from probe
to imx_sata_enable, as the phy needs to be re-initialized on resume too,
otherwise the drive won't be recognized after resume.

Tested on a wandboard i.mx6 quad.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Dan Murphy <DMurphy@ti.com>
ata: ahci_platform: Add DT compatible for Synopsis DWC AHCI controller

[ Upstream commit c431147184c05849f1d7e14f8fd6254e1026319d ]

Add compatible string "snps,dwc-ahci", which should be used
for Synopsis Designware SATA cores. e.g. on TI OMAP5 and DRA7 platforms.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Dan Murphy <DMurphy@ti.com>
ata: ahci_platform: Update DT compatible list

[ Upstream commit 42a7f53ba0f2baa2ea23cd830511cea7f8612dd2 ]

The ahci_platform driver supports "snps,dwc-ahci".
Add this to the DT binding information.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Dan Murphy <DMurphy@ti.com>
ata: ahci_platform: Manage SATA PHY

[ Upstream commit 21b5faeec229d4f70a7f60a7b0b065c98198f491 ]

Some platforms have a PHY hooked up to the SATA controller. The PHY
needs to be initialized and powered up for SATA to work. We do that
using the PHY framework.

tj: Minor comment formatting updates.

CC: Balaji T K <balajitk@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tejun Heo<tj@kernel.org>
Signed-off-by: Dan Murphy <DMurphy@ti.com>
ata: ahci_platform: runtime resume the device before use

[ Upstream commit e708e46edac8ab2f31e7ee991aa3c5b87638e658 ]

On OMAP platforms the device needs to be runtime resumed before it can
be accessed. The OMAP HWMOD framework takes care of enabling the
module and its resources based on the device's runtime PM state.

In this patch we runtime resume during .probe() and runtime suspend
after .remove().

We also update the runtime PM state during .resume().

CC: Balaji T K <balajitk@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Dan Murphy <DMurphy@ti.com>
ARM: dts: Get rid of incompatible ids for hci-omap USB host nodes

[ Upstream commit a2525e5404766d25474e164b818098ad348f3444 ]

[ Upstream commit a2525e5404766d25474e164b818098ad348f3444 ]

The OMAP EHCI and OHCI controllers are not compatible with drivers
other than "ti,ehci-omap" and "ti,ohci-omap3" respectively, so get
rid of the incompatible ids.

CC: Alan Stern <stern@rowland.harvard.edu>
CC: Nishant Menon <nm@ti.com>
CC: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Dan Murphy <DMurphy@ti.com>
phy: omap-control: Update DT binding information

[ Upstream commit d95faaec4763b94c9eedac9a1f933753015651ed ]

Move omap-control binding information to the right location.

Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Dan Murphy <DMurphy@ti.com>
phy: omap-control: update dra7 and am437 usb2 Documentation bindings

[ Upstream commit e99952093169b6d6fce8d612d6540c18c8759fff ]

The dra7-usb2 and am437-usb2 bindings have not yet been used.
Change them to be more elegant.

Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Dan Murphy <DMurphy@ti.com>
phy: ti-pipe3: Add clocks to PIPE3 PHY Documentation binding

[ Upstream commit 57554008699a640c7af114c3f67707a9b88d69a6 ]

Add wakeup, system and reference clocks to DT binding documentation.

Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Dan Murphy <DMurphy@ti.com>
Documentation: dt bindings: move ..usb/usb-phy.txt to ..phy/ti-phy.txt

[ Upstream commit 8d7212bc4107b343e93c13aa30c70b845f7f94ad ]

Since now we have a separate folder for phy, move the PHY dt binding
documentation of TI to that folder.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Dan Murphy <DMurphy@ti.com>
phy: ti-pipe3: Add SATA compatible to Documentation binding

[ Upstream commit 4b76e14d95f7b69e71eabc002dcb0dcb9ebb5340 ]

SATA PHY needs a new compatible ID. Add it to the DT binding documentation.

Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Dan Murphy <DMurphy@ti.com>
phy: omap-control: update dra7 and am437 usb2 bindings

[ Upstream commit 51c9f4adaee3fb01bb6f2e2ed72c0753c2609912 ]

The dra7-usb2 and am437-usb2 bindings have not yet been used.
Change them to be more elegant.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Dan Murphy <DMurphy@ti.com>