📄 bfin-isp1761.c
字号:
/* * File: bfin-isp1761.c * Based on: gumstix-isp1761.c Bernard Blackham <bernard@blackham.com.au> * Author: Michael Hennerich <hennerich@blackfin.uclinux.org> * * Created: Jan 30th, 2007 * Description: Platfrom initialization file for Blackfin Processors * * Rev: $Id:$ * * Modified: * Copyright 2004-2007 Analog Devices Inc. * * Bugs: Enter bugs at http://blackfin.uclinux.org/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see the file COPYING, or write * to the Free Software Foundation, Inc., * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */#include <linux/module.h>#include <linux/ioport.h>#include <linux/device.h>#include <linux/platform_device.h>#include <linux/delay.h>#include <linux/irq.h>#include <linux/interrupt.h>#include <asm/blackfin.h>#include <asm/delay.h>#define ISP1761_BASE 0x203C0000#define ISP1761_IRQ IRQ_PF7static struct resource bfin_isp1761_resources[] = { [0] = { .name = "isp1761-regs", .start = ISP1761_BASE + 0x00000000, .end = ISP1761_BASE + 0x000fffff, .flags = IORESOURCE_MEM, }, [1] = { .start = ISP1761_IRQ, .end = ISP1761_IRQ, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, },};static struct platform_device bfin_isp1761_device = { .name = "isp1761", .id = 0, .num_resources = ARRAY_SIZE(bfin_isp1761_resources), .resource = bfin_isp1761_resources,};static struct platform_device *bfin_isp1761_devices[] = { &bfin_isp1761_device,};int __init bfin_isp1761_init(void){ unsigned int num_devices=ARRAY_SIZE(bfin_isp1761_devices); set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING); return platform_add_devices(bfin_isp1761_devices, num_devices);}void __exit bfin_isp1761_exit(void){ platform_device_unregister(&bfin_isp1761_device);}module_init(bfin_isp1761_init);module_exit(bfin_isp1761_exit);MODULE_LICENSE("GPL");MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");MODULE_DESCRIPTION("Blackfin ISP1761 chip initialization driver");MODULE_VERSION("1.0");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -