powerpc: Little endian fix for arch/powerpc/platforms/powernv/pci.c

Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
Alistair Popple 2013-09-23 12:04:55 +10:00 committed by Benjamin Herrenschmidt
parent 1cc79bc806
commit 044cb69c53
1 changed files with 5 additions and 4 deletions

View File

@ -462,8 +462,8 @@ void pnv_pci_setup_iommu_table(struct iommu_table *tbl,
static struct iommu_table *pnv_pci_setup_bml_iommu(struct pci_controller *hose) static struct iommu_table *pnv_pci_setup_bml_iommu(struct pci_controller *hose)
{ {
struct iommu_table *tbl; struct iommu_table *tbl;
const __be64 *basep, *swinvp; const __be64 *basep;
const __be32 *sizep; const __be32 *sizep, *swinvp;
basep = of_get_property(hose->dn, "linux,tce-base", NULL); basep = of_get_property(hose->dn, "linux,tce-base", NULL);
sizep = of_get_property(hose->dn, "linux,tce-size", NULL); sizep = of_get_property(hose->dn, "linux,tce-size", NULL);
@ -484,8 +484,9 @@ static struct iommu_table *pnv_pci_setup_bml_iommu(struct pci_controller *hose)
swinvp = of_get_property(hose->dn, "linux,tce-sw-invalidate-info", swinvp = of_get_property(hose->dn, "linux,tce-sw-invalidate-info",
NULL); NULL);
if (swinvp) { if (swinvp) {
tbl->it_busno = swinvp[1]; tbl->it_busno = of_read_ulong(&swinvp[1], 2);
tbl->it_index = (unsigned long)ioremap(swinvp[0], 8); tbl->it_index =
(unsigned long)ioremap(of_read_number(swinvp, 2), 8);
tbl->it_type = TCE_PCI_SWINV_CREATE | TCE_PCI_SWINV_FREE; tbl->it_type = TCE_PCI_SWINV_CREATE | TCE_PCI_SWINV_FREE;
} }
return tbl; return tbl;