diff options
author | 2025-03-08 22:04:20 +0800 | |
---|---|---|
committer | 2025-03-08 22:04:20 +0800 | |
commit | a07bb8fd1299070229f0e8f3dcb57ffd5ef9870a (patch) | |
tree | 84f21bd0bf7071bc5fc7dd989e77d7ceb5476682 /arch/mips/pci/fixup-tb0219.c | |
download | ohosKernel-a07bb8fd1299070229f0e8f3dcb57ffd5ef9870a.tar.gz ohosKernel-a07bb8fd1299070229f0e8f3dcb57ffd5ef9870a.zip |
Initial commit: OpenHarmony-v4.0-ReleaseOpenHarmony-v4.0-Release
Diffstat (limited to 'arch/mips/pci/fixup-tb0219.c')
-rw-r--r-- | arch/mips/pci/fixup-tb0219.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/mips/pci/fixup-tb0219.c b/arch/mips/pci/fixup-tb0219.c new file mode 100644 index 000000000..439429985 --- /dev/null +++ b/arch/mips/pci/fixup-tb0219.c | |||
@@ -0,0 +1,38 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
2 | /* | ||
3 | * fixup-tb0219.c, The TANBAC TB0219 specific PCI fixups. | ||
4 | * | ||
5 | * Copyright (C) 2003 Megasolution Inc. <matsu@megasolution.jp> | ||
6 | * Copyright (C) 2004-2005 Yoichi Yuasa <yuasa@linux-mips.org> | ||
7 | */ | ||
8 | #include <linux/init.h> | ||
9 | #include <linux/pci.h> | ||
10 | |||
11 | #include <asm/vr41xx/tb0219.h> | ||
12 | |||
13 | int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | ||
14 | { | ||
15 | int irq = -1; | ||
16 | |||
17 | switch (slot) { | ||
18 | case 12: | ||
19 | irq = TB0219_PCI_SLOT1_IRQ; | ||
20 | break; | ||
21 | case 13: | ||
22 | irq = TB0219_PCI_SLOT2_IRQ; | ||
23 | break; | ||
24 | case 14: | ||
25 | irq = TB0219_PCI_SLOT3_IRQ; | ||
26 | break; | ||
27 | default: | ||
28 | break; | ||
29 | } | ||
30 | |||
31 | return irq; | ||
32 | } | ||
33 | |||
34 | /* Do platform specific device initialization at pci_enable_device() time */ | ||
35 | int pcibios_plat_dev_init(struct pci_dev *dev) | ||
36 | { | ||
37 | return 0; | ||
38 | } | ||