⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 io.c

📁 omap3 linux 2.6 用nocc去除了冗余代码
💻 C
字号:
/* * linux/arch/arm/mach-omap2/io.c * * OMAP2 I/O mapping code * * Copyright (C) 2005 Nokia Corporation * Copyright (C) 2007 Texas Instruments * * Author: *	Juha Yrjola <juha.yrjola@nokia.com> *	Syed Khasim <x0khasim@ti.com> * * 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/module.h>#include <linux/kernel.h>#include <linux/init.h>#include <asm/tlb.h>#include <asm/io.h>#include <asm/mach/map.h>#include <asm/arch/mux.h>#include <asm/arch/omapfb.h>extern void omap_sram_init(void);extern int omap3_clk_init(void);extern void omap2_check_revision(void);extern void omap2_init_memory(void);extern void gpmc_init(void);extern void omapfb_reserve_sdram(void);/* * The machine specific code may provide the extra mapping besides the * default mapping provided here. */static struct map_desc omap34xx_io_desc[] __initdata = {        {                .virtual        = L4_VIRT,                .pfn            = __phys_to_pfn(L4_PHYS),                .length         = L4_SIZE,                .type           = MT_DEVICE        },        {                .virtual        = L4_WK_VIRT,                .pfn            = __phys_to_pfn(L4_WK_PHYS),                .length         = L4_WK_SIZE,                .type           = MT_DEVICE        },        {                .virtual        = L4_PER_VIRT,                .pfn            = __phys_to_pfn(L4_PER_PHYS),                .length         = L4_PER_SIZE,                .type           = MT_DEVICE        },        {                .virtual        = L4_EMU_VIRT,                .pfn            = __phys_to_pfn(L4_EMU_PHYS),                .length         = L4_EMU_SIZE,                .type           = MT_DEVICE        },        {                .virtual        = GFX_VIRT,                .pfn            = __phys_to_pfn(GFX_PHYS),                .length         = GFX_SIZE,                .type           = MT_DEVICE        },        {                .virtual        = L3_VIRT,                .pfn            = __phys_to_pfn(L3_PHYS),                .length         = L3_SIZE,                .type           = MT_DEVICE        },        {                .virtual        = SMS_VIRT,                .pfn            = __phys_to_pfn(SMS_PHYS),                .length         = SMS_SIZE,                .type           = MT_DEVICE        },        {                .virtual        = SDRC_VIRT,                .pfn            = __phys_to_pfn(SDRC_PHYS),                .length         = SDRC_SIZE,                .type           = MT_DEVICE        },        {                .virtual        = GPMC_VIRT,                .pfn            = __phys_to_pfn(GPMC_PHYS),                .length         = GPMC_SIZE,                .type           = MT_DEVICE        },};void __init omap2_map_common_io(void){	iotable_init(omap34xx_io_desc, ARRAY_SIZE(omap34xx_io_desc));	/* Normally devicemaps_init() would flush caches and tlb after	 * mdesc->map_io(), but we must also do it here because of the CPU	 * revision check below.	 */	local_flush_tlb_all();	flush_cache_all();	omap2_check_revision();	omap_sram_init();	omapfb_reserve_sdram();}void __init omap2_init_common_hw(void){	omap3_mux_init();	omap3_clk_init();	omap2_init_memory();	gpmc_init();}

⌨️ 快捷键说明

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