]> git.baikalelectronics.ru Git - kernel.git/commit
net/macb: fix probe sequence to setup clocks earlier
authorNicolas Ferre <nicolas.ferre@atmel.com>
Tue, 31 Mar 2015 13:02:03 +0000 (15:02 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 31 Mar 2015 20:51:17 +0000 (16:51 -0400)
commitd528f785e53175954ffa6b43011d899ebeace2c2
tree08ed269c3126186d5fb9bb2c0bdfecfe5f0435f8
parent45b6e7b3e46dc255711451729d7c104a46a784af
net/macb: fix probe sequence to setup clocks earlier

As accessing the peripheral registers need the clocks to be set, we have to
enable them as soon as possible. Their configuration depend on the type of
device used and determined by the DT compatible string. That lead to add
another initialization function in the DT configuration structure.
As the device private structure length depend on an information read in the
registers, we have to store the clock pointers in temporary variables before
feeding the structure fields.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cadence/macb.c
drivers/net/ethernet/cadence/macb.h