Aaron Durbin | 849e4f5 | 2016-01-25 17:02:11 -0600 | [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 | |
Subrata Banik | 50b9258 | 2016-07-21 23:47:38 +0530 | [diff] [blame] | 16 | #include <bootblock_common.h> |
Aaron Durbin | 849e4f5 | 2016-01-25 17:02:11 -0600 | [diff] [blame] | 17 | #include <soc/gpio.h> |
| 18 | #include "gpio.h" |
| 19 | |
| 20 | static void early_config_gpio(void) |
| 21 | { |
| 22 | /* This is a hack for FSP because it does things in MemoryInit() |
Subrata Banik | 50b9258 | 2016-07-21 23:47:38 +0530 | [diff] [blame] | 23 | * which it shouldn't do. We have to prepare certain gpios here |
Aaron Durbin | 849e4f5 | 2016-01-25 17:02:11 -0600 | [diff] [blame] | 24 | * because of the brokenness in FSP. */ |
| 25 | gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table)); |
| 26 | } |
| 27 | |
Subrata Banik | 50b9258 | 2016-07-21 23:47:38 +0530 | [diff] [blame] | 28 | void bootblock_mainboard_init(void) |
Aaron Durbin | 849e4f5 | 2016-01-25 17:02:11 -0600 | [diff] [blame] | 29 | { |
Aaron Durbin | 849e4f5 | 2016-01-25 17:02:11 -0600 | [diff] [blame] | 30 | early_config_gpio(); |
| 31 | } |