亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? edb9307.c

?? 一個(gè)2.4.21版本的嵌入式linux內(nèi)核
?? C
字號(hào):
/* * Handle mapping of the NOR flash on Cirrus Logic EDB9307 boards * * 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/types.h>#include <linux/kernel.h>#include <asm/io.h>#include <linux/mtd/mtd.h>#include <linux/mtd/map.h>#include <linux/config.h>#include <linux/reboot.h>#ifdef CONFIG_MTD_PARTITIONS#include <linux/mtd/partitions.h>#endif#ifdef CONFIG_ARCH_EP93XX_CSN0#ifdef CONFIG_ARCH_EP93XX_SYNC_BOOT#define WINDOW_ADDR 0xf0000000#else#define WINDOW_ADDR 0x00000000#endif#endif#ifdef CONFIG_ARCH_EP93XX_CSN1#define WINDOW_ADDR 0x10000000#endif#ifdef CONFIG_ARCH_EP93XX_CSN2#define WINDOW_ADDR 0x20000000#endif#ifdef CONFIG_ARCH_EP93XX_CSN3#define WINDOW_ADDR 0x30000000#endif#ifdef CONFIG_ARCH_EP93XX_CSN6#define WINDOW_ADDR 0x60000000#endif#ifdef CONFIG_ARCH_EP93XX_CSN7#define WINDOW_ADDR 0x70000000#endif#define WINDOW_SIZE 0x02000000#define BUSWIDTH    4/* can be "cfi_probe", "jedec_probe", "map_rom", 0 }; */#define PROBETYPES { "cfi_probe", 0 }#define MSG_PREFIX "EDB9307-NOR:"   /* prefix for our printk()'s */#define MTDID      "edb9307-nor"    /* for mtdparts= partitioning */static struct mtd_info *mymtd;#define MUNG_ADDR(x) ((x & 0xfffe0000) | ((x & 0x00010000) >> 15) | ((x & 0x0000ffff) << 1))__u8 edb9307nor_read8(struct map_info *map, unsigned long ofs){	return __raw_readb(map->map_priv_1 + ofs);}__u16 edb9307nor_read16(struct map_info *map, unsigned long ofs){	return __raw_readw(map->map_priv_1 + ofs);}__u32 edb9307nor_read32(struct map_info *map, unsigned long ofs){	return __raw_readl(map->map_priv_1 + ofs);}void edb9307nor_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len){	memcpy_fromio(to, map->map_priv_1 + from, len);}void edb9307nor_write8(struct map_info *map, __u8 d, unsigned long adr){	__raw_writeb(d, map->map_priv_1 + adr);	mb();}void edb9307nor_write16(struct map_info *map, __u16 d, unsigned long adr){	__raw_writew(d, map->map_priv_1 + adr);	mb();}void edb9307nor_write32(struct map_info *map, __u32 d, unsigned long adr){	__raw_writel(d, map->map_priv_1 + adr);	mb();}void edb9307nor_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len){	memcpy_toio(map->map_priv_1 + to, from, len);}__u8 edb9307nor16_read8(struct map_info *map, unsigned long ofs){	return __raw_readb(map->map_priv_1 + MUNG_ADDR(ofs));}__u16 edb9307nor16_read16(struct map_info *map, unsigned long ofs){	if (ofs == 0x40)		return 0;	return __raw_readw(map->map_priv_1 + MUNG_ADDR(ofs));}__u32 edb9307nor16_read32(struct map_info *map, unsigned long ofs){	return __raw_readl(map->map_priv_1 + MUNG_ADDR(ofs));}void edb9307nor16_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len){	while (len--) {		*(short *)to++ = edb9307nor16_read16(map, from);		from += 2;	}}void edb9307nor16_write8(struct map_info *map, __u8 d, unsigned long adr){	__raw_writeb(d, map->map_priv_1 + MUNG_ADDR(adr));	mb();}void edb9307nor16_write16(struct map_info *map, __u16 d, unsigned long adr){	__raw_writew(d, map->map_priv_1 + MUNG_ADDR(adr));	mb();}void edb9307nor16_write32(struct map_info *map, __u32 d, unsigned long adr){	__raw_writel(d, map->map_priv_1 + MUNG_ADDR(adr));	mb();}void edb9307nor16_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len){	while (len--) {		edb9307nor16_write16(map, *(short *)from++, to);		to += 2;	}}struct map_info edb9307nor_map = {	name: "NOR flash on EDB9307",	size: WINDOW_SIZE,	buswidth: BUSWIDTH,	read8: edb9307nor_read8,	read16: edb9307nor_read16,	read32: edb9307nor_read32,	copy_from: edb9307nor_copy_from,	write8: edb9307nor_write8,	write16: edb9307nor_write16,	write32: edb9307nor_write32,	copy_to: edb9307nor_copy_to};#ifdef CONFIG_MTD_PARTITIONS#ifdef CONFIG_MTD_CMDLINE_PARTSint parse_cmdline_partitions(struct mtd_info *master, 			     struct mtd_partition **pparts,			     const char *mtd_id);#endif#ifdef CONFIG_MTD_REDBOOT_PARTSextern int parse_redboot_partitions(struct mtd_info *master,	struct mtd_partition **pparts);#endif#endifstatic int                   mtd_parts_nb = 0;static struct mtd_partition *mtd_parts    = 0;static int edb9307nor_reboot(struct notifier_block *this, unsigned long event,                             void *x){	switch (event) {	case SYS_HALT:	case SYS_POWER_OFF:	case SYS_RESTART:		edb9307nor_write32(&edb9307nor_map, 0x00f000f0, 0);		edb9307nor_write32(&edb9307nor_map, 0x00ff00ff, 0);	default:		return NOTIFY_DONE;	}}static struct notifier_block edb9307nor_notifier = {	edb9307nor_reboot,	NULL,	5};int __init init_edb9307nor(void){	static const char *rom_probe_types[] = PROBETYPES;	const char **type;	const char *part_type = 0;	unsigned long config;#ifdef CONFIG_ARCH_EP93XX_CSN0	config = inl(SMCBCR0);#endif#ifdef CONFIG_ARCH_EP93XX_CSN1	config = inl(SMCBCR1);#endif#ifdef CONFIG_ARCH_EP93XX_CSN2	config = inl(SMCBCR2);#endif#ifdef CONFIG_ARCH_EP93XX_CSN3	config = inl(SMCBCR3);#endif#ifdef CONFIG_ARCH_EP93XX_CSN6	config = inl(SMCBCR6);#endif#ifdef CONFIG_ARCH_EP93XX_CSN7	config = inl(SMCBCR7);#endif	if ((config & SMCBCR_MW_MASK) == SMCBCR_MW_16) {		edb9307nor_map.size >>= 1;		edb9307nor_map.buswidth >>= 1;		edb9307nor_map.read8 = edb9307nor16_read8;		edb9307nor_map.read16 = edb9307nor16_read16;		edb9307nor_map.read32 = edb9307nor16_read32;		edb9307nor_map.copy_from = edb9307nor16_copy_from;		edb9307nor_map.write8 = edb9307nor16_write8;		edb9307nor_map.write16 = edb9307nor16_write16;		edb9307nor_map.write32 = edb9307nor16_write32;		edb9307nor_map.copy_to = edb9307nor16_copy_to;	}       	printk(KERN_NOTICE MSG_PREFIX " 0x%08x at 0x%08x\n", 	       edb9307nor_map.size, WINDOW_ADDR);	edb9307nor_map.map_priv_1 = (unsigned long)	  ioremap(WINDOW_ADDR, edb9307nor_map.size);	if (!edb9307nor_map.map_priv_1) {		printk(MSG_PREFIX "failed to ioremap\n");		return -EIO;	}	mymtd = 0;	type = rom_probe_types;	for(; !mymtd && *type; type++) {		mymtd = do_map_probe(*type, &edb9307nor_map);	}	if (mymtd) {		mymtd->module = THIS_MODULE;		if ((config & SMCBCR_MW_MASK) == SMCBCR_MW_16) {			edb9307nor_map.read8 = edb9307nor_read8;			edb9307nor_map.read16 = edb9307nor_read16;			edb9307nor_map.read32 = edb9307nor_read32;			edb9307nor_map.copy_from = edb9307nor_copy_from;			edb9307nor_map.write8 = edb9307nor_write8;			edb9307nor_map.write16 = edb9307nor_write16;			edb9307nor_map.write32 = edb9307nor_write32;			edb9307nor_map.copy_to = edb9307nor_copy_to;		}#ifdef CONFIG_MTD_PARTITIONS#ifdef CONFIG_MTD_CMDLINE_PARTS		mtd_parts_nb = parse_cmdline_partitions(mymtd, &mtd_parts, MTDID);		if (mtd_parts_nb > 0)		  part_type = "command line";#endif		#ifdef CONFIG_MTD_REDBOOT_PARTS		if (mtd_parts_nb <= 0) {			mtd_parts_nb = parse_redboot_partitions(mymtd, &mtd_parts);			if (mtd_parts_nb > 0) {				part_type = "RedBoot";			}		}#endif#endif		add_mtd_device(mymtd);		if (mtd_parts_nb <= 0)		  printk(KERN_NOTICE MSG_PREFIX "no partition info available\n");		else		{			printk(KERN_NOTICE MSG_PREFIX			       "using %s partition definition\n", part_type);			add_mtd_partitions(mymtd, mtd_parts, mtd_parts_nb);		}		register_reboot_notifier(&edb9307nor_notifier);		return 0;	}	iounmap((void *)edb9307nor_map.map_priv_1);	return -ENXIO;}static void __exit cleanup_edb9307nor(void){	if (mymtd) {		del_mtd_device(mymtd);		map_destroy(mymtd);	}	if (edb9307nor_map.map_priv_1) {		iounmap((void *)edb9307nor_map.map_priv_1);		edb9307nor_map.map_priv_1 = 0;	}}module_init(init_edb9307nor);module_exit(cleanup_edb9307nor);MODULE_LICENSE("GPL");MODULE_AUTHOR("Marius Groeger <mag@sysgo.de>");MODULE_DESCRIPTION("Generic configurable MTD map driver");

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产高清一区| 欧美一区二区三区公司| 日韩成人免费电影| 中文字幕欧美日韩一区| 欧美一卡二卡三卡四卡| 91在线观看视频| 国产福利一区二区三区视频| 日日噜噜夜夜狠狠视频欧美人| 日本一区二区免费在线观看视频| 在线不卡一区二区| 欧美无人高清视频在线观看| caoporn国产精品| 精品一区二区三区免费播放| 日韩精品三区四区| 亚洲国产视频一区二区| 亚洲日韩欧美一区二区在线| 国产欧美一区二区精品忘忧草| 日韩欧美精品在线| 69p69国产精品| 精品国产凹凸成av人网站| 91国内精品野花午夜精品| 99久久国产综合精品女不卡| 国产91精品露脸国语对白| 国内精品伊人久久久久影院对白| 日韩中文字幕亚洲一区二区va在线 | 成人精品免费看| 久久99精品国产麻豆婷婷| 日韩电影一区二区三区四区| 亚洲精品乱码久久久久久| 1024精品合集| 中文字幕一区二区三区不卡在线| 久久精品人人做人人爽人人| 久久午夜老司机| 精品国产123| 久久蜜臀精品av| 精品理论电影在线| 精品久久免费看| 2023国产精华国产精品| 久久这里只有精品首页| 亚洲精品在线免费观看视频| 精品国产三级电影在线观看| 精品三级在线观看| 久久综合九色综合欧美亚洲| 久久精品视频网| 欧美国产1区2区| 亚洲色欲色欲www| 亚洲美女少妇撒尿| 亚洲激情在线播放| 午夜精品久久久久久久久久久 | 国产成人一区在线| 成人小视频免费在线观看| 成人伦理片在线| 色综合欧美在线| 91精品91久久久中77777| 欧美日韩一二三区| 日韩一区二区精品在线观看| 精品日韩99亚洲| 日本一区二区视频在线| 成人免费在线观看入口| 亚洲一区免费观看| 麻豆专区一区二区三区四区五区| 久久精品国产网站| 国产91精品精华液一区二区三区| 91在线视频观看| 欧美日韩国产电影| 久久久综合九色合综国产精品| 国产精品美女久久久久久久| 一区二区三区在线看| 日韩电影在线一区二区三区| 成人免费黄色在线| 91极品美女在线| 日韩久久精品一区| 国产精品大尺度| 青青草国产成人av片免费| 国产成人免费高清| 欧美人牲a欧美精品| 久久久久久久久久久99999| 亚洲蜜臀av乱码久久精品蜜桃| 图片区日韩欧美亚洲| 国产精品一区二区黑丝| 在线观看亚洲精品| 久久在线免费观看| 亚洲综合色区另类av| 韩国av一区二区三区在线观看| 欧美在线视频全部完| 26uuu欧美| 亚洲一区在线视频观看| 国产成人av福利| 欧美日韩一二区| 一色桃子久久精品亚洲| 伦理电影国产精品| 91麻豆.com| 2020国产精品| 日韩中文字幕区一区有砖一区| 波多野洁衣一区| 精品国产免费视频| 午夜久久久影院| 色香蕉成人二区免费| 26uuu精品一区二区在线观看| 一区二区三区精品视频| 国产成人免费视频精品含羞草妖精| 欧美日韩精品一区二区三区| 欧美国产在线观看| 蜜臀va亚洲va欧美va天堂| 色欧美日韩亚洲| 亚洲国产精品国自产拍av| 美女一区二区三区在线观看| 欧美在线观看你懂的| 亚洲欧洲日韩一区二区三区| 极品少妇xxxx精品少妇| 337p亚洲精品色噜噜噜| 一区二区三区高清在线| 成人综合在线观看| 精品少妇一区二区三区视频免付费| 亚洲成人在线观看视频| 91影视在线播放| 国产精品毛片久久久久久久| 国产激情91久久精品导航| 精品久久久久一区| 青青草成人在线观看| 欧美二区三区91| 亚洲第一电影网| 欧美视频一区二| 一区二区三区欧美| 色88888久久久久久影院按摩| 欧美国产综合一区二区| 国产成a人无v码亚洲福利| 久久亚洲综合色一区二区三区| 蜜臀精品一区二区三区在线观看| 欧美精品国产精品| 天堂久久一区二区三区| 欧美日韩免费一区二区三区视频| 亚洲国产成人精品视频| 欧美三级日韩在线| 亚洲成人免费视| 91精品国产综合久久久久久久久久| 五月激情综合婷婷| 在线成人免费视频| 麻豆高清免费国产一区| 日韩精品影音先锋| 国产一区二区三区香蕉| 久久久久国产精品免费免费搜索| 国产伦精品一区二区三区免费迷 | 免费看日韩精品| 日韩欧美国产三级| 国产精品综合av一区二区国产馆| 久久久www成人免费无遮挡大片 | 欧美精品日韩一本| 日韩高清在线不卡| 久久一区二区三区四区| 成人免费毛片嘿嘿连载视频| 亚洲视频在线一区观看| 色美美综合视频| 天堂va蜜桃一区二区三区| 欧美一区二区三区视频免费| 日本aⅴ精品一区二区三区| 精品久久国产字幕高潮| 国产成人啪免费观看软件| 中文字幕色av一区二区三区| 欧美午夜一区二区| 免费欧美在线视频| 国产欧美一区二区三区沐欲| 91在线观看免费视频| 日韩精品1区2区3区| 久久综合久久99| 色婷婷av一区| 蜜桃久久久久久久| 国产精品欧美综合在线| 在线观看av一区二区| 日日欢夜夜爽一区| 国产欧美在线观看一区| 色久综合一二码| 毛片av一区二区| 国产精品久久久久久久久久免费看 | 亚洲图片欧美一区| 欧美电视剧免费全集观看| 成人91在线观看| 日本视频在线一区| 国产精品每日更新在线播放网址 | 91福利区一区二区三区| 蜜臀av在线播放一区二区三区| 国产日韩欧美精品一区| 欧美日韩一级二级| 福利一区二区在线| 日本少妇一区二区| 国产精品精品国产色婷婷| 欧美精品1区2区3区| 成人网页在线观看| 视频一区二区不卡| 中文字幕在线一区| 日韩一二三区视频| 91久久久免费一区二区| 国产福利91精品一区| 五月激情六月综合| 又紧又大又爽精品一区二区| 久久久久国产精品人| 欧美一区二区三区不卡| 欧美中文字幕一区二区三区亚洲| 成人丝袜18视频在线观看| 久久精工是国产品牌吗|