Martin L Roth has uploaded this change for review.

View Change

mb/[google|intel]: Define and use POST_EC_INIT and POST_EC_INIT_DONE

Add postcode definitions for starting and finishing EC initialization.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: I776d63a3a71b3518dccf12d54468633e141ca6fb
---
M src/commonlib/include/commonlib/console/post_codes.h
M src/mainboard/google/auron/ec.c
M src/mainboard/google/cyan/ec.c
M src/mainboard/google/link/ec.c
M src/mainboard/google/rambi/ec.c
M src/mainboard/google/slippy/ec.c
M src/mainboard/intel/strago/ec.c
7 files changed, 47 insertions(+), 12 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/71594/1
diff --git a/src/commonlib/include/commonlib/console/post_codes.h b/src/commonlib/include/commonlib/console/post_codes.h
index d838815..b8e0b33 100644
--- a/src/commonlib/include/commonlib/console/post_codes.h
+++ b/src/commonlib/include/commonlib/console/post_codes.h
@@ -418,6 +418,23 @@
#define POST_RESUME_FAILURE 0xef

/**
+ * \brief Initialize the EC
+ *
+ * This postcode can be used in any stage to show that the EC is being
+ * initialized.
+ */
+#define POST_EC_INIT 0xf0
+
+
+/**
+ * \brief EC Initialization done
+ *
+ * This postcode can be used in any stage to show that the EC is finished
+ * being initialized.
+ */
+#define POST_EC_INIT_DONE 0xf1
+
+/**
* \brief Jumping to payload
*
* Called right before jumping to a payload. If the boot sequence stops with
diff --git a/src/mainboard/google/auron/ec.c b/src/mainboard/google/auron/ec.c
index a3ee95b..5afcc6d 100644
--- a/src/mainboard/google/auron/ec.c
+++ b/src/mainboard/google/auron/ec.c
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */

#include <acpi/acpi.h>
+#include <commonlib/console/post_codes.h>
#include <console/console.h>
#include <ec/google/chromeec/ec.h>
#include "ec.h"
@@ -17,7 +18,7 @@
int s3_wakeup = acpi_is_wakeup_s3();

printk(BIOS_DEBUG, "mainboard_ec_init\n");
- post_code(0xf0);
+ post_code(POST_EC_INIT);

google_chromeec_events_init(&info, s3_wakeup);
if (s3_wakeup) {
@@ -26,5 +27,5 @@
;
}

- post_code(0xf1);
+ post_code(POST_EC_INIT_DONE);
}
diff --git a/src/mainboard/google/cyan/ec.c b/src/mainboard/google/cyan/ec.c
index 41ef91e..bc0ffe5 100644
--- a/src/mainboard/google/cyan/ec.c
+++ b/src/mainboard/google/cyan/ec.c
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */

#include <acpi/acpi.h>
+#include <commonlib/console/post_codes.h>
#include <console/console.h>
#include <ec/google/chromeec/ec.h>
#include "ec.h"
@@ -15,9 +16,9 @@
};

printk(BIOS_DEBUG, "mainboard_ec_init\n");
- post_code(0xf0);
+ post_code(POST_EC_INIT);

google_chromeec_events_init(&info, acpi_is_wakeup_s3());

- post_code(0xf1);
+ post_code(POST_EC_INIT_DONE);
}
diff --git a/src/mainboard/google/link/ec.c b/src/mainboard/google/link/ec.c
index 6f87f1d..0688f26 100644
--- a/src/mainboard/google/link/ec.c
+++ b/src/mainboard/google/link/ec.c
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */

#include <acpi/acpi.h>
+#include <commonlib/console/post_codes.h>
#include <console/console.h>
#include <ec/google/chromeec/ec.h>
#include "ec.h"
@@ -15,9 +16,9 @@
};

printk(BIOS_DEBUG, "link_ec_init\n");
- post_code(0xf0);
+ post_code(POST_EC_INIT);

google_chromeec_events_init(&info, acpi_is_wakeup_s3());

- post_code(0xf1);
+ post_code(POST_EC_INIT_DONE);
}
diff --git a/src/mainboard/google/rambi/ec.c b/src/mainboard/google/rambi/ec.c
index 7588eff..27c3030 100644
--- a/src/mainboard/google/rambi/ec.c
+++ b/src/mainboard/google/rambi/ec.c
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */

#include <acpi/acpi.h>
+#include <commonlib/console/post_codes.h>
#include <console/console.h>
#include <ec/google/chromeec/ec.h>
#include "ec.h"
@@ -17,9 +18,9 @@
};

printk(BIOS_DEBUG, "mainboard_ec_init\n");
- post_code(0xf0);
+ post_code(POST_EC_INIT);

google_chromeec_events_init(&info, s3_wakeup);

- post_code(0xf1);
+ post_code(POST_EC_INIT_DONE);
}
diff --git a/src/mainboard/google/slippy/ec.c b/src/mainboard/google/slippy/ec.c
index a3ee95b..5afcc6d 100644
--- a/src/mainboard/google/slippy/ec.c
+++ b/src/mainboard/google/slippy/ec.c
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */

#include <acpi/acpi.h>
+#include <commonlib/console/post_codes.h>
#include <console/console.h>
#include <ec/google/chromeec/ec.h>
#include "ec.h"
@@ -17,7 +18,7 @@
int s3_wakeup = acpi_is_wakeup_s3();

printk(BIOS_DEBUG, "mainboard_ec_init\n");
- post_code(0xf0);
+ post_code(POST_EC_INIT);

google_chromeec_events_init(&info, s3_wakeup);
if (s3_wakeup) {
@@ -26,5 +27,5 @@
;
}

- post_code(0xf1);
+ post_code(POST_EC_INIT_DONE);
}
diff --git a/src/mainboard/intel/strago/ec.c b/src/mainboard/intel/strago/ec.c
index e34ea7f..d522d8d 100644
--- a/src/mainboard/intel/strago/ec.c
+++ b/src/mainboard/intel/strago/ec.c
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */

#include <acpi/acpi.h>
+#include <commonlib/console/post_codes.h>
#include <console/console.h>
#include <ec/google/chromeec/ec.h>
#include "ec.h"
@@ -15,9 +16,9 @@
};

printk(BIOS_DEBUG, "%s\n", __func__);
- post_code(0xf0);
+ post_code(POST_EC_INIT);

google_chromeec_events_init(&info, acpi_is_wakeup_s3());

- post_code(0xf1);
+ post_code(POST_EC_INIT_DONE);
}

To view, visit change 71594. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I776d63a3a71b3518dccf12d54468633e141ca6fb
Gerrit-Change-Number: 71594
Gerrit-PatchSet: 1
Gerrit-Owner: Martin L Roth <gaumless@gmail.com>
Gerrit-MessageType: newchange