Brenton Dong | 35f03d9 | 2017-02-06 16:07:27 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright 2016 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 <device/device.h> |
Brenton Dong | 6530b6d | 2017-02-15 16:13:27 -0700 | [diff] [blame] | 17 | #include "gpio.h" |
Brenton Dong | 35f03d9 | 2017-02-06 16:07:27 -0700 | [diff] [blame] | 18 | |
| 19 | static void mainboard_init(void *chip_info) |
| 20 | { |
Brenton Dong | 6530b6d | 2017-02-15 16:13:27 -0700 | [diff] [blame] | 21 | const struct pad_config *pads; |
| 22 | size_t num; |
| 23 | |
| 24 | /* Configure GPIOs in Ramstage */ |
| 25 | pads = gpio_table(&num); |
| 26 | gpio_configure_pads(pads, num); |
Brenton Dong | 35f03d9 | 2017-02-06 16:07:27 -0700 | [diff] [blame] | 27 | } |
| 28 | |
| 29 | struct chip_operations mainboard_ops = { |
| 30 | .init = mainboard_init, |
| 31 | }; |