diff options
author | David S. Miller <davem@davemloft.net> | 2008-09-01 23:21:15 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-09-02 03:52:55 -0400 |
commit | 463801b3ae97fe1c652ce8da5a61367405d6ec3e (patch) | |
tree | f5aab8792723f8432c153a855627f20147e5b054 | |
parent | 0f73d1bbe6240bcdf14c221bbe2ece63540c5c44 (diff) |
pci_schizo: Use of_get_property() and delete spurious local vars.
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | arch/sparc64/kernel/pci_schizo.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/arch/sparc64/kernel/pci_schizo.c b/arch/sparc64/kernel/pci_schizo.c index 64904b180f49..e1c565744d3f 100644 --- a/arch/sparc64/kernel/pci_schizo.c +++ b/arch/sparc64/kernel/pci_schizo.c | |||
@@ -1152,24 +1152,17 @@ static void schizo_pbm_strbuf_init(struct pci_pbm_info *pbm) | |||
1152 | 1152 | ||
1153 | static int schizo_pbm_iommu_init(struct pci_pbm_info *pbm) | 1153 | static int schizo_pbm_iommu_init(struct pci_pbm_info *pbm) |
1154 | { | 1154 | { |
1155 | struct iommu *iommu = pbm->iommu; | 1155 | static const u32 vdma_default[] = { 0xc0000000, 0x40000000 }; |
1156 | unsigned long i, tagbase, database; | 1156 | unsigned long i, tagbase, database; |
1157 | struct property *prop; | 1157 | struct iommu *iommu = pbm->iommu; |
1158 | u32 vdma[2], dma_mask; | ||
1159 | int tsbsize, err; | 1158 | int tsbsize, err; |
1159 | const u32 *vdma; | ||
1160 | u32 dma_mask; | ||
1160 | u64 control; | 1161 | u64 control; |
1161 | 1162 | ||
1162 | prop = of_find_property(pbm->prom_node, "virtual-dma", NULL); | 1163 | vdma = of_get_property(pbm->prom_node, "virtual-dma", NULL); |
1163 | if (prop) { | 1164 | if (!vdma) |
1164 | u32 *val = prop->value; | 1165 | vdma = vdma_default; |
1165 | |||
1166 | vdma[0] = val[0]; | ||
1167 | vdma[1] = val[1]; | ||
1168 | } else { | ||
1169 | /* No property, use default values. */ | ||
1170 | vdma[0] = 0xc0000000; | ||
1171 | vdma[1] = 0x40000000; | ||
1172 | } | ||
1173 | 1166 | ||
1174 | dma_mask = vdma[0]; | 1167 | dma_mask = vdma[0]; |
1175 | switch (vdma[1]) { | 1168 | switch (vdma[1]) { |
@@ -1284,7 +1277,6 @@ static int schizo_pbm_iommu_init(struct pci_pbm_info *pbm) | |||
1284 | 1277 | ||
1285 | static void schizo_pbm_hw_init(struct pci_pbm_info *pbm) | 1278 | static void schizo_pbm_hw_init(struct pci_pbm_info *pbm) |
1286 | { | 1279 | { |
1287 | struct property *prop; | ||
1288 | u64 tmp; | 1280 | u64 tmp; |
1289 | 1281 | ||
1290 | schizo_write(pbm->pbm_regs + SCHIZO_PCI_IRQ_RETRY, 5); | 1282 | schizo_write(pbm->pbm_regs + SCHIZO_PCI_IRQ_RETRY, 5); |
@@ -1298,8 +1290,7 @@ static void schizo_pbm_hw_init(struct pci_pbm_info *pbm) | |||
1298 | pbm->chip_version >= 0x2) | 1290 | pbm->chip_version >= 0x2) |
1299 | tmp |= 0x3UL << SCHIZO_PCICTRL_PTO_SHIFT; | 1291 | tmp |= 0x3UL << SCHIZO_PCICTRL_PTO_SHIFT; |
1300 | 1292 | ||
1301 | prop = of_find_property(pbm->prom_node, "no-bus-parking", NULL); | 1293 | if (!of_find_property(pbm->prom_node, "no-bus-parking", NULL)) |
1302 | if (!prop) | ||
1303 | tmp |= SCHIZO_PCICTRL_PARK; | 1294 | tmp |= SCHIZO_PCICTRL_PARK; |
1304 | else | 1295 | else |
1305 | tmp &= ~SCHIZO_PCICTRL_PARK; | 1296 | tmp &= ~SCHIZO_PCICTRL_PARK; |