summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2024-05-12 11:39:28 +0200
committerElyes Haouas <ehaouas@noos.fr>2024-05-13 17:12:30 +0000
commit200075ba2dc5697a09e9dcd6b41390e7435a5ed5 (patch)
tree2fa4b4e6f4383557bad2002500e8c80e703b6330 /src/mainboard
parentc2837e70b9171886c9efdc4ae9b089b1fe2732d3 (diff)
mb/google/rambi: Use <device/dram/ddr3.h>
Change-Id: I3aa669042908b92d7b270df077a352e197071780 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82354 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/rambi/romstage.c5
-rw-r--r--src/mainboard/google/rambi/variants/banjo/include/variant/variant.h1
-rw-r--r--src/mainboard/google/rambi/variants/candy/include/variant/variant.h1
-rw-r--r--src/mainboard/google/rambi/variants/clapper/include/variant/variant.h1
-rw-r--r--src/mainboard/google/rambi/variants/enguarde/include/variant/variant.h1
-rw-r--r--src/mainboard/google/rambi/variants/expresso/include/variant/variant.h1
-rw-r--r--src/mainboard/google/rambi/variants/glimmer/include/variant/variant.h1
-rw-r--r--src/mainboard/google/rambi/variants/gnawty/include/variant/variant.h1
-rw-r--r--src/mainboard/google/rambi/variants/heli/include/variant/variant.h1
-rw-r--r--src/mainboard/google/rambi/variants/kip/include/variant/variant.h1
-rw-r--r--src/mainboard/google/rambi/variants/ninja/include/variant/variant.h1
-rw-r--r--src/mainboard/google/rambi/variants/orco/include/variant/variant.h1
-rw-r--r--src/mainboard/google/rambi/variants/quawks/include/variant/variant.h1
-rw-r--r--src/mainboard/google/rambi/variants/rambi/include/variant/variant.h1
-rw-r--r--src/mainboard/google/rambi/variants/squawks/include/variant/variant.h1
-rw-r--r--src/mainboard/google/rambi/variants/sumo/include/variant/variant.h1
-rw-r--r--src/mainboard/google/rambi/variants/swanky/include/variant/variant.h1
-rw-r--r--src/mainboard/google/rambi/variants/winky/include/variant/variant.h1
18 files changed, 3 insertions, 19 deletions
diff --git a/src/mainboard/google/rambi/romstage.c b/src/mainboard/google/rambi/romstage.c
index 28496b15ba..b9aa870c10 100644
--- a/src/mainboard/google/rambi/romstage.c
+++ b/src/mainboard/google/rambi/romstage.c
@@ -2,6 +2,7 @@
#include <cbfs.h>
#include <console/console.h>
+#include <device/dram/ddr3.h>
#include <soc/gpio.h>
#include <soc/mrc_wrapper.h>
#include <soc/romstage.h>
@@ -38,7 +39,7 @@ static void *get_spd_pointer(char *spd_file_content, int total_spds, int *dual)
if (dual_channel_config & (1 << ram_id))
*dual = 1;
- return &spd_file_content[SPD_SIZE * ram_id];
+ return &spd_file_content[SPD_SIZE_MAX_DDR3 * ram_id];
}
void mainboard_fill_mrc_params(struct mrc_params *mp)
@@ -52,7 +53,7 @@ void mainboard_fill_mrc_params(struct mrc_params *mp)
if (!spd_file)
die("SPD data not found.");
- spd_content = get_spd_pointer(spd_file, spd_fsize / SPD_SIZE,
+ spd_content = get_spd_pointer(spd_file, spd_fsize / SPD_SIZE_MAX_DDR3,
&dual_channel);
mp->mainboard.dram_type = DRAM_DDR3L;
diff --git a/src/mainboard/google/rambi/variants/banjo/include/variant/variant.h b/src/mainboard/google/rambi/variants/banjo/include/variant/variant.h
index c9cf327586..47e0a2671f 100644
--- a/src/mainboard/google/rambi/variants/banjo/include/variant/variant.h
+++ b/src/mainboard/google/rambi/variants/banjo/include/variant/variant.h
@@ -18,7 +18,6 @@
static const uint32_t dual_channel_config =
(1 << 1) | (1 << 3) | (1 << 5);
-#define SPD_SIZE 256
#define GPIO_SSUS_37_PAD 57
#define GPIO_SSUS_38_PAD 50
#define GPIO_SSUS_39_PAD 58
diff --git a/src/mainboard/google/rambi/variants/candy/include/variant/variant.h b/src/mainboard/google/rambi/variants/candy/include/variant/variant.h
index dcecbbeddc..33ad2e6266 100644
--- a/src/mainboard/google/rambi/variants/candy/include/variant/variant.h
+++ b/src/mainboard/google/rambi/variants/candy/include/variant/variant.h
@@ -24,7 +24,6 @@
static const uint32_t dual_channel_config =
(1 << 0) | (1 << 1) | (1 << 2) | (1 << 6) | (1 << 7) | (1 << 10);
-#define SPD_SIZE 256
#define GPIO_SSUS_37_PAD 57
#define GPIO_SSUS_38_PAD 50
#define GPIO_SSUS_39_PAD 58
diff --git a/src/mainboard/google/rambi/variants/clapper/include/variant/variant.h b/src/mainboard/google/rambi/variants/clapper/include/variant/variant.h
index c41b4aafae..5105201114 100644
--- a/src/mainboard/google/rambi/variants/clapper/include/variant/variant.h
+++ b/src/mainboard/google/rambi/variants/clapper/include/variant/variant.h
@@ -20,7 +20,6 @@
static const uint32_t dual_channel_config =
(1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 6);
-#define SPD_SIZE 256
#define GPIO_SSUS_37_PAD 57
#define GPIO_SSUS_38_PAD 50
#define GPIO_SSUS_39_PAD 58
diff --git a/src/mainboard/google/rambi/variants/enguarde/include/variant/variant.h b/src/mainboard/google/rambi/variants/enguarde/include/variant/variant.h
index 8944e7b150..60c424d149 100644
--- a/src/mainboard/google/rambi/variants/enguarde/include/variant/variant.h
+++ b/src/mainboard/google/rambi/variants/enguarde/include/variant/variant.h
@@ -20,7 +20,6 @@
static const uint32_t dual_channel_config =
(1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 5) | (1 << 6);
-#define SPD_SIZE 256
#define GPIO_SSUS_37_PAD 57
#define GPIO_SSUS_38_PAD 50
#define GPIO_SSUS_39_PAD 58
diff --git a/src/mainboard/google/rambi/variants/expresso/include/variant/variant.h b/src/mainboard/google/rambi/variants/expresso/include/variant/variant.h
index 17d9acc353..1536601f8c 100644
--- a/src/mainboard/google/rambi/variants/expresso/include/variant/variant.h
+++ b/src/mainboard/google/rambi/variants/expresso/include/variant/variant.h
@@ -18,7 +18,6 @@
static const uint32_t dual_channel_config =
(1 << 0) | (1 << 1) | (1 << 2) | (1 << 3);
-#define SPD_SIZE 256
#define GPIO_SSUS_37_PAD 57
#define GPIO_SSUS_38_PAD 50
#define GPIO_SSUS_39_PAD 58
diff --git a/src/mainboard/google/rambi/variants/glimmer/include/variant/variant.h b/src/mainboard/google/rambi/variants/glimmer/include/variant/variant.h
index d581de8e5f..e264023305 100644
--- a/src/mainboard/google/rambi/variants/glimmer/include/variant/variant.h
+++ b/src/mainboard/google/rambi/variants/glimmer/include/variant/variant.h
@@ -24,7 +24,6 @@ static const uint32_t dual_channel_config =
(1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) |
(1 << 4) | (1 << 6) | (1 << 7);
-#define SPD_SIZE 256
#define GPIO_SSUS_37_PAD 57
#define GPIO_SSUS_38_PAD 50
#define GPIO_SSUS_39_PAD 58
diff --git a/src/mainboard/google/rambi/variants/gnawty/include/variant/variant.h b/src/mainboard/google/rambi/variants/gnawty/include/variant/variant.h
index 50e9ad8725..4df3c8d83c 100644
--- a/src/mainboard/google/rambi/variants/gnawty/include/variant/variant.h
+++ b/src/mainboard/google/rambi/variants/gnawty/include/variant/variant.h
@@ -20,7 +20,6 @@
static const uint32_t dual_channel_config =
(1 << 0) | (1 << 1) | (1 << 2) | (1 << 6) | (1 << 7);
-#define SPD_SIZE 256
#define GPIO_SSUS_37_PAD 57
#define GPIO_SSUS_38_PAD 50
#define GPIO_SSUS_39_PAD 58
diff --git a/src/mainboard/google/rambi/variants/heli/include/variant/variant.h b/src/mainboard/google/rambi/variants/heli/include/variant/variant.h
index 2e00104265..b357c6f526 100644
--- a/src/mainboard/google/rambi/variants/heli/include/variant/variant.h
+++ b/src/mainboard/google/rambi/variants/heli/include/variant/variant.h
@@ -18,7 +18,6 @@
static const uint32_t dual_channel_config =
(1 << 6) | (1 << 7);
-#define SPD_SIZE 256
#define GPIO_SSUS_37_PAD 57
#define GPIO_SSUS_38_PAD 50
#define GPIO_SSUS_39_PAD 58
diff --git a/src/mainboard/google/rambi/variants/kip/include/variant/variant.h b/src/mainboard/google/rambi/variants/kip/include/variant/variant.h
index 25c3f373fb..ea3e892792 100644
--- a/src/mainboard/google/rambi/variants/kip/include/variant/variant.h
+++ b/src/mainboard/google/rambi/variants/kip/include/variant/variant.h
@@ -20,7 +20,6 @@
static const uint32_t dual_channel_config =
(1 << 0) | (1 << 1) | (1 << 2) | (1 << 3);
-#define SPD_SIZE 256
#define GPIO_SSUS_37_PAD 57
#define GPIO_SSUS_38_PAD 50
#define GPIO_SSUS_39_PAD 58
diff --git a/src/mainboard/google/rambi/variants/ninja/include/variant/variant.h b/src/mainboard/google/rambi/variants/ninja/include/variant/variant.h
index 8a48c11e91..7b20daf1c7 100644
--- a/src/mainboard/google/rambi/variants/ninja/include/variant/variant.h
+++ b/src/mainboard/google/rambi/variants/ninja/include/variant/variant.h
@@ -20,7 +20,6 @@
static const uint32_t dual_channel_config =
(1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 6);
-#define SPD_SIZE 256
#define GPIO_SSUS_37_PAD 57
#define GPIO_SSUS_38_PAD 50
#define GPIO_SSUS_39_PAD 58
diff --git a/src/mainboard/google/rambi/variants/orco/include/variant/variant.h b/src/mainboard/google/rambi/variants/orco/include/variant/variant.h
index 4d8eebb5a0..16d3971099 100644
--- a/src/mainboard/google/rambi/variants/orco/include/variant/variant.h
+++ b/src/mainboard/google/rambi/variants/orco/include/variant/variant.h
@@ -20,7 +20,6 @@
static const uint32_t dual_channel_config =
(1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 6);
-#define SPD_SIZE 256
#define GPIO_SSUS_37_PAD 57
#define GPIO_SSUS_38_PAD 50
#define GPIO_SSUS_39_PAD 58
diff --git a/src/mainboard/google/rambi/variants/quawks/include/variant/variant.h b/src/mainboard/google/rambi/variants/quawks/include/variant/variant.h
index 51051e2591..d74551e270 100644
--- a/src/mainboard/google/rambi/variants/quawks/include/variant/variant.h
+++ b/src/mainboard/google/rambi/variants/quawks/include/variant/variant.h
@@ -20,7 +20,6 @@
static const uint32_t dual_channel_config =
(1 << 0) | (1 << 1) | (1 << 2) | (1 << 3);
-#define SPD_SIZE 256
#define GPIO_SSUS_37_PAD 57
#define GPIO_SSUS_38_PAD 50
#define GPIO_SSUS_39_PAD 58
diff --git a/src/mainboard/google/rambi/variants/rambi/include/variant/variant.h b/src/mainboard/google/rambi/variants/rambi/include/variant/variant.h
index 46ee249f41..a9bd04c942 100644
--- a/src/mainboard/google/rambi/variants/rambi/include/variant/variant.h
+++ b/src/mainboard/google/rambi/variants/rambi/include/variant/variant.h
@@ -17,7 +17,6 @@
static const uint32_t dual_channel_config =
(1 << 0) | (1 << 1) | (1 << 2) | (1 << 3);
-#define SPD_SIZE 256
#define GPIO_SSUS_37_PAD 57
#define GPIO_SSUS_38_PAD 50
#define GPIO_SSUS_39_PAD 58
diff --git a/src/mainboard/google/rambi/variants/squawks/include/variant/variant.h b/src/mainboard/google/rambi/variants/squawks/include/variant/variant.h
index 51051e2591..d74551e270 100644
--- a/src/mainboard/google/rambi/variants/squawks/include/variant/variant.h
+++ b/src/mainboard/google/rambi/variants/squawks/include/variant/variant.h
@@ -20,7 +20,6 @@
static const uint32_t dual_channel_config =
(1 << 0) | (1 << 1) | (1 << 2) | (1 << 3);
-#define SPD_SIZE 256
#define GPIO_SSUS_37_PAD 57
#define GPIO_SSUS_38_PAD 50
#define GPIO_SSUS_39_PAD 58
diff --git a/src/mainboard/google/rambi/variants/sumo/include/variant/variant.h b/src/mainboard/google/rambi/variants/sumo/include/variant/variant.h
index 8a48c11e91..7b20daf1c7 100644
--- a/src/mainboard/google/rambi/variants/sumo/include/variant/variant.h
+++ b/src/mainboard/google/rambi/variants/sumo/include/variant/variant.h
@@ -20,7 +20,6 @@
static const uint32_t dual_channel_config =
(1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 6);
-#define SPD_SIZE 256
#define GPIO_SSUS_37_PAD 57
#define GPIO_SSUS_38_PAD 50
#define GPIO_SSUS_39_PAD 58
diff --git a/src/mainboard/google/rambi/variants/swanky/include/variant/variant.h b/src/mainboard/google/rambi/variants/swanky/include/variant/variant.h
index 97094a952c..f5ec6a613d 100644
--- a/src/mainboard/google/rambi/variants/swanky/include/variant/variant.h
+++ b/src/mainboard/google/rambi/variants/swanky/include/variant/variant.h
@@ -16,7 +16,6 @@
static const uint32_t dual_channel_config =
(1 << 2) | (1 << 3);
-#define SPD_SIZE 256
#define GPIO_SSUS_37_PAD 57
#define GPIO_SSUS_38_PAD 50
#define GPIO_SSUS_39_PAD 58
diff --git a/src/mainboard/google/rambi/variants/winky/include/variant/variant.h b/src/mainboard/google/rambi/variants/winky/include/variant/variant.h
index f4aa213727..2238233666 100644
--- a/src/mainboard/google/rambi/variants/winky/include/variant/variant.h
+++ b/src/mainboard/google/rambi/variants/winky/include/variant/variant.h
@@ -18,7 +18,6 @@
static const uint32_t dual_channel_config =
(1 << 0) | (1 << 1) | (1 << 2) | (1 << 3);
-#define SPD_SIZE 256
#define GPIO_SSUS_37_PAD 57
#define GPIO_SSUS_38_PAD 50
#define GPIO_SSUS_39_PAD 58