Lines Matching defs:flash
2 /* flash.c: Allow mmap access to the OBP Flash, for OBP updates.
31 } flash;
40 if (flash.read_base == flash.write_base) {
41 addr = flash.read_base;
42 size = flash.read_size;
50 addr = flash.read_base;
51 size = flash.read_size;
53 addr = flash.write_base;
54 size = flash.write_size;
87 if (file->f_pos > flash.read_size)
88 file->f_pos = flash.read_size;
91 file->f_pos = flash.read_size;
108 if (count > flash.read_size - p)
109 count = flash.read_size - p;
112 u8 data = upa_readb(flash.read_base + p + i);
126 if (test_and_set_bit(0, (void *)&flash.busy) != 0) {
139 flash.busy = 0;
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;
172 flash.read_size = resource_size(&op->resource[0]);
174 flash.write_base = op->resource[1].start;
175 flash.write_size = resource_size(&op->resource[1]);
177 flash.write_base = op->resource[0].start;
178 flash.write_size = resource_size(&op->resource[0]);
180 flash.busy = 0;
184 flash.read_base, flash.read_size,
185 flash.write_base, flash.write_size);
207 .name = "flash",