Author: mjones Date: Sun May 15 23:48:22 2011 New Revision: 6582 URL: https://tracker.coreboot.org/trac/coreboot/changeset/6582
Log: Enable 33 MHz fast mode SPI read early to reduce boot time.
Signed-off-by: Scott Duplichan scott@notabs.org Acked-by: Marc Jones marcj303@gmail.com
Modified: trunk/src/mainboard/amd/persimmon/romstage.c
Modified: trunk/src/mainboard/amd/persimmon/romstage.c ============================================================================== --- trunk/src/mainboard/amd/persimmon/romstage.c Sun May 15 23:45:46 2011 (r6581) +++ trunk/src/mainboard/amd/persimmon/romstage.c Sun May 15 23:48:22 2011 (r6582) @@ -47,6 +47,19 @@ u32 val; u8 reg8;
+ // 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();
repository service wrote:
+++ trunk/src/mainboard/amd/persimmon/romstage.c Sun May 15 23:48:22 2011 (r6582)
..
- 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
Are there some PCI access functions available also in romstage?
//Peter
On Sun, May 15, 2011 at 4:54 PM, Peter Stuge peter@stuge.se wrote:
repository service wrote:
+++ trunk/src/mainboard/amd/persimmon/romstage.c Sun May 15 23:48:22 2011 (r6582)
..
- 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
Are there some PCI access functions available also in romstage?
Yes indeed there are. We will fix these up.
Marc