mb: Use fixed value in RcompTarget structure
Now RCOMP_TARGET_PARAMS is defined and used once in the definition of the RcompTarget structure. All other structures in these functions use a fixed value. Replace RCOMP_TARGET_PARAMS with fixed value. BUG=N/A TEST=build Change-Id: Ibe7c72c65975354433e9a0c613bda715eb782412 Signed-off-by: Wim Vervoorn <wvervoorn@eltan.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37658 Reviewed-by: Frans Hendriks <fhendriks@eltan.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
03f78b069d
commit
116a837818
|
@ -18,8 +18,6 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <spd_bin.h>
|
#include <spd_bin.h>
|
||||||
|
|
||||||
#define RCOMP_TARGET_PARAMS 0x5
|
|
||||||
|
|
||||||
static void mainboard_fill_dq_map_data(void *dq_map_ch0, void *dq_map_ch1)
|
static void mainboard_fill_dq_map_data(void *dq_map_ch0, void *dq_map_ch1)
|
||||||
{
|
{
|
||||||
/* DQ byte map */
|
/* DQ byte map */
|
||||||
|
@ -53,7 +51,7 @@ static void mainboard_fill_rcomp_res_data(void *rcomp_ptr)
|
||||||
static void mainboard_fill_rcomp_strength_data(void *rcomp_strength_ptr)
|
static void mainboard_fill_rcomp_strength_data(void *rcomp_strength_ptr)
|
||||||
{
|
{
|
||||||
/* Rcomp target */
|
/* Rcomp target */
|
||||||
static const u16 RcompTarget[RCOMP_TARGET_PARAMS] = {
|
static const u16 RcompTarget[5] = {
|
||||||
100, 40, 40, 23, 40 };
|
100, 40, 40, 23, 40 };
|
||||||
memcpy(rcomp_strength_ptr, RcompTarget, sizeof(RcompTarget));
|
memcpy(rcomp_strength_ptr, RcompTarget, sizeof(RcompTarget));
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
#ifndef MAINBOARD_SPD_H
|
#ifndef MAINBOARD_SPD_H
|
||||||
#define MAINBOARD_SPD_H
|
#define MAINBOARD_SPD_H
|
||||||
|
|
||||||
#define RCOMP_TARGET_PARAMS 0x5
|
|
||||||
|
|
||||||
void mainboard_fill_dq_map_data(void *dq_map_ptr);
|
void mainboard_fill_dq_map_data(void *dq_map_ptr);
|
||||||
void mainboard_fill_dqs_map_data(void *dqs_map_ptr);
|
void mainboard_fill_dqs_map_data(void *dqs_map_ptr);
|
||||||
void mainboard_fill_rcomp_res_data(void *rcomp_ptr);
|
void mainboard_fill_rcomp_res_data(void *rcomp_ptr);
|
||||||
|
|
|
@ -49,8 +49,7 @@ void mainboard_fill_rcomp_res_data(void *rcomp_ptr)
|
||||||
void mainboard_fill_rcomp_strength_data(void *rcomp_strength_ptr)
|
void mainboard_fill_rcomp_strength_data(void *rcomp_strength_ptr)
|
||||||
{
|
{
|
||||||
/* Rcomp target */
|
/* Rcomp target */
|
||||||
static const u16 RcompTarget[RCOMP_TARGET_PARAMS] = {
|
static const u16 RcompTarget[5] = { 100, 40, 40, 23, 40 };
|
||||||
100, 40, 40, 23, 40 };
|
|
||||||
|
|
||||||
memcpy(rcomp_strength_ptr, RcompTarget, sizeof(RcompTarget));
|
memcpy(rcomp_strength_ptr, RcompTarget, sizeof(RcompTarget));
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
#ifndef MAINBOARD_SPD_H
|
#ifndef MAINBOARD_SPD_H
|
||||||
#define MAINBOARD_SPD_H
|
#define MAINBOARD_SPD_H
|
||||||
|
|
||||||
#define RCOMP_TARGET_PARAMS 0x5
|
|
||||||
|
|
||||||
void mainboard_fill_dq_map_ch0(void *dq_map_ptr);
|
void mainboard_fill_dq_map_ch0(void *dq_map_ptr);
|
||||||
void mainboard_fill_dq_map_ch1(void *dq_map_ptr);
|
void mainboard_fill_dq_map_ch1(void *dq_map_ptr);
|
||||||
void mainboard_fill_dqs_map_ch0(void *dqs_map_ptr);
|
void mainboard_fill_dqs_map_ch0(void *dqs_map_ptr);
|
||||||
|
|
|
@ -73,8 +73,7 @@ void mainboard_fill_rcomp_res_data(void *rcomp_ptr)
|
||||||
void mainboard_fill_rcomp_strength_data(void *rcomp_strength_ptr)
|
void mainboard_fill_rcomp_strength_data(void *rcomp_strength_ptr)
|
||||||
{
|
{
|
||||||
/* Rcomp target */
|
/* Rcomp target */
|
||||||
static const u16 RcompTarget[RCOMP_TARGET_PARAMS] = {
|
static const u16 RcompTarget[5] = { 80, 40, 40, 40, 30 };
|
||||||
80, 40, 40, 40, 30 };
|
|
||||||
|
|
||||||
memcpy(rcomp_strength_ptr, RcompTarget, sizeof(RcompTarget));
|
memcpy(rcomp_strength_ptr, RcompTarget, sizeof(RcompTarget));
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,8 +16,6 @@
|
||||||
#ifndef MAINBOARD_SPD_H
|
#ifndef MAINBOARD_SPD_H
|
||||||
#define MAINBOARD_SPD_H
|
#define MAINBOARD_SPD_H
|
||||||
|
|
||||||
#define RCOMP_TARGET_PARAMS 0x5
|
|
||||||
|
|
||||||
void mainboard_fill_dq_map_ch0(void *dq_map_ptr);
|
void mainboard_fill_dq_map_ch0(void *dq_map_ptr);
|
||||||
void mainboard_fill_dq_map_ch1(void *dq_map_ptr);
|
void mainboard_fill_dq_map_ch1(void *dq_map_ptr);
|
||||||
void mainboard_fill_dqs_map_ch0(void *dqs_map_ptr);
|
void mainboard_fill_dqs_map_ch0(void *dqs_map_ptr);
|
||||||
|
|
|
@ -114,11 +114,11 @@ void mainboard_fill_rcomp_res_data(void *rcomp_ptr)
|
||||||
void mainboard_fill_rcomp_strength_data(void *rcomp_strength_ptr)
|
void mainboard_fill_rcomp_strength_data(void *rcomp_strength_ptr)
|
||||||
{
|
{
|
||||||
/* Rcomp target */
|
/* Rcomp target */
|
||||||
static const u16 RcompTarget_DDR4[RCOMP_TARGET_PARAMS] = {
|
static const u16 RcompTarget_DDR4[5] = {
|
||||||
100, 33, 32, 33, 28 };
|
100, 33, 32, 33, 28 };
|
||||||
static const u16 RcompTarget_LPDDR4_Ax[RCOMP_TARGET_PARAMS] = {
|
static const u16 RcompTarget_LPDDR4_Ax[5] = {
|
||||||
80, 40, 40, 40, 30 };
|
80, 40, 40, 40, 30 };
|
||||||
static const u16 RcompTarget_LPDDR4_Bx[RCOMP_TARGET_PARAMS] = {
|
static const u16 RcompTarget_LPDDR4_Bx[5] = {
|
||||||
60, 20, 20, 20, 20 };
|
60, 20, 20, 20, 20 };
|
||||||
|
|
||||||
switch (get_spd_index()) {
|
switch (get_spd_index()) {
|
||||||
|
|
|
@ -20,8 +20,6 @@
|
||||||
#include <gpio.h>
|
#include <gpio.h>
|
||||||
#include <variant/gpio.h>
|
#include <variant/gpio.h>
|
||||||
|
|
||||||
#define RCOMP_TARGET_PARAMS 0x5
|
|
||||||
|
|
||||||
void mainboard_fill_dq_map_data(void *dq_map_ch0, void *dq_map_ch1);
|
void mainboard_fill_dq_map_data(void *dq_map_ch0, void *dq_map_ch1);
|
||||||
void mainboard_fill_dqs_map_data(void *dqs_map_ch0, void *dqs_map_ch1);
|
void mainboard_fill_dqs_map_data(void *dqs_map_ch0, void *dqs_map_ch1);
|
||||||
void mainboard_fill_rcomp_res_data(void *rcomp_ptr);
|
void mainboard_fill_rcomp_res_data(void *rcomp_ptr);
|
||||||
|
|
|
@ -52,8 +52,7 @@ void mainboard_fill_rcomp_res_data(void *rcomp_ptr)
|
||||||
void mainboard_fill_rcomp_strength_data(void *rcomp_strength_ptr)
|
void mainboard_fill_rcomp_strength_data(void *rcomp_strength_ptr)
|
||||||
{
|
{
|
||||||
/* Rcomp target */
|
/* Rcomp target */
|
||||||
static const u16 RcompTarget[RCOMP_TARGET_PARAMS] = {
|
static const u16 RcompTarget[5] = { 100, 40, 40, 23, 40 };
|
||||||
100, 40, 40, 23, 40 };
|
|
||||||
|
|
||||||
memcpy(rcomp_strength_ptr, RcompTarget, sizeof(RcompTarget));
|
memcpy(rcomp_strength_ptr, RcompTarget, sizeof(RcompTarget));
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,6 @@
|
||||||
|
|
||||||
/* PCH_MEM_CFG[3:0] */
|
/* PCH_MEM_CFG[3:0] */
|
||||||
#define MAX_MEMORY_CONFIG 0x10
|
#define MAX_MEMORY_CONFIG 0x10
|
||||||
#define RCOMP_TARGET_PARAMS 0x5
|
|
||||||
#define K4E6E304EE_MEM_ID 0x3
|
#define K4E6E304EE_MEM_ID 0x3
|
||||||
|
|
||||||
static inline int get_spd_index(void) {
|
static inline int get_spd_index(void) {
|
||||||
|
|
|
@ -55,11 +55,11 @@ void mainboard_fill_rcomp_strength_data(void *rcomp_strength_ptr)
|
||||||
|
|
||||||
mem_cfg_id = get_spd_index();
|
mem_cfg_id = get_spd_index();
|
||||||
/* Rcomp target */
|
/* Rcomp target */
|
||||||
static const u16 RcompTarget[RCOMP_TARGET_PARAMS] = {
|
static const u16 RcompTarget[5] = {
|
||||||
100, 40, 40, 23, 40 };
|
100, 40, 40, 23, 40 };
|
||||||
|
|
||||||
/* Strengthen the Rcomp Target Ctrl for 8GB K4E6E304EE -EGCF */
|
/* Strengthen the Rcomp Target Ctrl for 8GB K4E6E304EE -EGCF */
|
||||||
static const u16 StrengthendRcompTarget[RCOMP_TARGET_PARAMS] = {
|
static const u16 StrengthendRcompTarget[5] = {
|
||||||
100, 40, 40, 21, 40 };
|
100, 40, 40, 21, 40 };
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
#ifndef MAINBOARD_SPD_H
|
#ifndef MAINBOARD_SPD_H
|
||||||
#define MAINBOARD_SPD_H
|
#define MAINBOARD_SPD_H
|
||||||
|
|
||||||
#define RCOMP_TARGET_PARAMS 0x5
|
|
||||||
|
|
||||||
void mainboard_fill_dq_map_data(void *dq_map_ch0, void *dq_map_ch1);
|
void mainboard_fill_dq_map_data(void *dq_map_ch0, void *dq_map_ch1);
|
||||||
void mainboard_fill_dqs_map_data(void *dqs_map_ch0, void *dqs_map_ch1);
|
void mainboard_fill_dqs_map_data(void *dqs_map_ch0, void *dqs_map_ch1);
|
||||||
void mainboard_fill_rcomp_res_data(void *rcomp_ptr);
|
void mainboard_fill_rcomp_res_data(void *rcomp_ptr);
|
||||||
|
|
|
@ -49,7 +49,6 @@ void mainboard_fill_rcomp_res_data(void *rcomp_ptr)
|
||||||
void mainboard_fill_rcomp_strength_data(void *rcomp_strength_ptr)
|
void mainboard_fill_rcomp_strength_data(void *rcomp_strength_ptr)
|
||||||
{
|
{
|
||||||
/* Rcomp target */
|
/* Rcomp target */
|
||||||
static const u16 RcompTarget[RCOMP_TARGET_PARAMS] = {
|
static const u16 RcompTarget[5] = { 100, 40, 20, 20, 26 };
|
||||||
100, 40, 20, 20, 26 };
|
|
||||||
memcpy(rcomp_strength_ptr, RcompTarget, sizeof(RcompTarget));
|
memcpy(rcomp_strength_ptr, RcompTarget, sizeof(RcompTarget));
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,8 +21,6 @@
|
||||||
#include <gpio.h>
|
#include <gpio.h>
|
||||||
#include "../gpio.h"
|
#include "../gpio.h"
|
||||||
|
|
||||||
#define RCOMP_TARGET_PARAMS 0x5
|
|
||||||
|
|
||||||
void mainboard_fill_dq_map_data(void *dq_map_ptr);
|
void mainboard_fill_dq_map_data(void *dq_map_ptr);
|
||||||
void mainboard_fill_dqs_map_data(void *dqs_map_ptr);
|
void mainboard_fill_dqs_map_data(void *dqs_map_ptr);
|
||||||
void mainboard_fill_rcomp_res_data(void *rcomp_ptr);
|
void mainboard_fill_rcomp_res_data(void *rcomp_ptr);
|
||||||
|
|
|
@ -44,7 +44,7 @@ void mainboard_fill_rcomp_res_data(void *rcomp_ptr)
|
||||||
void mainboard_fill_rcomp_strength_data(void *rcomp_strength_ptr)
|
void mainboard_fill_rcomp_strength_data(void *rcomp_strength_ptr)
|
||||||
{
|
{
|
||||||
/* Rcomp target */
|
/* Rcomp target */
|
||||||
static const u16 RcompTarget[RCOMP_TARGET_PARAMS] = {100, 40, 40, 23, 40};
|
static const u16 RcompTarget[5] = {100, 40, 40, 23, 40};
|
||||||
|
|
||||||
memcpy(rcomp_strength_ptr, RcompTarget, sizeof(RcompTarget));
|
memcpy(rcomp_strength_ptr, RcompTarget, sizeof(RcompTarget));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue