X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-ppc64%2Fiommu.h;h=19f57ab5964144d862ee3f1ce20edb25b30295fd;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=e67575457fb2ded15f3c9d3a0ce2660b7f49b506;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/include/asm-ppc64/iommu.h b/include/asm-ppc64/iommu.h index e67575457..19f57ab59 100644 --- a/include/asm-ppc64/iommu.h +++ b/include/asm-ppc64/iommu.h @@ -69,18 +69,16 @@ union tce_entry { struct iommu_table { unsigned long it_busno; /* Bus number this table belongs to */ - unsigned long it_size; /* Size in pages of iommu table */ + unsigned long it_size; /* Size of iommu table in entries */ unsigned long it_offset; /* Offset into global table */ unsigned long it_base; /* mapped address of tce table */ unsigned long it_index; /* which iommu table this is */ unsigned long it_type; /* type: PCI or Virtual Bus */ - unsigned long it_entrysize; /* Size of an entry in bytes */ unsigned long it_blocksize; /* Entries in each block (cacheline) */ unsigned long it_hint; /* Hint for next alloc */ unsigned long it_largehint; /* Hint for large allocs */ unsigned long it_halfpoint; /* Breaking point for small/large allocs */ spinlock_t it_lock; /* Protects it_map */ - unsigned long it_mapsize; /* Size of map in # of entries (bits) */ unsigned long *it_map; /* A simple allocation bitmap for now */ }; @@ -110,11 +108,18 @@ struct scatterlist; extern void iommu_setup_pSeries(void); extern void iommu_setup_u3(void); -/* Creates table for an individual device node */ -extern void iommu_devnode_init(struct device_node *dn); +/* Frees table for an individual device node */ +extern void iommu_free_table(struct device_node *dn); #endif /* CONFIG_PPC_MULTIPLATFORM */ +#ifdef CONFIG_PPC_PSERIES + +/* Creates table for an individual device node */ +extern void iommu_devnode_init_pSeries(struct device_node *dn); + +#endif /* CONFIG_PPC_PSERIES */ + #ifdef CONFIG_PPC_ISERIES /* Walks all buses and creates iommu tables */ @@ -125,7 +130,7 @@ extern void __init iommu_vio_init(void); struct iSeries_Device_Node; /* Creates table for an individual device node */ -extern void iommu_devnode_init(struct iSeries_Device_Node *dn); +extern void iommu_devnode_init_iSeries(struct iSeries_Device_Node *dn); #endif /* CONFIG_PPC_ISERIES */ @@ -149,14 +154,13 @@ extern dma_addr_t iommu_map_single(struct iommu_table *tbl, void *vaddr, extern void iommu_unmap_single(struct iommu_table *tbl, dma_addr_t dma_handle, size_t size, enum dma_data_direction direction); -extern void tce_init_pSeries(void); -extern void tce_init_iSeries(void); +extern void iommu_init_early_pSeries(void); +extern void iommu_init_early_iSeries(void); +extern void iommu_init_early_u3(void); extern void pci_iommu_init(void); -extern void pci_dma_init_direct(void); +extern void pci_direct_iommu_init(void); extern void alloc_u3_dart_table(void); -extern int ppc64_iommu_off; - #endif /* _ASM_IOMMU_H */