1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Contains routines needed to support swiotlb for ppc.
5 * Copyright (C) 2009-2010 Freescale Semiconductor, Inc.
8 #include <linux/memblock.h>
9 #include <asm/machdep.h>
10 #include <asm/swiotlb.h>
12 unsigned int ppc_swiotlb_enable
;
14 void __init
swiotlb_detect_4g(void)
16 if ((memblock_end_of_DRAM() - 1) > 0xffffffff)
17 ppc_swiotlb_enable
= 1;
20 static int __init
check_swiotlb_enabled(void)
22 if (ppc_swiotlb_enable
)
29 subsys_initcall(check_swiotlb_enabled
);