sb/amd/cs5536: Get rid of device_t
[coreboot.git] / src / southbridge / amd / cs5536 / pirq.c
blob447d285f4b981992bd87f9d1c38fb756558f5640
1 /*
2 * This file is part of the coreboot project.
4 * Copyright (C) 2007 Nikolay Petukhov <nikolay.petukhov@gmail.com>
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.
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.
17 #include <arch/pirq_routing.h>
18 #include <console/console.h>
19 #include <device/pci.h>
20 #include <device/pci_ids.h>
22 #if IS_ENABLED(CONFIG_PIRQ_ROUTE) && IS_ENABLED(CONFIG_GENERATE_PIRQ_TABLE)
23 void pirq_assign_irqs(const unsigned char pIntAtoD[4])
25 struct device *pdev;
27 pdev = dev_find_device(PCI_VENDOR_ID_AMD,
28 PCI_DEVICE_ID_AMD_CS5536_ISA, 0);
30 if (pdev) {
31 pci_write_config16(pdev, 0x5c, (pIntAtoD[3] << 12
32 | pIntAtoD[2] << 8 | pIntAtoD[1] << 4 | pIntAtoD[0]));
35 #endif