Lines Matching defs:flash
0 /* flash.c: Allow mmap access to the OBP Flash, for OBP updates.
33 } flash;
44 if (flash.read_base == flash.write_base) {
45 addr = flash.read_base;
46 size = flash.read_size;
54 addr = flash.read_base;
55 size = flash.read_size;
57 addr = flash.write_base;
58 size = flash.write_size;
91 if (file->f_pos > flash.read_size)
92 file->f_pos = flash.read_size;
95 file->f_pos = flash.read_size;
112 if (count > flash.read_size - p)
113 count = flash.read_size - p;
116 u8 data = upa_readb(flash.read_base + p + i);
130 if (test_and_set_bit(0, (void *)&flash.busy) != 0) {
143 flash.busy = 0;
151 * and play flash dependent tricks.
161 static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops };
176 flash.read_base = op->resource[0].start;
177 flash.read_size = resource_size(&op->resource[0]);
179 flash.write_base = op->resource[1].start;
180 flash.write_size = resource_size(&op->resource[1]);
182 flash.write_base = op->resource[0].start;
183 flash.write_size = resource_size(&op->resource[0]);
185 flash.busy = 0;
189 flash.read_base, flash.read_size,
190 flash.write_base, flash.write_size);
212 .name = "flash",