/*1* fixup-tb0287.c, The TANBAC TB0287 specific PCI fixups.2*3* Copyright (C) 2005 Yoichi Yuasa <[email protected]>4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License as published by7* the Free Software Foundation; either version 2 of the License, or8* (at your option) any later version.9*10* This program is distributed in the hope that it will be useful,11* but WITHOUT ANY WARRANTY; without even the implied warranty of12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13* GNU General Public License for more details.14*15* You should have received a copy of the GNU General Public License16* along with this program; if not, write to the Free Software17* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA18*/19#include <linux/init.h>20#include <linux/pci.h>2122#include <asm/vr41xx/tb0287.h>2324int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)25{26unsigned char bus;27int irq = -1;2829bus = dev->bus->number;30if (bus == 0) {31switch (slot) {32case 16:33irq = TB0287_SM501_IRQ;34break;35case 17:36irq = TB0287_SIL680A_IRQ;37break;38default:39break;40}41} else if (bus == 1) {42switch (PCI_SLOT(dev->devfn)) {43case 0:44irq = TB0287_PCI_SLOT_IRQ;45break;46case 2:47case 3:48irq = TB0287_RTL8110_IRQ;49break;50default:51break;52}53} else if (bus > 1) {54irq = TB0287_PCI_SLOT_IRQ;55}5657return irq;58}5960/* Do platform specific device initialization at pci_enable_device() time */61int pcibios_plat_dev_init(struct pci_dev *dev)62{63return 0;64}656667