summaryrefslogtreecommitdiff
path: root/drivers/ata/ahci_ceva.c
AgeCommit message (Collapse)Author
2018-08-22ata: add an extra argument to ahci_platform_get_resources()Kunihiko Hayashi
Add an extra argument to ahci_platform_get_resources(), that is for the bitmap representing the resource to get in this function. Currently there is no resources to be defined, so all the callers set '0' to the argument. Suggested-by: Hans de Goede <hdegoede@redhat.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Matthias Brugger <matthias.bgg@gmail.com> Cc: Patrice Chotard <patrice.chotard@st.com> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2017-10-23ata: ceva: Add SMMU support for SATA IPAnurag Kumar Vulisha
AXI master interface in CEVA AHCI controller requires two unique Write/Read ID tags per port. This is because, ahci controller uses different AXI ID[3:0] bits for identifying non-data transfers(like reading descriptors, updating PRD tables, etc) and data transfers (like sending/receiving FIS).To make SMMU work with SATA we need to add correct SMMU stream id for SATA. SMMU stream id for SATA is determined based on the AXI ID[1:0] as shown below SATA SMMU ID = <TBU number>, 0011, 00, 00, AXI ID[1:0] Note: SATA in ZynqMp uses TBU1 so TBU number = 0x1, so SMMU ID = 001, 0011, 00, 00, AXI ID[1:0] Since we have four different AXI ID[3:0] (2 for port0 & 2 for port1 as said above) we get four different SMMU stream id's combinations for SATA. These AXI ID can be configured using PAXIC register. In this patch we assumed the below AXI ID values Read ID/ Write ID for Non-Data Port0 transfers = 0 Read ID/ Write ID for Data Port0 transfers = 1 Read ID/ Write ID for Non-Data Port1 transfers = 2 Read ID/ Write ID for Data Port1 transfers = 3 Based on the above values,SMMU stream ID's for SATA will be 0x4c0 & 0x4c1 for PORT0, 0x4c2 & 0x4c3 for PORT1. These values needed to be added to iommus dts property. This patch does the same. Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2017-10-23ata: ceva: Correct the suspend and resume logic for SATAAnurag Kumar Vulisha
The present suspend code disables the port interrupts and stops the HBA. On resume it enables the interrupts and HBA. This works fine until the FPD power domain is not off. If FPD is off then the ceva vendor specific configurations like OOB, AXI settings are lost, they need to be re-programmed and also since SERDES is also in FPD , SATA lane phy init needs to be called again (which is not happening in the present sequence) Because of this incorrect sequence SATA fails to work on resume. This patch corrects the code to make Suspend & Resume work in normal and FPD off cases. Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com> Reviewed-by: Shubhrajyoti Datta <shubhraj@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2017-10-23ata: ceva: Correct the AXI bus configuration for SATA portsAnurag Kumar Vulisha
Previously PAXIC register was programmed before configuring PCFG register. PCFG should be programmed with the address of the port for which PAXIC should be configured for. This was not happening before, so only one port PAXIC was written correctly and the other port was having wrong value. This patch moves the PXAIC register write after configuring PCFG, doing so will correct the axi bus settings for sata port0 & port1. Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2017-10-23ata: ceva: Add CCI support for SATA if CCI is enabledAnurag Kumar Vulisha
This patch adds support for CCI in SATA controller if CCI is enabled in design. This patch will add CCI settings for SATA if "dma-coherent" dts property is added. Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2017-10-23ata: ceva: Make RxWaterMark value as module parameterAnurag Kumar Vulisha
This patch updates the driver to make Rx Fifo water mark value as a module parameter. Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2017-10-23ata: ceva: Disable Device Sleep capabilityAnurag Kumar Vulisha
Since CEVA controller does not support Device Sleep capability, we need to clear that feature by clearing the DEVSLP bit in word78 of IDENTIFY DEVICE data. This patch does the same. Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2017-10-23ata: ceva: Add gen 3 mode support in driverAnurag Kumar Vulisha
This patch sets gen 3 mode as default mode in ahci_ceva driver. Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2017-10-23ata: ceva: Move sata port phy oob settings to device-treeAnurag Kumar Vulisha
In SATA Speed negotiation happens with OOB(Out of Band) signals. These OOB signal timing values are configured through vendor specific registers in the SATA controller. These OOB timings depends on the generator and detector clock frequency, which varies from board to board (ex: ep108 and zc1751 has different clock frequencies). To avoid maintaing these OOB settings in the driver, it is better to move these settings to the device-tree node and read from the device-tree. This patch does the same. Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-06-10drivers: ata: add support for Ceva sata host controllerSuneel Garapati
Adds support for Ceva sata host controller on Xilinx Zynq UltraScale+ MPSoC. Signed-off-by: Suneel Garapati <suneel.garapati@xilinx.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>