linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] can: xilinx: use readl/writel instead of ioread/iowrite
@ 2015-10-22  4:46 Kedareswara rao Appana
  2015-10-22  4:46 ` [PATCH 2/2] can: xilinx: fix bug in bus error handling Kedareswara rao Appana
  2015-10-22  8:14 ` [PATCH 1/2] can: xilinx: use readl/writel instead of ioread/iowrite Arnd Bergmann
  0 siblings, 2 replies; 13+ messages in thread
From: Kedareswara rao Appana @ 2015-10-22  4:46 UTC (permalink / raw)
  To: linux-arm-kernel

The driver only supports memory-mapped I/O [by ioremap()],
so readl/writel is actually the right thing to do, IMO.
During the validation of this driver or IP on ARM 64-bit processor
while sending lot of packets observed that the tx packet drop with iowrite
Putting the barriers for each tx fifo register write fixes this issue
Instead of barriers using writel also fixed this issue.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
---
 drivers/net/can/xilinx_can.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c
index 6114214..055d6f3 100644
--- a/drivers/net/can/xilinx_can.c
+++ b/drivers/net/can/xilinx_can.c
@@ -170,7 +170,7 @@ static const struct can_bittiming_const xcan_bittiming_const = {
 static void xcan_write_reg_le(const struct xcan_priv *priv, enum xcan_reg reg,
 			u32 val)
 {
-	iowrite32(val, priv->reg_base + reg);
+	writel(val, priv->reg_base + reg);
 }
 
 /**
@@ -183,7 +183,7 @@ static void xcan_write_reg_le(const struct xcan_priv *priv, enum xcan_reg reg,
  */
 static u32 xcan_read_reg_le(const struct xcan_priv *priv, enum xcan_reg reg)
 {
-	return ioread32(priv->reg_base + reg);
+	return readl(priv->reg_base + reg);
 }
 
 /**
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-10-26  1:25 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-22  4:46 [PATCH 1/2] can: xilinx: use readl/writel instead of ioread/iowrite Kedareswara rao Appana
2015-10-22  4:46 ` [PATCH 2/2] can: xilinx: fix bug in bus error handling Kedareswara rao Appana
2015-10-22 16:33   ` Sören Brinkmann
2015-10-23  5:21     ` Appana Durga Kedareswara Rao
2015-10-22  8:14 ` [PATCH 1/2] can: xilinx: use readl/writel instead of ioread/iowrite Arnd Bergmann
2015-10-22  8:21   ` Marc Kleine-Budde
2015-10-22  8:39     ` Appana Durga Kedareswara Rao
2015-10-22  8:58     ` Arnd Bergmann
2015-10-25 20:32       ` Marc Kleine-Budde
2015-10-26  1:25         ` Arnd Bergmann
2015-10-22  8:34   ` Appana Durga Kedareswara Rao
2015-10-22  9:02     ` Arnd Bergmann
2015-10-22  9:49       ` Michal Simek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).