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-lantiq.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-lantiq.c')
-rw-r--r-- | arch/mips/pci/fixup-lantiq.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/mips/pci/fixup-lantiq.c b/arch/mips/pci/fixup-lantiq.c new file mode 100644 index 000000000..105569c1b --- /dev/null +++ b/arch/mips/pci/fixup-lantiq.c | |||
@@ -0,0 +1,27 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
2 | /* | ||
3 | * | ||
4 | * Copyright (C) 2012 John Crispin <john@phrozen.org> | ||
5 | */ | ||
6 | |||
7 | #include <linux/of_irq.h> | ||
8 | #include <linux/of_pci.h> | ||
9 | |||
10 | int (*ltq_pci_plat_arch_init)(struct pci_dev *dev) = NULL; | ||
11 | int (*ltq_pci_plat_dev_init)(struct pci_dev *dev) = NULL; | ||
12 | |||
13 | int pcibios_plat_dev_init(struct pci_dev *dev) | ||
14 | { | ||
15 | if (ltq_pci_plat_arch_init) | ||
16 | return ltq_pci_plat_arch_init(dev); | ||
17 | |||
18 | if (ltq_pci_plat_dev_init) | ||
19 | return ltq_pci_plat_dev_init(dev); | ||
20 | |||
21 | return 0; | ||
22 | } | ||
23 | |||
24 | int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | ||
25 | { | ||
26 | return of_irq_parse_and_map_pci(dev, slot, pin); | ||
27 | } | ||