Skip to contentSkip to conversation

Patch: Power Mangement with smc911x driver

U-Boot New bertrand.cachet at heig-vd.ch 2 participants 3 messages Nov 14, 2011 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): Patches for SMSC LAN911X driver on UBoot and QEMU

#1 lore raw

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

#3 lore raw

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_CTRL register, it means that

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 D1/D2 mode.

---
 drivers/net/smc911x.h |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
drivers/net/smc911x.h +0 -0
index 8ce08a9..258b9b6 100644

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.