sb800: move spi prefetch and fast read mode to sb bootblock.
So we don't waste time on the first cbfs scan. Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> [adapt persimmon with the same change, and work around romcc bug in bootblock code: it doesn't like MEMACCESS[idx] |= value;] Change-Id: Ic4d0e53d3102be0de0bd18b1b8b29c500bd6d997 Reviewed-on: http://review.coreboot.org/9 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Marc Jones <marcj303@gmail.com>
This commit is contained in:
parent
46b033e8cb
commit
d1cb0eecd1
3 changed files with 34 additions and 40 deletions
|
|
@ -70,26 +70,6 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
*(volatile u32 *)(0xFED80000+0xE00+0x40) |= 1 << 1; /* 48Mhz */
|
||||
}
|
||||
|
||||
// early enable of PrefetchEnSPIFromHost
|
||||
if (boot_cpu())
|
||||
{
|
||||
__outdword (0xcf8, 0x8000a3b8);
|
||||
__outdword (0xcfc, __indword (0xcfc) | 1 << 24);
|
||||
}
|
||||
|
||||
// early enable of SPI 33 MHz fast mode read
|
||||
if (boot_cpu())
|
||||
{
|
||||
volatile u32 *spiBase = (void *) 0xa0000000;
|
||||
u32 save;
|
||||
__outdword (0xcf8, 0x8000a3a0);
|
||||
save = __indword (0xcfc);
|
||||
__outdword (0xcfc, (u32) spiBase | 2); // set temp MMIO base
|
||||
spiBase [3] = (spiBase [3] & ~(3 << 14)) | (1 << 14);
|
||||
spiBase [0] |= 1 << 18; // fast read enable
|
||||
__outdword (0xcfc, save); // clear temp base
|
||||
}
|
||||
|
||||
if (!cpu_init_detectedx && boot_cpu()) {
|
||||
post_code(0x30);
|
||||
sb_poweron_init();
|
||||
|
|
|
|||
|
|
@ -55,23 +55,6 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
// all cores: set pstate 0 (1600 MHz) early to save a few ms of boot time
|
||||
__writemsr(0xc0010062, 0);
|
||||
|
||||
// early enable of PrefetchEnSPIFromHost
|
||||
if (boot_cpu()) {
|
||||
__outdword(0xcf8, 0x8000a3b8);
|
||||
__outdword(0xcfc, __indword(0xcfc) | 1 << 24);
|
||||
}
|
||||
// early enable of SPI 33 MHz fast mode read
|
||||
if (boot_cpu()) {
|
||||
volatile u32 *spiBase = (void *)0xa0000000;
|
||||
u32 save;
|
||||
__outdword(0xcf8, 0x8000a3a0);
|
||||
save = __indword(0xcfc);
|
||||
__outdword(0xcfc, (u32) spiBase | 2); // set temp MMIO base
|
||||
spiBase[3] = (spiBase[3] & ~(3 << 14)) | (1 << 14);
|
||||
spiBase[0] |= 1 << 18; // fast read enable
|
||||
__outdword(0xcfc, save); // clear temp base
|
||||
}
|
||||
|
||||
if (!cpu_init_detectedx && boot_cpu()) {
|
||||
post_code(0x30);
|
||||
sb_poweron_init();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue