Lines Matching full:flash

2 /* flash.c: Allow mmap access to the OBP Flash, for OBP updates.
31 } flash; variable
40 if (flash.read_base == flash.write_base) { in flash_mmap()
41 addr = flash.read_base; in flash_mmap()
42 size = flash.read_size; in flash_mmap()
50 addr = flash.read_base; in flash_mmap()
51 size = flash.read_size; in flash_mmap()
53 addr = flash.write_base; in flash_mmap()
54 size = flash.write_size; in flash_mmap()
87 if (file->f_pos > flash.read_size) in flash_llseek()
88 file->f_pos = flash.read_size; in flash_llseek()
91 file->f_pos = flash.read_size; in flash_llseek()
108 if (count > flash.read_size - p) in flash_read()
109 count = flash.read_size - p; in flash_read()
112 u8 data = upa_readb(flash.read_base + p + i); in flash_read()
126 if (test_and_set_bit(0, (void *)&flash.busy) != 0) { in flash_open()
139 flash.busy = 0; in flash_release()
146 /* no write to the Flash, use mmap
147 * and play flash dependent tricks.
157 static struct miscdevice flash_dev = { SBUS_FLASH_MINOR, "flash", &flash_fops };
171 flash.read_base = op->resource[0].start; in flash_probe()
172 flash.read_size = resource_size(&op->resource[0]); in flash_probe()
174 flash.write_base = op->resource[1].start; in flash_probe()
175 flash.write_size = resource_size(&op->resource[1]); in flash_probe()
177 flash.write_base = op->resource[0].start; in flash_probe()
178 flash.write_size = resource_size(&op->resource[0]); in flash_probe()
180 flash.busy = 0; in flash_probe()
182 printk(KERN_INFO "%pOF: OBP Flash, RD %lx[%lx] WR %lx[%lx]\n", in flash_probe()
184 flash.read_base, flash.read_size, in flash_probe()
185 flash.write_base, flash.write_size); in flash_probe()
207 .name = "flash",