提交 8aef7278 编写于 作者: D David S. Miller

pci_sun4v: Use of_get_property().

Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 463801b3
...@@ -587,22 +587,15 @@ static unsigned long __init probe_existing_entries(struct pci_pbm_info *pbm, ...@@ -587,22 +587,15 @@ static unsigned long __init probe_existing_entries(struct pci_pbm_info *pbm,
static int __init pci_sun4v_iommu_init(struct pci_pbm_info *pbm) static int __init pci_sun4v_iommu_init(struct pci_pbm_info *pbm)
{ {
static const u32 vdma_default[] = { 0x80000000, 0x80000000 };
struct iommu *iommu = pbm->iommu; struct iommu *iommu = pbm->iommu;
struct property *prop;
unsigned long num_tsb_entries, sz, tsbsize; unsigned long num_tsb_entries, sz, tsbsize;
u32 vdma[2], dma_mask, dma_offset; u32 dma_mask, dma_offset;
const u32 *vdma;
prop = of_find_property(pbm->prom_node, "virtual-dma", NULL);
if (prop) {
u32 *val = prop->value;
vdma[0] = val[0]; vdma = of_get_property(pbm->prom_node, "virtual-dma", NULL);
vdma[1] = val[1]; if (!vdma)
} else { vdma = vdma_default;
/* No property, use default values. */
vdma[0] = 0x80000000;
vdma[1] = 0x80000000;
}
if ((vdma[0] | vdma[1]) & ~IO_PAGE_MASK) { if ((vdma[0] | vdma[1]) & ~IO_PAGE_MASK) {
printk(KERN_ERR PFX "Strange virtual-dma[%08x:%08x].\n", printk(KERN_ERR PFX "Strange virtual-dma[%08x:%08x].\n",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册