Patrick Georgi | 406313d | 2015-07-20 22:01:32 +0200 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2007-2009 coresystems GmbH |
| 5 | * Copyright (C) 2015 Google Inc. |
| 6 | * Copyright (C) 2015 Intel Corporation |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation; version 2 of the License. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
Patrick Georgi | 406313d | 2015-07-20 22:01:32 +0200 | [diff] [blame] | 16 | */ |
| 17 | |
| 18 | #include <device/device.h> |
Aaron Durbin | 9506aea | 2015-07-24 13:06:12 -0500 | [diff] [blame] | 19 | #include <stdlib.h> |
Patrick Georgi | 406313d | 2015-07-20 22:01:32 +0200 | [diff] [blame] | 20 | #include "ec.h" |
| 21 | |
| 22 | static void mainboard_init(device_t dev) |
| 23 | { |
Martin Roth | 302aeb7 | 2015-08-25 11:26:33 -0600 | [diff] [blame] | 24 | mainboard_ec_init(); |
Patrick Georgi | 406313d | 2015-07-20 22:01:32 +0200 | [diff] [blame] | 25 | } |
| 26 | |
| 27 | /* |
| 28 | * mainboard_enable is executed as first thing after |
| 29 | * enumerate_buses(). |
| 30 | */ |
| 31 | static void mainboard_enable(device_t dev) |
| 32 | { |
| 33 | dev->ops->init = mainboard_init; |
| 34 | } |
| 35 | |
| 36 | struct chip_operations mainboard_ops = { |
| 37 | .enable_dev = mainboard_enable, |
| 38 | }; |