2 * Contains routines needed to support swiotlb for ppc.
4 * Copyright (C) 2009-2010 Freescale Semiconductor, Inc.
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
13 #include <linux/memblock.h>
14 #include <asm/machdep.h>
15 #include <asm/swiotlb.h>
17 unsigned int ppc_swiotlb_enable;
19 void __init swiotlb_detect_4g(void)
21 if ((memblock_end_of_DRAM() - 1) > 0xffffffff)
22 ppc_swiotlb_enable = 1;
25 static int __init check_swiotlb_enabled(void)
27 if (ppc_swiotlb_enable)
34 subsys_initcall(check_swiotlb_enabled);