summaryrefslogtreecommitdiff
path: root/drivers/ata/pata_imx.c
AgeCommit message (Collapse)AuthorFilesLines
2016-11-09pata: imx: support controller modes up to PIO4Vladimir Zapolskiy1-1/+1
Having timing settings for all supported by the controller PIO modes now it is possible to expand its PIO mask. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2016-11-09pata: imx: add support of setting timings for PIO modesVladimir Zapolskiy1-1/+46
The controller is capable to operate in up to PIO4 mode, however before the change the driver relies on timing settings done by a bootloader for PIO0 mode only. The change adds more flexibility in PIO mode selection at runtime and makes the driver to work even if bootloader does not preset ATA timings. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2016-11-09pata: imx: set controller PIO mode with .set_piomode callbackVladimir Zapolskiy1-19/+8
Convert .set_mode callback function to more specific .set_piomode, the driver does not have support of DMA modes, thus a simpler version of the callback is preferred. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2016-11-09pata: imx: sort headers outVladimir Zapolskiy1-5/+3
Put headers in alphabetic order and remove redundant ones. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-10-20ata: drop owner assignment from platform_driversWolfram Sang1-1/+0
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-05ata: pata_imx: Use the SIMPLE_DEV_PM_OPS() macroFabio Estevam1-7/+2
Using the SIMPLE_DEV_PM_OPS() macro can make the code shorter and cleaner. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-05-10ata: use CONFIG_PM_SLEEP instead of CONFIG_PM where applicable in host driversBartlomiej Zolnierkiewicz1-2/+2
This patch fixes host drivers to use CONFIG_PM_SLEEP instead of CONFIG_PM where applicable. Benefits of this change: * unused code is not being compiled in for CONFIG_PM=y, CONFIG_PM_SLEEP=n and CONFIG_PM_RUNTIME=y configurations * easier transition to use struct dev_pm_ops and SIMPLE_DEV_PM_OPS() in the future * more consistent code (there are host drivers which are using the correct CONFIG_PM_SLEEP checks already) The patch leaves the core libata code and ->port_[suspend,resume] support in sata_[inic162x,nv,sil24].c alone for now. Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-04-01Merge branch 'for-3.15' of ↵Linus Torvalds1-12/+6
git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata updates from Tejun Heo: "A lot of activities on libata side this time. - A lot of changes around ahci. Various embedded platforms are implementing ahci controllers. Some were built atop ahci_platform, others were doing their own things. Hans made some structural changes to libahci and librarized ahci_platform so that ahci platform drivers can share more common code. A couple platform drivers are added on top of that and several are added to replace older drivers which were doing their own things (older ones are scheduled to be removed). - Dan finishes the patchset to make libata PM operations asynchronous. Combined with one patch being routed through scsi, this should speed resume measurably. - Various fixes and cleanups from Bartlomiej and others" * 'for-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: (61 commits) ata: fix Marvell SATA driver dependencies ata: fix ARASAN CompactFlash PATA driver dependencies ata: remove superfluous casts ata: sata_highbank: remove superfluous cast ata: fix Calxeda Highbank SATA driver dependencies ata: fix R-Car SATA driver dependencies ARM: davinci: da850: update SATA AHCI support ata: add new-style AHCI platform driver for DaVinci DA850 AHCI controller ata: move library code from ahci_platform.c to libahci_platform.c ata: ahci_platform: fix ahci_platform_data->suspend method handling libata: remove unused ata_sas_port_async_resume() stub libata.h: add stub for ata_sas_port_resume libata: async resume libata, libsas: kill pm_result and related cleanup ata: Fix compiler warning with APM X-Gene host controller driver arm64: Add APM X-Gene SoC AHCI SATA host controller DTS entries ata: Add APM X-Gene SoC AHCI SATA host controller driver Documentation: Add documentation for the APM X-Gene SoC SATA host controller DTS binding arm64: Add APM X-Gene SoC 15Gbps Multi-purpose PHY DTS entries ata: ahci_sunxi: fix code formatting ...
2014-03-14ata: pata_imx: fix devm_ioremap_resource() return value checkingBartlomiej Zolnierkiewicz1-2/+2
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-02-19pata_imx: Propagate the real error code on platform_get_irq() failureFabio Estevam1-2/+2
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-19pata_imx: Use devm_ioremap_resource() to simplify codeFabio Estevam1-7/+2
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>
2014-02-14ata: delete non-required instances of include <linux/init.h>Paul Gortmaker1-1/+0
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>
2014-01-29ata: pata_imx: Check the return value from clk_prepare_enable()Fabio Estevam1-2/+6
clk_prepare_enable() may fail, so let's check its return value and propagate it in the case of error. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2013-07-29pata_imx: expose module alias for loading from device-treeNiels de Vos1-0/+1
Enable auto loading by udev when pata_imx is compiled as a module. Signed-off-by: Niels de Vos <ndevos@redhat.com> Cc: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Tejun Heo <tj@kernel.org>
2013-05-24ata: use platform_{get,set}_drvdata()Jingoo Han1-1/+1
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Also, unnecessary dev_set_drvdata() is removed, because the driver core clears the driver data to NULL after device_release or on probe failure. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2013-04-12pata_imx: add devicetree supportSascha Hauer1-0/+9
Not much to do here, only the compatible entries have to be added. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2013-04-12pata_imx: use void __iomem * for regsSascha Hauer1-1/+1
regs is returned from ioremap, so add a __iomem. Also, make it void * instead of u8 *. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2013-04-12pata_imx: cleanup error pathSascha Hauer1-6/+14
- rename free_priv label to 'err' since priv is allocated with devm_* and not freed here. - add missing 'goto err' in case ata_host_activate fails - add 'ret' variable to return correct error value instead of hardcoded -ENOMEM in error case. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2013-04-12pata_imx: Use devm_clk_getSascha Hauer1-3/+2
To make the error path a bit simpler. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2013-01-04Drivers: ata: remove __dev* attributes.Greg Kroah-Hartman1-3/+3
CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitdata, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Jeff Garzik <jgarzik@pobox.com> Cc: Viresh Kumar <viresh.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-12-14pata_imx: convert ata_dev_printk() to ata_dev_info()Wei Yongjun1-1/+1
Using ata_dev_info() instead of ata_dev_printk(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-07-25pata_imx: Convert to clk_prepare_enable/clk_disable_unprepareFabio Estevam1-5/+5
With the new i.mx clock framework, we need to use clk_prepare_enable/clk_disable_unprepare. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-01-09SATA/PATA: convert drivers/ata/* to use module_platform_driver()Axel Lin1-11/+1
This patch converts the drivers in drivers/ata/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: Viresh Kumar <viresh.kumar@st.com> Cc: Jeff Garzik <jgarzik@pobox.com> Cc: Arnaud Patard <arnaud.patard@rtp-net.org> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Sylvain Munaut <tnt@246tNt.com> Cc: Anton Vorontsov <avorontsov@ru.mvista.com> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Florian Fainelli <florian@openwrt.org> Cc: Mark Miesfeld <mmiesfeld@amcc.com> Cc: Ashish Kalra <ashish.kalra@freescale.com> Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2011-08-19ata: Add iMX pata supportArnaud Patard (Rtp)1-0/+253
Add basic support for pata on iMX. It has been tested only on imx51. SDMA support will probably be added later so this version supports only PIO. v2: - enable only when needed IORDY - use dev_get_drvdata v3: - add missing clk_put() calls - use platform_get_irq() - fix resume code to avoid disabling IORDY on resume v4: - Remove EXPERIMENTAL and switch to depends on ARCH_MXC - Use devm_kzalloc() - make clock a must-have - Use only 1 ioremap Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>