Remove defines APMC_FINALIZE.

We already have APM_CNT_FINALIZE defined to the same value. Just use it
thoughout.

Change-Id: Ife94ec7a34da27d3a720bda7337c02e41f18ac72
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/10226
Tested-by: build bot (Jenkins)
Reviewed-by: Nicolas Reinecke <nr@das-labor.org>
This commit is contained in:
Vladimir Serbinenko 2015-05-16 13:33:49 +02:00
parent 5b667df135
commit 3026e473da
15 changed files with 15 additions and 30 deletions

View File

@ -144,14 +144,13 @@ void mainboard_smi_sleep(u8 slp_typ)
google_chromeec_set_wake_mask(MAINBOARD_EC_S3_WAKE_EVENTS); google_chromeec_set_wake_mask(MAINBOARD_EC_S3_WAKE_EVENTS);
} }
#define APMC_FINALIZE 0xcb
static int mainboard_finalized = 0; static int mainboard_finalized = 0;
int mainboard_smi_apmc(u8 apmc) int mainboard_smi_apmc(u8 apmc)
{ {
switch (apmc) { switch (apmc) {
case APMC_FINALIZE: case APM_CNT_FINALIZE:
if (mainboard_finalized) { if (mainboard_finalized) {
printk(BIOS_DEBUG, "SMI#: Already finalized\n"); printk(BIOS_DEBUG, "SMI#: Already finalized\n");
return 0; return 0;

View File

@ -73,7 +73,6 @@ void mainboard_smi_sleep(u8 slp_typ)
} }
} }
#define APMC_FINALIZE 0xcb
#define APMC_ACPI_EN 0xe1 #define APMC_ACPI_EN 0xe1
#define APMC_ACPI_DIS 0x1e #define APMC_ACPI_DIS 0x1e
@ -83,7 +82,7 @@ int mainboard_smi_apmc(u8 apmc)
{ {
printk(BIOS_DEBUG, "mainboard_smi_apmc: %x\n", apmc); printk(BIOS_DEBUG, "mainboard_smi_apmc: %x\n", apmc);
switch (apmc) { switch (apmc) {
case APMC_FINALIZE: case APM_CNT_FINALIZE:
printk(BIOS_DEBUG, "APMC: FINALIZE\n"); printk(BIOS_DEBUG, "APMC: FINALIZE\n");
if (mainboard_finalized) { if (mainboard_finalized) {
printk(BIOS_DEBUG, "APMC#: Already finalized\n"); printk(BIOS_DEBUG, "APMC#: Already finalized\n");

View File

@ -137,14 +137,13 @@ void mainboard_smi_sleep(u8 slp_typ)
while (google_chromeec_get_event() != 0); while (google_chromeec_get_event() != 0);
} }
#define APMC_FINALIZE 0xcb
static int mainboard_finalized = 0; static int mainboard_finalized = 0;
int mainboard_smi_apmc(u8 apmc) int mainboard_smi_apmc(u8 apmc)
{ {
switch (apmc) { switch (apmc) {
case APMC_FINALIZE: case APM_CNT_FINALIZE:
if (mainboard_finalized) { if (mainboard_finalized) {
printk(BIOS_DEBUG, "SMI#: Already finalized\n"); printk(BIOS_DEBUG, "SMI#: Already finalized\n");
return 0; return 0;

View File

@ -118,7 +118,6 @@ void mainboard_smi_sleep(u8 slp_typ)
google_chromeec_set_wake_mask(LINK_EC_S3_WAKE_EVENTS); google_chromeec_set_wake_mask(LINK_EC_S3_WAKE_EVENTS);
} }
#define APMC_FINALIZE 0xcb
#define APMC_ACPI_EN 0xe1 #define APMC_ACPI_EN 0xe1
#define APMC_ACPI_DIS 0x1e #define APMC_ACPI_DIS 0x1e
@ -127,7 +126,7 @@ static int mainboard_finalized = 0;
int mainboard_smi_apmc(u8 apmc) int mainboard_smi_apmc(u8 apmc)
{ {
switch (apmc) { switch (apmc) {
case APMC_FINALIZE: case APM_CNT_FINALIZE:
if (mainboard_finalized) { if (mainboard_finalized) {
printk(BIOS_DEBUG, "SMI#: Already finalized\n"); printk(BIOS_DEBUG, "SMI#: Already finalized\n");
return 0; return 0;

View File

@ -52,14 +52,13 @@ int mainboard_io_trap_handler(int smif)
return 1; return 1;
} }
#define APMC_FINALIZE 0xcb
static int mainboard_finalized = 0; static int mainboard_finalized = 0;
int mainboard_smi_apmc(u8 apmc) int mainboard_smi_apmc(u8 apmc)
{ {
switch (apmc) { switch (apmc) {
case APMC_FINALIZE: case APM_CNT_FINALIZE:
if (mainboard_finalized) { if (mainboard_finalized) {
printk(BIOS_DEBUG, "SMI#: Already finalized\n"); printk(BIOS_DEBUG, "SMI#: Already finalized\n");
return 0; return 0;

View File

@ -130,7 +130,6 @@ void mainboard_smi_sleep(u8 slp_typ)
} }
} }
#define APMC_FINALIZE 0xcb
#define APMC_ACPI_EN 0xe1 #define APMC_ACPI_EN 0xe1
#define APMC_ACPI_DIS 0x1e #define APMC_ACPI_DIS 0x1e
@ -140,7 +139,7 @@ int mainboard_smi_apmc(u8 apmc)
{ {
printk(BIOS_DEBUG, "mainboard_smi_apmc: %x\n", apmc); printk(BIOS_DEBUG, "mainboard_smi_apmc: %x\n", apmc);
switch (apmc) { switch (apmc) {
case APMC_FINALIZE: case APM_CNT_FINALIZE:
printk(BIOS_DEBUG, "APMC: FINALIZE\n"); printk(BIOS_DEBUG, "APMC: FINALIZE\n");
if (mainboard_finalized) { if (mainboard_finalized) {
printk(BIOS_DEBUG, "APMC#: Already finalized\n"); printk(BIOS_DEBUG, "APMC#: Already finalized\n");

View File

@ -134,14 +134,13 @@ void mainboard_smi_sleep(u8 slp_typ)
while (google_chromeec_get_event() != 0); while (google_chromeec_get_event() != 0);
} }
#define APMC_FINALIZE 0xcb
static int mainboard_finalized = 0; static int mainboard_finalized = 0;
int mainboard_smi_apmc(u8 apmc) int mainboard_smi_apmc(u8 apmc)
{ {
switch (apmc) { switch (apmc) {
case APMC_FINALIZE: case APM_CNT_FINALIZE:
if (mainboard_finalized) { if (mainboard_finalized) {
printk(BIOS_DEBUG, "SMI#: Already finalized\n"); printk(BIOS_DEBUG, "SMI#: Already finalized\n");
return 0; return 0;

View File

@ -121,14 +121,13 @@ void mainboard_smi_sleep(u8 slp_typ)
while (google_chromeec_get_event() != 0); while (google_chromeec_get_event() != 0);
} }
#define APMC_FINALIZE 0xcb
static int mainboard_finalized = 0; static int mainboard_finalized = 0;
int mainboard_smi_apmc(u8 apmc) int mainboard_smi_apmc(u8 apmc)
{ {
switch (apmc) { switch (apmc) {
case APMC_FINALIZE: case APM_CNT_FINALIZE:
if (mainboard_finalized) { if (mainboard_finalized) {
printk(BIOS_DEBUG, "SMI#: Already finalized\n"); printk(BIOS_DEBUG, "SMI#: Already finalized\n");
return 0; return 0;

View File

@ -110,7 +110,6 @@ void mainboard_smi_sleep(u8 slp_typ)
ec_it8518_enable_wake_events(); ec_it8518_enable_wake_events();
} }
#define APMC_FINALIZE 0xcb
#define APMC_ACPI_EN 0xe1 #define APMC_ACPI_EN 0xe1
#define APMC_ACPI_DIS 0x1e #define APMC_ACPI_DIS 0x1e
@ -119,7 +118,7 @@ static int mainboard_finalized = 0;
int mainboard_smi_apmc(u8 apmc) int mainboard_smi_apmc(u8 apmc)
{ {
switch (apmc) { switch (apmc) {
case APMC_FINALIZE: case APM_CNT_FINALIZE:
if (mainboard_finalized) { if (mainboard_finalized) {
printk(BIOS_DEBUG, "SMI#: Already finalized\n"); printk(BIOS_DEBUG, "SMI#: Already finalized\n");
return 0; return 0;

View File

@ -71,14 +71,13 @@ void mainboard_smi_sleep(u8 slp_typ)
} }
} }
#define APMC_FINALIZE 0xcb
static int mainboard_finalized = 0; static int mainboard_finalized = 0;
int mainboard_smi_apmc(u8 apmc) int mainboard_smi_apmc(u8 apmc)
{ {
switch (apmc) { switch (apmc) {
case APMC_FINALIZE: case APM_CNT_FINALIZE:
if (mainboard_finalized) { if (mainboard_finalized) {
printk(BIOS_DEBUG, "SMI#: Already finalized\n"); printk(BIOS_DEBUG, "SMI#: Already finalized\n");
return 0; return 0;

View File

@ -72,14 +72,13 @@ void mainboard_smi_sleep(u8 slp_typ)
} }
} }
#define APMC_FINALIZE 0xcb
static int mainboard_finalized = 0; static int mainboard_finalized = 0;
int mainboard_smi_apmc(u8 apmc) int mainboard_smi_apmc(u8 apmc)
{ {
switch (apmc) { switch (apmc) {
case APMC_FINALIZE: case APM_CNT_FINALIZE:
if (mainboard_finalized) { if (mainboard_finalized) {
printk(BIOS_DEBUG, "SMI#: Already finalized\n"); printk(BIOS_DEBUG, "SMI#: Already finalized\n");
return 0; return 0;

View File

@ -71,14 +71,13 @@ void mainboard_smi_sleep(u8 slp_typ)
} }
} }
#define APMC_FINALIZE 0xcb
static int mainboard_finalized = 0; static int mainboard_finalized = 0;
int mainboard_smi_apmc(u8 apmc) int mainboard_smi_apmc(u8 apmc)
{ {
switch (apmc) { switch (apmc) {
case APMC_FINALIZE: case APM_CNT_FINALIZE:
if (mainboard_finalized) { if (mainboard_finalized) {
printk(BIOS_DEBUG, "SMI#: Already finalized\n"); printk(BIOS_DEBUG, "SMI#: Already finalized\n");
return 0; return 0;

View File

@ -53,7 +53,6 @@ void mainboard_smi_gpi(u32 gpi_sts)
printk(BIOS_DEBUG, "warn: unknown mainboard_smi_gpi: %x\n", gpi_sts); printk(BIOS_DEBUG, "warn: unknown mainboard_smi_gpi: %x\n", gpi_sts);
} }
#define APMC_FINALIZE 0xcb
static int mainboard_finalized = 0; static int mainboard_finalized = 0;
@ -61,7 +60,7 @@ int mainboard_smi_apmc(u8 apmc)
{ {
printk(BIOS_DEBUG, "mainboard_smi_apmc: %x\n", apmc); printk(BIOS_DEBUG, "mainboard_smi_apmc: %x\n", apmc);
switch (apmc) { switch (apmc) {
case APMC_FINALIZE: case APM_CNT_FINALIZE:
printk(BIOS_DEBUG, "APMC: FINALIZE\n"); printk(BIOS_DEBUG, "APMC: FINALIZE\n");
if (mainboard_finalized) { if (mainboard_finalized) {
printk(BIOS_DEBUG, "APMC#: Already finalized\n"); printk(BIOS_DEBUG, "APMC#: Already finalized\n");

View File

@ -85,7 +85,6 @@ void mainboard_smi_gpi(u32 gpi_sts)
} }
} }
#define APMC_FINALIZE 0xcb
static int mainboard_finalized = 0; static int mainboard_finalized = 0;
@ -104,7 +103,7 @@ int mainboard_smi_apmc(u8 apmc)
send_ec_command(EC_ACPI_DISABLE); send_ec_command(EC_ACPI_DISABLE);
break; break;
case APMC_FINALIZE: case APM_CNT_FINALIZE:
if (mainboard_finalized) { if (mainboard_finalized) {
printk(BIOS_DEBUG, "SMI#: Already finalized\n"); printk(BIOS_DEBUG, "SMI#: Already finalized\n");
return 0; return 0;

View File

@ -89,14 +89,13 @@ void mainboard_smi_sleep(u8 slp_typ)
} }
} }
#define APMC_FINALIZE 0xcb
static int mainboard_finalized = 0; static int mainboard_finalized = 0;
int mainboard_smi_apmc(u8 apmc) int mainboard_smi_apmc(u8 apmc)
{ {
switch (apmc) { switch (apmc) {
case APMC_FINALIZE: case APM_CNT_FINALIZE:
if (mainboard_finalized) { if (mainboard_finalized) {
printk(BIOS_DEBUG, "SMI#: Already finalized\n"); printk(BIOS_DEBUG, "SMI#: Already finalized\n");
return 0; return 0;