/* This function disables SPI Prefetching and caching, and returns previous BIOS Control Register value before disabling. */
UINT8 SaveAndDisableSpiPrefetchCache(IN UINTN PchSpiBase)
/* This function disables SPI Prefetching and caching, and returns previous BIOS Control Register value before disabling. */
UINT8 SaveAndDisableSpiPrefetchCache(IN UINTN PchSpiBase)
{
  UINT8  BiosCtlSave;
  BiosCtlSave = MmioRead8 (PchSpiBase + R_SPI_BCR) & B_SPI_BCR_SRC;
  MmioAndThenOr32 (
    PchSpiBase + R_SPI_BCR, \
    (UINT32)(~B_SPI_BCR_SRC), \
    (UINT32)(V_SPI_BCR_SRC_PREF_DIS_CACHE_DIS <<  B_SPI_BCR_SRC)
    );
  return BiosCtlSave;
}