Various license header consistency fixes (trivial).
[coreboot.git] / src / southbridge / via / vt8237r / vt8237r_nic.c
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2007, 2008 Rudolf Marek <r.marek@assembler.cz>
5  * Copyright (C) 2009 Jon Harrison <bothlyn@blueyonder.co.uk>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; version 2 of the License.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
19  */
20
21 #include <console/console.h>
22 #include <device/device.h>
23 #include <device/pci.h>
24 #include <device/pci_ids.h>
25 #include "vt8237r.h"
26
27
28 static void vt8237_eth_read_resources(struct device *dev)
29 {
30 #if CONFIG_EPIA_VT8237R_INIT
31         struct resource *res;
32
33         /* Fix the I/O Resources of the USB2.0 Interface */
34         res = new_resource(dev, PCI_BASE_ADDRESS_0);
35         res->base = 0xF6001000ULL;
36         res->size = 256;
37         res->align = 12;
38         res->gran = 8;
39         res->limit = res->base + res->size - 1;
40         res->flags = IORESOURCE_MEM | IORESOURCE_FIXED |
41                                 IORESOURCE_ASSIGNED;
42 #else
43         pci_dev_read_resources(dev);
44 #endif
45         return;
46 }
47
48
49 static const struct device_operations vt8237_eth_ops = {
50         .read_resources         = vt8237_eth_read_resources,
51         .set_resources          = pci_dev_set_resources,
52         .enable_resources       = pci_dev_enable_resources,
53         .init                           = 0,
54         .enable                         = 0,
55         .ops_pci                        = 0,
56 };
57
58 static const struct pci_driver vt8237r_driver_eth __pci_driver = {
59         .ops    = &vt8237_eth_ops,
60         .vendor = PCI_VENDOR_ID_VIA,
61         .device = PCI_DEVICE_ID_VIA_8233_7,
62 };