From patchwork Mon Jan 27 05:06:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 240238 List-Id: U-Boot discussion From: sjg at chromium.org (Simon Glass) Date: Sun, 26 Jan 2020 22:06:34 -0700 Subject: [PATCH 087/108] x86: apl: Add a check for reading the FSP-S config In-Reply-To: <20200127050655.170614-1-sjg@chromium.org> References: <20200127050655.170614-1-sjg@chromium.org> Message-ID: <20200126220508.87.Ia817c48e5544c95f117f45b37a2581f54d67392b@changeid> This currently fails as two required items are commented out. Put them back in and add a check that reading the config succeeds. Both of these items need a little more work to put them in an appropriate driver at some point. Signed-off-by: Simon Glass --- arch/x86/cpu/apollolake/fsp_s.c | 6 ++++-- arch/x86/dts/chromebook_coral.dts | 12 ++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/arch/x86/cpu/apollolake/fsp_s.c b/arch/x86/cpu/apollolake/fsp_s.c index e7e0c30873..d1aad7a094 100644 --- a/arch/x86/cpu/apollolake/fsp_s.c +++ b/arch/x86/cpu/apollolake/fsp_s.c @@ -350,8 +350,10 @@ int fsps_update_config(struct udevice *dev, ulong rom_offset, apl = malloc(sizeof(*apl)); if (!apl) - return log_msg_ret("config", -ENOMEM); - get_config(dev, apl); + return log_msg_ret("alloc", -ENOMEM); + ret = get_config(dev, apl); + if (ret) + return log_msg_ret("config", ret); cfg->ish_enable = 0; cfg->enable_sata = 0; diff --git a/arch/x86/dts/chromebook_coral.dts b/arch/x86/dts/chromebook_coral.dts index 7ba38d7791..3c6f14310f 100644 --- a/arch/x86/dts/chromebook_coral.dts +++ b/arch/x86/dts/chromebook_coral.dts @@ -497,13 +497,13 @@ * If the Board has PERST_0 signal, assign the GPIO * If the Board does not have PERST_0, assign GPIO_PRT0_UDEF * - * This are not used yet, so comment them out for now. - * - * prt0-gpio = ; - * - * GPIO for SD card detect - * sdcard-cd-gpio = ; + * This should be converted to real GPIOs and ideally stored in the + * device they relate to. */ + prt0-gpio = ; + + /* GPIO for SD card detect */ + sdcard-cd-gpio = ; /* * Order is emmc-tx-data-cntl1, emmc-tx-data-cntl2,