of the device (I/O space)
endif #DM_ETH
-choice
- prompt "SMC911X bus width"
- default SMC911X_16_BIT
-
config SMC911X_32_BIT
- bool "Enable 32-bit interface"
-
-config SMC911X_16_BIT
- bool "Enable 16-bit interface"
+ bool "Enable SMC911X 32-bit interface"
+ default n
help
- Define this if data bus is 16 bits. If your processor
- automatically converts one 32 bit word to two 16 bit
- words you may also try CONFIG_SMC911X_32_BIT.
+ Define this if data bus is 32 bits. If your processor use a
+ narrower 16 bit bus or cannot convert one 32 bit word to two 16 bit
+ words, leave this to "n".
-endchoice
endif #SMC911X
config SUN7I_GMAC
#define DRIVERNAME "smc911x"
-#if defined (CONFIG_SMC911X_32_BIT) && \
- defined (CONFIG_SMC911X_16_BIT)
-#error "SMC911X: Only one of CONFIG_SMC911X_32_BIT and \
- CONFIG_SMC911X_16_BIT shall be set"
-#endif
-
#if defined (CONFIG_SMC911X_32_BIT)
static u32 smc911x_reg_read(struct smc911x_priv *priv, u32 offset)
{
{
writel(val, priv->iobase + offset);
}
-#elif defined (CONFIG_SMC911X_16_BIT)
+#else
static u32 smc911x_reg_read(struct smc911x_priv *priv, u32 offset)
{
return (readw(priv->iobase + offset) & 0xffff) |
writew(val & 0xffff, priv->iobase + offset);
writew(val >> 16, priv->iobase + offset + 2);
}
-#else
-#error "SMC911X: undefined bus width"
-#endif /* CONFIG_SMC911X_16_BIT */
+#endif /* CONFIG_SMC911X_32_BIT */
static u32 smc911x_get_mac_csr(struct smc911x_priv *priv, u8 reg)
{