x86: tnc: Drop unprotect_spi_flash()
authorBin Meng <bmeng.cn@gmail.com>
Mon, 1 Feb 2016 09:40:39 +0000 (01:40 -0800)
committerBin Meng <bmeng.cn@gmail.com>
Fri, 5 Feb 2016 04:47:20 +0000 (12:47 +0800)
Unprotecting SPI flash is now handled in the SPI controller driver,
via a call to the PCH driver. Drop the ad-hoc version.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
arch/x86/cpu/queensbay/tnc.c
include/configs/crownbay.h

index 75f7adb74cd622603c595cd228930a09a45e01f8..f9fddc1ba7645ade8246f116a77e3aa7a5f82c3c 100644 (file)
 #include <asm/fsp/fsp_support.h>
 #include <asm/processor.h>
 
-static void unprotect_spi_flash(void)
-{
-       u32 bc;
-
-       bc = x86_pci_read_config32(TNC_LPC, 0xd8);
-       bc |= 0x1;      /* unprotect the flash */
-       x86_pci_write_config32(TNC_LPC, 0xd8, bc);
-}
-
 static void __maybe_unused disable_igd(void)
 {
        /*
@@ -68,10 +59,3 @@ int arch_early_init_r(void)
 
        return 0;
 }
-
-int arch_misc_init(void)
-{
-       unprotect_spi_flash();
-
-       return 0;
-}
index ffd65d54393abc9aec9f28c52f8093dd64832bc4..fc1a8baf89458b48b908b4992e57b03f3ddad22e 100644 (file)
@@ -16,7 +16,6 @@
 #define CONFIG_SYS_MONITOR_LEN         (1 << 20)
 #define CONFIG_BOARD_EARLY_INIT_F
 #define CONFIG_ARCH_EARLY_INIT_R
-#define CONFIG_ARCH_MISC_INIT
 
 #define CONFIG_SMSC_LPC47M