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

📄 devices.c

📁 omap3 linux 2.6 用nocc去除了冗余代码
💻 C
字号:
/* * linux/arch/arm/mach-omap2/devices.c * * OMAP2 platform device setup/initialization * * 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. */#include <linux/module.h>#include <linux/kernel.h>#include <linux/init.h>#include <linux/platform_device.h>#include <asm/hardware.h>#include <asm/irq.h>#include <asm/io.h>#include <asm/mach-types.h>#include <asm/mach/map.h>#include <asm/arch/tc.h>#include <asm/arch/board.h>#include <asm/arch/mux.h>#include <asm/arch/gpio.h>#include <asm/arch/eac.h>static inline void omap_init_mbox(void) { }static inline void omap_init_sti(void) {}static inline void omap_init_mcspi(void) {}void omap_init_eac(struct eac_platform_data *pdata) {}#define	OMAP_HSMMC_1_BASE	0x4809c000static struct omap_mmc_conf mmc1_conf;static struct resource mmc1_resources[] = {	{		.start		= OMAP_HSMMC_1_BASE,		.end		= OMAP_HSMMC_1_BASE + 0x01FC,		.flags		= IORESOURCE_MEM,	},	{		.start		= INT_24XX_MMC_IRQ,		.flags		= IORESOURCE_IRQ,	},};static struct platform_device mmc_omap_device1 = {	.name		= "hsmmc-omap",	.id		= 1,	.dev = {		.platform_data	= &mmc1_conf,	},	.num_resources	= ARRAY_SIZE(mmc1_resources),	.resource	= mmc1_resources,};static void __init omap2_3_init_mmc(void){	const struct omap_mmc_config	*mmc_conf;	const struct omap_mmc_conf	*mmc;	mmc_conf = omap_get_config(OMAP_TAG_MMC, struct omap_mmc_config);	if (!mmc_conf)		return;	mmc = &mmc_conf->mmc[0];	if (mmc->enabled) {		mmc1_conf = *mmc;		(void) platform_device_register(&mmc_omap_device1);	}}	static inline void omap_bci_battery_init(void) {}static inline void omap_bq2700_battery_init(void) {}static inline void omap_hdq_init(void) {}static inline void twl4030_madc_init(void) {}/*-------------------------------------------------------------------------*/static int __init omap2_init_devices(void){	/* please keep these calls, and their implementations above,	 * in alphabetical order so they're easier to sort through.	 */	omap_init_mbox();	omap_init_mcspi();	omap_hdq_init();	omap_bci_battery_init();	omap_bq2700_battery_init();	twl4030_madc_init();	omap_init_sti();	omap2_3_init_mmc();	return 0;}arch_initcall(omap2_init_devices);

⌨️ 快捷键说明

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