summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2014-03-26ata: sata_highbank: remove superfluous castBartlomiej Zolnierkiewicz
hpriv->plat_data is 'void *' so there is no need to cast it to 'struct ecx_plat_data *'. Cc: Mark Langsdorf <mark.langsdorf@calxeda.com> Cc: Rob Herring <robh@kernel.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-03-26ata: fix Calxeda Highbank SATA driver dependenciesBartlomiej Zolnierkiewicz
Make sata_highbank host driver depend on ARCH_HIGHBANK config option as Calxeda Highbank SATA support is specific to Calxeda Highbank SoCs and the driver to work requires suitable device tree node to be defined. Additionally allow the driver build if COMPILE_TEST config option is set. Cc: Mark Langsdorf <mark.langsdorf@calxeda.com> Cc: Rob Herring <robh@kernel.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-03-26ata: fix R-Car SATA driver dependenciesBartlomiej Zolnierkiewicz
Make sata_rcar host driver depend on ARCH_SHMOBILE config option as Renesas R-Car SATA support is specific to Renesas SoCs and the driver to work requires suitable device tree node (or platform device) to be defined. Additionally allow the driver build if COMPILE_TEST config option is set. Cc: Simon Horman <horms@verge.net.au> Cc: Magnus Damm <magnus.damm@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-03-25ata: add new-style AHCI platform driver for DaVinci DA850 AHCI controllerBartlomiej Zolnierkiewicz
Add the new ahci_da850 host driver. Platform changes needed to make DaVinci DA850 SATA AHCI support fully functional are in the separate "ARM: davinci: da850: update SATA AHCI support" commit. Please note that this driver doesn't have the superfluous clock control code as clock is already handled by the generic AHCI platform library code. Cc: Sekhar Nori <nsekhar@ti.com> Cc: Kevin Hilman <khilman@deeprootsystems.com> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-03-25ata: move library code from ahci_platform.c to libahci_platform.cBartlomiej Zolnierkiewicz
Move AHCI platform library code from ahci_platform.c to libahci_platform.c and fix dependencies for ahci_st, ahci_imx and ahci_sunxi drivers. Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-03-25ata: ahci_platform: fix ahci_platform_data->suspend method handlingBartlomiej Zolnierkiewicz
Looking at ST SPEAr1340 AHCI code (the only user of the deprecated pdata->suspend and pdata->resume) it is obvious the we should return after calling pdata->suspend() only if the function have returned non-zero return value. The code has been broken since commit 1e70c2 ("ata/ahci_platform: Add clock framework support"). Fix it. Cc: Viresh Kumar <viresh.linux@gmail.com> Cc: Shiraz Hashim <shiraz.hashim@st.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-03-18libata: async resumeTodd Brandt
Improve overall system resume time by making libata link recovery actions asynchronous relative to other resume events. Link resume operations are performed using the scsi_eh thread, so commands, particularly the sd resume start/stop command, will be held off until the device exits error handling. Libata already flushes eh with ata_port_wait_eh() in the port teardown paths, so there are no concerns with async operation colliding with the end-of-life of the ata_port object. Also, libata-core is already careful to flush in-flight pm operations before another round of pm starts on the given ata_port. Reference: https://01.org/suspendresume/blogs/tebrandt/2013/hard-disk-resume-optimization-simpler-approach Cc: Len Brown <len.brown@intel.com> Cc: Phillip Susi <psusi@ubuntu.com> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Todd Brandt <todd.e.brandt@linux.intel.com> [djbw: rebase on cleanup patch, changelog wordsmithing] Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-03-18libata, libsas: kill pm_result and related cleanupDan Williams
Tejun says: "At least for libata, worrying about suspend/resume failures don't make whole lot of sense. If suspend failed, just proceed with suspend. If the device can't be woken up afterwards, that's that. There isn't anything we could have done differently anyway. The same for resume, if spinup fails, the device is dud and the following commands will invoke EH actions and will eventually fail. Again, there really isn't any *choice* to make. Just making sure the errors are handled gracefully (ie. don't crash) and the following commands are handled correctly should be enough." The only libata user that actually cares about the result from a suspend operation is libsas. However, it only cares about whether queuing a new operation collides with an in-flight one. All libsas does with the error is retry, but we can just let libata wait for the previous operation before continuing. Other cleanups include: 1/ Unifying all ata port pm operations on an ata_port_pm_ prefix 2/ Marking all ata port pm helper routines as returning void, only ata_port_pm_ entry points need to fake a 0 return value. 3/ Killing ata_port_{suspend|resume}_common() in favor of calling ata_port_request_pm() directly 4/ Killing the wrappers that just do a to_ata_port() conversion 5/ Clearly marking the entry points that do async operations with an _async suffix. Reference: http://marc.info/?l=linux-scsi&m=138995409532286&w=2 Cc: Phillip Susi <psusi@ubuntu.com> Cc: Alan Stern <stern@rowland.harvard.edu> Suggested-by: Tejun Heo <tj@kernel.org> Signed-off-by: Todd Brandt <todd.e.brandt@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-03-18ata: Fix compiler warning with APM X-Gene host controller driverLoc Ho
This patch fixes an compiler warning with APM X-Gene host controller driver when compiled with DEBUG enabled. Signed-off-by: Loc Ho <lho@apm.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-03-17ata: Add APM X-Gene SoC AHCI SATA host controller driverLoc Ho
This patch adds support for the APM X-Gene SoC AHCI SATA host controller driver. It requires the corresponding APM X-Gene SoC PHY driver. This initial version only supports Gen3 speed. Signed-off-by: Loc Ho <lho@apm.com> Signed-off-by: Tuan Phan <tphan@apm.com> Signed-off-by: Suman Tripathi <stripathi@apm.com> Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-03-17ata: ahci_sunxi: fix code formattingBartlomiej Zolnierkiewicz
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Hans de Goede <hdegoede@redhat.com>
2014-03-17ata: ahci_sunxi: make ahci_sunxi_resume() staticBartlomiej Zolnierkiewicz
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Hans de Goede <hdegoede@redhat.com>
2014-03-14ata: ahci_platform: fix devm_ioremap_resource() return value checkingBartlomiej Zolnierkiewicz
devm_ioremap_resource() returns a pointer to the remapped memory or an ERR_PTR() encoded error code on failure. Fix the check inside ahci_platform_get_resources() accordingly. Also while at it remove a needless line break. Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-03-14ata: pata_imx: fix devm_ioremap_resource() return value checkingBartlomiej Zolnierkiewicz
devm_ioremap_resource() returns a pointer to the remapped memory or an ERR_PTR() encoded error code on failure. Fix the check inside pata_imx_probe() accordingly. Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-03-14ata: ahci_st: remove deprecated struct ahci_platform_data usageBartlomiej Zolnierkiewicz
struct ahci_platform_data is deprecated (please see comments in <linux/ahci_platform.h> for details). Convert ahci_st driver to use custom ->host_stop method instead. Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-03-14ata: ahci_st: build fixesBartlomiej Zolnierkiewicz
* The config option for ahci_st driver was renamed from CONFIG_SATA_AHCI_ST to CONFIG_AHCI_ST but Makefile was not updated. Fix it (also while at it move the ahci_st driver entry below ahci_imx and ahci_sunxi ones). * Fix a few build issues in the ahci_st driver itself. Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-03-14libata: zpodd: eliminate odd_can_poweroffAaron Lu
Now that we can directly get the ACPI device conterpart of the physical ATA transport device, the odd_can_poweroff can be eliminated. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-03-14libata: acpi: avoid passing NULL to ACPI evaluation methodAaron Lu
If ACPI handle for an ATA device is NULL, we shouldn't call ata_dev_get_GTF as that function will use handle to do some ACPI evaluation. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-03-14libata: zpodd: should depend on PM_RUNTIMEAaron Lu
ZPODD is built on top of runtime PM functionality, it doesn't make sense to have it in a kernel that doesn't have CONFIG_PM_RUNTIME set. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-03-14ata: Fix SC1200 dependenciesJean Delvare
The SC1200 is a SoC based on the Geode GX1 32-bit x86 processor, so its drivers are only needed on this architecture, except for build testing purpose. Signed-off-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-03-14ahci: st: Invoke AHCI Platform Suspend/ResumeLee Jones
This is where we disable IRQs on suspend and update the internal power state during suspend/resume. Suggested-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-03-14ahci: st: Only build for ST-Micro h/wLee Jones
This device is designed specifically to run on ST-Microelectronics' hardware. To ensure no attempts are made to run on anything incompatible we add a dependency on ST architecture Suggested-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-03-14ahci: st: Utilise ata_platform_remove_one() callLee Jones
ata_platform_remove_one() allows us to specify our own exit function via platform data then goes off and removes ATA Host and Port in preparation for device removal. Suggested-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-03-14ahci: st: Remove legacy dependencies on PHYLee Jones
Suggested-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-03-14ahci: st: Standardise naming conventionsLee Jones
Other devices have adopted similar naming conventions which have been accepted as the standard. This patch brings any mention of the the ST AHCI driver into line with them. Suggested-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-03-14ahci: st: Add support for ST's SATA IPLee Jones
Acked-by: Alexandre Torgue <alexandre.torgue@st.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-03-11pata_legacy: Remove dead codeSilvan Jegen
The current flow of control prevents this function from being called. Let's remove the call. Signed-off-by: Silvan Jegen <s.jegen@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-03-11ata: Fix CS55xx dependenciesJean Delvare
As far as I know, the CS5520 and CS5530 chipsets were only used with 32-bit x86 Geode processors, so I think their drivers are only needed on this architecture, except for build testing purpose. While we're here, simplify the dependencies for the CS5535 driver. The CS5536 was used with the Geode processors, but also on MIPS Loongson/Lemote 2 systems, so let its driver be built for these two architectures only, except for build testing purpose. Signed-off-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Ralf Baechle <ralf@linux-mips.org>
2014-03-07libata: end the r-wordDan Williams
Prompted by the social effort in the US to discourage usage of the adjective "retarded". In this case we needlessly anthropomorphize hard drives. The implication is that due to design deficiencies in the device reset recovery time is negatively impacted. We can simply clearly state that fact. "Exceptional devices cause outliers in reset recovery time." This steers clear of any unintended comparison of such devices to humans with cognitive disabilities. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-03-06ahci_imx: Put #ifdef CONFIG_PM_SLEEP around suspend / resume functionsHans de Goede
This fixes the following warnings when CONFIG_PM_SLEEP is not set: drivers/ata/ahci_imx.c:284:12: warning: ‘imx_ahci_suspend’ defined but not used [-Wunused-function] drivers/ata/ahci_imx.c:299:12: warning: ‘imx_ahci_resume’ defined but not used [-Wunused-function] Reported-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-02-23ahci_sunxi: Use msleep instead of mdelayHans de Goede
ahci_sunxi_phy_init is called from the probe and resume code paths, and sleeping is safe in both, so use msleep instead of mdelay. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-02-22ahci_platform: Drop unused ahci_platform_data membersHans de Goede
These members are not used anywhere, and in the future we want ahci_platform_data to go away entirely so there is no reason to keep these around. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-02-22ahci_platform: Drop support for imx53-ahci platform device typeHans de Goede
Since the 3.13 release the ahci_imx driver has proper devicetree enabled support for ahci on imx53 and that is used instead of the old board file created imx53-ahci platform device. Note this patch also complete drops the id-table, an id-table is not needed for a single id platform driver, the name field in the driver struct suffices. And the code already has an explicit "MODULE_ALIAS("platform:ahci");" so the id-table is not needed for that either. Cc: Marek Vasut <marex@denx.de> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-02-22ahci_platform: Drop support for ahci-strict platform device typeHans de Goede
I've done a grep over the entire kernel tree and nothing is using this (anymore?). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-02-22ata: ahci_platform: runtime resume the device before useRoger Quadros
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>
2014-02-22ata: ahci_platform: Manage SATA PHYRoger Quadros
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>
2014-02-22ata: ahci_platform: Add DT compatible for Synopsis DWC AHCI controllerRoger Quadros
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>
2014-02-22ahci-imx: Port to library-ised ahci_platformHans de Goede
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>
2014-02-22ARM: sunxi: Add support for Allwinner SUNXi SoCs sata to ahci_platformOlliver Schinagl
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>
2014-02-22ahci-platform: "Library-ise" suspend / resume functionalityHans de Goede
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>
2014-02-22ahci-platform: "Library-ise" ahci_probe functionalityHans de Goede
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>
2014-02-22ahci-platform: Add enable_ / disable_resources helper functionsHans de Goede
tj: Minor comment formatting updates. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-02-22ahci-platform: Add support for an optional regulator for sata-target powerHans de Goede
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-02-22ahci-platform: Add support for devices with more then 1 clockHans de Goede
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>
2014-02-22libahci: Allow drivers to override start_engineHans de Goede
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>
2014-02-20ata: libahci: replace obsolete simple_strtoul() with kstrtouint()Daeseok Youn
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-02-20ata: libahci: make ahci_pmp_retry_softreset() as staticDaeseok Youn
sparse says: drivers/ata/libahci.c:1390:5: warning: symbol 'ahci_pmp_retry_softreset' was not declared. Should it be static? Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-02-18ata: CONFIG_ATA is libataRandy Dunlap
Let users know that CONFIG_ATA is the kconfig symbol for libata, since libata is mentioned in documentation and messages several times. Also correct a grammar typo. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-02-18pata_imx: Propagate the real error code on platform_get_irq() failureFabio Estevam
No need to return a 'fake' return value on platform_get_irq() failure. Just return the error code itself instead. Also, change the error condition to irq < 0, so that only negative values are treated as errors. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-02-18pata_imx: Use devm_ioremap_resource() to simplify codeFabio Estevam
Using devm_ioremap_resource() can lead to code simplication, as we don't need to explicitily check for error returned by platform_get_resource(). Also, no need to print an error message when devm_ioremap_resource() fails, as the OOM code code will shout loudly on such condition. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Tejun Heo <tj@kernel.org>