Stefan Reinauer | 23f7034 | 2010-05-16 13:07:59 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
Uwe Hermann | c6a1062 | 2010-10-17 19:30:58 +0000 | [diff] [blame] | 4 | * Copyright (C) 2008 coresystems GmbH |
Stefan Reinauer | 23f7034 | 2010-05-16 13:07:59 +0000 | [diff] [blame] | 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. |
Stefan Reinauer | 23f7034 | 2010-05-16 13:07:59 +0000 | [diff] [blame] | 14 | */ |
| 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 Reinauer | 23f7034 | 2010-05-16 13:07:59 +0000 | [diff] [blame] | 23 | |
| 24 | static 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 | |
| 30 | static void pcixx12_read_resources(device_t dev) |
| 31 | { |
| 32 | cardbus_read_resources(dev); |
| 33 | } |
| 34 | |
| 35 | static void pcixx12_set_resources(device_t dev) |
| 36 | { |
Paul Menzel | d0cdcae | 2014-08-08 15:24:31 +0200 | [diff] [blame] | 37 | printk(BIOS_DEBUG, "%s In set resources\n",dev_path(dev)); |
Stefan Reinauer | 23f7034 | 2010-05-16 13:07:59 +0000 | [diff] [blame] | 38 | |
| 39 | pci_dev_set_resources(dev); |
| 40 | |
Paul Menzel | d0cdcae | 2014-08-08 15:24:31 +0200 | [diff] [blame] | 41 | printk(BIOS_DEBUG, "%s done set resources\n",dev_path(dev)); |
Stefan Reinauer | 23f7034 | 2010-05-16 13:07:59 +0000 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | static 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 Watson | 84e8e45 | 2010-06-07 17:12:57 +0000 | [diff] [blame] | 49 | .scan_bus = pci_scan_bridge, |
Stefan Reinauer | 23f7034 | 2010-05-16 13:07:59 +0000 | [diff] [blame] | 50 | }; |
| 51 | |
| 52 | static const struct pci_driver ti_pcixx12_driver __pci_driver = { |
| 53 | .ops = &ti_pcixx12_ops, |
| 54 | .vendor = 0x104c, |
| 55 | .device = 0x8039, |
| 56 | }; |
| 57 | |
| 58 | static void southbridge_init(device_t dev) |
| 59 | { |
Stefan Reinauer | 23f7034 | 2010-05-16 13:07:59 +0000 | [diff] [blame] | 60 | } |
| 61 | |
| 62 | struct chip_operations southbridge_ti_pcixx12_ops = { |
| 63 | CHIP_NAME("Texas Instruments PCIxx12 Cardbus Controller") |
| 64 | .enable_dev = southbridge_init, |
| 65 | }; |