예제 #1
0
static void tsunami_flash_copy_to(
	struct map_info *map, unsigned long offset, 
	const void *addr, ssize_t len)
{
	const unsigned char *src;
	src = addr;
	while(len && (offset < MAX_TIG_FLASH_SIZE)) {
		tsunami_tig_writeb(*src, offset);
		offset++;
		src++;
		len--;
	}
}
예제 #2
0
static int __init init_tsunami_flash(void)
{
	static const char *rom_probe_types[] = { "cfi_probe", "jedec_probe", "map_rom", 0 };
	char **type;

	tsunami_tig_writeb(FLASH_ENABLE_BYTE, FLASH_ENABLE_PORT);
	
	tsunami_flash_mtd = 0;
	type = rom_probe_types;
	for(; !tsunami_flash_mtd && *type; type++) {
		tsunami_flash_mtd = do_map_probe(*type, &tsunami_flash_map);
	}
	if (tsunami_flash_mtd) {
		tsunami_flash_mtd->module = THIS_MODULE;
		add_mtd_device(tsunami_flash_mtd);
		return 0;
	}
	return -ENXIO;
}
예제 #3
0
static void tsunami_flash_write8(struct map_info *map, __u8 value, unsigned long offset)
{
	tsunami_tig_writeb(value, offset);
}
예제 #4
0
static void tsunami_flash_write8(struct map_info *map, map_word value, unsigned long offset)
{
	tsunami_tig_writeb(value.x[0], offset);
}