Lines Matching +full:input +full:- +full:value

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
28 int write_eeprom_reg (struct eth_device *dev, int value, int reg);
36 int c, i, j, done, line, reg, value, start, what; in smc91111_eeprom() local
37 char input[50]; in smc91111_eeprom() local
46 printf ("Actual U-Boot ABI version %d\n", in smc91111_eeprom()
75 c -= ('a' - 'A'); in smc91111_eeprom()
81 input[i] = 0; in smc91111_eeprom()
88 case 0x03: /* ^C - break */ in smc91111_eeprom()
89 input[0] = 0; in smc91111_eeprom()
96 case 0x08: /* ^H - backspace */ in smc91111_eeprom()
97 case 0x7F: /* DEL - backspace */ in smc91111_eeprom()
100 i--; in smc91111_eeprom()
109 input[i] = c; in smc91111_eeprom()
120 input[i] = c; in smc91111_eeprom()
131 input[i] = 0; in smc91111_eeprom()
133 switch (input[0]) { in smc91111_eeprom()
135 /* Line should be w reg value */ in smc91111_eeprom()
138 value = 0; in smc91111_eeprom()
140 while ((input[i] != ' ') && (input[i] != 0)) in smc91111_eeprom()
143 if (input[i] != 0) in smc91111_eeprom()
147 switch (input[i]) { in smc91111_eeprom()
160 while ((input[i] != ' ') && (input[i] != 0)) in smc91111_eeprom()
162 if (input[i] != 0) in smc91111_eeprom()
167 while ((input[i] != ' ') && (input[i] != 0)) { in smc91111_eeprom()
168 j = input[i] - 0x30; in smc91111_eeprom()
170 j -= 0x07; in smc91111_eeprom()
176 while ((input[i] != ' ') && (input[i] != 0)) in smc91111_eeprom()
179 if (input[i] != 0) in smc91111_eeprom()
184 /* Get the value to write */ in smc91111_eeprom()
186 while ((input[i] != ' ') && (input[i] != 0)) { in smc91111_eeprom()
187 j = input[i] - 0x30; in smc91111_eeprom()
189 j -= 0x07; in smc91111_eeprom()
191 value = (value * 0x10) + j; in smc91111_eeprom()
197 printf ("Writing EEPROM register %02x with %04x\n", reg, value); in smc91111_eeprom()
198 write_eeprom_reg (&dev, value, reg); in smc91111_eeprom()
201 printf ("Writing MAC register bank %i, reg %02x with %04x\n", reg >> 4, reg & 0xE, value); in smc91111_eeprom()
203 SMC_outw (&dev, value, reg & 0xE); in smc91111_eeprom()
239 while ((SMC_inw (dev, CTL_REG) & CTL_RELOAD) && --i) in copy_from_eeprom()
280 printf ("IOS2-0 "); in dump_eeprom()
320 while ((SMC_inw (dev, CTL_REG) & CTL_RELOAD) && --timeout) in read_eeprom_reg()
331 int write_eeprom_reg (struct eth_device *dev, int value, int reg) in write_eeprom_reg() argument
339 SMC_outw (dev, value, GP_REG); in write_eeprom_reg()
343 while ((SMC_inw (dev, CTL_REG) & CTL_STORE) && --timeout) in write_eeprom_reg()