• Home
  • Raw
  • Download

Lines Matching refs:sd

101 #define CLOCK_PULSE(sd, rdy)				\  argument
102 while ((SEEPROM_STATUS_INB(sd) & rdy) == 0) { \
105 (void)SEEPROM_INB(sd); /* Clear clock */
111 send_seeprom_cmd(struct seeprom_descriptor *sd, const struct seeprom_cmd *cmd) in send_seeprom_cmd() argument
117 temp = sd->sd_MS ^ sd->sd_CS; in send_seeprom_cmd()
118 SEEPROM_OUTB(sd, temp ^ sd->sd_CK); in send_seeprom_cmd()
119 CLOCK_PULSE(sd, sd->sd_RDY); in send_seeprom_cmd()
123 temp ^= sd->sd_DO; in send_seeprom_cmd()
124 SEEPROM_OUTB(sd, temp); in send_seeprom_cmd()
125 CLOCK_PULSE(sd, sd->sd_RDY); in send_seeprom_cmd()
126 SEEPROM_OUTB(sd, temp ^ sd->sd_CK); in send_seeprom_cmd()
127 CLOCK_PULSE(sd, sd->sd_RDY); in send_seeprom_cmd()
129 temp ^= sd->sd_DO; in send_seeprom_cmd()
137 reset_seeprom(struct seeprom_descriptor *sd) in reset_seeprom() argument
141 temp = sd->sd_MS; in reset_seeprom()
142 SEEPROM_OUTB(sd, temp); in reset_seeprom()
143 CLOCK_PULSE(sd, sd->sd_RDY); in reset_seeprom()
144 SEEPROM_OUTB(sd, temp ^ sd->sd_CK); in reset_seeprom()
145 CLOCK_PULSE(sd, sd->sd_RDY); in reset_seeprom()
146 SEEPROM_OUTB(sd, temp); in reset_seeprom()
147 CLOCK_PULSE(sd, sd->sd_RDY); in reset_seeprom()
155 ahc_read_seeprom(struct seeprom_descriptor *sd, uint16_t *buf, in ahc_read_seeprom() argument
172 send_seeprom_cmd(sd, &seeprom_read); in ahc_read_seeprom()
175 temp = sd->sd_MS ^ sd->sd_CS; in ahc_read_seeprom()
176 for (i = (sd->sd_chip - 1); i >= 0; i--) { in ahc_read_seeprom()
178 temp ^= sd->sd_DO; in ahc_read_seeprom()
179 SEEPROM_OUTB(sd, temp); in ahc_read_seeprom()
180 CLOCK_PULSE(sd, sd->sd_RDY); in ahc_read_seeprom()
181 SEEPROM_OUTB(sd, temp ^ sd->sd_CK); in ahc_read_seeprom()
182 CLOCK_PULSE(sd, sd->sd_RDY); in ahc_read_seeprom()
184 temp ^= sd->sd_DO; in ahc_read_seeprom()
195 SEEPROM_OUTB(sd, temp); in ahc_read_seeprom()
196 CLOCK_PULSE(sd, sd->sd_RDY); in ahc_read_seeprom()
198 if (SEEPROM_DATA_INB(sd) & sd->sd_DI) in ahc_read_seeprom()
200 SEEPROM_OUTB(sd, temp ^ sd->sd_CK); in ahc_read_seeprom()
201 CLOCK_PULSE(sd, sd->sd_RDY); in ahc_read_seeprom()
207 reset_seeprom(sd); in ahc_read_seeprom()
227 ahc_write_seeprom(struct seeprom_descriptor *sd, uint16_t *buf, in ahc_write_seeprom() argument
236 if (sd->sd_chip == C46) { in ahc_write_seeprom()
239 } else if (sd->sd_chip == C56_66) { in ahc_write_seeprom()
244 sd->sd_chip); in ahc_write_seeprom()
248 send_seeprom_cmd(sd, ewen); in ahc_write_seeprom()
249 reset_seeprom(sd); in ahc_write_seeprom()
252 temp = sd->sd_MS ^ sd->sd_CS; in ahc_write_seeprom()
255 send_seeprom_cmd(sd, &seeprom_write); in ahc_write_seeprom()
258 for (i = (sd->sd_chip - 1); i >= 0; i--) { in ahc_write_seeprom()
260 temp ^= sd->sd_DO; in ahc_write_seeprom()
261 SEEPROM_OUTB(sd, temp); in ahc_write_seeprom()
262 CLOCK_PULSE(sd, sd->sd_RDY); in ahc_write_seeprom()
263 SEEPROM_OUTB(sd, temp ^ sd->sd_CK); in ahc_write_seeprom()
264 CLOCK_PULSE(sd, sd->sd_RDY); in ahc_write_seeprom()
266 temp ^= sd->sd_DO; in ahc_write_seeprom()
273 temp ^= sd->sd_DO; in ahc_write_seeprom()
274 SEEPROM_OUTB(sd, temp); in ahc_write_seeprom()
275 CLOCK_PULSE(sd, sd->sd_RDY); in ahc_write_seeprom()
276 SEEPROM_OUTB(sd, temp ^ sd->sd_CK); in ahc_write_seeprom()
277 CLOCK_PULSE(sd, sd->sd_RDY); in ahc_write_seeprom()
279 temp ^= sd->sd_DO; in ahc_write_seeprom()
283 temp = sd->sd_MS; in ahc_write_seeprom()
284 SEEPROM_OUTB(sd, temp); in ahc_write_seeprom()
285 CLOCK_PULSE(sd, sd->sd_RDY); in ahc_write_seeprom()
286 temp = sd->sd_MS ^ sd->sd_CS; in ahc_write_seeprom()
288 SEEPROM_OUTB(sd, temp); in ahc_write_seeprom()
289 CLOCK_PULSE(sd, sd->sd_RDY); in ahc_write_seeprom()
290 SEEPROM_OUTB(sd, temp ^ sd->sd_CK); in ahc_write_seeprom()
291 CLOCK_PULSE(sd, sd->sd_RDY); in ahc_write_seeprom()
292 } while ((SEEPROM_DATA_INB(sd) & sd->sd_DI) == 0); in ahc_write_seeprom()
294 reset_seeprom(sd); in ahc_write_seeprom()
298 send_seeprom_cmd(sd, ewds); in ahc_write_seeprom()
299 reset_seeprom(sd); in ahc_write_seeprom()