summaryrefslogtreecommitdiff
path: root/cleopatre/linux-2.6.25.10-spc300/drivers
diff options
context:
space:
mode:
authorOlivier Dufour2012-11-14 17:45:02 +0100
committerOlivier Dufour2012-12-21 15:15:45 +0100
commit8c10cce00c2d426af6b9a60bf12444e91c4ba7eb (patch)
treeb30f5c35261a06ebcef69f48bc36c94156250730 /cleopatre/linux-2.6.25.10-spc300/drivers
parenta87e735cbe7994e052c220f57d792b6c37a8c98d (diff)
cleo/app/pmd: add a daemon to handle power state changes, closes #2633
pmd polls /proc/pm/suspend_cmd, and triggers the suspend script when the criterias are matched. The criterias are defined and handled by the kernel, pmd only reads the status entry and triggers the script, as it cannot be done from kernel space.
Diffstat (limited to 'cleopatre/linux-2.6.25.10-spc300/drivers')
-rw-r--r--cleopatre/linux-2.6.25.10-spc300/drivers/net/arm/synop3504.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/cleopatre/linux-2.6.25.10-spc300/drivers/net/arm/synop3504.c b/cleopatre/linux-2.6.25.10-spc300/drivers/net/arm/synop3504.c
index 25ca3b4727..a09f3ac396 100644
--- a/cleopatre/linux-2.6.25.10-spc300/drivers/net/arm/synop3504.c
+++ b/cleopatre/linux-2.6.25.10-spc300/drivers/net/arm/synop3504.c
@@ -58,6 +58,9 @@
#ifdef CONFIG_CHIP_FEATURE_SRAM
#include <asm/arch/ips/sram.h>
#endif
+#ifdef CONFIG_PM
+#include <asm/arch/spc300-pm.h>
+#endif
#include "synop3504_hw.h"
#include "synop3504.h"
@@ -1299,6 +1302,16 @@ static void synop3504_handle_link_change(struct net_device *dev)
SynopsysSetMiiClkCap(synop, 1000);
priv->speed = 0;
priv->duplex = -1;
+
+#ifdef CONFIG_PM
+ //Request standby mode
+ spc300_pm_request_suspend();
+ }
+ else
+ {
+ //Clear standby mode request
+ spc300_pm_clear_suspend();
+#endif
}
priv->link = phydev->link;