Commit 0f89c54be92773b23d66ac401ba6acb6144100c3

Authored by Peter Tyser
Committed by Wolfgang Denk
1 parent d48eb5131d

i2c: Update references to individual i2c commands

The individual i2c commands imd, imm, inm, imw, icrc32, iprobe, iloop,
and isdram are no longer available so all references to them have been
updated to the new form of "i2c <cmd>".

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>

Showing 14 changed files with 42 additions and 78 deletions Side-by-side Diff

... ... @@ -1430,9 +1430,9 @@
1430 1430 CONFIG_SYS_I2C_NOPROBES
1431 1431  
1432 1432 This option specifies a list of I2C devices that will be skipped
1433   - when the 'i2c probe' command is issued (or 'iprobe' using the legacy
1434   - command). If CONFIG_I2C_MULTI_BUS is set, specify a list of bus-device
1435   - pairs. Otherwise, specify a 1D array of device addresses
  1433 + when the 'i2c probe' command is issued. If CONFIG_I2C_MULTI_BUS
  1434 + is set, specify a list of bus-device pairs. Otherwise, specify
  1435 + a 1D array of device addresses
1436 1436  
1437 1437 e.g.
1438 1438 #undef CONFIG_I2C_MULTI_BUS
... ... @@ -2866,14 +2866,7 @@
2866 2866 cp - memory copy
2867 2867 cmp - memory compare
2868 2868 crc32 - checksum calculation
2869   -imd - i2c memory display
2870   -imm - i2c memory modify (auto-incrementing)
2871   -inm - i2c memory modify (constant address)
2872   -imw - i2c memory write (fill)
2873   -icrc32 - i2c checksum calculation
2874   -iprobe - probe to discover valid I2C chip addresses
2875   -iloop - infinite loop on address range
2876   -isdram - print SDRAM configuration information
  2869 +i2c - I2C sub-system
2877 2870 sspi - SPI utility commands
2878 2871 base - print or set address offset
2879 2872 printenv- print environment variables
board/esd/tasreg/tasreg.c
... ... @@ -231,7 +231,7 @@
231 231  
232 232 addr = simple_strtol (argv[1], NULL, 16);
233 233  
234   - printf("iprobe looping on addr 0x%lx (cntrl-c aborts)...\n", addr);
  234 + printf("i2c probe looping on addr 0x%lx (cntrl-c aborts)...\n", addr);
235 235  
236 236 for (;;) {
237 237 i2c_probe(addr);
... ... @@ -249,7 +249,7 @@
249 249 }
250 250 U_BOOT_CMD(
251 251 iploop, 2, 1, do_iploop,
252   - "iprobe loop <addr>",
  252 + "i2c probe loop <addr>",
253 253 NULL
254 254 );
255 255  
... ... @@ -27,11 +27,6 @@
27 27 * There are several parameters in many of the commands that bear further
28 28 * explanations:
29 29 *
30   - * Two of the commands (imm and imw) take a byte/word/long modifier
31   - * (e.g. imm.w specifies the word-length modifier). This was done to
32   - * allow manipulating word-length registers. It was not done on any other
33   - * commands because it was not deemed useful.
34   - *
35 30 * {i2c_chip} is the I2C chip address (the first byte sent on the bus).
36 31 * Each I2C chip on the bus has a unique address. On the I2C data bus,
37 32 * the address is the upper seven bits and the LSB is the "read/write"
38 33  
39 34  
... ... @@ -69,11 +64,11 @@
69 64 * {addr} field (since .1 is the default, it doesn't actually have to
70 65 * be specified). Examples: given a memory chip at I2C chip address
71 66 * 0x50, the following would happen...
72   - * imd 50 0 10 display 16 bytes starting at 0x000
  67 + * i2c md 50 0 10 display 16 bytes starting at 0x000
73 68 * On the bus: <S> A0 00 <E> <S> A1 <rd> ... <rd>
74   - * imd 50 100 10 display 16 bytes starting at 0x100
  69 + * i2c md 50 100 10 display 16 bytes starting at 0x100
75 70 * On the bus: <S> A2 00 <E> <S> A3 <rd> ... <rd>
76   - * imd 50 210 10 display 16 bytes starting at 0x210
  71 + * i2c md 50 210 10 display 16 bytes starting at 0x210
77 72 * On the bus: <S> A4 10 <E> <S> A5 <rd> ... <rd>
78 73 * This is awfully ugly. It would be nice if someone would think up
79 74 * a better way of handling this.
... ... @@ -158,7 +153,7 @@
158 153  
159 154 /*
160 155 * Syntax:
161   - * imd {i2c_chip} {addr}{.0, .1, .2} {len}
  156 + * i2c md {i2c_chip} {addr}{.0, .1, .2} {len}
162 157 */
163 158 #define DISP_LINE_LEN 16
164 159  
... ... @@ -275,7 +270,7 @@
275 270 /* Write (fill) memory
276 271 *
277 272 * Syntax:
278   - * imw {i2c_chip} {addr}{.0, .1, .2} {data} [{count}]
  273 + * i2c mw {i2c_chip} {addr}{.0, .1, .2} {data} [{count}]
279 274 */
280 275 int do_i2c_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
281 276 {
... ... @@ -359,7 +354,7 @@
359 354 /* Calculate a CRC on memory
360 355 *
361 356 * Syntax:
362   - * icrc32 {i2c_chip} {addr}{.0, .1, .2} {count}
  357 + * i2c crc32 {i2c_chip} {addr}{.0, .1, .2} {count}
363 358 */
364 359 int do_i2c_crc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
365 360 {
... ... @@ -428,8 +423,8 @@
428 423 /* Modify memory.
429 424 *
430 425 * Syntax:
431   - * imm{.b, .w, .l} {i2c_chip} {addr}{.0, .1, .2}
432   - * inm{.b, .w, .l} {i2c_chip} {addr}{.0, .1, .2}
  426 + * i2c mm{.b, .w, .l} {i2c_chip} {addr}{.0, .1, .2}
  427 + * i2c nm{.b, .w, .l} {i2c_chip} {addr}{.0, .1, .2}
433 428 */
434 429  
435 430 static int
... ... @@ -562,7 +557,7 @@
562 557  
563 558 /*
564 559 * Syntax:
565   - * iprobe {addr}{.0, .1, .2}
  560 + * i2c probe {addr}{.0, .1, .2}
566 561 */
567 562 int do_i2c_probe (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
568 563 {
... ... @@ -604,7 +599,7 @@
604 599  
605 600 /*
606 601 * Syntax:
607   - * iloop {i2c_chip} {addr}{.0, .1, .2} [{length}] [{delay}]
  602 + * i2c loop {i2c_chip} {addr}{.0, .1, .2} [{length}] [{delay}]
608 603 * {length} - Number of bytes to read
609 604 * {delay} - A DECIMAL number and defaults to 1000 uSec
610 605 */
... ... @@ -726,7 +721,7 @@
726 721  
727 722 /*
728 723 * Syntax:
729   - * sdram {i2c_chip}
  724 + * i2c sdram {i2c_chip}
730 725 */
731 726 int do_sdram (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
732 727 {
... ... @@ -31,17 +31,17 @@
31 31 All others are factory default.
32 32  
33 33  
34   -I2C iprobe
  34 +I2C probe
35 35 =====================
36 36  
37 37 The i2c utilities have been tested on both Rev B. and Rev C. and
38 38 look good. The CONFIG_SYS_I2C_NOPROBES macro is defined to prevent
39 39 probing the CDCV850 clock controller at address 0x69 (since reading
40 40 it causes the i2c implementation to misbehave. The output of
41   -iprobe should look like this (assuming you are only using a single
  41 +'i2c probe' should look like this (assuming you are only using a single
42 42 SO-DIMM:
43 43  
44   -=> iprobe
  44 +=> i2c probe
45 45 Valid chip addresses: 50 53 54
46 46 Excluded chip addresses: 69
47 47  
48 48  
49 49  
... ... @@ -63,13 +63,13 @@
63 63  
64 64 This will select the default sys0 and sys1 settings (the serial
65 65 eeproms are not used). Then power up the board and fix the serial
66   -eeprom using the imm command. Here are the values I currently
  66 +eeprom using the 'i2c mm' command. Here are the values I currently
67 67 use:
68 68  
69   -=> imd 50 0 10
  69 +=> i2c md 50 0 10
70 70 0000: bf a2 04 01 ae 94 11 00 00 00 00 00 00 00 00 00 ................
71 71  
72   -=> imd 54 0 10
  72 +=> i2c md 54 0 10
73 73 0000: 8f b3 24 01 4d 14 11 00 00 00 00 00 00 00 00 00 ..$.M...........
74 74  
75 75 Once you have the eeproms set correctly change the
... ... @@ -83,8 +83,8 @@
83 83 eeprom is corrupted, U-Boot will never get into ram. Here's how I got
84 84 out of this situation:
85 85  
86   -0. First, _before_ playing with the i2c utilities, do an iprobe, then
87   -use imd to capture the various device contents to a file. Some day
  86 +0. First, _before_ playing with the i2c utilities, do an 'i2c probe', then
  87 +use 'i2c md' to capture the various device contents to a file. Some day
88 88 you may be glad you did this ... trust me :-). Otherwise try the
89 89 following:
90 90  
91 91  
... ... @@ -100,12 +100,12 @@
100 100  
101 101 3. Load the new U-Boot image and reboot ebony.
102 102  
103   -4. Repair the SPD eeprom using the imm command. Here's the eeprom
  103 +4. Repair the SPD eeprom using the 'i2c mm' command. Here's the eeprom
104 104 contents that work with the default SO-DIMM that comes with the
105 105 ebony board (micron 8VDDT164AG-265A1). Note: these are probably
106 106 _not_ the factory settings ... but they work.
107 107  
108   -=> imd 53 0 10 80
  108 +=> i2c md 53 0 10 80
109 109 0000: 80 08 07 0c 0a 01 40 00 04 75 75 00 80 08 00 01 ......@..uu.....
110 110 0010: 0e 04 0c 01 02 20 00 a0 75 00 00 50 3c 50 2d 20 ..... ..u..P<P-
111 111 0020: 90 90 50 50 00 00 00 00 00 41 4b 34 32 75 00 00 ..PP.....AK42u..
doc/README.m52277evb
... ... @@ -204,16 +204,10 @@
204 204 flinfo - print FLASH memory information
205 205 go - start application at address 'addr'
206 206 help - print online help
  207 +i2c - I2C sub-system
207 208 icache - enable or disable instruction cache
208   -icrc32 - checksum calculation
209   -iloop - infinite loop on address range
210   -imd - i2c memory display
211 209 iminfo - print header information for application image
212 210 imls - list all images found in flash
213   -imm - i2c memory modify (auto-incrementing)
214   -imw - memory write (fill)
215   -inm - memory modify (constant address)
216   -iprobe - probe to discover valid I2C chip addresses
217 211 itest - return true/false on integer compare
218 212 loadb - load binary file over serial line (kermit mode)
219 213 loads - load S-Record file over serial line
... ... @@ -215,16 +215,10 @@
215 215 flinfo - print FLASH memory information
216 216 go - start application at address 'addr'
217 217 help - print online help
  218 +i2c - I2C sub-system
218 219 icache - enable or disable instruction cache
219   -icrc32 - checksum calculation
220   -iloop - infinite loop on address range
221   -imd - i2c memory display
222 220 iminfo - print header information for application image
223 221 imls - list all images found in flash
224   -imm - i2c memory modify (auto-incrementing)
225   -imw - memory write (fill)
226   -inm - memory modify (constant address)
227   -iprobe - probe to discover valid I2C chip addresses
228 222 itest - return true/false on integer compare
229 223 loadb - load binary file over serial line (kermit mode)
230 224 loads - load S-Record file over serial line
doc/README.m54455evb
... ... @@ -304,17 +304,11 @@
304 304 fsload - load binary file from a filesystem image
305 305 go - start application at address 'addr'
306 306 help - print online help
  307 +i2c - I2C sub-system
307 308 icache - enable or disable instruction cache
308   -icrc32 - checksum calculation
309 309 ide - IDE sub-system
310   -iloop - infinite loop on address range
311   -imd - i2c memory display
312 310 iminfo - print header information for application image
313 311 imls - list all images found in flash
314   -imm - i2c memory modify (auto-incrementing)
315   -imw - memory write (fill)
316   -inm - memory modify (constant address)
317   -iprobe - probe to discover valid I2C chip addresses
318 312 itest - return true/false on integer compare
319 313 loadb - load binary file over serial line (kermit mode)
320 314 loads - load S-Record file over serial line
... ... @@ -234,16 +234,10 @@
234 234 flinfo - print FLASH memory information
235 235 go - start application at address 'addr'
236 236 help - print online help
  237 +i2c - I2C sub-system
237 238 icache - enable or disable instruction cache
238   -icrc32 - checksum calculation
239   -iloop - infinite loop on address range
240   -imd - i2c memory display
241 239 iminfo - print header information for application image
242 240 imls - list all images found in flash
243   -imm - i2c memory modify (auto-incrementing)
244   -imw - memory write (fill)
245   -inm - memory modify (constant address)
246   -iprobe - probe to discover valid I2C chip addresses
247 241 itest - return true/false on integer compare
248 242 loadb - load binary file over serial line (kermit mode)
249 243 loads - load S-Record file over serial line
... ... @@ -88,7 +88,7 @@
88 88 =================
89 89  
90 90 The i2c utilities have been tested on both Rev B. and Rev C. and
91   -look good. The iprobe command implementation has been updated to
  91 +look good. The 'i2c probe' command implementation has been updated to
92 92 allow for 'skipped' addresses. Some i2c slaves are write only and
93 93 cause problems when a probe (read) is performed (for example the
94 94 CDCV850 clock controller at address 0x69 on the ebony board).
... ... @@ -97,7 +97,7 @@
97 97 CONFIG_SYS_I2C_NOPROBES macro in your board-specific header file. When
98 98 defined, all specified addresses are skipped during a probe.
99 99 The addresses that are skipped will be displayed in the output
100   -of the iprobe command.
  100 +of the 'i2c probe' command.
101 101  
102 102 For example, to prevent probing address 0x69, define the macro as
103 103 follows:
doc/README.xpedite1k
... ... @@ -23,7 +23,7 @@
23 23 change the 1st page of the EEPROM! Unpopulated jumper J560 can get you
24 24 out of trouble as it disables the strapping read from EEPROM.
25 25  
26   -I2C iprobe
  26 +I2C probe
27 27 =====================
28 28  
29 29 The i2c utilities work and have been tested on Rev B. of the 440GX. See
30 30  
... ... @@ -47,10 +47,10 @@
47 47  
48 48 This will select the default sys0 and sys1 settings (the serial
49 49 eeproms are not used). Then power up the board and fix the serial
50   -eeprom using the imm command. Here are the values I currently
  50 +eeprom using the 'i2c mm' command. Here are the values I currently
51 51 use:
52 52  
53   -=> imd 50 0 10
  53 +=> i2c md 50 0 10
54 54  
55 55 0000: 85 7d 42 06 07 80 11 00 00 00 00 00 00 00 00 00 .}B.............
56 56  
drivers/i2c/tsi108_i2c.c
... ... @@ -129,7 +129,7 @@
129 129 * chip_addr: I2C chip address, range 0..127
130 130 * (to read from SPD channel EEPROM use (0xD0 ... 0xD7)
131 131 * NOTE: The bit 7 in the chip_addr serves as a channel select.
132   - * This hack is for enabling "isdram" command on Tsi108 boards
  132 + * This hack is for enabling "i2c sdram" command on Tsi108 boards
133 133 * without changes to common code. Used for I2C reads only.
134 134 * byte_addr: Memory or register address within the chip
135 135 * alen: Number of bytes to use for addr (typically 1, 2 for larger
include/configs/bubinga.h
... ... @@ -134,7 +134,7 @@
134 134 */
135 135 #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */
136 136  
137   -#define CONFIG_SYS_I2C_NOPROBES { 0x69 } /* avoid iprobe hangup (why?) */
  137 +#define CONFIG_SYS_I2C_NOPROBES { 0x69 } /* avoid i2c probe hangup (why?) */
138 138 #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 6 /* 24C02 requires 5ms delay */
139 139  
140 140 #if defined(CONFIG_CMD_EEPROM)
include/configs/sacsng.h
... ... @@ -408,9 +408,9 @@
408 408 "echo hostname ${hostname}\0" \
409 409 "ana=run adc ; run dac\0" \
410 410 "adc=run adc-12 ; run adc-34\0" \
411   -"adc-12=echo ### ADC-12 ; imd.b e 81 e\0" \
412   -"adc-34=echo ### ADC-34 ; imd.b f 81 e\0" \
413   -"dac=echo ### DAC ; imd.b 11 81 5\0" \
  411 +"adc-12=echo ### ADC-12 ; i2c md e 81 e\0" \
  412 +"adc-34=echo ### ADC-34 ; i2c md f 81 e\0" \
  413 +"dac=echo ### DAC ; i2c md 11 81 5\0" \
414 414 "boot-hook=echo\0"
415 415  
416 416 /* What should the console's baud rate be? */
include/configs/taihu.h
... ... @@ -139,7 +139,7 @@
139 139 */
140 140 #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */
141 141  
142   -#define CONFIG_SYS_I2C_NOPROBES { 0x69 } /* avoid iprobe hangup (why?) */
  142 +#define CONFIG_SYS_I2C_NOPROBES { 0x69 } /* avoid i2c probe hangup (why?) */
143 143 #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 6 /* 24C02 requires 5ms delay */
144 144  
145 145 #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* I2C boot EEPROM (24C02W) */