mb/google/sarien: Add sku_id function

This change adds a sku_id() function that returns a static value to
differentiate the sarien and arcada boards.

Change-Id: I1fecc675573a6aece7188aae9370733068d45dbf
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/29486
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Duncan Laurie 2018-11-05 16:26:01 -07:00 committed by Patrick Georgi
parent 2b7cd1d0d4
commit 21e23480cc
4 changed files with 67 additions and 0 deletions

View File

@ -16,6 +16,7 @@
bootblock-y += bootblock.c bootblock-y += bootblock.c
ramstage-y += ramstage.c ramstage-y += ramstage.c
ramstage-y += sku.c
romstage-y += romstage.c romstage-y += romstage.c

View File

@ -0,0 +1,22 @@
/*
* This file is part of the coreboot project.
*
* Copyright 2018 Google LLC
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <boardid.h>
#include <variant/variant.h>
uint32_t sku_id(void)
{
return VARIANT_SKU_ID;
}

View File

@ -0,0 +1,22 @@
/*
* This file is part of the coreboot project.
*
* Copyright 2018 Google LLC
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef VARIANT_H
#define VARIANT_H
/* Arcada is SKU ID 2 */
#define VARIANT_SKU_ID 2
#endif

View File

@ -0,0 +1,22 @@
/*
* This file is part of the coreboot project.
*
* Copyright 2018 Google LLC
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef VARIANT_H
#define VARIANT_H
/* Sarien is SKU ID 1 */
#define VARIANT_SKU_ID 1
#endif