powerpc/swiotlb: Enable at early stage and disable if not necessary
authorJia Hongtao <B38951@freescale.com>
Fri, 3 Aug 2012 10:14:10 +0000 (18:14 +0800)
committerKumar Gala <galak@kernel.crashing.org>
Wed, 12 Sep 2012 19:57:09 +0000 (14:57 -0500)
commit688ba1dbee8a49a2efe507cd9ae69634d92bb640
treef795ef7757957fd04bd2938a8a1a5b33b30b0795
parent39be5b4a7f232870aad0b3c130791eacd0d34347
powerpc/swiotlb: Enable at early stage and disable if not necessary

Remove the dependency on PCI initialization for SWIOTLB initialization.
So that PCI can be initialized at proper time.

SWIOTLB is partly determined by PCI inbound/outbound map which is assigned
in PCI initialization. But swiotlb_init() should be done at the stage of
mem_init() which is much earlier than PCI initialization. So we reserve the
memory for SWIOTLB first and free it if not necessary.

All boards are converted to fit this change.

Signed-off-by: Jia Hongtao <B38951@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
Acked-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/include/asm/swiotlb.h
arch/powerpc/kernel/dma-swiotlb.c
arch/powerpc/mm/mem.c
arch/powerpc/platforms/44x/currituck.c
arch/powerpc/platforms/85xx/mpc85xx_ds.c
arch/powerpc/platforms/85xx/qemu_e500.c
arch/powerpc/sysdev/fsl_pci.c