mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
Improve Power Management in SMC911X driver.
device is already in *normal* (D0) mode => it doesn't need to be wake-up. With this patch, we only wake-up (writing on TEST_BYTE register) if PM_MODE bits of PM_CTRL register is in sleep (D1/D2) mode. Signed-off-by: Bertrand Cachet <bertrand.cachet@heig-vd.ch>
This commit is contained in:
parent
27aafe988e
commit
3c8849df5f
1 changed files with 5 additions and 2 deletions
|
@ -471,8 +471,11 @@ static void smc911x_reset(struct eth_device *dev)
|
|||
{
|
||||
int timeout;
|
||||
|
||||
/* Take out of PM setting first */
|
||||
if (smc911x_reg_read(dev, PMT_CTRL) & PMT_CTRL_READY) {
|
||||
/*
|
||||
* Take out of PM setting first
|
||||
* Device is already wake up if PMT_CTRL_READY bit is set
|
||||
*/
|
||||
if ((smc911x_reg_read(dev, PMT_CTRL) & PMT_CTRL_READY) == 0) {
|
||||
/* Write to the bytetest will take out of powerdown */
|
||||
smc911x_reg_write(dev, BYTE_TEST, 0x0);
|
||||
|
||||
|
|
Loading…
Reference in a new issue