Lines Matching +full:j +full:- +full:to +full:- +full:k
1 // SPDX-License-Identifier: GPL-2.0+
7 * - Wolfgang Denk, DENX Software Engineering, wd@denx.de
8 * Das U-Boot
9 * - Ladislav Michl ladis@linux-mips.org
10 * A rejected patch on the U-Boot mailing list
36 int c, i, j, done, line, reg, value, start, what; in smc91111_eeprom() local
46 printf ("Actual U-Boot ABI version %d\n", in smc91111_eeprom()
75 c -= ('a' - 'A'); in smc91111_eeprom()
88 case 0x03: /* ^C - break */ in smc91111_eeprom()
96 case 0x08: /* ^H - backspace */ in smc91111_eeprom()
97 case 0x7F: /* DEL - backspace */ in smc91111_eeprom()
100 i--; in smc91111_eeprom()
139 /* Skip to the next space or end) */ in smc91111_eeprom()
146 /* Are we writing to EEPROM or MAC */ in smc91111_eeprom()
159 /* skip to the next space or end */ in smc91111_eeprom()
165 /* Find register to write into */ in smc91111_eeprom()
166 j = 0; in smc91111_eeprom()
168 j = input[i] - 0x30; in smc91111_eeprom()
169 if (j >= 0xA) { in smc91111_eeprom()
170 j -= 0x07; in smc91111_eeprom()
172 reg = (reg * 0x10) + j; in smc91111_eeprom()
184 /* Get the value to write */ in smc91111_eeprom()
185 j = 0; in smc91111_eeprom()
187 j = input[i] - 0x30; in smc91111_eeprom()
188 if (j >= 0xA) { in smc91111_eeprom()
189 j -= 0x07; in smc91111_eeprom()
191 value = (value * 0x10) + j; in smc91111_eeprom()
239 while ((SMC_inw (dev, CTL_REG) & CTL_RELOAD) && --i) in copy_from_eeprom()
244 printf ("EEPROM contents copied to MAC\n"); in copy_from_eeprom()
251 int i, j, k, mac[6]; in print_macaddr() local
262 for (j = 0x20; j < 0x23; j++) { in print_macaddr()
263 k = read_eeprom_reg (dev, j); in print_macaddr()
264 mac[i] = k & 0xFF; in print_macaddr()
266 mac[i] = k >> 8; in print_macaddr()
278 int j, k; in dump_eeprom() local
280 printf ("IOS2-0 "); in dump_eeprom()
281 for (j = 0; j < 8; j++) { in dump_eeprom()
282 printf ("%03x ", j); in dump_eeprom()
286 for (k = 0; k < 4; k++) { in dump_eeprom()
287 if (k == 0) in dump_eeprom()
289 if (k == 1) in dump_eeprom()
291 if ((k == 2) || (k == 3)) in dump_eeprom()
293 for (j = 0; j < 0x20; j += 4) { in dump_eeprom()
294 printf ("%02x:%04x ", j + k, in dump_eeprom()
295 read_eeprom_reg (dev, j + k)); in dump_eeprom()
300 for (j = 0x20; j < 0x40; j++) { in dump_eeprom()
301 if ((j & 0x07) == 0) in dump_eeprom()
303 printf ("%02x:%04x ", j, read_eeprom_reg (dev, j)); in dump_eeprom()
320 while ((SMC_inw (dev, CTL_REG) & CTL_RELOAD) && --timeout) in read_eeprom_reg()
343 while ((SMC_inw (dev, CTL_REG) & CTL_STORE) && --timeout) in write_eeprom_reg()
356 int i, j; in dump_reg() local
359 for (j = 0; j < 4; j++) { in dump_reg()
360 printf ("Bank%i ", j); in dump_reg()
365 for (j = 0; j < 4; j++) { in dump_reg()
366 SMC_SELECT_BANK (dev, j); in dump_reg()