diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/mips/pci/fixup-atlas.c |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'arch/mips/pci/fixup-atlas.c')
-rw-r--r-- | arch/mips/pci/fixup-atlas.c | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/arch/mips/pci/fixup-atlas.c b/arch/mips/pci/fixup-atlas.c new file mode 100644 index 000000000000..2406835833d6 --- /dev/null +++ b/arch/mips/pci/fixup-atlas.c | |||
@@ -0,0 +1,69 @@ | |||
1 | #include <linux/config.h> | ||
2 | #include <linux/init.h> | ||
3 | #include <linux/pci.h> | ||
4 | #include <asm/mips-boards/atlasint.h> | ||
5 | |||
6 | #define INTD ATLASINT_INTD | ||
7 | #define INTC ATLASINT_INTC | ||
8 | #define INTB ATLASINT_INTB | ||
9 | #define INTA ATLASINT_INTA | ||
10 | #define SCSI ATLASINT_SCSI | ||
11 | #define ETH ATLASINT_ETH | ||
12 | |||
13 | static char irq_tab[][5] __initdata = { | ||
14 | /* INTA INTB INTC INTD */ | ||
15 | {0, 0, 0, 0, 0 }, /* 0: Unused */ | ||
16 | {0, 0, 0, 0, 0 }, /* 1: Unused */ | ||
17 | {0, 0, 0, 0, 0 }, /* 2: Unused */ | ||
18 | {0, 0, 0, 0, 0 }, /* 3: Unused */ | ||
19 | {0, 0, 0, 0, 0 }, /* 4: Unused */ | ||
20 | {0, 0, 0, 0, 0 }, /* 5: Unused */ | ||
21 | {0, 0, 0, 0, 0 }, /* 6: Unused */ | ||
22 | {0, 0, 0, 0, 0 }, /* 7: Unused */ | ||
23 | {0, 0, 0, 0, 0 }, /* 8: Unused */ | ||
24 | {0, 0, 0, 0, 0 }, /* 9: Unused */ | ||
25 | {0, 0, 0, 0, 0 }, /* 10: Unused */ | ||
26 | {0, 0, 0, 0, 0 }, /* 11: Unused */ | ||
27 | {0, 0, 0, 0, 0 }, /* 12: Unused */ | ||
28 | {0, 0, 0, 0, 0 }, /* 13: Unused */ | ||
29 | {0, 0, 0, 0, 0 }, /* 14: Unused */ | ||
30 | {0, 0, 0, 0, 0 }, /* 15: Unused */ | ||
31 | {0, SCSI, 0, 0, 0 }, /* 16: SYM53C810A SCSI */ | ||
32 | {0, 0, 0, 0, 0 }, /* 17: Core */ | ||
33 | {0, INTA, INTB, INTC, INTD }, /* 18: PCI Slot 1 */ | ||
34 | {0, ETH, 0, 0, 0 }, /* 19: SAA9730 Ethernet */ | ||
35 | {0, 0, 0, 0, 0 }, /* 20: PCI Slot 3 */ | ||
36 | {0, 0, 0, 0, 0 } /* 21: PCI Slot 4 */ | ||
37 | }; | ||
38 | |||
39 | int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | ||
40 | { | ||
41 | return irq_tab[slot][pin]; | ||
42 | } | ||
43 | |||
44 | /* Do platform specific device initialization at pci_enable_device() time */ | ||
45 | int pcibios_plat_dev_init(struct pci_dev *dev) | ||
46 | { | ||
47 | return 0; | ||
48 | } | ||
49 | |||
50 | #ifdef CONFIG_KGDB | ||
51 | /* | ||
52 | * The PCI scan may have moved the saa9730 I/O address, so reread | ||
53 | * the address here. | ||
54 | * This does mean that it's not possible to debug the PCI bus configuration | ||
55 | * code, but it is better than nothing... | ||
56 | */ | ||
57 | |||
58 | static void atlas_saa9730_base_fixup (struct pci_dev *pdev) | ||
59 | { | ||
60 | extern void *saa9730_base; | ||
61 | if (pdev->bus == 0 && PCI_SLOT(pdev->devfn) == 19) | ||
62 | (void) pci_read_config_dword (pdev, 0x14, (u32 *)&saa9730_base); | ||
63 | printk ("saa9730_base = %x\n", saa9730_base); | ||
64 | } | ||
65 | |||
66 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_PHILIPS, PCI_DEVICE_ID_PHILIPS_SAA9730, | ||
67 | atlas_saa9730_base_fixup); | ||
68 | |||
69 | #endif | ||