Mario Scheithauer has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/85891?usp=email )
Change subject: mb/siemens/{mc_ehl2,...,mc_ehl5}: Fix return in variant_mainboard_final() ......................................................................
mb/siemens/{mc_ehl2,...,mc_ehl5}: Fix return in variant_mainboard_final()
If no resource is found for a device, do not return directly, otherwise the following code will no longer be executed.
Change-Id: Ida8019c383df4be2d37a1532a1759086e86124e6 Signed-off-by: Mario Scheithauer mario.scheithauer@siemens.com --- M src/mainboard/siemens/mc_ehl/variants/mc_ehl2/mainboard.c M src/mainboard/siemens/mc_ehl/variants/mc_ehl3/mainboard.c M src/mainboard/siemens/mc_ehl/variants/mc_ehl4/mainboard.c M src/mainboard/siemens/mc_ehl/variants/mc_ehl5/mainboard.c 4 files changed, 32 insertions(+), 32 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/91/85891/1
diff --git a/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/mainboard.c b/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/mainboard.c index ac3ab14..b384619 100644 --- a/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/mainboard.c +++ b/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/mainboard.c @@ -42,22 +42,21 @@ dev = pcidev_path_on_root(PCH_DEVFN_SDCARD); if (dev) { struct resource *res = probe_resource(dev, PCI_BASE_ADDRESS_0); - if (!res) - return; + if (res) { + disable_sdr_modes(res);
- disable_sdr_modes(res); - - /* Use preset driver strength from preset value registers. */ - clrsetbits16(res2mmio(res, HOSTCTRL2, 0), 0, HOSTCTRL2_PRESET); + /* Use preset driver strength from preset value + registers. */ + clrsetbits16(res2mmio(res, HOSTCTRL2, 0), 0, + HOSTCTRL2_PRESET); + } }
dev = pcidev_path_on_root(PCH_DEVFN_EMMC); if (dev) { struct resource *res = probe_resource(dev, PCI_BASE_ADDRESS_0); - if (!res) - return; - - disable_sdr_modes(res); + if (res) + disable_sdr_modes(res); } }
diff --git a/src/mainboard/siemens/mc_ehl/variants/mc_ehl3/mainboard.c b/src/mainboard/siemens/mc_ehl/variants/mc_ehl3/mainboard.c index d76ac03..c68ecda 100644 --- a/src/mainboard/siemens/mc_ehl/variants/mc_ehl3/mainboard.c +++ b/src/mainboard/siemens/mc_ehl/variants/mc_ehl3/mainboard.c @@ -33,13 +33,14 @@ dev = pcidev_path_on_root(PCH_DEVFN_SDCARD); if (dev) { struct resource *res = probe_resource(dev, PCI_BASE_ADDRESS_0); - if (!res) - return; + if (res) { + disable_sdr_modes(res);
- disable_sdr_modes(res); - - /* Use preset driver strength from preset value registers. */ - clrsetbits16(res2mmio(res, HOSTCTRL2, 0), 0, HOSTCTRL2_PRESET); + /* Use preset driver strength from preset value + registers. */ + clrsetbits16(res2mmio(res, HOSTCTRL2, 0), 0, + HOSTCTRL2_PRESET); + } } }
diff --git a/src/mainboard/siemens/mc_ehl/variants/mc_ehl4/mainboard.c b/src/mainboard/siemens/mc_ehl/variants/mc_ehl4/mainboard.c index 3ef72fd..64cb3f3 100644 --- a/src/mainboard/siemens/mc_ehl/variants/mc_ehl4/mainboard.c +++ b/src/mainboard/siemens/mc_ehl/variants/mc_ehl4/mainboard.c @@ -32,12 +32,13 @@ dev = pcidev_path_on_root(PCH_DEVFN_SDCARD); if (dev) { struct resource *res = probe_resource(dev, PCI_BASE_ADDRESS_0); - if (!res) - return; + if (res) { + disable_sdr_modes(res);
- disable_sdr_modes(res); - - /* Use preset driver strength from preset value registers. */ - clrsetbits16(res2mmio(res, HOSTCTRL2, 0), 0, HOSTCTRL2_PRESET); + /* Use preset driver strength from preset value + registers. */ + clrsetbits16(res2mmio(res, HOSTCTRL2, 0), 0, + HOSTCTRL2_PRESET); + } } } diff --git a/src/mainboard/siemens/mc_ehl/variants/mc_ehl5/mainboard.c b/src/mainboard/siemens/mc_ehl/variants/mc_ehl5/mainboard.c index ac3ab14..b384619 100644 --- a/src/mainboard/siemens/mc_ehl/variants/mc_ehl5/mainboard.c +++ b/src/mainboard/siemens/mc_ehl/variants/mc_ehl5/mainboard.c @@ -42,22 +42,21 @@ dev = pcidev_path_on_root(PCH_DEVFN_SDCARD); if (dev) { struct resource *res = probe_resource(dev, PCI_BASE_ADDRESS_0); - if (!res) - return; + if (res) { + disable_sdr_modes(res);
- disable_sdr_modes(res); - - /* Use preset driver strength from preset value registers. */ - clrsetbits16(res2mmio(res, HOSTCTRL2, 0), 0, HOSTCTRL2_PRESET); + /* Use preset driver strength from preset value + registers. */ + clrsetbits16(res2mmio(res, HOSTCTRL2, 0), 0, + HOSTCTRL2_PRESET); + } }
dev = pcidev_path_on_root(PCH_DEVFN_EMMC); if (dev) { struct resource *res = probe_resource(dev, PCI_BASE_ADDRESS_0); - if (!res) - return; - - disable_sdr_modes(res); + if (res) + disable_sdr_modes(res); } }