mx1fs2.c

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

C
71
字号
/* * linux/arch/arm/mach-imx/mx1fs2.c * * Copyright (c) 2004 Sascha Hauer <sascha@saschahauer.de> * * 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/device.h>#include <linux/init.h>#include <asm/system.h>#include <asm/hardware.h>#include <asm/irq.h>#include <asm/pgtable.h>#include <asm/page.h>#include <asm/mach/map.h>#include <asm/mach-types.h>#include <asm/mach/arch.h>#include <linux/interrupt.h>#include "generic.h"#include <asm/serial.h>static struct map_desc mx1fs2_io_desc[] __initdata = {	/* virtual     physical    length      type */	{IMX_CS0_VIRT, IMX_CS0_PHYS, IMX_CS0_SIZE, MT_DEVICE},	{IMX_CS1_VIRT, IMX_CS1_PHYS, IMX_CS1_SIZE, MT_DEVICE},	{IMX_CS2_VIRT, IMX_CS2_PHYS, IMX_CS2_SIZE, MT_DEVICE},	{IMX_CS3_VIRT, IMX_CS3_PHYS, IMX_CS3_SIZE, MT_DEVICE},	{IMX_CS4_VIRT, IMX_CS4_PHYS, IMX_CS4_SIZE, MT_DEVICE},	{IMX_CS5_VIRT, IMX_CS5_PHYS, IMX_CS5_SIZE, MT_DEVICE},	{IMX_FB_VIRT,  IMX_FB_PHYS,  IMX_FB_SIZE,  MT_DEVICE},};void __initmx1fs2_map_io(void){	imx_map_io();	iotable_init(mx1fs2_io_desc, ARRAY_SIZE(mx1fs2_io_desc));}static int __init mx1fs2_init(void){	printk("%s\n",__FUNCTION__);		UFCR(IMX_UART1_BASE) = 0xa81;	UFCR(IMX_UART2_BASE) = 0xa81;	imx_gpio_mode( 9 | GPIO_IN | GPIO_PORTC );	imx_gpio_mode( 10 | GPIO_IN | GPIO_PORTC );	set_irq_type( MX1FS2_UART1_IRQ, __IRQT_HIGHLVL);	set_irq_type( MX1FS2_UART2_IRQ, __IRQT_HIGHLVL);		return 0;}subsys_initcall(mx1fs2_init);MACHINE_START(MX1FS2, "viasys mx1fs2")    MAINTAINER("Sascha Hauer")    BOOT_MEM(0x08000000, 0x00200000, 0xe0200000)    BOOT_PARAMS(0x08000100)    MAPIO(mx1fs2_map_io)    INITIRQ(imx_init_irq)    INITTIME(imx_init_time)MACHINE_END

⌨️ 快捷键说明

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