Martin Roth | ac35e62 | 2017-11-07 13:43:02 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright 2017 Google Inc. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; version 2 of the License. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | */ |
| 15 | |
| 16 | #include <gpio.h> /* src/include/gpio.h */ |
| 17 | #include <baseboard/variants.h> |
| 18 | #include <variant/gpio.h> |
| 19 | |
| 20 | size_t __attribute__((weak)) variant_board_id(void) |
| 21 | { |
| 22 | gpio_t pads[] = { |
| 23 | [3] = MEM_CONFIG3, |
| 24 | [2] = MEM_CONFIG2, |
| 25 | [1] = MEM_CONFIG1, |
| 26 | [0] = MEM_CONFIG0, |
| 27 | }; |
| 28 | |
| 29 | return gpio_pullup_base2_value(pads, ARRAY_SIZE(pads)); |
| 30 | } |