sio/acpi: Add more magic bytes to ENTER/EXIT_CONFIG_MODE

ITE super-i/o chips need a fourth byte and have a special register
to exit config mode.

Change-Id: Ic40873649d567b87d3a937f2bf068649e67715de
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/17286
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
Nico Huber 2016-09-30 11:51:04 +02:00 committed by Nico Huber
parent 6167365530
commit 21707cc29d
3 changed files with 16 additions and 0 deletions

View File

@ -81,7 +81,10 @@ Device(IT8516E_EC_DEV) {
#undef PNP_ENTER_MAGIC_1ST #undef PNP_ENTER_MAGIC_1ST
#undef PNP_ENTER_MAGIC_2ND #undef PNP_ENTER_MAGIC_2ND
#undef PNP_ENTER_MAGIC_3RD #undef PNP_ENTER_MAGIC_3RD
#undef PNP_ENTER_MAGIC_4TH
#undef PNP_EXIT_MAGIC_1ST #undef PNP_EXIT_MAGIC_1ST
#undef PNP_EXIT_SPECIAL_REG
#undef PNP_EXIT_SPECIAL_VAL
#include <superio/acpi/pnp_config.asl> #include <superio/acpi/pnp_config.asl>
Method (_PSC) Method (_PSC)

View File

@ -24,8 +24,12 @@
* used to enter config mode. * used to enter config mode.
* PNP_ENTER_MAGIC_3RD If defined, specifies the third magic byte * PNP_ENTER_MAGIC_3RD If defined, specifies the third magic byte
* used to enter config mode. * used to enter config mode.
* PNP_ENTER_MAGIC_4TH If defined, specifies the fourth magic byte
* used to enter config mode.
* PNP_EXIT_MAGIC_1ST If defined, specifies the first magic byte * PNP_EXIT_MAGIC_1ST If defined, specifies the first magic byte
* used to exit config mode. * used to exit config mode.
* PNP_EXIT_SPECIAL_REG If defined, specifies a special register plus
* PNP_EXIT_SPECIAL_VAL a value to be written there to exit config mode.
*/ */
@ -50,6 +54,9 @@ Method (ENTER_CONFIG_MODE, 1)
Store (PNP_ENTER_MAGIC_2ND, PNP_ADDR_REG) Store (PNP_ENTER_MAGIC_2ND, PNP_ADDR_REG)
#ifdef PNP_ENTER_MAGIC_3RD #ifdef PNP_ENTER_MAGIC_3RD
Store (PNP_ENTER_MAGIC_3RD, PNP_ADDR_REG) Store (PNP_ENTER_MAGIC_3RD, PNP_ADDR_REG)
#ifdef PNP_ENTER_MAGIC_4TH
Store (PNP_ENTER_MAGIC_4TH, PNP_ADDR_REG)
#endif
#endif #endif
#endif #endif
#endif #endif
@ -66,6 +73,9 @@ Method (EXIT_CONFIG_MODE)
{ {
#ifdef PNP_EXIT_MAGIC_1ST #ifdef PNP_EXIT_MAGIC_1ST
Store (PNP_EXIT_MAGIC_1ST, PNP_ADDR_REG) Store (PNP_EXIT_MAGIC_1ST, PNP_ADDR_REG)
#endif
#if defined(PNP_EXIT_SPECIAL_REG) && defined(PNP_EXIT_SPECIAL_VAL)
Store (PNP_EXIT_SPECIAL_VAL, PNP_EXIT_SPECIAL_REG)
#endif #endif
Release (CONFIG_MODE_MUTEX) Release (CONFIG_MODE_MUTEX)
} }

View File

@ -113,7 +113,10 @@ Device(SUPERIO_DEV) {
#undef PNP_ENTER_MAGIC_1ST #undef PNP_ENTER_MAGIC_1ST
#undef PNP_ENTER_MAGIC_2ND #undef PNP_ENTER_MAGIC_2ND
#undef PNP_ENTER_MAGIC_3RD #undef PNP_ENTER_MAGIC_3RD
#undef PNP_ENTER_MAGIC_4TH
#undef PNP_EXIT_MAGIC_1ST #undef PNP_EXIT_MAGIC_1ST
#undef PNP_EXIT_SPECIAL_REG
#undef PNP_EXIT_SPECIAL_VAL
#define PNP_ENTER_MAGIC_1ST 0x87 #define PNP_ENTER_MAGIC_1ST 0x87
#define PNP_ENTER_MAGIC_2ND 0x87 #define PNP_ENTER_MAGIC_2ND 0x87
#define PNP_EXIT_MAGIC_1ST 0xaa #define PNP_EXIT_MAGIC_1ST 0xaa