smsc911x: add dynamic bus configuration

Convert the driver to select 16-bit or 32-bit bus access at runtime,
at a small performance cost.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Steve Glendinning
2008-11-05 00:35:38 +00:00
committed by David S. Miller
parent 6fabd715e6
commit 2107fb8b5b
3 changed files with 83 additions and 79 deletions

View File

@@ -28,6 +28,7 @@
struct smsc911x_platform_config {
unsigned int irq_polarity;
unsigned int irq_type;
unsigned int flags;
phy_interface_t phy_interface;
};
@@ -39,4 +40,8 @@ struct smsc911x_platform_config {
#define SMSC911X_IRQ_TYPE_OPEN_DRAIN 0
#define SMSC911X_IRQ_TYPE_PUSH_PULL 1
/* Constants for flags */
#define SMSC911X_USE_16BIT (BIT(0))
#define SMSC911X_USE_32BIT (BIT(1))
#endif /* __LINUX_SMSC911X_H__ */