coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
spd.c
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#include <
mainboard/google/auron/variant.h
>
4
#include <
southbridge/intel/lynxpoint/lp_gpio.h
>
5
6
/* Lulu board memory configuration GPIOs */
7
#define SPD_GPIO_BIT0 13
8
#define SPD_GPIO_BIT1 9
9
#define SPD_GPIO_BIT2 47
10
#define SPD_GPIO_BIT3 8
11
12
unsigned
int
variant_get_spd_index
(
void
)
13
{
14
const
int
gpio_vector[] = {
15
SPD_GPIO_BIT0
,
16
SPD_GPIO_BIT1
,
17
SPD_GPIO_BIT2
,
18
SPD_GPIO_BIT3
,
19
-1,
20
};
21
return
get_gpios
(gpio_vector);
22
}
23
24
bool
variant_is_dual_channel
(
const
unsigned
int
spd_index
)
25
{
26
/* CH1 not used in 2GB configurations */
27
return
!((
spd_index
== 0b0000) || (
spd_index
== 0b0011) || (
spd_index
== 0b1010));
28
}
variant.h
lp_gpio.h
variant_is_dual_channel
bool variant_is_dual_channel(const unsigned int spd_index)
Definition:
spd.c:22
variant_get_spd_index
unsigned int variant_get_spd_index(void)
Definition:
spd.c:11
SPD_GPIO_BIT1
#define SPD_GPIO_BIT1
Definition:
spd.c:8
SPD_GPIO_BIT3
#define SPD_GPIO_BIT3
Definition:
spd.c:10
SPD_GPIO_BIT0
#define SPD_GPIO_BIT0
Definition:
spd.c:7
SPD_GPIO_BIT2
#define SPD_GPIO_BIT2
Definition:
spd.c:9
spd_index
static const int spd_index[32]
Definition:
memory.c:10
get_gpios
unsigned int get_gpios(const int *gpio_num_array)
Definition:
gpio.c:107
src
mainboard
google
auron
variants
lulu
spd
spd.c
Generated by
1.9.1