remove trailing whitespace
[coreboot.git] / src / drivers / dec / 21143 / 21143.c
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2010 Marc Bertens <mbertens@xs4all.nl>
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; either version 2 of the License, or
9  * (at your option) any later version.
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 <device/device.h>
22 #include <device/pci_def.h>
23 #include <device/pci.h>
24 #include <device/pci_ids.h>
25 #include <console/console.h>
26
27 static void dec_21143_enable(device_t dev)
28 {
29         printk(BIOS_DEBUG, "Initializing DECchip 21143\n");
30
31         // The resource allocator should do this. If not, it needs to be fixed
32         // differently.
33 #if 0
34         /* Command and status configuration (offset 0x04) */
35         pci_write_config32(dev, 0x04, 0x02800107);
36         printk(BIOS_DEBUG, "0x04 = %08x (07 01 80 02)\n",
37                pci_read_config32(dev, 0x04));
38
39         /* Cache line size (offset 0x0C) */
40         pci_write_config8(dev, 0x0C, 0x00);
41         printk(BIOS_DEBUG, "0x0c = %08x (00)\n",
42                pci_read_config8(dev, 0x0C));
43 #endif
44 }
45
46 static struct device_operations dec_21143_ops = {
47         .read_resources   = pci_dev_read_resources,
48         .set_resources    = pci_dev_set_resources,
49         .enable_resources = pci_dev_enable_resources,
50         .init             = dec_21143_enable,
51         .scan_bus         = 0,
52 };
53
54 static const struct pci_driver dec_21143_driver __pci_driver = {
55         .ops    = &dec_21143_ops,
56         .vendor = PCI_VENDOR_ID_DEC,
57         .device = PCI_DEVICE_ID_DEC_21142, // FIXME wrong ID?
58 };