soc/intel/braswell/pmutil.c: Use GEN_PMCON1 for RTC status
cbmem_find is not available in every stage. Remove usage of cbmem_find() and use GEN_PMCON1 always. BUG=NA TEST=Booting Embedded Linux on Facebook FBG-1701 Change-Id: Id97d57864b3e241e8f046d9b1caebdce199a46b1 Signed-off-by: Frans Hendriks <fhendriks@eltan.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/32724 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
committed by
Patrick Georgi
parent
232113e7cd
commit
20989630c4
@ -16,9 +16,9 @@
|
|||||||
|
|
||||||
#include <arch/acpi.h>
|
#include <arch/acpi.h>
|
||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
|
#include <assert.h>
|
||||||
#include <device/mmio.h>
|
#include <device/mmio.h>
|
||||||
#include <device/pci_ops.h>
|
#include <device/pci_ops.h>
|
||||||
#include <cbmem.h>
|
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <soc/iomap.h>
|
#include <soc/iomap.h>
|
||||||
#include <soc/lpc.h>
|
#include <soc/lpc.h>
|
||||||
@ -364,15 +364,14 @@ int rtc_failure(void)
|
|||||||
{
|
{
|
||||||
uint32_t gen_pmcon1;
|
uint32_t gen_pmcon1;
|
||||||
int rtc_fail;
|
int rtc_fail;
|
||||||
struct chipset_power_state *ps = cbmem_find(CBMEM_ID_POWER_STATE);
|
|
||||||
|
|
||||||
if (ps != NULL)
|
/* not usable in ramstage as GEN_PMCON1 gets reset */
|
||||||
gen_pmcon1 = ps->gen_pmcon1;
|
if (ENV_RAMSTAGE)
|
||||||
else
|
dead_code();
|
||||||
|
|
||||||
gen_pmcon1 = read32((u32 *)(PMC_BASE_ADDRESS + GEN_PMCON1));
|
gen_pmcon1 = read32((u32 *)(PMC_BASE_ADDRESS + GEN_PMCON1));
|
||||||
|
|
||||||
rtc_fail = !!(gen_pmcon1 & RPS);
|
rtc_fail = !!(gen_pmcon1 & RPS);
|
||||||
|
|
||||||
if (rtc_fail)
|
if (rtc_fail)
|
||||||
printk(BIOS_DEBUG, "RTC failure.\n");
|
printk(BIOS_DEBUG, "RTC failure.\n");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user