Lines Matching +full:0 +full:x01100000
71 #define FLASH_OFFSET 0xe8000000 /* see linux/arch/arm/mach-sa1100/lart.c */
75 #define PART_BLOB_START 0x00000000
91 #define READ_ARRAY 0x00FF00FF /* Read Array/Reset */
92 #define READ_ID_CODES 0x00900090 /* Read Identifier Codes */
93 #define ERASE_SETUP 0x00200020 /* Block Erase */
94 #define ERASE_CONFIRM 0x00D000D0 /* Block Erase and Program Resume */
95 #define PGM_SETUP 0x00400040 /* Program */
96 #define STATUS_READ 0x00700070 /* Read Status Register */
97 #define STATUS_CLEAR 0x00500050 /* Clear Status Register */
98 #define STATUS_BUSY 0x00800080 /* Write State Machine Status (WSMS) */
99 #define STATUS_ERASE_ERR 0x00200020 /* Erase Status (ES) */
100 #define STATUS_PGM_ERR 0x00100010 /* Program Status (PS) */
105 #define FLASH_MANUFACTURER 0x00890089
106 #define FLASH_DEVICE_8mbit_TOP 0x88f188f1
107 #define FLASH_DEVICE_8mbit_BOTTOM 0x88f288f2
108 #define FLASH_DEVICE_16mbit_TOP 0x88f388f3
109 #define FLASH_DEVICE_16mbit_BOTTOM 0x88f488f4
118 * 0 20 | 0 12
122 * 4 24 | 4 0
139 (((x) & 0x08009000) >> 11) + \
140 (((x) & 0x00002000) >> 10) + \
141 (((x) & 0x04004000) >> 8) + \
142 (((x) & 0x00000010) >> 4) + \
143 (((x) & 0x91000820) >> 3) + \
144 (((x) & 0x22080080) >> 2) + \
145 ((x) & 0x40000400) + \
146 (((x) & 0x00040040) << 1) + \
147 (((x) & 0x00110000) << 4) + \
148 (((x) & 0x00220100) << 5) + \
149 (((x) & 0x00800208) << 6) + \
150 (((x) & 0x00400004) << 9) + \
151 (((x) & 0x00000001) << 12) + \
152 (((x) & 0x00000002) << 13) \
158 (((x) & 0x00010012) << 11) + \
159 (((x) & 0x00000008) << 10) + \
160 (((x) & 0x00040040) << 8) + \
161 (((x) & 0x00000001) << 4) + \
162 (((x) & 0x12200104) << 3) + \
163 (((x) & 0x08820020) << 2) + \
164 ((x) & 0x40000400) + \
165 (((x) & 0x00080080) >> 1) + \
166 (((x) & 0x01100000) >> 4) + \
167 (((x) & 0x04402000) >> 5) + \
168 (((x) & 0x20008200) >> 6) + \
169 (((x) & 0x80000800) >> 9) + \
170 (((x) & 0x00001000) >> 12) + \
171 (((x) & 0x00004000) >> 13) \
179 * 0 2 | 0 2
215 (((x) & 0x00000f00) >> 4) + \
216 (((x) & 0x00042000) << 1) + \
217 (((x) & 0x0009c003) << 2) + \
218 (((x) & 0x00021080) << 3) + \
219 (((x) & 0x00000010) << 4) + \
220 (((x) & 0x00000040) << 5) + \
221 (((x) & 0x00000024) << 7) + \
222 (((x) & 0x00000008) << 10) \
228 (((x) << 4) & 0x00000f00) + \
229 (((x) >> 1) & 0x00042000) + \
230 (((x) >> 2) & 0x0009c003) + \
231 (((x) >> 3) & 0x00021080) + \
232 (((x) >> 4) & 0x00000010) + \
233 (((x) >> 5) & 0x00000040) + \
234 (((x) >> 7) & 0x00000024) + \
235 (((x) >> 10) & 0x00000008) \
241 (((x) & 0x00000080) >> 3) + \
242 (((x) & 0x00000040) >> 1) + \
243 (((x) & 0x00052020) << 1) + \
244 (((x) & 0x00084f03) << 2) + \
245 (((x) & 0x00029010) << 3) + \
246 (((x) & 0x00000008) << 5) + \
247 (((x) & 0x00000004) << 7) \
253 (((x) << 3) & 0x00000080) + \
254 (((x) << 1) & 0x00000040) + \
255 (((x) >> 1) & 0x00052020) + \
256 (((x) >> 2) & 0x00084f03) + \
257 (((x) >> 3) & 0x00029010) + \
258 (((x) >> 5) & 0x00000008) + \
259 (((x) >> 7) & 0x00000004) \
268 printk (KERN_DEBUG "%s(): 0x%.8x -> 0x%.2x\n", __func__, offset, *data); in read8()
277 printk (KERN_DEBUG "%s(): 0x%.8x -> 0x%.8x\n", __func__, offset, *data); in read32()
287 printk (KERN_DEBUG "%s(): 0x%.8x <- 0x%.8x\n", __func__, offset, *data); in write32()
299 * Returns 1 if we found 16mbit flash memory on LART, 0 otherwise.
306 write32 (DATA_TO_FLASH (READ_ID_CODES),0x00000000); in flash_probe()
310 manufacturer = FLASH_TO_DATA (read32 (ADDR_TO_FLASH_U2 (0x00000000))); in flash_probe()
311 devtype = FLASH_TO_DATA (read32 (ADDR_TO_FLASH_U2 (0x00000001))); in flash_probe()
314 write32 (DATA_TO_FLASH (READ_ARRAY),0x00000000); in flash_probe()
323 * Returns 1 if successful, 0 otherwise.
330 printk (KERN_DEBUG "%s(): 0x%.8x\n", __func__, offset); in erase_block()
343 while ((~status & STATUS_BUSY) != 0); in erase_block()
351 printk (KERN_WARNING "%s: erase error at address 0x%.8x.\n",module_name,offset); in erase_block()
352 return (0); in erase_block()
364 printk (KERN_DEBUG "%s(addr = 0x%.8x, len = %d)\n", __func__, instr->addr, instr->len); in flash_erase()
376 for (i = 0; i < mtd->numeraseregions && instr->addr >= mtd->eraseregions[i].offset; i++) ; in flash_erase()
385 if (i < 0 || (instr->addr & (mtd->eraseregions[i].erasesize - 1))) in flash_erase()
402 if (i < 0 || ((instr->addr + instr->len) & (mtd->eraseregions[i].erasesize - 1))) in flash_erase()
422 return (0); in flash_erase()
428 printk (KERN_DEBUG "%s(from = 0x%.8x, len = %d)\n", __func__, (__u32)from, len); in flash_read()
459 return (0); in flash_read()
466 * Returns 1 if successful, 0 otherwise.
473 printk (KERN_DEBUG "%s(): 0x%.8x <- 0x%.8x\n", __func__, offset, x); in write_dword()
488 while ((~status & STATUS_BUSY) != 0); in write_dword()
496 printk (KERN_WARNING "%s: write error at address 0x%.8x.\n",module_name,offset); in write_dword()
497 return (0); in write_dword()
509 printk (KERN_DEBUG "%s(to = 0x%.8x, len = %d)\n", __func__, (__u32)to, len); in flash_write()
513 if (!len) return (0); in flash_write()
515 /* first, we write a 0xFF.... padded byte until we reach a dword boundary */ in flash_write()
521 i = n = 0; in flash_write()
523 while (gap--) tmp[i++] = 0xFF; in flash_write()
528 while (i < BUSWIDTH) tmp[i++] = 0xFF; in flash_write()
548 /* top up the last unaligned bytes, padded with 0xFF.... */ in flash_write()
551 i = n = 0; in flash_write()
554 while (i < BUSWIDTH) tmp[i++] = 0xFF; in flash_write()
561 return (0); in flash_write()
571 .offset = 0x00000000,
608 memset (&mtd,0,sizeof (mtd)); in lart_flash_init()
634 "mtd.size = 0x%.8x (%uM)\n" in lart_flash_init()
635 "mtd.erasesize = 0x%.8x (%uK)\n" in lart_flash_init()
643 for (result = 0; result < mtd.numeraseregions; result++) in lart_flash_init()
646 "mtd.eraseregions[%d].offset = 0x%.8x\n" in lart_flash_init()
647 "mtd.eraseregions[%d].erasesize = 0x%.8x (%uK)\n" in lart_flash_init()
655 for (result = 0; result < ARRAY_SIZE(lart_partitions); result++) in lart_flash_init()
659 "lart_partitions[%d].offset = 0x%.8x\n" in lart_flash_init()
660 "lart_partitions[%d].size = 0x%.8x (%uK)\n", in lart_flash_init()