9 static inline struct pci_hba_data *parisc_walk_tree(struct device *dev)
11 struct device *otherdev;
13 if (likely(dev->platform_data))
14 return dev->platform_data;
16 /* OK, just traverse the bus to find it */
17 for (otherdev = dev->parent;
19 otherdev = otherdev->parent) {
20 if (otherdev->platform_data) {
21 dev->platform_data = otherdev->platform_data;
26 return dev->platform_data;
29 static inline struct ioc *GET_IOC(struct device *dev)
31 struct pci_hba_data *pdata = parisc_walk_tree(dev);
38 #ifdef CONFIG_IOMMU_CCIO
39 void *ccio_get_iommu(const struct parisc_device *dev);
40 int ccio_request_resource(const struct parisc_device *dev,
41 struct resource *res);
42 int ccio_allocate_resource(const struct parisc_device *dev,
43 struct resource *res, unsigned long size,
44 unsigned long min, unsigned long max, unsigned long align);
45 #else /* !CONFIG_IOMMU_CCIO */
46 #define ccio_get_iommu(dev) NULL
47 #define ccio_request_resource(dev, res) insert_resource(&iomem_resource, res)
48 #define ccio_allocate_resource(dev, res, size, min, max, align) \
49 allocate_resource(&iomem_resource, res, size, min, max, \
51 #endif /* !CONFIG_IOMMU_CCIO */
53 void *sba_get_iommu(struct parisc_device *dev);