summaryrefslogtreecommitdiffstats
path: root/drivers/ata/ahci_st.c
Commit message (Collapse)AuthorAgeFilesLines
* ahci: st: Add ports-implemented property in supportPatrice Chotard2016-08-101-0/+4
| | | | | | | | | Despite ST AHCI version = 1.3, reading HOST_PORTS_IMPL returns 0. So force_port_map to 1 by using ports-implemented DT property. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Tejun Heo <tj@kernel.org>
* ata: ahci_st: fixup layering violations / drvdata errorsPeter Griffin2015-04-201-25/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | Brian noticed while working on another SATA driver that uses libahci_platform, an error in this driver; it tries to the the driver data for its device, while libata also thinks it can set the driver data. See: ahci_platform_init_host() -> ata_host_alloc_pinfo() -> ata_host_alloc() -> dev_set_drvdata() So instead of sticking the IP-specific platform data into drvdata, let's use the plat_data variable that is reserved for this use. Addtionally plat_data isn't set until ahci_platform_init_host() has been called further down in probe(). So re-work the st_ahci_probe_resets and st_ahci_deassert_resets functions to take ahci_host_priv *hpriv as a parameter. Signed-off-by: Peter Griffin <peter.griffin@linaro.org> Suggested-by: Brian Norris <computersforpeace@gmail.com> Cc: Srinivas Kandagatla <srinivas.kandagatla@gmail.com> Cc: Maxime Coquelin <maxime.coquelin@st.com> Cc: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Tejun Heo <tj@kernel.org>
* ahci: st: st_configure_oob must be called after IP is clocked.Peter Griffin2015-04-011-2/+4
| | | | | | | | | | | | | | | | | Currently the ahci_st driver will hang the system on probe, as the st_configure_oob function does some register writes before the IP is clocked. This patch moves the function call to after ahci_platform_enable_resources (which enables the IP clock), and resolves the hang. Addtionally st_ahci_configure_oob should be called in the st_ahci_resume function, so we also rectify that ensuring it is also called after the IP clock has been enabled. Signed-off-by: Peter Griffin <peter.griffin@linaro.org> Acked-by: Lee Jones <lee.jones@linaro.org> Acked-by: Maxime Coquelin <maxime.coquelin@st.com> Signed-off-by: Tejun Heo <tj@kernel.org>
* ata: ahci_platform: fix owner module reference mismatch for scsi hostAkinobu Mita2015-01-281-2/+9
| | | | | | | | | | | | | | | | | | | The owner module reference of the ahci platform's scsi_host is initialized to libahci_platform's one, because these drivers use a scsi_host_template defined in libahci_platform. So these drivers can be unloaded even if the scsi device is being accessed. This fixes it by pushing the scsi_host_template from libahci_platform to all leaf drivers. The scsi_host_template is passed through a new argument of ahci_platform_init_host(). Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: "James E.J. Bottomley" <JBottomley@parallels.com> Cc: linux-ide@vger.kernel.org Cc: linux-scsi@vger.kernel.org
* ata: drop owner assignment from platform_driversWolfram Sang2014-10-201-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>
* ata: libahci_platform: move port_map parameters into the AHCI structureAntoine Ténart2014-07-301-1/+1
| | | | | | | | | | | | | | This patch moves force_port_map and mask_port_map into the ahci_host_priv structure. This allows to modify them into the AHCI framework. This is needed by the new dt bindings representing ports as the port_map mask is computed automatically. Parameters modifying force_port_map, mask_port_map and flags have been removed from the ahci_platform_init_host() function, and inputs in the ahci_host_priv structure are now directly filed. Signed-off-by: Antoine Ténart <antoine.tenart@free-electrons.com> Signed-off-by: Tejun Heo <tj@kernel.org>
* ahci: st: Make of_device_id array constKiran Padwal2014-07-221-1/+1
| | | | | | | | Make of_device_id array const, because all OF functions handle it as const. Signed-off-by: Kiran Padwal <kiran.padwal21@gmail.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Tejun Heo <tj@kernel.org>
* libahci_platform: add host_flags parameter in ahci_platform_init_host()Kefeng Wang2014-05-141-1/+1
| | | | | | | | | | | Add a dynamic host_flags argument to make ahci_platform_init_host more flexible, then remove the AHCI_HFLAGS(...) argument from some driver's ata_port_info, and pass that in as the new argument. Cc: Hans de Geode <hdegoede@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Kefeng Wang <kefeng.wang@linaro.org> Signed-off-by: Tejun Heo <tj@kernel.org>
* ata: ahci_st: remove deprecated struct ahci_platform_data usageBartlomiej Zolnierkiewicz2014-03-141-11/+9
| | | | | | | | | 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>
* ata: ahci_st: build fixesBartlomiej Zolnierkiewicz2014-03-141-7/+5
| | | | | | | | | | | | * 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>
* ahci: st: Invoke AHCI Platform Suspend/ResumeLee Jones2014-03-141-1/+5
| | | | | | | | | 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>
* ahci: st: Utilise ata_platform_remove_one() callLee Jones2014-03-141-18/+26
| | | | | | | | | | 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>
* ahci: st: Remove legacy dependencies on PHYLee Jones2014-03-141-2/+0
| | | | | | 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>
* ahci: st: Standardise naming conventionsLee Jones2014-03-141-1/+1
| | | | | | | | | | 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>
* ahci: st: Add support for ST's SATA IPLee Jones2014-03-141-0/+239
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>