ata: ceva: Make RxWaterMark value as module parameter

This change “ata: ceva: Make RxWaterMark value as module parameter” (commit 05e890d) in Linux kernel is authored by Anurag Kumar Vulisha <anurag.kumar.vulisha [at] xilinx.com> on Mon Aug 21 13:17:20 2017 +0200.

Description of "ata: ceva: Make RxWaterMark value as module parameter"

The change “ata: ceva: Make RxWaterMark value as module parameter” introduces changes as follows.

ata: ceva: Make RxWaterMark value as module parameter

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>

Linux kernel releases containing commit 05e890d

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "ata: ceva: Make RxWaterMark value as module parameter"

There are 6 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/ata/ahci_ceva.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
 
diff --git a/drivers/ata/ahci_ceva.c b/drivers/ata/ahci_ceva.c
index b63fab2507fa..eff40ec86065 100644
--- a/drivers/ata/ahci_ceva.c
+++ b/drivers/ata/ahci_ceva.c
@@ -71,6 +71,10 @@
 #define DRV_NAME	"ahci-ceva"
 #define CEVA_FLAG_BROKEN_GEN2	1
 
+static unsigned int rx_watermark = PTC_RX_WM_VAL;
+module_param(rx_watermark, uint, 0644);
+MODULE_PARM_DESC(rx_watermark, "RxWaterMark value (0 - 0x80)");
+
 struct ceva_ahci_priv {
 	struct platform_device *ahci_pdev;
 	/* Port Phy2Cfg Register */
@@ -152,7 +156,7 @@ static void ahci_ceva_setup(struct ahci_host_priv *hpriv)
 		writel(cevapriv->pp5c[i], mmio + AHCI_VEND_PP5C);
 
 		/* Rx Watermark setting  */
-		tmp = PTC_RX_WM_VAL | PTC_RSVD;
+		tmp = rx_watermark | PTC_RSVD;
 		writel(tmp, mmio + AHCI_VEND_PTC);
 
 		/* Default to Gen 3 Speed and Gen 1 if Gen2 is broken */

The commit for this change in Linux stable tree is 05e890d (patch).

Last modified: 2020/02/09