| Jamie Lenehan | a09749d | 2006-09-27 15:05:39 +0900 | [diff] [blame] | 1 | /* | 
 | 2 |  * arch/sh/drivers/pci/ops-titan.c | 
 | 3 |  * | 
 | 4 |  * Ported to new API by Paul Mundt <lethal@linux-sh.org> | 
 | 5 |  * | 
 | 6 |  * Modified from ops-snapgear.c written by  David McCullough | 
 | 7 |  * Highly leveraged from pci-bigsur.c, written by Dustin McIntire. | 
 | 8 |  * | 
 | 9 |  * May be copied or modified under the terms of the GNU General Public | 
 | 10 |  * License.  See linux/COPYING for more information. | 
 | 11 |  * | 
 | 12 |  * PCI initialization for the Titan boards | 
 | 13 |  */ | 
| Jamie Lenehan | a09749d | 2006-09-27 15:05:39 +0900 | [diff] [blame] | 14 | #include <linux/kernel.h> | 
 | 15 | #include <linux/types.h> | 
 | 16 | #include <linux/init.h> | 
| Paul Mundt | 0f08f33 | 2006-09-27 17:03:56 +0900 | [diff] [blame] | 17 | #include <linux/pci.h> | 
| Jamie Lenehan | ea0f8fe | 2006-12-06 12:05:02 +0900 | [diff] [blame] | 18 | #include <linux/io.h> | 
| Paul Mundt | 7639a45 | 2008-10-20 13:02:48 +0900 | [diff] [blame] | 19 | #include <mach/titan.h> | 
| Paul Mundt | 959f85f | 2006-09-27 16:43:28 +0900 | [diff] [blame] | 20 | #include "pci-sh4.h" | 
| Jamie Lenehan | a09749d | 2006-09-27 15:05:39 +0900 | [diff] [blame] | 21 |  | 
| Jamie Lenehan | ea0f8fe | 2006-12-06 12:05:02 +0900 | [diff] [blame] | 22 | static char titan_irq_tab[] __initdata = { | 
 | 23 | 	TITAN_IRQ_WAN, | 
 | 24 | 	TITAN_IRQ_LAN, | 
 | 25 | 	TITAN_IRQ_MPCIA, | 
 | 26 | 	TITAN_IRQ_MPCIB, | 
 | 27 | 	TITAN_IRQ_USB, | 
 | 28 | }; | 
 | 29 |  | 
| Paul Mundt | 959f85f | 2006-09-27 16:43:28 +0900 | [diff] [blame] | 30 | int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin) | 
| Jamie Lenehan | a09749d | 2006-09-27 15:05:39 +0900 | [diff] [blame] | 31 | { | 
| Jamie Lenehan | ea0f8fe | 2006-12-06 12:05:02 +0900 | [diff] [blame] | 32 | 	int irq = titan_irq_tab[slot]; | 
| Jamie Lenehan | a09749d | 2006-09-27 15:05:39 +0900 | [diff] [blame] | 33 |  | 
 | 34 | 	printk("PCI: Mapping TITAN IRQ for slot %d, pin %c to irq %d\n", | 
 | 35 | 		slot, pin - 1 + 'A', irq); | 
 | 36 |  | 
 | 37 | 	return irq; | 
 | 38 | } |