MCPcopy Create free account
hub / github.com/coreboot/coreboot / set_spi_frequency

Function set_spi_frequency

util/ifdtool/ifdtool.c:1283–1300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1281}
1282
1283static void set_spi_frequency(const char *filename, char *image, int size,
1284 enum spi_frequency freq)
1285{
1286 struct fcba *fcba = find_fcba(image, size);
1287 if (!fcba)
1288 exit(EXIT_FAILURE);
1289
1290 /* clear bits 21-29 */
1291 fcba->flcomp &= ~0x3fe00000;
1292 /* Read ID and Read Status Clock Frequency */
1293 fcba->flcomp |= freq << 27;
1294 /* Write and Erase Clock Frequency */
1295 fcba->flcomp |= freq << 24;
1296 /* Fast Read Clock Frequency */
1297 fcba->flcomp |= freq << 21;
1298
1299 write_image(filename, image, size);
1300}
1301
1302static void set_em100_mode(const char *filename, char *image, int size)
1303{

Callers 2

set_em100_modeFunction · 0.85
mainFunction · 0.85

Calls 3

find_fcbaFunction · 0.85
exitFunction · 0.85
write_imageFunction · 0.85

Tested by

no test coverage detected