Thread (13 messages) flat view 13 messages, 2 authors, 2011-07-06

Re: [PATCH net-next 4/6] r8169: add ERI functions

From: Francois Romieu <romieu@fr.zoreil.com>
Date: 2011-07-05 19:09:49
Also in: lkml

Hayes Wang [off-list ref] :
[...]
quoted hunk ↗ jump to hunk
@@ -1046,6 +1046,49 @@ static u32 rtl_csi_read(void __iomem *ioaddr, int addr)
 	return value;
 }
 
+static
+void rtl_eri_write(void __iomem *ioaddr, int addr, u32 mask, u32 val, int type)
+{
+	unsigned int i;
+
+	BUG_ON((addr & 3) || (mask == 0));
+	RTL_W32(ERIDR, val);
+	RTL_W32(ERIAR, ERIAR_WRITE_CMD | type | mask | addr);
+
+	for (i = 0; i < 100; i++) {
+		udelay(100);
+		if (!(RTL_R32(ERIAR) & ERIAR_FLAG))
+			break;
I'd rather reverse those if possible : implicit posted write flushing read,
then udelay.

-- 
Ueimor
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help