Thread (2 messages) read the whole thread 2 messages, 2 authors, 2017-03-23

Re: [PATCH] net: stmmac: dwmac-rk: Add handling for RGMII_ID/RXID/TXID

From: David Miller <davem@davemloft.net>
Date: 2017-03-23 02:32:52
Also in: linux-rockchip, lkml

From: Wadim Egorov <redacted>
Date: Wed, 22 Mar 2017 16:50:22 +0100
quoted hunk ↗ jump to hunk
@@ -74,6 +74,10 @@ struct rk_priv_data {
 #define GRF_BIT(nr)	(BIT(nr) | BIT(nr+16))
 #define GRF_CLR_BIT(nr)	(BIT(nr+16))
 
+#define DELAY_ENABLE(soc, tx, rx) \
+	((tx) ? soc##_GMAC_TXCLK_DLY_ENABLE : soc##_GMAC_TXCLK_DLY_DISABLE | \
+	 (rx) ? soc##_GMAC_RXCLK_DLY_ENABLE : soc##_GMAC_RXCLK_DLY_DISABLE)
This doesn't evaluate the way you want it to.

You need to put parenthesis around both "x ? a : b" expressions.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help