Files
SDK_SG200x_V2/linux_5.10/arch/powerpc/kernel/dma-swiotlb.c
carbon 0545e9dc6d init version 2024-05-07
commit d1edce71135cc6d98c0a4b5729774542b676e769
Author: sophgo-forum-service <forum_service@sophgo.com>
Date:   Fri Mar 15 16:07:33 2024 +0800

    [fix] recommend using ssh method to clone repo.
    [fix] fix sensor driver repo branch name.
2024-05-07 19:36:36 +08:00

30 lines
594 B
C

// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Contains routines needed to support swiotlb for ppc.
*
* Copyright (C) 2009-2010 Freescale Semiconductor, Inc.
* Author: Becky Bruce
*/
#include <linux/memblock.h>
#include <asm/machdep.h>
#include <asm/swiotlb.h>
unsigned int ppc_swiotlb_enable;
void __init swiotlb_detect_4g(void)
{
if ((memblock_end_of_DRAM() - 1) > 0xffffffff)
ppc_swiotlb_enable = 1;
}
static int __init check_swiotlb_enabled(void)
{
if (ppc_swiotlb_enable)
swiotlb_print_info();
else
swiotlb_exit();
return 0;
}
subsys_initcall(check_swiotlb_enabled);