payloads/edk2: Disable the CPU Timer Lib unless supported
[coreboot.git] / src / mainboard / facebook / monolith / spd / spd_util.c
blob07cf286e5ecd65ee318297436191195fa72d550b
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <stdint.h>
4 #include <string.h>
6 #include "spd.h"
8 void mainboard_fill_dq_map_data(void *dq_map_ptr)
10 /* DQ byte map */
11 const u8 dq_map[2][12] = {
12 { 0x0F, 0xF0, 0x00, 0xF0, 0x0F, 0xF0,
13 0x0F, 0x00, 0xFF, 0x00, 0xFF, 0x00 },
14 { 0x33, 0xCC, 0x00, 0xCC, 0x33, 0xCC,
15 0x33, 0x00, 0xFF, 0x00, 0xFF, 0x00 } };
16 memcpy(dq_map_ptr, dq_map, sizeof(dq_map));
19 void mainboard_fill_dqs_map_data(void *dqs_map_ptr)
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_ptr, dqs_map, sizeof(dqs_map));
28 void mainboard_fill_rcomp_res_data(void *rcomp_ptr)
30 /* Rcomp resistor */
31 const u16 RcompResistor[3] = { 200, 81, 162 };
32 memcpy(rcomp_ptr, RcompResistor,
33 sizeof(RcompResistor));
36 void mainboard_fill_rcomp_strength_data(void *rcomp_strength_ptr)
38 /* Rcomp target */
39 static const u16 RcompTarget[5] = { 100, 40, 40, 23, 40 };
41 memcpy(rcomp_strength_ptr, RcompTarget, sizeof(RcompTarget));