soc/intel/cannonlake: Export function to set After G3 state

Export the SOC level function to set the After G3 state so it
can be changed by the mainboard.  The setting will be restored
by a normal boot but in some circumstances coreboot wants to
ensure that it will be powered up again after a reset.

BUG=b:121380403
TEST=update cr50 firmware on sarien and reboot and ensure the
host does not power off after the cr50 initiated reset.

Change-Id: I6cd572ac91229584b9907f87bb4b340963203c32
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/31056
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Duncan Laurie 2019-01-23 14:58:23 -08:00 committed by Patrick Georgi
parent 52b5b587f1
commit 26bc3282f6
2 changed files with 5 additions and 1 deletions

View File

@ -162,4 +162,8 @@
#define SCIS_IRQ21 5
#define SCIS_IRQ22 6
#define SCIS_IRQ23 7
struct device;
void pmc_set_afterg3(struct device *dev, int s5pwr);
#endif

View File

@ -30,7 +30,7 @@
* Set which power state system will be after reapplying
* the power (from G3 State)
*/
static void pmc_set_afterg3(struct device *dev, int s5pwr)
void pmc_set_afterg3(struct device *dev, int s5pwr)
{
uint8_t reg8;
uint8_t *pmcbase = pmc_mmio_regs();