trizeps2.c

来自「优龙2410linux2.6.8内核源代码」· C语言 代码 · 共 107 行

C
107
字号
/* *  linux/arch/arm/mach-pxa/trizeps2.c * * (c) 2004 Robert Schwebel <r.schwebel@pengutronix.de>, Pengutronix * * 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, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */#include <linux/kernel.h>#include <linux/init.h>#include <linux/device.h>#include <linux/major.h>#include <linux/fs.h>#include <linux/interrupt.h>#include <asm/setup.h>#include <asm/memory.h>#include <asm/mach-types.h>#include <asm/hardware.h>#include <asm/irq.h>#include <asm/mach/arch.h>#include <asm/mach/map.h>#include <asm/mach/irq.h>#include <asm/arch/irq.h>//#include <asm/arch/irqs.h>#include <asm/arch/trizeps2.h>#include "generic.h"/*  * Interrupt Initialisation */static void __init trizeps2_init_irq(void){	pxa_init_irq();	}static struct platform_device *devices[] __initdata = {};/* * Specific Board Initialisation */static int __init trizeps2_init(void){	char buf[255];	sprintf(buf,"trizeps2_init\n"); printascii(buf);	return platform_add_devices(devices, ARRAY_SIZE(devices));}subsys_initcall(trizeps2_init);/* memory mapping */static struct map_desc trizeps2_io_desc[] __initdata = {/*  virtual           physical          length            type                           */// { INNOKOM_ETH_VIRT, INNOKOM_ETH_PHYS, INNOKOM_ETH_SIZE, MT_DEVICE }, /* ETH SMSC 91111 */};static void __init trizeps2_map_io(void){	pxa_map_io();	//iotable_init(trizeps2_io_desc, ARRAY_SIZE(trizeps2_io_desc));	/* Enable the BTUART */	CKEN |= CKEN7_BTUART;	pxa_gpio_mode(GPIO42_BTRXD_MD);	pxa_gpio_mode(GPIO43_BTTXD_MD);	pxa_gpio_mode(GPIO44_BTCTS_MD);	pxa_gpio_mode(GPIO45_BTRTS_MD);	//pxa_gpio_mode(GPIO33_nCS_5_MD);	/* SMSC network chip */	/* setup sleep mode values */	PWER  = 0x00000002;	PFER  = 0x00000000;	PRER  = 0x00000002;	PGSR0 = 0x00008000;	PGSR1 = 0x003F0202;	PGSR2 = 0x0001C000;	PCFR |= PCFR_OPDE;}MACHINE_START(TRIZEPS2, "Keith & Koep Trizeps2")	MAINTAINER("Robert Schwebel, Pengutronix")	BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000))	BOOT_PARAMS(0xa0000100)	MAPIO(trizeps2_map_io)	INITIRQ(trizeps2_init_irq)MACHINE_END

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?