📄 arch.c
字号:
/* * linux/arch/arm/mach-ep93xx/arch.c * * Copyright (C) 2000 Deep Blue Solutions Ltd * (c) Copyright 2002-2003 Cirrus Logic, Inc., Austin, Tx * * 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/config.h>#include <linux/types.h>#include <linux/sched.h>#include <linux/interrupt.h>#include <linux/init.h>#include <linux/utsname.h>#include <asm/irq.h>#include <asm/setup.h>#include <asm/mach-types.h>#include <asm/hardware.h>#include <asm/io.h>#include <asm/memory.h>#include <asm/arch/platform.h>#include <asm/mach/arch.h>#include <asm/arch/ssp.h>extern void ep93xx_map_io(void);extern void ep93xx_init_irq(void);extern void init_FIQ(void);static int __initep93xx_init(void){ unsigned int uiTemp; int SSP_Handle; /* * Initialize the FIQ handler. */ init_FIQ(); /* * Enable halt mode. */ uiTemp = inl(SYSCON_DEVCFG) | SYSCON_DEVCFG_SHena; SysconSetLocked(SYSCON_DEVCFG, uiTemp); /* * Set the bus priority. */ outl(BMAR_PRIORD_02, SYSCON_BMAR); /* * Get the hostname from the SPI FLASH if it has been programmed. */ SSP_Handle = SSPDriver->Open(SERIAL_FLASH, 0); if(SSP_Handle != -1) { SSPDriver->Read( SSP_Handle, 0x1000, &uiTemp ); if (uiTemp == 0x43414d45) { SSPDriver->Read( SSP_Handle, 0x1010, &uiTemp ); system_utsname.nodename[0] = uiTemp & 255; system_utsname.nodename[1] = (uiTemp >> 8) & 255; system_utsname.nodename[2] = (uiTemp >> 16) & 255; system_utsname.nodename[3] = uiTemp >> 24; SSPDriver->Read( SSP_Handle, 0x1014, &uiTemp ); system_utsname.nodename[4] = uiTemp & 255; system_utsname.nodename[5] = (uiTemp >> 8) & 255; system_utsname.nodename[6] = (uiTemp >> 16) & 255; system_utsname.nodename[7] = uiTemp >> 24; SSPDriver->Read( SSP_Handle, 0x1018, &uiTemp ); system_utsname.nodename[8] = uiTemp & 255; system_utsname.nodename[9] = (uiTemp >> 8) & 255; system_utsname.nodename[10] = (uiTemp >> 16) & 255; system_utsname.nodename[11] = uiTemp >> 24; SSPDriver->Read( SSP_Handle, 0x101c, &uiTemp ); system_utsname.nodename[12] = uiTemp & 255; system_utsname.nodename[13] = (uiTemp >> 8) & 255; system_utsname.nodename[14] = (uiTemp >> 16) & 255; system_utsname.nodename[15] = uiTemp >> 24; system_utsname.nodename[16] = 0; } SSPDriver->Close( SSP_Handle ); } return 0;}__initcall(ep93xx_init);/* Machine Descriptor created by macros in asm-arm/mach/arch.h bootmem: phys ram base, phys io base, virt io base bootpara: phys param base */#ifdef CONFIG_ARCH_EDB9301MACHINE_START(EDB9301, "edb9301") MAINTAINER("Cirrus Logic") BOOT_MEM( CONFIG_EP93XX_PHYS_ADDR, 0x80000000, 0xff000000 ) BOOT_PARAMS( CONFIG_EP93XX_PARAMS_PHYS ) MAPIO(ep93xx_map_io) INITIRQ(ep93xx_init_irq)MACHINE_END#endif#ifdef CONFIG_ARCH_EDB9302MACHINE_START(EDB9302, "edb9302") MAINTAINER("Cirrus Logic") BOOT_MEM( CONFIG_EP93XX_PHYS_ADDR, 0x80000000, 0xff000000 ) BOOT_PARAMS( CONFIG_EP93XX_PARAMS_PHYS ) MAPIO(ep93xx_map_io) INITIRQ(ep93xx_init_irq)MACHINE_END#endif#ifdef CONFIG_ARCH_EDB9307MACHINE_START(EDB9307, "edb9307") MAINTAINER("Cirrus Logic") BOOT_MEM( CONFIG_EP93XX_PHYS_ADDR, 0x80000000, 0xff000000 ) BOOT_PARAMS( CONFIG_EP93XX_PARAMS_PHYS ) MAPIO(ep93xx_map_io) INITIRQ(ep93xx_init_irq)MACHINE_END#endif#ifdef CONFIG_ARCH_EDB9312MACHINE_START(EDB9312, "edb9312") MAINTAINER("Cirrus Logic") BOOT_MEM( CONFIG_EP93XX_PHYS_ADDR, 0x80000000, 0xff000000 ) BOOT_PARAMS( CONFIG_EP93XX_PARAMS_PHYS ) MAPIO(ep93xx_map_io) INITIRQ(ep93xx_init_irq)MACHINE_END#endif#ifdef CONFIG_ARCH_EDB9315MACHINE_START(EDB9315, "edb9315") MAINTAINER("Cirrus Logic") BOOT_MEM( CONFIG_EP93XX_PHYS_ADDR, 0x80000000, 0xff000000 ) BOOT_PARAMS( CONFIG_EP93XX_PARAMS_PHYS ) MAPIO(ep93xx_map_io) INITIRQ(ep93xx_init_irq)MACHINE_END#endif#ifdef CONFIG_ARCH_EDB9315AMACHINE_START(EDB9315A, "edb9315A") MAINTAINER("Cirrus Logic") BOOT_MEM( CONFIG_EP93XX_PHYS_ADDR, 0x80000000, 0xff000000 ) BOOT_PARAMS( CONFIG_EP93XX_PARAMS_PHYS ) MAPIO(ep93xx_map_io) INITIRQ(ep93xx_init_irq)MACHINE_END#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -