Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aa91796e authored by Christophe Leroy's avatar Christophe Leroy Committed by Michael Ellerman
Browse files

powerpc: don't use ioremap_prot() nor __ioremap() unless really needed.



In many places, ioremap_prot() and __ioremap() can be replaced with
higher level functions like ioremap(), ioremap_coherent(),
ioremap_cache(), ioremap_wc() ...

Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 402a5698
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -163,7 +163,7 @@ void btext_map(void)
	offset = ((unsigned long) dispDeviceBase) - base;
	size = dispDeviceRowBytes * dispDeviceRect[3] + offset
		+ dispDeviceRect[0];
	vbase = __ioremap(base, size, pgprot_val(pgprot_noncached_wc(__pgprot(0))));
	vbase = ioremap_wc(base, size);
	if (!vbase)
		return;
	logicalDisplayBase = vbase + offset;
+1 −1
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf,
		vaddr = __va(paddr);
		csize = copy_oldmem_vaddr(vaddr, buf, csize, offset, userbuf);
	} else {
		vaddr = __ioremap(paddr, PAGE_SIZE, 0);
		vaddr = ioremap_cache(paddr, PAGE_SIZE);
		csize = copy_oldmem_vaddr(vaddr, buf, csize, offset, userbuf);
		iounmap(vaddr);
	}
+2 −2
Original line number Diff line number Diff line
@@ -216,8 +216,8 @@ static int smp_85xx_start_cpu(int cpu)

	/* Map the spin table */
	if (ioremappable)
		spin_table = ioremap_prot(*cpu_rel_addr,
			sizeof(struct epapr_spin_table), _PAGE_COHERENT);
		spin_table = ioremap_coherent(*cpu_rel_addr,
					      sizeof(struct epapr_spin_table));
	else
		spin_table = phys_to_virt(*cpu_rel_addr);

+1 −1
Original line number Diff line number Diff line
@@ -576,7 +576,7 @@ int pasemi_dma_init(void)
		res.start = 0xfd800000;
		res.end = res.start + 0x1000;
	}
	dma_status = __ioremap(res.start, resource_size(&res), 0);
	dma_status = ioremap_cache(res.start, resource_size(&res));
	pci_dev_put(iob_pdev);

	for (i = 0; i < MAX_TXCH; i++)
+1 −2
Original line number Diff line number Diff line
@@ -215,8 +215,7 @@ static int __init setup_areas(struct spu *spu)
		goto fail_ioremap;
	}

	spu->local_store = (__force void *)ioremap_prot(spu->local_store_phys,
		LS_SIZE, pgprot_val(pgprot_noncached_wc(__pgprot(0))));
	spu->local_store = (__force void *)ioremap_wc(spu->local_store_phys, LS_SIZE);

	if (!spu->local_store) {
		pr_debug("%s:%d: ioremap local_store failed\n",
Loading