Lines Matching +full:input +full:- +full:value
5 * SPDX-License-Identifier: GPL-2.0+
8 * - Wolfgang Denk, DENX Software Engineering, wd@denx.de
9 * Das U-Boot
10 * - Ladislav Michl ladis@linux-mips.org
11 * A rejected patch on the U-Boot mailing list
29 int write_eeprom_reg (struct eth_device *dev, int value, int reg);
37 int c, i, j, done, line, reg, value, start, what; in smc91111_eeprom() local
38 char input[50]; in smc91111_eeprom() local
47 printf ("Actual U-Boot ABI version %d\n", in smc91111_eeprom()
76 c -= ('a' - 'A'); in smc91111_eeprom()
82 input[i] = 0; in smc91111_eeprom()
89 case 0x03: /* ^C - break */ in smc91111_eeprom()
90 input[0] = 0; in smc91111_eeprom()
97 case 0x08: /* ^H - backspace */ in smc91111_eeprom()
98 case 0x7F: /* DEL - backspace */ in smc91111_eeprom()
101 i--; in smc91111_eeprom()
110 input[i] = c; in smc91111_eeprom()
121 input[i] = c; in smc91111_eeprom()
132 input[i] = 0; in smc91111_eeprom()
134 switch (input[0]) { in smc91111_eeprom()
136 /* Line should be w reg value */ in smc91111_eeprom()
139 value = 0; in smc91111_eeprom()
141 while ((input[i] != ' ') && (input[i] != 0)) in smc91111_eeprom()
144 if (input[i] != 0) in smc91111_eeprom()
148 switch (input[i]) { in smc91111_eeprom()
161 while ((input[i] != ' ') && (input[i] != 0)) in smc91111_eeprom()
163 if (input[i] != 0) in smc91111_eeprom()
168 while ((input[i] != ' ') && (input[i] != 0)) { in smc91111_eeprom()
169 j = input[i] - 0x30; in smc91111_eeprom()
171 j -= 0x07; in smc91111_eeprom()
177 while ((input[i] != ' ') && (input[i] != 0)) in smc91111_eeprom()
180 if (input[i] != 0) in smc91111_eeprom()
185 /* Get the value to write */ in smc91111_eeprom()
187 while ((input[i] != ' ') && (input[i] != 0)) { in smc91111_eeprom()
188 j = input[i] - 0x30; in smc91111_eeprom()
190 j -= 0x07; in smc91111_eeprom()
192 value = (value * 0x10) + j; in smc91111_eeprom()
198 printf ("Writing EEPROM register %02x with %04x\n", reg, value); in smc91111_eeprom()
199 write_eeprom_reg (&dev, value, reg); in smc91111_eeprom()
202 printf ("Writing MAC register bank %i, reg %02x with %04x\n", reg >> 4, reg & 0xE, value); in smc91111_eeprom()
204 SMC_outw (&dev, value, reg & 0xE); in smc91111_eeprom()
240 while ((SMC_inw (dev, CTL_REG) & CTL_RELOAD) && --i) in copy_from_eeprom()
281 printf ("IOS2-0 "); in dump_eeprom()
321 while ((SMC_inw (dev, CTL_REG) & CTL_RELOAD) && --timeout) in read_eeprom_reg()
332 int write_eeprom_reg (struct eth_device *dev, int value, int reg) in write_eeprom_reg() argument
340 SMC_outw (dev, value, GP_REG); in write_eeprom_reg()
344 while ((SMC_inw (dev, CTL_REG) & CTL_STORE) && --timeout) in write_eeprom_reg()