Add more missing GPL-headers, fix inconsistencies in others.
[coreboot.git] / src / southbridge / ti / pcixx12 / pcixx12.c
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2008 coresystems GmbH
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; version 2 of the License.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19
20 #include <arch/io.h>
21 #include <device/device.h>
22 #include <device/pci.h>
23 #include <device/pci_ops.h>
24 #include <device/pci_ids.h>
25 #include <console/console.h>
26 #include <device/cardbus.h>
27 #include "chip.h"
28
29 static void pcixx12_init(device_t dev)
30 {
31         /* cardbus controller function 1 for CF Socket */
32         printk(BIOS_DEBUG, "TI PCIxx12 init\n");
33 }
34
35 static void pcixx12_read_resources(device_t dev)
36 {
37         cardbus_read_resources(dev);
38 }
39
40 static void pcixx12_set_resources(device_t dev)
41 {
42         printk(BIOS_DEBUG, "%s In set resources \n",dev_path(dev));
43
44         pci_dev_set_resources(dev);
45
46         printk(BIOS_DEBUG, "%s done set resources \n",dev_path(dev));
47 }
48
49 static struct device_operations ti_pcixx12_ops = {
50         .read_resources   = pcixx12_read_resources,
51         .set_resources    = pcixx12_set_resources,
52         .enable_resources = cardbus_enable_resources,
53         .init             = pcixx12_init,
54         .scan_bus         = pci_scan_bridge,
55 };
56
57 static const struct pci_driver ti_pcixx12_driver __pci_driver = {
58         .ops    = &ti_pcixx12_ops,
59         .vendor = 0x104c,
60         .device = 0x8039,
61 };
62
63 static void southbridge_init(device_t dev)
64 {
65         // struct southbridge_ti_pcixx12_config *config = dev->chip_info;
66 }
67
68 struct chip_operations southbridge_ti_pcixx12_ops = {
69         CHIP_NAME("Texas Instruments PCIxx12 Cardbus Controller")
70         .enable_dev    = southbridge_init,
71 };