aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/xilinx
diff options
context:
space:
mode:
authorSrikanth Thokala <sthokal@xilinx.com>2013-12-07 03:10:49 -0500
committerDavid S. Miller <davem@davemloft.net>2013-12-09 21:02:25 -0500
commitec21b6b404dd850a23952ee3b871ff676c0703fa (patch)
tree59d076a2697c3e3d438a4ef24755c58cf278d30d /drivers/net/ethernet/xilinx
parent243fedd5fa4a4a72caae7bde3f0bd0354a256b88 (diff)
net: emaclite: add barriers to support Xilinx Zynq platform
This patch adds barriers at appropriate places to ensure the driver works on Xilinx Zynq ARM-based SoC platform. Signed-off-by: Srikanth Thokala <sthokal@xilinx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/xilinx')
-rw-r--r--drivers/net/ethernet/xilinx/xilinx_emaclite.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index b2850fdb517e..fefb8cd5eb65 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -220,6 +220,13 @@ static void xemaclite_aligned_write(void *src_ptr, u32 *dest_ptr,
220 *to_u16_ptr++ = *from_u16_ptr++; 220 *to_u16_ptr++ = *from_u16_ptr++;
221 *to_u16_ptr++ = *from_u16_ptr++; 221 *to_u16_ptr++ = *from_u16_ptr++;
222 222
223 /* This barrier resolves occasional issues seen around
224 * cases where the data is not properly flushed out
225 * from the processor store buffers to the destination
226 * memory locations.
227 */
228 wmb();
229
223 /* Output a word */ 230 /* Output a word */
224 *to_u32_ptr++ = align_buffer; 231 *to_u32_ptr++ = align_buffer;
225 } 232 }
@@ -235,6 +242,12 @@ static void xemaclite_aligned_write(void *src_ptr, u32 *dest_ptr,
235 for (; length > 0; length--) 242 for (; length > 0; length--)
236 *to_u8_ptr++ = *from_u8_ptr++; 243 *to_u8_ptr++ = *from_u8_ptr++;
237 244
245 /* This barrier resolves occasional issues seen around
246 * cases where the data is not properly flushed out
247 * from the processor store buffers to the destination
248 * memory locations.
249 */
250 wmb();
238 *to_u32_ptr = align_buffer; 251 *to_u32_ptr = align_buffer;
239 } 252 }
240} 253}