Skip to content

Commit

Permalink
net/smsc911x: Correctly configure 16-bit register access from DT
Browse files Browse the repository at this point in the history
The SMSC911X_USE_16BIT needs to be set when using 16-bit register
access.  However, currently no flag is set if the device tree
doesn't specify 32-bit access, resulting in a BUG() and a non-
working driver when 16-bit register access is configured for
smsc911x in the DT.

This patch should set the SMSC911X_USE_16BIT flag in a manner
consistent with the documented DT bindings.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dave Martin authored and David S. Miller committed Sep 21, 2011
1 parent 9c9b1f2 commit f26cd41
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/smsc/smsc911x.c
Original file line number Diff line number Diff line change
Expand Up @@ -2121,6 +2121,8 @@ static int __devinit smsc911x_probe_config_dt(
of_property_read_u32(np, "reg-io-width", &width);
if (width == 4)
config->flags |= SMSC911X_USE_32BIT;
else
config->flags |= SMSC911X_USE_16BIT;

if (of_get_property(np, "smsc,irq-active-high", NULL))
config->irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH;
Expand Down

0 comments on commit f26cd41

Please sign in to comment.