From 7a0eecb2bd818faa8fe4f64c5db95d019be701bd Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Mon, 21 Jun 2021 10:12:32 +0800 Subject: docs: uefi: Update stale U-Boot on EFI doc The existing intructions in the U-Boot on EFI doc do not work with the latest QEMU. Update the doc with the correct instructions, as well as using the new OVMF URL link. Signed-off-by: Bin Meng --- doc/develop/uefi/u-boot_on_efi.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/develop/uefi/u-boot_on_efi.rst b/doc/develop/uefi/u-boot_on_efi.rst index c9a41bc..43afb11 100644 --- a/doc/develop/uefi/u-boot_on_efi.rst +++ b/doc/develop/uefi/u-boot_on_efi.rst @@ -72,17 +72,19 @@ You will end up with one of these files depending on what you build for: Trying it out ------------- QEMU is an emulator and it can emulate an x86 machine. Please make sure your -QEMU version is 2.3.0 or above to test this. You can run the payload with +QEMU version is 6.0.0 or above to test this. You can run the payload with something like this:: mkdir /tmp/efi cp /path/to/u-boot*.efi /tmp/efi - qemu-system-x86_64 -bios bios.bin -hda fat:/tmp/efi/ + qemu-system-x86_64 -pflash edk2-x86_64-code.fd -hda fat:rw:/tmp/efi/ Add -nographic if you want to use the terminal for output. Once it starts type 'fs0:u-boot-payload.efi' to run the payload or 'fs0:u-boot-app.efi' to -run the application. 'bios.bin' is the EFI 'BIOS'. Check [2] to obtain a -prebuilt EFI BIOS for QEMU or you can build one from source as well. +run the application. 'edk2-x86_64-code.fd' is the EFI 'BIOS'. QEMU already +ships both 32-bit and 64-bit EFI BIOS images. For 32-bit EFI 'BIOS' image, +use 'edk2-i386-code.fd'. + To try it on real hardware, put u-boot-app.efi on a suitable boot medium, such as a USB stick. Then you can type something like this to start it:: @@ -232,4 +234,4 @@ Google, Inc July 2015 * [1] http://www.qemu.org -* [2] http://www.tianocore.org/ovmf/ +* [2] https://github.com/tianocore/tianocore.github.io/wiki/OVMF -- cgit v1.1 From 23f3e399de58712620b10210246831facea550fe Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Wed, 20 Oct 2021 00:18:14 -0700 Subject: pxe_utils: Fix arguments to x86 zboot bootm and zboot accept different arguments: > bootm [addr [arg ...]] > - boot application image stored in memory > passing arguments 'arg ...'; when booting a Linux kernel, > 'arg' can be the address of an initrd image > zboot [addr] [size] [initrd addr] [initrd size] [setup] [cmdline] > addr - The optional starting address of the bzimage. > If not set it defaults to the environment > variable "fileaddr". > size - The optional size of the bzimage. Defaults to > zero. > initrd addr - The address of the initrd image to use, if any. > initrd size - The size of the initrd image to use, if any. In the zboot flow, the current code will reuse the bootm args and attempt to pass the initrd arg (argv[2]) as the kernel size (should be argv[3]). zboot also expects the initrd address and size to be separate arguments. Let's untangle them and have separate argv/argc locals. Signed-off-by: Zhaofeng Li Cc: Simon Glass Cc: Bin Meng Reviewed-by: Simon Glass --- cmd/pxe_utils.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cmd/pxe_utils.c b/cmd/pxe_utils.c index 067c24e..78ebfdc 100644 --- a/cmd/pxe_utils.c +++ b/cmd/pxe_utils.c @@ -441,11 +441,14 @@ skip_overlay: static int label_boot(struct cmd_tbl *cmdtp, struct pxe_label *label) { char *bootm_argv[] = { "bootm", NULL, NULL, NULL, NULL }; + char *zboot_argv[] = { "zboot", NULL, "0", NULL, NULL }; char initrd_str[28]; + char initrd_filesize[10]; char mac_str[29] = ""; char ip_str[68] = ""; char *fit_addr = NULL; int bootm_argc = 2; + int zboot_argc = 3; int len = 0; ulong kernel_addr; void *buf; @@ -478,6 +481,11 @@ static int label_boot(struct cmd_tbl *cmdtp, struct pxe_label *label) strcat(bootm_argv[2], ":"); strncat(bootm_argv[2], env_get("filesize"), 9); bootm_argc = 3; + + strncpy(initrd_filesize, env_get("filesize"), 9); + zboot_argv[3] = env_get("ramdisk_addr_r"); + zboot_argv[4] = initrd_filesize; + zboot_argc = 5; } if (get_relfile_envaddr(cmdtp, label->kernel, "kernel_addr_r") < 0) { @@ -529,6 +537,8 @@ static int label_boot(struct cmd_tbl *cmdtp, struct pxe_label *label) } bootm_argv[1] = env_get("kernel_addr_r"); + zboot_argv[1] = env_get("kernel_addr_r"); + /* for FIT, append the configuration identifier */ if (label->config) { int len = strlen(bootm_argv[1]) + strlen(label->config) + 1; @@ -665,7 +675,7 @@ static int label_boot(struct cmd_tbl *cmdtp, struct pxe_label *label) do_bootz(cmdtp, 0, bootm_argc, bootm_argv); /* Try booting an x86_64 Linux kernel image */ else if (IS_ENABLED(CONFIG_CMD_ZBOOT)) - do_zboot_parent(cmdtp, 0, bootm_argc, bootm_argv, NULL); + do_zboot_parent(cmdtp, 0, zboot_argc, zboot_argv, NULL); unmap_sysmem(buf); -- cgit v1.1 From c97bd17b2cfea02c9ef34f889bfb336b7c645cf2 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Wed, 20 Oct 2021 00:18:15 -0700 Subject: pxe_utils: Clean up {bootm,zboot}_argv generation Signed-off-by: Zhaofeng Li Cc: Simon Glass Cc: Bin Meng Reviewed-by: Simon Glass --- cmd/pxe_utils.c | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/cmd/pxe_utils.c b/cmd/pxe_utils.c index 78ebfdc..b79fcb6 100644 --- a/cmd/pxe_utils.c +++ b/cmd/pxe_utils.c @@ -442,15 +442,17 @@ static int label_boot(struct cmd_tbl *cmdtp, struct pxe_label *label) { char *bootm_argv[] = { "bootm", NULL, NULL, NULL, NULL }; char *zboot_argv[] = { "zboot", NULL, "0", NULL, NULL }; - char initrd_str[28]; + char *kernel_addr = NULL; + char *initrd_addr_str = NULL; char initrd_filesize[10]; + char initrd_str[28]; char mac_str[29] = ""; char ip_str[68] = ""; char *fit_addr = NULL; int bootm_argc = 2; int zboot_argc = 3; int len = 0; - ulong kernel_addr; + ulong kernel_addr_r; void *buf; label_print(label); @@ -476,16 +478,12 @@ static int label_boot(struct cmd_tbl *cmdtp, struct pxe_label *label) return 1; } - bootm_argv[2] = initrd_str; - strncpy(bootm_argv[2], env_get("ramdisk_addr_r"), 18); - strcat(bootm_argv[2], ":"); - strncat(bootm_argv[2], env_get("filesize"), 9); - bootm_argc = 3; - + initrd_addr_str = env_get("ramdisk_addr_r"); strncpy(initrd_filesize, env_get("filesize"), 9); - zboot_argv[3] = env_get("ramdisk_addr_r"); - zboot_argv[4] = initrd_filesize; - zboot_argc = 5; + + strncpy(initrd_str, initrd_addr_str, 18); + strcat(initrd_str, ":"); + strncat(initrd_str, initrd_filesize, 9); } if (get_relfile_envaddr(cmdtp, label->kernel, "kernel_addr_r") < 0) { @@ -536,20 +534,19 @@ static int label_boot(struct cmd_tbl *cmdtp, struct pxe_label *label) printf("append: %s\n", finalbootargs); } - bootm_argv[1] = env_get("kernel_addr_r"); - zboot_argv[1] = env_get("kernel_addr_r"); + kernel_addr = env_get("kernel_addr_r"); /* for FIT, append the configuration identifier */ if (label->config) { - int len = strlen(bootm_argv[1]) + strlen(label->config) + 1; + int len = strlen(kernel_addr) + strlen(label->config) + 1; fit_addr = malloc(len); if (!fit_addr) { printf("malloc fail (FIT address)\n"); return 1; } - snprintf(fit_addr, len, "%s%s", bootm_argv[1], label->config); - bootm_argv[1] = fit_addr; + snprintf(fit_addr, len, "%s%s", kernel_addr, label->config); + kernel_addr = fit_addr; } /* @@ -653,6 +650,18 @@ static int label_boot(struct cmd_tbl *cmdtp, struct pxe_label *label) } } + bootm_argv[1] = kernel_addr; + zboot_argv[1] = kernel_addr; + + if (initrd_addr_str) { + bootm_argv[2] = initrd_str; + bootm_argc = 3; + + zboot_argv[3] = initrd_addr_str; + zboot_argv[4] = initrd_filesize; + zboot_argc = 5; + } + if (!bootm_argv[3]) bootm_argv[3] = env_get("fdt_addr"); @@ -662,8 +671,8 @@ static int label_boot(struct cmd_tbl *cmdtp, struct pxe_label *label) bootm_argc = 4; } - kernel_addr = genimg_get_kernel_addr(bootm_argv[1]); - buf = map_sysmem(kernel_addr, 0); + kernel_addr_r = genimg_get_kernel_addr(kernel_addr); + buf = map_sysmem(kernel_addr_r, 0); /* Try bootm for legacy and FIT format image */ if (genimg_get_format(buf) != IMAGE_FORMAT_INVALID) do_bootm(cmdtp, 0, bootm_argc, bootm_argv); -- cgit v1.1 From d3023b8139088ddd5953bd0d1955a905925990d5 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Wed, 20 Oct 2021 15:51:18 +0300 Subject: x86: tangier: Replace Method() by Name() for _STA object There is no point to use Method() for the constant. Replace it with Name() defined object. For the _STA case it saves 3 bytes per each entry. Before: 2881 After: 2833 Signed-off-by: Andy Shevchenko Reviewed-by: Simon Glass Reviewed-by: Bin Meng --- .../include/asm/arch-tangier/acpi/southcluster.asl | 81 +++++----------------- 1 file changed, 17 insertions(+), 64 deletions(-) diff --git a/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl b/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl index a8852f8..4a7c854 100644 --- a/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl +++ b/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl @@ -123,10 +123,7 @@ Device (PCI0) } }) - Method (_STA) - { - Return (STA_VISIBLE) - } + Name (_STA, STA_VISIBLE) } Device (SDHC) @@ -138,10 +135,7 @@ Device (PCI0) }) Name (PSTS, Zero) - Method (_STA) - { - Return (STA_VISIBLE) - } + Name (_STA, STA_VISIBLE) Method (_PS3, 0, NotSerialized) { @@ -168,10 +162,7 @@ Device (PCI0) GPIO }) - Method (_STA) - { - Return (STA_VISIBLE) - } + Name (_STA, STA_VISIBLE) Method (_RMV, 0, NotSerialized) { @@ -203,10 +194,8 @@ Device (PCI0) Device (BRC2) { Name (_ADR, 0x02) - Method (_STA, 0, NotSerialized) - { - Return (STA_VISIBLE) - } + + Name (_STA, STA_VISIBLE) Method (_RMV, 0, NotSerialized) { @@ -257,20 +246,14 @@ Device (PCI0) } }) - Method (_STA, 0, NotSerialized) - { - Return (STA_VISIBLE) - } + Name (_STA, STA_VISIBLE) } Device (I2C1) { Name (_ADR, 0x00080000) - Method (_STA, 0, NotSerialized) - { - Return (STA_VISIBLE) - } + Name (_STA, STA_VISIBLE) Name (SSCN, Package () { @@ -303,10 +286,7 @@ Device (PCI0) { Name (_ADR, 0x00090001) - Method (_STA, 0, NotSerialized) - { - Return (STA_VISIBLE) - } + Name (_STA, STA_VISIBLE) Name (SSCN, Package () { @@ -328,10 +308,7 @@ Device (PCI0) { Name (_ADR, 0x000c0000) - Method (_STA) - { - Return (STA_VISIBLE) - } + Name (_STA, STA_VISIBLE) Name (AVBL, Zero) Method (_REG, 2, NotSerialized) @@ -361,10 +338,7 @@ Device (PCI0) ^IPC1.PMIC }) - Method (_STA, 0, NotSerialized) - { - Return (STA_VISIBLE) - } + Name (_STA, STA_VISIBLE) Device (RHUB) { @@ -404,20 +378,14 @@ Device (PCI0) { Name (_ADR, 0x00170000) - Method (_STA, 0, NotSerialized) - { - Return (STA_VISIBLE) - } + Name (_STA, STA_VISIBLE) } Device (HSU0) { Name (_ADR, 0x00040001) - Method (_STA, 0, NotSerialized) - { - Return (STA_VISIBLE) - } + Name (_STA, STA_VISIBLE) Device (BTH0) { @@ -428,10 +396,7 @@ Device (PCI0) HSU0 }) - Method (_STA, 0, NotSerialized) - { - Return (STA_VISIBLE) - } + Name (_STA, STA_VISIBLE) Name (RBUF, ResourceTemplate() { @@ -466,10 +431,7 @@ Device (PCI0) { Name (_ADR, 0x00130000) - Method (_STA, 0, NotSerialized) - { - Return (STA_VISIBLE) - } + Name (_STA, STA_VISIBLE) Device (PMIC) { @@ -481,10 +443,7 @@ Device (PCI0) IPC1 }) - Method (_STA, 0, NotSerialized) - { - Return (STA_VISIBLE) - } + Name (_STA, STA_VISIBLE) Name (RBUF, ResourceTemplate() { @@ -554,10 +513,7 @@ Device (PCI0) Name (_ADR, 0x00150000) Name (_UID, Zero) - Method (_STA, 0, NotSerialized) - { - Return (STA_VISIBLE) - } + Name (_STA, STA_VISIBLE) Name (RBUF, ResourceTemplate () { @@ -594,8 +550,5 @@ Device (FLIS) Return (RBUF) } - Method (_STA, 0, NotSerialized) - { - Return (STA_VISIBLE) - } + Name (_STA, STA_VISIBLE) } -- cgit v1.1 From daf26a6bc29568fb4522cd63689906440785f28d Mon Sep 17 00:00:00 2001 From: Alistair Delva Date: Wed, 20 Oct 2021 21:31:29 +0000 Subject: x86: chromebook_coral: fix C block comment Fix a warning seen when compiling this dts file. Signed-off-by: Alistair Delva Cc: Simon Glass Cc: Bin Meng Reviewed-by: Simon Glass Reviewed-by: Bin Meng --- arch/x86/dts/chromebook_coral.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/dts/chromebook_coral.dts b/arch/x86/dts/chromebook_coral.dts index f0caaac..69a1c1c 100644 --- a/arch/x86/dts/chromebook_coral.dts +++ b/arch/x86/dts/chromebook_coral.dts @@ -825,6 +825,7 @@ * Refer to EDS-Vol2-22.3 * [14:8] steps of delay for HS400, each 125ps * [6:0] steps of delay for SDR104/HS200, each 125ps + */ /* * EMMC TX DATA Delay 2 -- cgit v1.1 From 9bcd51b83829ee7b80482716d490a46d381d59c6 Mon Sep 17 00:00:00 2001 From: Alistair Delva Date: Wed, 20 Oct 2021 21:31:30 +0000 Subject: x86: Fix i8254 ifdef include guard When building U-Boot with clang, it notices that the i8254.h include guard does not work correctly due to a typo. Fix it. Signed-off-by: Alistair Delva Cc: Simon Glass Cc: Bin Meng Reviewed-by: Simon Glass Reviewed-by: Bin Meng [bmeng: fixed the other same typo at the end of the same file] Signed-off-by: Bin Meng --- arch/x86/include/asm/i8254.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/i8254.h b/arch/x86/include/asm/i8254.h index d769daf..4069b9a 100644 --- a/arch/x86/include/asm/i8254.h +++ b/arch/x86/include/asm/i8254.h @@ -7,7 +7,7 @@ /* i8254.h Intel 8254 PIT registers */ #ifndef _ASMI386_I8254_H_ -#define _ASMI386_I8954_H_ +#define _ASMI386_I8254_H_ #define PIT_T0 0x00 /* PIT channel 0 count/status */ #define PIT_T1 0x01 /* PIT channel 1 count/status */ @@ -53,4 +53,4 @@ int i8254_enable_beep(uint frequency_hz); */ void i8254_disable_beep(void); -#endif /* _ASMI386_I8954_H_ */ +#endif /* _ASMI386_I8254_H_ */ -- cgit v1.1 From 90cc2c5c64422d9ff004721f2c57f3643459424a Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Wed, 27 Oct 2021 14:28:09 +0300 Subject: x86: tangier: Enable support for SD/SDIO family in the pinmux driver We would need to quirk out the Card Detect case and for that we allow configuring the SD/SDIO family of pins. Signed-off-by: Andy Shevchenko Reviewed-by: Bin Meng --- arch/x86/cpu/tangier/pinmux.c | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/arch/x86/cpu/tangier/pinmux.c b/arch/x86/cpu/tangier/pinmux.c index acf97e3..8385167 100644 --- a/arch/x86/cpu/tangier/pinmux.c +++ b/arch/x86/cpu/tangier/pinmux.c @@ -37,8 +37,9 @@ struct mrfld_family { .npins = (e) - (s) + 1, \ } -/* Now we only support I2C family of pins */ +/* Now we only support SD/SDIO and I2C families of pins */ static struct mrfld_family mrfld_families[] = { + MRFLD_FAMILY(3, 37, 56), MRFLD_FAMILY(7, 101, 114), }; @@ -125,6 +126,34 @@ static int mrfld_pinconfig_protected(unsigned int pin, u32 mask, u32 bits) return ret; } +static int mrfld_pinconfig(unsigned int pin, u32 mask, u32 bits) +{ + struct mrfld_pinctrl *pinctrl; + struct udevice *dev; + void __iomem *bufcfg; + u32 v, value; + int ret; + + ret = syscon_get_by_driver_data(X86_SYSCON_PINCONF, &dev); + if (ret) + return ret; + + pinctrl = dev_get_priv(dev); + + bufcfg = mrfld_get_bufcfg(pinctrl, pin); + if (!bufcfg) + return -EINVAL; + + value = readl(bufcfg); + v = (value & ~mask) | (bits & mask); + writel(v, bufcfg); + + debug("v: 0x%x p: 0x%x bits: %d, mask: %d bufcfg: 0x%p\n", + v, (u32)bufcfg, bits, mask, bufcfg); + + return 0; +} + static int mrfld_pinctrl_cfg_pin(ofnode pin_node) { bool is_protected; @@ -133,10 +162,7 @@ static int mrfld_pinctrl_cfg_pin(ofnode pin_node) u32 mask; int ret; - /* For now we only support just protected Family of pins */ is_protected = ofnode_read_bool(pin_node, "protected"); - if (!is_protected) - return -ENOTSUPP; pad_offset = ofnode_read_s32_default(pin_node, "pad-offset", -1); if (pad_offset == -1) @@ -152,7 +178,10 @@ static int mrfld_pinctrl_cfg_pin(ofnode pin_node) if (mode & ~mask) return -ENOTSUPP; - ret = mrfld_pinconfig_protected(pad_offset, mask, mode); + if (is_protected) + ret = mrfld_pinconfig_protected(pad_offset, mask, mode); + else + ret = mrfld_pinconfig(pad_offset, mask, mode); return ret; } -- cgit v1.1 From 144cb060831189ec0fb985bf66ec7a3156e3d7dd Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Wed, 27 Oct 2021 14:28:10 +0300 Subject: x86: edison: Don't take SD card detect pin into consideration There are two PCB designs in the wild which use the opposite signaling for SD card detection. This makes U-Boot working in one case and failing in the other. Quirk this out by disconnecting SD card detection pin from the PCB by switching it to mode 3. In the disconnected state the read value is always the same and inverted to what we are expecting in the code. BugLink: https://github.com/edison-fw/meta-intel-edison/issues/136 Signed-off-by: Andy Shevchenko Reviewed-by: Bin Meng --- arch/x86/dts/edison.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/x86/dts/edison.dts b/arch/x86/dts/edison.dts index 2c8cf6c..b3658b8 100644 --- a/arch/x86/dts/edison.dts +++ b/arch/x86/dts/edison.dts @@ -94,6 +94,12 @@ sdcard: mmc@ff3fa000 { compatible = "intel,sdhci-tangier"; reg = <0xff3fa000 0x1000>; + /* + * In the disconnected state of the SD Card Detection pin + * the read value is always the same and inverted to what + * we are expecting in the code. + */ + cd-inverted; }; pmu: power@ff00b000 { @@ -132,6 +138,17 @@ reg = <0xff0c0000 0x8000>; /* + * Disconnect SD card detection pin, so it won't affect + * the reality on two different PCB designs where it's + * using the opposite signaling: Edison/Arduino uses + * Active Low, while SparkFun went with Active High. + */ + sd_cd@0 { + pad-offset = <37>; + mode-func = <3>; + }; + + /* * Initial configuration came from the firmware. * Which quite likely has been used in the phones, where I2C #8, * that is not part of Atom peripheral, is in use. -- cgit v1.1 From 74bf2048e6e18ba310c62827d90f5ef76119bff6 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Wed, 27 Oct 2021 17:23:37 +0300 Subject: x86: tangier: pinmux: Move is_protected assignment closer to its user Move is_protected assignment closer to its user. This increases readability and makes maintenance easier. Signed-off-by: Andy Shevchenko Reviewed-by: Simon Glass Reviewed-by: Bin Meng --- arch/x86/cpu/tangier/pinmux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/cpu/tangier/pinmux.c b/arch/x86/cpu/tangier/pinmux.c index 8385167..883860f 100644 --- a/arch/x86/cpu/tangier/pinmux.c +++ b/arch/x86/cpu/tangier/pinmux.c @@ -162,8 +162,6 @@ static int mrfld_pinctrl_cfg_pin(ofnode pin_node) u32 mask; int ret; - is_protected = ofnode_read_bool(pin_node, "protected"); - pad_offset = ofnode_read_s32_default(pin_node, "pad-offset", -1); if (pad_offset == -1) return -EINVAL; @@ -178,6 +176,7 @@ static int mrfld_pinctrl_cfg_pin(ofnode pin_node) if (mode & ~mask) return -ENOTSUPP; + is_protected = ofnode_read_bool(pin_node, "protected"); if (is_protected) ret = mrfld_pinconfig_protected(pad_offset, mask, mode); else -- cgit v1.1 From 5270bee9b27cf63251696916e4b5a5d4412d3a2d Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Wed, 27 Oct 2021 17:23:38 +0300 Subject: 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 Reviewed-by: Simon Glass Reviewed-by: Bin Meng --- arch/x86/cpu/tangier/pinmux.c | 10 +++------- 1 file 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; } -- cgit v1.1