aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2021-10-27 17:23:38 +0300
committerBin Meng <bmeng.cn@gmail.com>2021-11-01 10:19:05 +0800
commit5270bee9b27cf63251696916e4b5a5d4412d3a2d (patch)
treeb5ca780d0e9ce29fe58362533b56765a9ed3abad /arch
parent74bf2048e6e18ba310c62827d90f5ef76119bff6 (diff)
downloadu-boot-5270bee9b27cf63251696916e4b5a5d4412d3a2d.zip
u-boot-5270bee9b27cf63251696916e4b5a5d4412d3a2d.tar.gz
u-boot-5270bee9b27cf63251696916e4b5a5d4412d3a2d.tar.bz2
x86: tangier: pinmux: Move error message to the caller
Move error message to the caller of mrfld_pinconfig*() in order to unify them in the future. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/cpu/tangier/pinmux.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/x86/cpu/tangier/pinmux.c b/arch/x86/cpu/tangier/pinmux.c
index 883860f..7b2c35f 100644
--- a/arch/x86/cpu/tangier/pinmux.c
+++ b/arch/x86/cpu/tangier/pinmux.c
@@ -117,13 +117,7 @@ static int mrfld_pinconfig_protected(unsigned int pin, u32 mask, u32 bits)
debug("scu: v: 0x%x p: 0x%x bits: %d, mask: %d bufcfg: 0x%p\n",
v, (u32)bufcfg, bits, mask, bufcfg);
- ret = scu_ipc_raw_command(IPCMSG_INDIRECT_WRITE, 0, &v, 4,
- NULL, 0, (u32)bufcfg, 0);
- if (ret)
- pr_err("Failed to set mode via SCU for pin %u (%d)\n",
- pin, ret);
-
- return ret;
+ return scu_ipc_raw_command(IPCMSG_INDIRECT_WRITE, 0, &v, 4, NULL, 0, (u32)bufcfg, 0);
}
static int mrfld_pinconfig(unsigned int pin, u32 mask, u32 bits)
@@ -181,6 +175,8 @@ static int mrfld_pinctrl_cfg_pin(ofnode pin_node)
ret = mrfld_pinconfig_protected(pad_offset, mask, mode);
else
ret = mrfld_pinconfig(pad_offset, mask, mode);
+ if (ret)
+ pr_err("Failed to set mode for pin %u (%d)\n", pad_offset, ret);
return ret;
}