| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | #ifndef __ASM_POWERPC_PCI_H |
|---|
| 2 | 3 | #define __ASM_POWERPC_PCI_H |
|---|
| 3 | 4 | #ifdef __KERNEL__ |
|---|
| 4 | 5 | |
|---|
| 5 | 6 | /* |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or |
|---|
| 7 | | - * modify it under the terms of the GNU General Public License |
|---|
| 8 | | - * as published by the Free Software Foundation; either version |
|---|
| 9 | | - * 2 of the License, or (at your option) any later version. |
|---|
| 10 | 7 | */ |
|---|
| 11 | 8 | |
|---|
| 12 | 9 | #include <linux/types.h> |
|---|
| 13 | 10 | #include <linux/slab.h> |
|---|
| 14 | 11 | #include <linux/string.h> |
|---|
| 15 | | -#include <linux/dma-mapping.h> |
|---|
| 12 | +#include <linux/dma-map-ops.h> |
|---|
| 16 | 13 | #include <linux/scatterlist.h> |
|---|
| 17 | 14 | |
|---|
| 18 | 15 | #include <asm/machdep.h> |
|---|
| .. | .. |
|---|
| 52 | 49 | |
|---|
| 53 | 50 | #ifdef CONFIG_PCI |
|---|
| 54 | 51 | extern void set_pci_dma_ops(const struct dma_map_ops *dma_ops); |
|---|
| 55 | | -extern const struct dma_map_ops *get_pci_dma_ops(void); |
|---|
| 56 | 52 | #else /* CONFIG_PCI */ |
|---|
| 57 | 53 | #define set_pci_dma_ops(d) |
|---|
| 58 | | -#define get_pci_dma_ops() NULL |
|---|
| 59 | 54 | #endif |
|---|
| 60 | 55 | |
|---|
| 61 | 56 | #ifdef CONFIG_PPC64 |
|---|
| .. | .. |
|---|
| 117 | 112 | unsigned long size, |
|---|
| 118 | 113 | pgprot_t prot); |
|---|
| 119 | 114 | |
|---|
| 120 | | -#define HAVE_ARCH_PCI_RESOURCE_TO_USER |
|---|
| 121 | | - |
|---|
| 122 | 115 | extern resource_size_t pcibios_io_space_offset(struct pci_controller *hose); |
|---|
| 123 | | -extern void pcibios_setup_bus_devices(struct pci_bus *bus); |
|---|
| 124 | 116 | extern void pcibios_setup_bus_self(struct pci_bus *bus); |
|---|
| 125 | 117 | extern void pcibios_setup_phb_io_space(struct pci_controller *hose); |
|---|
| 126 | 118 | extern void pcibios_scan_phb(struct pci_controller *hose); |
|---|
| .. | .. |
|---|
| 129 | 121 | |
|---|
| 130 | 122 | extern struct pci_dev *pnv_pci_get_gpu_dev(struct pci_dev *npdev); |
|---|
| 131 | 123 | extern struct pci_dev *pnv_pci_get_npu_dev(struct pci_dev *gpdev, int index); |
|---|
| 124 | +extern int pnv_npu2_init(struct pci_controller *hose); |
|---|
| 125 | +extern int pnv_npu2_map_lpar_dev(struct pci_dev *gpdev, unsigned int lparid, |
|---|
| 126 | + unsigned long msr); |
|---|
| 127 | +extern int pnv_npu2_unmap_lpar_dev(struct pci_dev *gpdev); |
|---|
| 132 | 128 | |
|---|
| 133 | 129 | #endif /* __ASM_POWERPC_PCI_H */ |
|---|