Files
system76-coreboot/src/mainboard/google/smaug/boardid.c
Angel Pons 8d0e929efd mb/google/smaug: Use SPDX for GPL-2.0-only files
Done with sed and God Lines. Only done for C-like code for now.

Change-Id: I5e297e7c68d5c2646d1a086ae1a5b64fef7ed730
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40195
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
2020-04-06 13:50:43 +00:00

26 lines
413 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
/* This file is part of the coreboot project. */
#include <boardid.h>
#include <soc/sdram.h>
#include "gpio.h"
uint32_t board_id(void)
{
static int id = -1;
if (id < 0) {
gpio_t gpio[] = {[1] = BD_ID1, [0] = BD_ID0}; /* ID0 is LSB */
id = gpio_base3_value(gpio, ARRAY_SIZE(gpio));
}
return id;
}
uint32_t ram_code(void)
{
return sdram_get_ram_code();
}