Stefan Reinauer | 2e73e19 | 2010-01-17 13:52:50 +0000 | [diff] [blame] | 1 | /* |
Uwe Hermann | c70e9fc | 2010-02-15 23:10:19 +0000 | [diff] [blame] | 2 | * This file is part of the coreboot project. |
Stefan Reinauer | 2e73e19 | 2010-01-17 13:52:50 +0000 | [diff] [blame] | 3 | * |
Uwe Hermann | c70e9fc | 2010-02-15 23:10:19 +0000 | [diff] [blame] | 4 | * 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 Reinauer | 2e73e19 | 2010-01-17 13:52:50 +0000 | [diff] [blame] | 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 |
Uwe Hermann | c70e9fc | 2010-02-15 23:10:19 +0000 | [diff] [blame] | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
Stefan Reinauer | 2e73e19 | 2010-01-17 13:52:50 +0000 | [diff] [blame] | 19 | */ |
| 20 | |
| 21 | #include <arch/io.h> |
| 22 | #include <device/device.h> |
| 23 | #include <device/pci.h> |
| 24 | #include <device/pci_ops.h> |
| 25 | #include <device/pci_ids.h> |
| 26 | #include <console/console.h> |
| 27 | #include <device/cardbus.h> |
| 28 | #include "pci7420.h" |
| 29 | #include "chip.h" |
| 30 | |
| 31 | static void pci7420_firewire_init(device_t dev) |
| 32 | { |
Stefan Reinauer | c02b4fc | 2010-03-22 11:42:32 +0000 | [diff] [blame] | 33 | printk(BIOS_DEBUG, "TI PCI7420/7620 FireWire init\n"); |
Stefan Reinauer | 2e73e19 | 2010-01-17 13:52:50 +0000 | [diff] [blame] | 34 | |
| 35 | #ifdef ODD_IRQ_FIXUP |
| 36 | /* This is a workaround for buggy kernels. This should |
| 37 | * probably be read from the device tree, but as long |
| 38 | * as only one mainboard is using this bridge it does |
| 39 | * not matter |
| 40 | */ |
| 41 | pci_write_config8(dev, PCI_INTERRUPT_PIN, INTC); |
| 42 | #endif |
| 43 | } |
| 44 | |
| 45 | static struct device_operations ti_pci7420_firewire_ops = { |
| 46 | .read_resources = pci_dev_read_resources, |
| 47 | .set_resources = pci_dev_set_resources, |
| 48 | .enable_resources = pci_dev_enable_resources, |
| 49 | .init = pci7420_firewire_init, |
| 50 | }; |
| 51 | |
| 52 | static const struct pci_driver ti_pci7420_driver __pci_driver = { |
| 53 | .ops = &ti_pci7420_firewire_ops, |
| 54 | .vendor = 0x104c, |
| 55 | .device = 0x802e, |
| 56 | }; |
| 57 | |
| 58 | static void ti_pci7420_firewire_enable_dev(device_t dev) |
| 59 | { |
| 60 | /* Nothing here yet */ |
| 61 | } |
| 62 | |
| 63 | struct chip_operations southbridge_ti_pci7420_firewire_ops = { |
| 64 | CHIP_NAME("Texas Instruments PCI7420/7620 FireWire (IEEE 1394)") |
| 65 | .enable_dev = ti_pci7420_firewire_enable_dev, |
| 66 | }; |