Lee Leahy | c421041 | 2015-06-29 11:37:56 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2007-2009 coresystems GmbH |
| 5 | * Copyright (C) 2013 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. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this program; if not, write to the Free Software |
Lee Leahy | b993d2f | 2015-07-17 11:07:54 -0700 | [diff] [blame] | 19 | * Foundation, Inc. |
Lee Leahy | c421041 | 2015-06-29 11:37:56 -0700 | [diff] [blame] | 20 | */ |
| 21 | |
| 22 | #include <device/device.h> |
pchandri | dfdd33e | 2015-08-24 13:44:19 -0700 | [diff] [blame^] | 23 | #include <stdlib.h> |
| 24 | #include "ec.h" |
| 25 | |
| 26 | static void mainboard_init(device_t dev) |
| 27 | { |
| 28 | mainboard_ec_init(); |
| 29 | } |
| 30 | |
| 31 | /* |
| 32 | * mainboard_enable is executed as first thing after |
| 33 | * enumerate_buses(). |
| 34 | */ |
| 35 | static void mainboard_enable(device_t dev) |
| 36 | { |
| 37 | dev->ops->init = mainboard_init; |
| 38 | } |
Lee Leahy | c421041 | 2015-06-29 11:37:56 -0700 | [diff] [blame] | 39 | |
| 40 | struct chip_operations mainboard_ops = { |
pchandri | dfdd33e | 2015-08-24 13:44:19 -0700 | [diff] [blame^] | 41 | .enable_dev = mainboard_enable, |
Lee Leahy | c421041 | 2015-06-29 11:37:56 -0700 | [diff] [blame] | 42 | }; |