Commit | Line | Data |
---|---|---|
8f6a93a1 DM |
1 | /* pci_sun4v.c: SUN4V specific PCI controller support. |
2 | * | |
3 | * Copyright (C) 2006 David S. Miller (davem@davemloft.net) | |
4 | */ | |
5 | ||
6 | #include <linux/kernel.h> | |
7 | #include <linux/types.h> | |
8 | #include <linux/pci.h> | |
9 | #include <linux/init.h> | |
10 | #include <linux/slab.h> | |
11 | #include <linux/interrupt.h> | |
12 | ||
13 | #include <asm/pbm.h> | |
14 | #include <asm/iommu.h> | |
15 | #include <asm/irq.h> | |
16 | #include <asm/upa.h> | |
17 | #include <asm/pstate.h> | |
18 | #include <asm/oplib.h> | |
19 | #include <asm/hypervisor.h> | |
20 | ||
21 | #include "pci_impl.h" | |
22 | #include "iommu_common.h" | |
23 | ||
24 | static void *pci_4v_alloc_consistent(struct pci_dev *pdev, size_t size, dma_addr_t *dma_addrp) | |
25 | { | |
26 | return NULL; | |
27 | } | |
28 | ||
29 | static void pci_4v_free_consistent(struct pci_dev *pdev, size_t size, void *cpu, dma_addr_t dvma) | |
30 | { | |
31 | } | |
32 | ||
33 | static dma_addr_t pci_4v_map_single(struct pci_dev *pdev, void *ptr, size_t sz, int direction) | |
34 | { | |
35 | return 0; | |
36 | } | |
37 | ||
38 | static void pci_4v_unmap_single(struct pci_dev *pdev, dma_addr_t bus_addr, size_t sz, int direction) | |
39 | { | |
40 | } | |
41 | ||
42 | static int pci_4v_map_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems, int direction) | |
43 | { | |
44 | return nelems; | |
45 | } | |
46 | ||
47 | static void pci_4v_unmap_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems, int direction) | |
48 | { | |
49 | } | |
50 | ||
51 | static void pci_4v_dma_sync_single_for_cpu(struct pci_dev *pdev, dma_addr_t bus_addr, size_t sz, int direction) | |
52 | { | |
53 | } | |
54 | ||
55 | static void pci_4v_dma_sync_sg_for_cpu(struct pci_dev *pdev, struct scatterlist *sglist, int nelems, int direction) | |
56 | { | |
57 | } | |
58 | ||
59 | struct pci_iommu_ops pci_sun4v_iommu_ops = { | |
60 | .alloc_consistent = pci_4v_alloc_consistent, | |
61 | .free_consistent = pci_4v_free_consistent, | |
62 | .map_single = pci_4v_map_single, | |
63 | .unmap_single = pci_4v_unmap_single, | |
64 | .map_sg = pci_4v_map_sg, | |
65 | .unmap_sg = pci_4v_unmap_sg, | |
66 | .dma_sync_single_for_cpu = pci_4v_dma_sync_single_for_cpu, | |
67 | .dma_sync_sg_for_cpu = pci_4v_dma_sync_sg_for_cpu, | |
68 | }; | |
69 | ||
70 | void sun4v_pci_init(int node, char *model_name) | |
71 | { | |
72 | prom_printf("sun4v_pci_init: Implement me.\n"); | |
73 | prom_halt(); | |
74 | } |