歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> Linux DMA總的platform

Linux DMA總的platform

日期:2017/3/2 10:05:35   编辑:關於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 © Linux教程網 All Rights Reserved