Lines Matching refs:sba_dev

1108 sba_get_pat_resources(struct sba_device *sba_dev)  in sba_get_pat_resources()  argument
1527 static void __iomem *ioc_remap(struct sba_device *sba_dev, unsigned int offset) in ioc_remap() argument
1529 return ioremap(sba_dev->dev->hpa.start + offset, SBA_FUNC_SIZE); in ioc_remap()
1532 static void sba_hw_init(struct sba_device *sba_dev) in sba_hw_init() argument
1582 if (!IS_PLUTO(sba_dev->dev)) { in sba_hw_init()
1583 ioc_ctl = READ_REG(sba_dev->sba_hpa+IOC_CTRL); in sba_hw_init()
1585 __func__, sba_dev->sba_hpa, ioc_ctl); in sba_hw_init()
1591 WRITE_REG(ioc_ctl, sba_dev->sba_hpa+IOC_CTRL); in sba_hw_init()
1594 ioc_ctl = READ_REG64(sba_dev->sba_hpa+IOC_CTRL); in sba_hw_init()
1599 if (IS_ASTRO(sba_dev->dev)) { in sba_hw_init()
1601 sba_dev->ioc[0].ioc_hpa = ioc_remap(sba_dev, ASTRO_IOC_OFFSET); in sba_hw_init()
1604 sba_dev->chip_resv.name = "Astro Intr Ack"; in sba_hw_init()
1605 sba_dev->chip_resv.start = PCI_F_EXTEND | 0xfef00000UL; in sba_hw_init()
1606 sba_dev->chip_resv.end = PCI_F_EXTEND | (0xff000000UL - 1) ; in sba_hw_init()
1607 err = request_resource(&iomem_resource, &(sba_dev->chip_resv)); in sba_hw_init()
1610 } else if (IS_PLUTO(sba_dev->dev)) { in sba_hw_init()
1613 sba_dev->ioc[0].ioc_hpa = ioc_remap(sba_dev, PLUTO_IOC_OFFSET); in sba_hw_init()
1616 sba_dev->chip_resv.name = "Pluto Intr/PIOP/VGA"; in sba_hw_init()
1617 sba_dev->chip_resv.start = PCI_F_EXTEND | 0xfee00000UL; in sba_hw_init()
1618 sba_dev->chip_resv.end = PCI_F_EXTEND | (0xff200000UL - 1); in sba_hw_init()
1619 err = request_resource(&iomem_resource, &(sba_dev->chip_resv)); in sba_hw_init()
1622 sba_dev->iommu_resv.name = "IOVA Space"; in sba_hw_init()
1623 sba_dev->iommu_resv.start = 0x40000000UL; in sba_hw_init()
1624 sba_dev->iommu_resv.end = 0x50000000UL - 1; in sba_hw_init()
1625 err = request_resource(&iomem_resource, &(sba_dev->iommu_resv)); in sba_hw_init()
1629 sba_dev->ioc[0].ioc_hpa = ioc_remap(sba_dev, IKE_IOC_OFFSET(0)); in sba_hw_init()
1630 sba_dev->ioc[1].ioc_hpa = ioc_remap(sba_dev, IKE_IOC_OFFSET(1)); in sba_hw_init()
1637 sba_dev->num_ioc = num_ioc; in sba_hw_init()
1639 void __iomem *ioc_hpa = sba_dev->ioc[i].ioc_hpa; in sba_hw_init()
1650 if (IS_PLUTO(sba_dev->dev)) { in sba_hw_init()
1667 READ_REG(sba_dev->ioc[i].ioc_hpa + ROPE7_CTL); in sba_hw_init()
1671 (unsigned long) READ_REG(sba_dev->ioc[i].ioc_hpa + 0x40), in sba_hw_init()
1672 (unsigned long) READ_REG(sba_dev->ioc[i].ioc_hpa + 0x50) in sba_hw_init()
1675 (unsigned long) READ_REG(sba_dev->ioc[i].ioc_hpa + 0x108), in sba_hw_init()
1676 (unsigned long) READ_REG(sba_dev->ioc[i].ioc_hpa + 0x400) in sba_hw_init()
1679 if (IS_PLUTO(sba_dev->dev)) { in sba_hw_init()
1680 sba_ioc_init_pluto(sba_dev->dev, &(sba_dev->ioc[i]), i); in sba_hw_init()
1682 sba_ioc_init(sba_dev->dev, &(sba_dev->ioc[i]), i); in sba_hw_init()
1688 sba_common_init(struct sba_device *sba_dev) in sba_common_init() argument
1695 sba_dev->next = sba_list; in sba_common_init()
1696 sba_list = sba_dev; in sba_common_init()
1698 for(i=0; i< sba_dev->num_ioc; i++) { in sba_common_init()
1707 res_size = sba_dev->ioc[i].pdir_size/sizeof(u64); /* entries */ in sba_common_init()
1718 sba_dev->ioc[i].res_size = res_size; in sba_common_init()
1719 sba_dev->ioc[i].res_map = (char *) __get_free_pages(GFP_KERNEL, get_order(res_size)); in sba_common_init()
1722 iterate_pages( sba_dev->ioc[i].res_map, res_size, in sba_common_init()
1726 if (NULL == sba_dev->ioc[i].res_map) in sba_common_init()
1732 memset(sba_dev->ioc[i].res_map, 0, res_size); in sba_common_init()
1734 sba_dev->ioc[i].res_hint = (unsigned long *) in sba_common_init()
1735 &(sba_dev->ioc[i].res_map[L1_CACHE_BYTES]); in sba_common_init()
1739 sba_dev->ioc[i].res_map[0] = 0x80; in sba_common_init()
1740 sba_dev->ioc[i].pdir_base[0] = (__force __le64) 0xeeffc0addbba0080ULL; in sba_common_init()
1749 long *p_start = (long *) &(sba_dev->ioc[i].res_map[idx_start]); in sba_common_init()
1750 long *p_end = (long *) &(sba_dev->ioc[i].res_map[idx_end]); in sba_common_init()
1759 iterate_pages( sba_dev->ioc[i].res_map, res_size, in sba_common_init()
1761 iterate_pages( sba_dev->ioc[i].pdir_base, sba_dev->ioc[i].pdir_size, in sba_common_init()
1766 __func__, i, res_size, sba_dev->ioc[i].res_map); in sba_common_init()
1769 spin_lock_init(&sba_dev->sba_lock); in sba_common_init()
1789 struct sba_device *sba_dev = sba_list; in sba_proc_info() local
1790 struct ioc *ioc = &sba_dev->ioc[0]; /* FIXME: Multi-IOC support! */ in sba_proc_info()
1798 sba_dev->name, in sba_proc_info()
1799 (sba_dev->hw_rev & 0x7) + 1, in sba_proc_info()
1800 (sba_dev->hw_rev & 0x18) >> 3); in sba_proc_info()
1809 READ_REG32(sba_dev->sba_hpa + LMMIO_DIST_BASE), in sba_proc_info()
1810 READ_REG32(sba_dev->sba_hpa + LMMIO_DIST_MASK), in sba_proc_info()
1811 READ_REG32(sba_dev->sba_hpa + LMMIO_DIST_ROUTE)); in sba_proc_info()
1816 READ_REG32(sba_dev->sba_hpa + LMMIO_DIRECT0_BASE + i*0x18), in sba_proc_info()
1817 READ_REG32(sba_dev->sba_hpa + LMMIO_DIRECT0_MASK + i*0x18), in sba_proc_info()
1818 READ_REG32(sba_dev->sba_hpa + LMMIO_DIRECT0_ROUTE + i*0x18)); in sba_proc_info()
1860 struct sba_device *sba_dev = sba_list; in sba_proc_bitmap_info() local
1861 struct ioc *ioc = &sba_dev->ioc[0]; /* FIXME: Multi-IOC support! */ in sba_proc_bitmap_info()
1895 struct sba_device *sba_dev; in sba_driver_callback() local
1944 sba_dev = kzalloc(sizeof(struct sba_device), GFP_KERNEL); in sba_driver_callback()
1945 if (!sba_dev) { in sba_driver_callback()
1950 parisc_set_drvdata(dev, sba_dev); in sba_driver_callback()
1953 spin_lock_init(&(sba_dev->ioc[i].res_lock)); in sba_driver_callback()
1955 sba_dev->dev = dev; in sba_driver_callback()
1956 sba_dev->hw_rev = func_class; in sba_driver_callback()
1957 sba_dev->name = dev->name; in sba_driver_callback()
1958 sba_dev->sba_hpa = sba_addr; in sba_driver_callback()
1960 sba_get_pat_resources(sba_dev); in sba_driver_callback()
1961 sba_hw_init(sba_dev); in sba_driver_callback()
1962 sba_common_init(sba_dev); in sba_driver_callback()
2007 struct parisc_device *sba_dev = parisc_parent(pci_hba); in sba_get_iommu() local
2008 struct sba_device *sba = dev_get_drvdata(&sba_dev->dev); in sba_get_iommu()
2009 char t = sba_dev->id.hw_type; in sba_get_iommu()
2028 struct parisc_device *sba_dev = parisc_parent(pci_hba); in sba_directed_lmmio() local
2029 struct sba_device *sba = dev_get_drvdata(&sba_dev->dev); in sba_directed_lmmio()
2030 char t = sba_dev->id.hw_type; in sba_directed_lmmio()
2071 struct parisc_device *sba_dev = parisc_parent(pci_hba); in sba_distributed_lmmio() local
2072 struct sba_device *sba = dev_get_drvdata(&sba_dev->dev); in sba_distributed_lmmio()
2073 char t = sba_dev->id.hw_type; in sba_distributed_lmmio()