Lines Matching +full:msb +full:- +full:-

1 /*-
39 * -------------------------------------------------------------------
40 * READ 1 10 A5 - A0 Reads data stored in memory,
44 * ERASE 1 11 A5 - A0 Erase register A5A4A3A2A1A0
45 * WRITE 1 01 A5 - A0 D15 - D0 Writes register
47 * WRAL 1 00 01XXXX D15 - D0 Writes to all registers
61 * requested 16-bit register contents is read from the data out line but
62 * is preceded by an initial zero (leading 0, followed by 16-bits, MSB
111 temp = sd->sd_MS ^ sd->sd_CS;
112 SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
113 CLOCK_PULSE(sd, sd->sd_RDY);
115 for (i = 0; i < cmd->len; i++) {
116 if (cmd->bits[i] != 0)
117 temp ^= sd->sd_DO;
119 CLOCK_PULSE(sd, sd->sd_RDY);
120 SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
121 CLOCK_PULSE(sd, sd->sd_RDY);
122 if (cmd->bits[i] != 0)
123 temp ^= sd->sd_DO;
135 temp = sd->sd_MS;
137 CLOCK_PULSE(sd, sd->sd_RDY);
138 SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
139 CLOCK_PULSE(sd, sd->sd_RDY);
141 CLOCK_PULSE(sd, sd->sd_RDY);
159 * will range from 0 to count-1.
164 * address of the 16-bit register we want to read.
168 /* Send the 6 or 8 bit address (MSB first, LSB last). */
169 temp = sd->sd_MS ^ sd->sd_CS;
170 for (i = (sd->sd_chip - 1); i >= 0; i--) {
172 temp ^= sd->sd_DO;
174 CLOCK_PULSE(sd, sd->sd_RDY);
175 SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
176 CLOCK_PULSE(sd, sd->sd_RDY);
178 temp ^= sd->sd_DO;
183 * register contents which begins with bit 15 (MSB) and ends
188 for (i = 16; i >= 0; i--) {
190 CLOCK_PULSE(sd, sd->sd_RDY);
192 if (SEEPROM_DATA_INB(sd) & sd->sd_DI)
194 SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
195 CLOCK_PULSE(sd, sd->sd_RDY);
198 buf[k - start_addr] = v;
229 /* Place the chip into write-enable mode */
230 if (sd->sd_chip == C46) {
233 } else if (sd->sd_chip == C56_66) {
238 sd->sd_chip);
246 temp = sd->sd_MS ^ sd->sd_CS;
251 /* Send the 6 or 8 bit address (MSB first). */
252 for (i = (sd->sd_chip - 1); i >= 0; i--) {
254 temp ^= sd->sd_DO;
256 CLOCK_PULSE(sd, sd->sd_RDY);
257 SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
258 CLOCK_PULSE(sd, sd->sd_RDY);
260 temp ^= sd->sd_DO;
263 /* Write the 16 bit value, MSB first */
264 v = buf[k - start_addr];
265 for (i = 15; i >= 0; i--) {
267 temp ^= sd->sd_DO;
269 CLOCK_PULSE(sd, sd->sd_RDY);
270 SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
271 CLOCK_PULSE(sd, sd->sd_RDY);
273 temp ^= sd->sd_DO;
277 temp = sd->sd_MS;
279 CLOCK_PULSE(sd, sd->sd_RDY);
280 temp = sd->sd_MS ^ sd->sd_CS;
283 CLOCK_PULSE(sd, sd->sd_RDY);
284 SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
285 CLOCK_PULSE(sd, sd->sd_RDY);
286 } while ((SEEPROM_DATA_INB(sd) & sd->sd_DI) == 0);
291 /* Put the chip back into write-protect mode */
306 maxaddr = (sizeof(*sc)/2) - 1;
313 || (checksum & 0xFFFF) != sc->checksum) {