Skip to content

Commit 50e0981

Browse files
authored
Merge pull request ARMmbed#13978 from LDong-Arm/remove_s5js100_idle_hook
S5JS100: remove idle hook in favour of Mbed-default idle hook
2 parents 65281b9 + 65e5db8 commit 50e0981

File tree

1 file changed

+0
-18
lines changed
  • targets/TARGET_Samsung/TARGET_SIDK_S5JS100

1 file changed

+0
-18
lines changed

targets/TARGET_Samsung/TARGET_SIDK_S5JS100/sleep.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929

3030
int nbsleep_req = 0;
3131
int external_pin = 0;
32-
static int initialize_policy = 0;
3332
static int disable_poweroffbycp = 1;
3433

3534
static inline void hw_delay_us(unsigned int value)
@@ -68,19 +67,6 @@ int s5js100_idle_sicd(void)
6867
return 0;
6968
}
7069

71-
static void s5js100_idle_hook(void)
72-
{
73-
core_util_critical_section_enter();
74-
sleep();
75-
core_util_critical_section_exit();
76-
}
77-
78-
static void set_sleep_policy(void)
79-
{
80-
rtos_attach_idle_hook(&s5js100_idle_hook);
81-
initialize_policy = 1;
82-
}
83-
8470
void config_poweroffbycp(int enable)
8571
{
8672
disable_poweroffbycp = (enable == 0) ? 1 : 0;
@@ -119,10 +105,6 @@ static int change_cp_pwr_lock(int lock)
119105

120106
void hal_sleep(void)
121107
{
122-
if (initialize_policy == 0) {
123-
set_sleep_policy();
124-
}
125-
126108
if (!strcmp(get_env("SLEEP"), "ON") && disable_poweroffbycp != 1) {
127109
hal_deepsleep();
128110
return;

0 commit comments

Comments
 (0)