2 * This file is part of the coreboot project.
4 * Copyright (C) 2007, 2008 Rudolf Marek <r.marek@assembler.cz>
5 * Copyright (C) 2009 Jon Harrison <bothlyn@blueyonder.co.uk>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License v2 as published by
9 * the Free Software Foundation.
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.
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
21 #include <console/console.h>
22 #include <device/device.h>
23 #include <device/pci.h>
24 #include <device/pci_ids.h>
28 static void vt8237_eth_read_resources(struct device *dev)
30 #ifdef CONFIG_EPIA_VT8237R_INIT
33 /* Fix the I/O Resources of the USB2.0 Interface */
34 res = new_resource(dev, PCI_BASE_ADDRESS_0);
35 res->base = 0xF6001000ULL;
39 res->limit = res->base + res->size - 1;
40 res->flags = IORESOURCE_MEM | IORESOURCE_FIXED |
43 pci_dev_read_resources(dev);
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,
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,