From 52dd56ba847acd048205e6412e779fda991c95d3 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Sat, 26 Aug 2017 19:22:58 -0700 Subject: [PATCH 1/4] x86: ich-spi: Remove useless assignment in ich_spi_xfer() In ich_spi_xfer() when the driver presets control fields, control variable gets assigned twice. Apparently only the last assignment takes effect. Remove the other one. Signed-off-by: Bin Meng Reviewed-by: Stefan Roese --- drivers/spi/ich.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c index 373bc2683b0..5a3d6908152 100644 --- a/drivers/spi/ich.c +++ b/drivers/spi/ich.c @@ -468,8 +468,6 @@ static int ich_spi_xfer(struct udevice *dev, unsigned int bitlen, } /* Preset control fields */ - control = ich_readw(ctlr, ctlr->control); - control &= ~SSFC_RESERVED; control = SPIC_SCGO | ((opcode_index & 0x07) << 4); /* Issue atomic preop cycle if needed */ From d2ca80c3d7e314c2dd2ac1bf63e5630ae7131a57 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Sat, 26 Aug 2017 19:22:59 -0700 Subject: [PATCH 2/4] x86: ich-spi: Clear atomic preop only when SPI settings are not locked The atomic preop register can only be written when SPI settings are not locked, otherwise it's read-only. Signed-off-by: Bin Meng Reviewed-by: Stefan Roese --- drivers/spi/ich.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c index 5a3d6908152..22fc83dd725 100644 --- a/drivers/spi/ich.c +++ b/drivers/spi/ich.c @@ -563,7 +563,8 @@ static int ich_spi_xfer(struct udevice *dev, unsigned int bitlen, } /* Clear atomic preop now that xfer is done */ - ich_writew(ctlr, 0, ctlr->preop); + if (!lock) + ich_writew(ctlr, 0, ctlr->preop); return 0; } From 3fe6e6e2aa084d857af8a7e4663baf0451c33b30 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Mon, 28 Aug 2017 22:09:11 -0700 Subject: [PATCH 3/4] x86: baytrail: acpi: Add full reset bit to the reset register value in FADT It was noticed a few times, that the reboot from Linux (reboot command) is different from the reboot (reset command) under U-Boot. The U-Boot version does seem to reset the board more deeply (PCI cards etc) than the Linux reboot. This is actually caused by missing full reset bit in the reset register value in the ACPI FADT table. Reported-by: Stefan Roese Signed-off-by: Bin Meng Tested-by: Stefan Roese --- arch/x86/cpu/baytrail/acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/cpu/baytrail/acpi.c b/arch/x86/cpu/baytrail/acpi.c index cbefdf871dc..7aac634d661 100644 --- a/arch/x86/cpu/baytrail/acpi.c +++ b/arch/x86/cpu/baytrail/acpi.c @@ -73,7 +73,7 @@ void acpi_create_fadt(struct acpi_fadt *fadt, struct acpi_facs *facs, fadt->reset_reg.access_size = ACPI_ACCESS_SIZE_BYTE_ACCESS; fadt->reset_reg.addrl = IO_PORT_RESET; fadt->reset_reg.addrh = 0; - fadt->reset_value = SYS_RST | RST_CPU; + fadt->reset_value = SYS_RST | RST_CPU | FULL_RST; fadt->x_firmware_ctl_l = (u32)facs; fadt->x_firmware_ctl_h = 0; From f04034cba4c2351da5b54ae36f5a30e3ccfce1cc Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Wed, 30 Aug 2017 09:40:17 +0200 Subject: [PATCH 4/4] x86: theadorable-x86-common: Remove "ip=dhcp" from default environment Without ethernet cable plugged, "ip=dhcp" leads to a complete hangup in Linux booting and the system does not boot into userland at all. Since its not required to have an active network connection on these board, lets remove this statement from the default environment. Signed-off-by: Stefan Roese Cc: Bin Meng Reviewed-by: Bin Meng --- include/configs/theadorable-x86-common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/configs/theadorable-x86-common.h b/include/configs/theadorable-x86-common.h index 37b78c1b57e..8de659a4960 100644 --- a/include/configs/theadorable-x86-common.h +++ b/include/configs/theadorable-x86-common.h @@ -88,7 +88,7 @@ "/boot/initrd.img-${kernel-ver}-generic;" \ "run boot\0" \ "yocto_args=setenv bootargs root=/dev/sda${yocto_part} " \ - "ip=dhcp panic=1\0" \ + "panic=1\0" \ "yocto_args_fast=setenv bootargs root=/dev/sda${yocto_part} " \ "quiet panic=1\0" \ "yocto_boot=run yocto_args addmtd addmisc addtty_yocto;" \ @@ -110,7 +110,7 @@ "fi\0" \ "swupdate-initrd=/boot/swupdate-image-theadorable.ext4.gz\0" \ "swupdate-kernel=/boot/bzImage\0" \ - "swupdate_args=setenv bootargs root=/dev/ram rw ip=dhcp panic=1\0" \ + "swupdate_args=setenv bootargs root=/dev/ram rw panic=1\0" \ "swupdate_dev=0\0" \ "swupdate_factory=0\0" \ "swupdate_interface=usb\0" \