Windows XP Windows 7 Windows 2003 Windows Vista Windows教程綜合 Linux 系統教程
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟件教程
 Windows教程網 >> Linux系統教程 >> Linux教程 >> Linux DMA總的platform

Linux DMA總的platform

日期:2017/2/7 14:39:29      編輯:Linux教程
 

/* linux/arch/arm/mach-s5pv210/dma.c
*
* Copyright (c) 2009 Samsung Electronics Co., Ltd.
* http://www.samsung.com/
*
* S5PV210 - DMA support
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/


#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/sysdev.h>
#include <linux/serial_core.h>


#include <mach/map.h>
#include <mach/dma.h>


#include <plat/cpu.h>
#include <plat/dma-s5p.h>


//沒定義# CONFIG_OLD_DMA_PL330 is not set CONFIG_NEW_DMA_PL330=y
#ifdef CONFIG_OLD_DMA_PL330


.....(略)


#else


#include <linux/platform_device.h>
#include <plat/devs.h>


static struct platform_device *s5pc110_dmacs[] __initdata = {
&s5pc11x_device_mdma, //定義在arch/arm/plat-s5p/dev-dma.c中
&s5pc11x_device_pdma0,
&s5pc11x_device_pdma1,
};
#endif


static int __init s5pv210_dma_init(void)
{
platform_add_devices(s5pc110_dmacs, ARRAY_SIZE(s5pc110_dmacs));
return 0;
}
arch_initcall(s5pv210_dma_init);
 

Copyright © Windows教程網 All Rights Reserved