Lines Matching refs:offset

267 static __u8 read8 (__u32 offset)  in read8()  argument
269 volatile __u8 *data = (__u8 *) (FLASH_OFFSET + offset); in read8()
271 printk (KERN_DEBUG "%s(): 0x%.8x -> 0x%.2x\n", __func__, offset, *data); in read8()
276 static __u32 read32 (__u32 offset) in read32() argument
278 volatile __u32 *data = (__u32 *) (FLASH_OFFSET + offset); in read32()
280 printk (KERN_DEBUG "%s(): 0x%.8x -> 0x%.8x\n", __func__, offset, *data); in read32()
285 static void write32 (__u32 x,__u32 offset) in write32() argument
287 volatile __u32 *data = (__u32 *) (FLASH_OFFSET + offset); in write32()
290 printk (KERN_DEBUG "%s(): 0x%.8x <- 0x%.8x\n", __func__, offset, *data); in write32()
328 static inline int erase_block (__u32 offset) in erase_block() argument
333 printk (KERN_DEBUG "%s(): 0x%.8x\n", __func__, offset); in erase_block()
337 write32 (DATA_TO_FLASH (ERASE_SETUP),offset); in erase_block()
338 write32 (DATA_TO_FLASH (ERASE_CONFIRM),offset); in erase_block()
343 write32 (DATA_TO_FLASH (STATUS_READ),offset); in erase_block()
344 status = FLASH_TO_DATA (read32 (offset)); in erase_block()
349 write32 (DATA_TO_FLASH (READ_ARRAY),offset); in erase_block()
354 printk (KERN_WARNING "%s: erase error at address 0x%.8x.\n",module_name,offset); in erase_block()
379 for (i = 0; i < mtd->numeraseregions && instr->addr >= mtd->eraseregions[i].offset; i++) ; in flash_erase()
401 … for (; i < mtd->numeraseregions && instr->addr + instr->len >= mtd->eraseregions[i].offset; i++) ; in flash_erase()
425 …if (addr == mtd->eraseregions[i].offset + (mtd->eraseregions[i].erasesize * mtd->eraseregions[i].n… in flash_erase()
474 static inline int write_dword (__u32 offset,__u32 x) in write_dword() argument
479 printk (KERN_DEBUG "%s(): 0x%.8x <- 0x%.8x\n", __func__, offset, x); in write_dword()
483 write32 (DATA_TO_FLASH (PGM_SETUP),offset); in write_dword()
486 write32 (x,offset); in write_dword()
491 write32 (DATA_TO_FLASH (STATUS_READ),offset); in write_dword()
492 status = FLASH_TO_DATA (read32 (offset)); in write_dword()
497 write32 (DATA_TO_FLASH (READ_ARRAY),offset); in write_dword()
500 if ((status & STATUS_PGM_ERR) || read32 (offset) != x) in write_dword()
502 printk (KERN_WARNING "%s: write error at address 0x%.8x.\n",module_name,offset); in write_dword()
574 .offset = 0x00000000,
580 .offset = FLASH_BLOCKSIZE_PARAM * FLASH_NUMBLOCKS_16m_PARAM,
590 .offset = BLOB_START,
596 .offset = KERNEL_START, /* MTDPART_OFS_APPEND */
602 .offset = INITRD_START, /* MTDPART_OFS_APPEND */
652 result,mtd.eraseregions[result].offset, in lart_flash_init()
665 result,lart_partitions[result].offset, in lart_flash_init()