Patch: Power Mangement with smc911x driver
A message that is not in the archive (sent off-list or not yet received): Patches for SMSC LAN911X driver on UBoot and QEMU
Hello,
In a previous email I sent a patch without following u-boot gitflow. So I send my patch again following informations provided by Mike Frysinger.
I hope that I have done everything correctly now.
Sincerely
Bertrand Cachet
PATCH 1/1 Improve Power Management in SMC911X driver.
From: Bertrand Cachet <[email protected]>
PATCH 1/1 Improve Power Management in SMC911X driver.
Hi Bertrand,
Quoted 18 lines · bertrand.cachet at heig-vd.ch
From: Bertrand Cachet <[email protected]>
Quoted 1 line
From datasheet, when READY bit is set inside
PM_CTRLregister, it means thatdevice is already in *normal* (D0) mode => it doesn't need to be wake-up.
With this patch, we only wake-up (writing on
TEST_BYTEregister) ifPM_MODEbits ofPM_CTRLregister is in D1/D2 mode.Signed-off-by Bertrand Cachet <[email protected]>--- drivers/net/smc911x.h | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)drivers/net/smc911x.h +0
-0
drivers/net/smc911x.h static void smc911x_reset(struct eth_device *dev) · line 476
Quoted 8 lines
drivers/net/smc911x.h +3
-2@@ -471,8 +471,10 @@ 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 */ +/* If PMT_CTRL_READY bit is set to 1b => power management is +already ready */
The multi-line comments should look like this:
/*
* blablabla
*/
Quoted 4 lines
drivers/net/smc911x.h +1
-0+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 );
Signature · 2 lines
Regards, Igor.