blob: 2f67141cd34ba4ba53cc7fdd05e60158f99ab51f [file] [log] [blame]
Stefan Reinauer2e73e192010-01-17 13:52:50 +00001/*
Uwe Hermannc70e9fc2010-02-15 23:10:19 +00002 * This file is part of the coreboot project.
Stefan Reinauer2e73e192010-01-17 13:52:50 +00003 *
Uwe Hermannc70e9fc2010-02-15 23:10:19 +00004 * Copyright (C) 2008-2009 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; either version 2 of the License, or
9 * (at your option) any later version.
Stefan Reinauer2e73e192010-01-17 13:52:50 +000010 *
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.
Stefan Reinauer2e73e192010-01-17 13:52:50 +000015 */
16
17#include <arch/io.h>
18#include <device/device.h>
19#include <device/pci.h>
20#include <device/pci_ops.h>
21#include <device/pci_ids.h>
22#include <console/console.h>
23#include <device/cardbus.h>
24#include "pci7420.h"
25#include "chip.h"
26
27static void pci7420_firewire_init(device_t dev)
28{
Stefan Reinauerc02b4fc2010-03-22 11:42:32 +000029 printk(BIOS_DEBUG, "TI PCI7420/7620 FireWire init\n");
Stefan Reinauer2e73e192010-01-17 13:52:50 +000030
31#ifdef ODD_IRQ_FIXUP
32 /* This is a workaround for buggy kernels. This should
33 * probably be read from the device tree, but as long
34 * as only one mainboard is using this bridge it does
35 * not matter
36 */
37 pci_write_config8(dev, PCI_INTERRUPT_PIN, INTC);
38#endif
39}
40
41static struct device_operations ti_pci7420_firewire_ops = {
42 .read_resources = pci_dev_read_resources,
43 .set_resources = pci_dev_set_resources,
44 .enable_resources = pci_dev_enable_resources,
45 .init = pci7420_firewire_init,
46};
47
48static const struct pci_driver ti_pci7420_driver __pci_driver = {
49 .ops = &ti_pci7420_firewire_ops,
50 .vendor = 0x104c,
51 .device = 0x802e,
52};
53
54static void ti_pci7420_firewire_enable_dev(device_t dev)
55{
56 /* Nothing here yet */
57}
58
59struct chip_operations southbridge_ti_pci7420_firewire_ops = {
60 CHIP_NAME("Texas Instruments PCI7420/7620 FireWire (IEEE 1394)")
61 .enable_dev = ti_pci7420_firewire_enable_dev,
62};