This patch unifies the use of config options in v2 to all start with CONFIG_
[coreboot.git] / src / southbridge / amd / cs5536 / cs5536_pirq.c
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2007 Nikolay Petukhov <nikolay.petukhov@gmail.com>
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.
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
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
19  */
20
21 #include <arch/pirq_routing.h>
22 #include <console/console.h>
23 #include <device/pci.h>
24 #include <device/pci_ids.h>
25
26 #if (CONFIG_PIRQ_ROUTE==1 && CONFIG_HAVE_PIRQ_TABLE==1)
27 void pirq_assign_irqs(const unsigned char pIntAtoD[4])
28 {
29         device_t pdev;
30
31         pdev = dev_find_device(PCI_VENDOR_ID_AMD,
32                                PCI_DEVICE_ID_AMD_CS5536_ISA, 0);
33
34         if (pdev) {
35                 pci_write_config16(pdev, 0x5c, (pIntAtoD[3] << 12
36                         | pIntAtoD[2] << 8 | pIntAtoD[1] << 4 | pIntAtoD[0]));
37         }
38 }
39 #endif