Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RPi/RPi2] linux: Reduce power consumption after shutdown
- Loading branch information
1 parent
7ce5523
commit 5016b90
Showing
4 changed files
with
96 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
config/platforms/arm/bcm2708/packages/linux/patches/1100-Power-off.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- a/arch/arm/kernel/reboot.c 2016-03-24 11:11:55.000000000 +0100 | ||
+++ b/arch/arm/kernel/reboot.c 2016-04-24 12:54:02.860639634 +0200 | ||
@@ -18,6 +18,17 @@ | ||
typedef void (*phys_reset_t)(unsigned long); | ||
|
||
/* | ||
+ * Enter non-interruptable CPU halt state | ||
+ */ | ||
+static void cpu_halt(void) | ||
+{ | ||
+ local_irq_disable(); | ||
+ | ||
+ while (1) | ||
+ cpu_do_idle(); | ||
+} | ||
+ | ||
+/* | ||
* Function pointers to optional machine specific functions | ||
*/ | ||
void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd); | ||
@@ -105,8 +116,7 @@ | ||
local_irq_disable(); | ||
smp_send_stop(); | ||
|
||
- local_irq_disable(); | ||
- while (1); | ||
+ cpu_halt(); | ||
} | ||
|
||
/* | ||
@@ -122,6 +132,8 @@ | ||
|
||
if (pm_power_off) | ||
pm_power_off(); | ||
+ | ||
+ cpu_halt(); | ||
} | ||
|
||
/* | ||
@@ -150,6 +162,5 @@ | ||
|
||
/* Whoops - the platform was unable to reboot. Tell the user! */ | ||
printk("Reboot failed -- System halted\n"); | ||
- local_irq_disable(); | ||
- while (1); | ||
+ cpu_halt(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
config/platforms/arm/bcm2709/packages/linux/patches/1100-Power-off.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- a/arch/arm/kernel/reboot.c 2016-03-24 11:11:55.000000000 +0100 | ||
+++ b/arch/arm/kernel/reboot.c 2016-04-24 12:54:02.860639634 +0200 | ||
@@ -18,6 +18,17 @@ | ||
typedef void (*phys_reset_t)(unsigned long); | ||
|
||
/* | ||
+ * Enter non-interruptable CPU halt state | ||
+ */ | ||
+static void cpu_halt(void) | ||
+{ | ||
+ local_irq_disable(); | ||
+ | ||
+ while (1) | ||
+ cpu_do_idle(); | ||
+} | ||
+ | ||
+/* | ||
* Function pointers to optional machine specific functions | ||
*/ | ||
void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd); | ||
@@ -105,8 +116,7 @@ | ||
local_irq_disable(); | ||
smp_send_stop(); | ||
|
||
- local_irq_disable(); | ||
- while (1); | ||
+ cpu_halt(); | ||
} | ||
|
||
/* | ||
@@ -122,6 +132,8 @@ | ||
|
||
if (pm_power_off) | ||
pm_power_off(); | ||
+ | ||
+ cpu_halt(); | ||
} | ||
|
||
/* | ||
@@ -150,6 +162,5 @@ | ||
|
||
/* Whoops - the platform was unable to reboot. Tell the user! */ | ||
printk("Reboot failed -- System halted\n"); | ||
- local_irq_disable(); | ||
- while (1); | ||
+ cpu_halt(); | ||
} |