• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/drivers/mtd/chips/

Lines Matching refs:base

28 static int cfi_probe_chip(struct map_info *map, __u32 base,
39 #define xip_allowed(base, map) \
41 (void) map_read(map, base); \
46 #define xip_enable(base, map, cfi) \
48 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); \
49 cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi->device_type, NULL); \
50 xip_allowed(base, map); \
53 #define xip_disable_qry(base, map, cfi) \
56 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); \
57 cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi->device_type, NULL); \
58 cfi_send_gen_cmd(0x98, 0x55, base, map, cfi, cfi->device_type, NULL); \
64 #define xip_allowed(base, map) do { } while (0)
65 #define xip_enable(base, map, cfi) do { } while (0)
66 #define xip_disable_qry(base, map, cfi) do { } while (0)
74 static int __xipram qry_present(struct map_info *map, __u32 base,
85 val[0] = map_read(map, base + osf*0x10);
86 val[1] = map_read(map, base + osf*0x11);
87 val[2] = map_read(map, base + osf*0x12);
101 static int __xipram cfi_probe_chip(struct map_info *map, __u32 base,
106 if ((base + 0) >= map->size) {
108 "Probe at base[0x00](0x%08lx) past the end of the map(0x%08lx)\n",
109 (unsigned long)base, map->size -1);
112 if ((base + 0xff) >= map->size) {
114 "Probe at base[0x55](0x%08lx) past the end of the map(0x%08lx)\n",
115 (unsigned long)base + 0x55, map->size -1);
120 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL);
121 cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi->device_type, NULL);
122 cfi_send_gen_cmd(0x98, 0x55, base, map, cfi, cfi->device_type, NULL);
125 if (!qry_present(map,base,cfi)) {
126 xip_enable(base, map, cfi);
137 for (i=0; i < (base >> cfi->chipshift); i++) {
154 xip_allowed(base, map);
156 map->name, base, start);
162 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL);
165 if (qry_present(map, base, cfi)) {
166 xip_allowed(base, map);
168 map->name, base, start);
176 set_bit((base >> cfi->chipshift), chip_map); /* Update chip map */
180 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL);
181 cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi->device_type, NULL);
182 xip_allowed(base, map);
185 map->name, cfi->interleave, cfi->device_type*8, base,
195 __u32 base = 0;
196 int num_erase_regions = cfi_read_query(map, base + (0x10 + 28)*ofs_factor);
199 xip_enable(base, map, cfi);
217 xip_disable_qry(base, map, cfi);
219 ((unsigned char *)cfi->cfiq)[i] = cfi_read_query(map,base + (0x10 + i)*ofs_factor);
228 cfi_send_gen_cmd(0xf0, 0, base, map, cfi, cfi->device_type, NULL);
229 cfi_send_gen_cmd(0xaa, 0x555, base, map, cfi, cfi->device_type, NULL);
230 cfi_send_gen_cmd(0x55, 0x2aa, base, map, cfi, cfi->device_type, NULL);
231 cfi_send_gen_cmd(0x90, 0x555, base, map, cfi, cfi->device_type, NULL);
232 cfi->mfr = cfi_read_query16(map, base);
233 cfi->id = cfi_read_query16(map, base + ofs_factor);
236 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL);
238 cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi->device_type, NULL);
239 xip_allowed(base, map);
266 map->name, cfi->interleave, cfi->device_type*8, base,