Karthik Ramasubramanian has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34761 )
Change subject: soc/intel/common/gspi: Check device validity before setting state ......................................................................
soc/intel/common/gspi: Check device validity before setting state
Not all GSPI devices are enabled in all SoCs. Ensure that the GSPI device is valid before setting controller state to active.
BUG=None TEST=Boot to ChromeOS.
Change-Id: I792ab1fa6529f5317218896ad05321f8f17cedcd Signed-off-by: Karthikeyan Ramasubramanian kramasub@google.com --- M src/soc/intel/common/block/gspi/gspi.c 1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/34761/1
diff --git a/src/soc/intel/common/block/gspi/gspi.c b/src/soc/intel/common/block/gspi/gspi.c index beb12fb..4a5b3b9 100644 --- a/src/soc/intel/common/block/gspi/gspi.c +++ b/src/soc/intel/common/block/gspi/gspi.c @@ -479,7 +479,8 @@ }
/* Ensure controller is in D0 state */ - lpss_set_power_state(device, STATE_D0); + if (device) + lpss_set_power_state(device, STATE_D0);
/* Take controller out of reset, keeping DMA in reset. */ gspi_write_mmio_reg(p, RESETS, CTRLR_ACTIVE | DMA_RESET);