blob: 91d4885e028885bf10387fac026efcd0f6a2628b [file] [log] [blame]
Stefan Reinauer23f70342010-05-16 13:07:59 +00001/*
2 * This file is part of the coreboot project.
3 *
Uwe Hermannc6a10622010-10-17 19:30:58 +00004 * Copyright (C) 2008 coresystems GmbH
Stefan Reinauer23f70342010-05-16 13:07:59 +00005 *
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.
Stefan Reinauer23f70342010-05-16 13:07:59 +000014 */
15
16#include <arch/io.h>
17#include <device/device.h>
18#include <device/pci.h>
19#include <device/pci_ops.h>
20#include <device/pci_ids.h>
21#include <console/console.h>
22#include <device/cardbus.h>
Stefan Reinauer23f70342010-05-16 13:07:59 +000023
24static void pcixx12_init(device_t dev)
25{
26 /* cardbus controller function 1 for CF Socket */
27 printk(BIOS_DEBUG, "TI PCIxx12 init\n");
28}
29
30static void pcixx12_read_resources(device_t dev)
31{
32 cardbus_read_resources(dev);
33}
34
35static void pcixx12_set_resources(device_t dev)
36{
Paul Menzeld0cdcae2014-08-08 15:24:31 +020037 printk(BIOS_DEBUG, "%s In set resources\n",dev_path(dev));
Stefan Reinauer23f70342010-05-16 13:07:59 +000038
39 pci_dev_set_resources(dev);
40
Paul Menzeld0cdcae2014-08-08 15:24:31 +020041 printk(BIOS_DEBUG, "%s done set resources\n",dev_path(dev));
Stefan Reinauer23f70342010-05-16 13:07:59 +000042}
43
44static struct device_operations ti_pcixx12_ops = {
45 .read_resources = pcixx12_read_resources,
46 .set_resources = pcixx12_set_resources,
47 .enable_resources = cardbus_enable_resources,
48 .init = pcixx12_init,
Myles Watson84e8e452010-06-07 17:12:57 +000049 .scan_bus = pci_scan_bridge,
Stefan Reinauer23f70342010-05-16 13:07:59 +000050};
51
52static const struct pci_driver ti_pcixx12_driver __pci_driver = {
53 .ops = &ti_pcixx12_ops,
54 .vendor = 0x104c,
55 .device = 0x8039,
56};
57
58static void southbridge_init(device_t dev)
59{
Stefan Reinauer23f70342010-05-16 13:07:59 +000060}
61
62struct chip_operations southbridge_ti_pcixx12_ops = {
63 CHIP_NAME("Texas Instruments PCIxx12 Cardbus Controller")
64 .enable_dev = southbridge_init,
65};