@@ -301,47 +301,6 @@ static int chipset_prepare_S3(uint8_t enable)
301
301
return true;
302
302
}
303
303
304
- /*
305
- * Issue : 866a60d67
306
- * for this issue, if into S3 and resume back by keyboard, system would not wake
307
- * because scan code was send before espi_rst, at the moment system would not
308
- * take any scan code, co-work with BIOS when Keyboard event send,
309
- * do this workaround to send a scan code again
310
- */
311
- static void key_stuck_wa (void );
312
- DECLARE_DEFERRED (key_stuck_wa );
313
- static void key_stuck_wa (void )
314
- {
315
- int wa_bit = * host_get_memmap (EC_CUSTOMIZED_MEMMAP_DISPLAY_ON );
316
-
317
- if (wa_bit ) {
318
- * host_get_memmap (EC_CUSTOMIZED_MEMMAP_DISPLAY_ON ) = 0 ;
319
- hook_call_deferred (& key_stuck_wa_data , -1 );
320
- simulate_keyboard (SCANCODE_UNASSIGNED , 1 );
321
- simulate_keyboard (SCANCODE_UNASSIGNED , 0 );
322
- } else
323
- hook_call_deferred (& key_stuck_wa_data , 10 * MSEC );
324
-
325
- }
326
-
327
- /*
328
- * Issue : 866ajywad
329
- * for this issue, if into S3 and resume back by power button,
330
- * system would not take Keybuffer(DBBOUT) after EC send IRQ1,
331
- * add this workaround EC manually send Keybuffer and clearn OBF flag,
332
- * it will regenerate a IRQ signal to notice system.
333
- */
334
- static void key_stuck_ptn (void )
335
- {
336
- * host_get_memmap (EC_CUSTOMIZED_MEMMAP_DISPLAY_ON ) = 0 ;
337
- simulate_keyboard (SCANCODE_UNASSIGNED , 1 );
338
- simulate_keyboard (SCANCODE_UNASSIGNED , 0 );
339
- keyboard_clear_buffer ();
340
- /* stop key_stuck_wa if system already wake */
341
- hook_call_deferred (& key_stuck_wa_data , -1 );
342
- }
343
- DECLARE_DEFERRED (key_stuck_ptn );
344
-
345
304
enum power_state power_handle_state (enum power_state state )
346
305
{
347
306
switch (state ) {
@@ -525,17 +484,13 @@ enum power_state power_handle_state(enum power_state state)
525
484
526
485
case POWER_S0ixS3 :
527
486
CPRINTS ("PH S0ixS3" );
528
- /* make sure next time wake flag not error trigger */
529
- * host_get_memmap (EC_CUSTOMIZED_MEMMAP_DISPLAY_ON ) = 0 ;
530
- hook_call_deferred (& key_stuck_wa_data , -1 );
531
487
/* follow power sequence Disable S3 power */
532
488
chipset_prepare_S3 (0 );
533
489
CPRINTS ("PH S0ixS0->S3" );
534
490
return POWER_S3 ;
535
491
536
492
case POWER_S3S0ix :
537
493
CPRINTS ("PH S3->S0ix" );
538
- hook_call_deferred (& key_stuck_wa_data , 1 );
539
494
/* Enable power for CPU check system */
540
495
chipset_prepare_S3 (1 );
541
496
CPRINTS ("PH S3S0ix->S0ix" );
@@ -545,7 +500,6 @@ enum power_state power_handle_state(enum power_state state)
545
500
CPRINTS ("PH S0ixS0" );
546
501
resume_ms_flag = 0 ;
547
502
system_in_s0ix = 0 ;
548
- hook_call_deferred (& key_stuck_ptn_data , 100 * MSEC );
549
503
lpc_s0ix_resume_restore_masks ();
550
504
/* Call hooks now that rails are up */
551
505
hook_notify (HOOK_CHIPSET_RESUME );
0 commit comments