logodl.c

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

C
95
字号
/* * (C) 2002 Abraham van der Merwe <abraham@2d3d.co.za> * (C) 2003 August Hoerandl <august.hoerandl@gmx.at>, Logotronic GmbH * (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>, Pengutronix  * * See file CREDITS for list of people who contributed to this * project. * * 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/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 "generic.h"#define CFG_LED_A_BIT           (1<<18)#define CFG_LED_A_SR            GPSR0#define CFG_LED_A_CR            GPCR0#define CFG_LED_B_BIT           (1<<16)#define CFG_LED_B_SR            GPSR1#define CFG_LED_B_CR            GPCR1static int __init logodl_init(void){	return 0;}__initcall(logodl_init);static void __initlogodl_fixup(struct machine_desc *desc, struct param_struct *params,             char **cmdline, struct meminfo *mi){	/* we probably want to get this information from the bootloader later */	SET_BANK (0, 0x08000000, 4*1024*1024);	mi->nr_banks      = 1;}static void __init logodl_init_irq(void){	pxa_init_irq();}static struct map_desc logodl_io_desc[] __initdata = {	/* virtual             	physical		length            type */	{LOGODL_UART_VIRT,	LOGODL_UART_PHYS,	LOGODL_UART_SIZE, 0, 1, 0, 0 },	{LOGODL_USB_VIRT,	LOGODL_USB_PHYS,	LOGODL_USB_SIZE,  0, 1, 0, 0 },	{LOGODL_ETH_VIRT,	LOGODL_ETH_PHYS,	LOGODL_ETH_SIZE,  0, 1, 0, 0 },	{LOGODL_CPLD_VIRT,	LOGODL_CPLD_PHYS,	LOGODL_CPLD_SIZE, 0, 1, 0, 0 },	LAST_DESC};static void __init logodl_map_io(void){	pxa_map_io();	iotable_init(logodl_io_desc);}MACHINE_START(LOGODL, "Logotronic DL")	MAINTAINER("August Hoerandl, Logotronic; Robert Schwebel, Pengutronix")	BOOT_MEM(0x08000000, 0x40000000, io_p2v(0x40000000))	BOOT_PARAMS(0x08000100)	FIXUP(logodl_fixup)	MAPIO(logodl_map_io)	INITIRQ(logodl_init_irq)MACHINE_END

⌨️ 快捷键说明

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