payloads/edk2: Disable the CPU Timer Lib unless supported
[coreboot.git] / src / mainboard / intel / saddlebrook / spd / spd_util.c
blobbd2d4385cf11e48e885106ae9b28dadea4098568
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <stdint.h>
4 #include <string.h>
5 #include "spd.h"
7 void mainboard_fill_dq_map_data(void *dq_map_ch0, void *dq_map_ch1)
9 /* DQ byte map */
10 const u8 dq_map[2][12] = {
11 { 0x0F, 0xF0, 0x00, 0xF0, 0x0F, 0xF0,
12 0x0F, 0x00, 0xFF, 0x00, 0xFF, 0x00 },
13 { 0x33, 0xCC, 0x00, 0xCC, 0x33, 0xCC,
14 0x33, 0x00, 0xFF, 0x00, 0xFF, 0x00 } };
15 memcpy(dq_map_ch0, dq_map[0], sizeof(dq_map[0]));
16 memcpy(dq_map_ch1, dq_map[1], sizeof(dq_map[1]));
19 void mainboard_fill_dqs_map_data(void *dqs_map_ch0, void *dqs_map_ch1)
21 /* DQS CPU<>DRAM map */
22 const u8 dqs_map[2][8] = {
23 { 0, 1, 3, 2, 4, 5, 6, 7 },
24 { 1, 0, 4, 5, 2, 3, 6, 7 } };
25 memcpy(dqs_map_ch0, dqs_map[0], sizeof(dqs_map[0]));
26 memcpy(dqs_map_ch1, dqs_map[1], sizeof(dqs_map[1]));
29 void mainboard_fill_rcomp_res_data(void *rcomp_ptr)
31 /* Rcomp resistor */
32 const u16 RcompResistor[3] = { 121, 81, 100 };
33 memcpy(rcomp_ptr, RcompResistor, sizeof(RcompResistor));
36 void mainboard_fill_rcomp_strength_data(void *rcomp_strength_ptr)
38 /* Rcomp target */
39 static const u16 RcompTarget[5] = { 100, 40, 20, 20, 26 };
40 memcpy(rcomp_strength_ptr, RcompTarget, sizeof(RcompTarget));