summaryrefslogtreecommitdiffstats
path: root/include/linux/smsc911x.h
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2009-04-27 21:32:16 +0000
committerDavid S. Miller <davem@davemloft.net>2009-04-28 01:53:11 -0700
commit833cc67c7722e35863c6aaee9df56b442ef957ae (patch)
treeea7d2f6983fc9a8334065e291678eb418a1d5e44 /include/linux/smsc911x.h
parent52fbc1007eb071c40a367462476eee695b412578 (diff)
smsc911x: add fifo byteswap support V2
This is V2 of the smsc911x fifo byteswap patch. The smsc911x hardware supports both big and little and endian hardware configurations, and the linux smsc911x driver currently detects word order. For correct operation on big endian platforms lacking swapped byte lanes the following patch is needed. Only fifo data is swapped, register data does not require any swapping. Signed-off-by: Magnus Damm <damm@igel.co.jp> Acked-by: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/smsc911x.h')
-rw-r--r--include/linux/smsc911x.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/smsc911x.h b/include/linux/smsc911x.h
index b32725075d7..5241e4fb4ec 100644
--- a/include/linux/smsc911x.h
+++ b/include/linux/smsc911x.h
@@ -47,4 +47,14 @@ struct smsc911x_platform_config {
#define SMSC911X_FORCE_EXTERNAL_PHY (BIT(3))
#define SMSC911X_SAVE_MAC_ADDRESS (BIT(4))
+/*
+ * SMSC911X_SWAP_FIFO:
+ * Enables software byte swap for fifo data. Should only be used as a
+ * "last resort" in the case of big endian mode on boards with incorrectly
+ * routed data bus to older devices such as LAN9118. Newer devices such as
+ * LAN9221 can handle this in hardware, there are registers to control
+ * this swapping but the driver doesn't currently use them.
+ */
+#define SMSC911X_SWAP_FIFO (BIT(5))
+
#endif /* __LINUX_SMSC911X_H__ */