Lines Matching refs:sd
88 #define CLOCK_PULSE(sd, rdy) do { \ argument
97 while ((SEEPROM_STATUS_INB(sd) & rdy) == 0 && cpi-- > 0) { \
100 (void)SEEPROM_INB(sd); /* Clear clock */ \
108 read_seeprom(struct seeprom_descriptor *sd, u_int16_t *buf, bus_size_t start_addr, bus_size_t count) in read_seeprom() argument
121 temp = sd->sd_MS ^ sd->sd_CS; in read_seeprom()
122 SEEPROM_OUTB(sd, temp ^ sd->sd_CK); in read_seeprom()
123 CLOCK_PULSE(sd, sd->sd_RDY); in read_seeprom()
131 temp ^= sd->sd_DO; in read_seeprom()
132 SEEPROM_OUTB(sd, temp); in read_seeprom()
133 CLOCK_PULSE(sd, sd->sd_RDY); in read_seeprom()
134 SEEPROM_OUTB(sd, temp ^ sd->sd_CK); in read_seeprom()
135 CLOCK_PULSE(sd, sd->sd_RDY); in read_seeprom()
137 temp ^= sd->sd_DO; in read_seeprom()
140 for (i = (sd->sd_chip - 1); i >= 0; i--) { in read_seeprom()
142 temp ^= sd->sd_DO; in read_seeprom()
143 SEEPROM_OUTB(sd, temp); in read_seeprom()
144 CLOCK_PULSE(sd, sd->sd_RDY); in read_seeprom()
145 SEEPROM_OUTB(sd, temp ^ sd->sd_CK); in read_seeprom()
146 CLOCK_PULSE(sd, sd->sd_RDY); in read_seeprom()
148 temp ^= sd->sd_DO; in read_seeprom()
159 SEEPROM_OUTB(sd, temp); in read_seeprom()
160 CLOCK_PULSE(sd, sd->sd_RDY); in read_seeprom()
162 if (SEEPROM_DATA_INB(sd) & sd->sd_DI) in read_seeprom()
164 SEEPROM_OUTB(sd, temp ^ sd->sd_CK); in read_seeprom()
165 CLOCK_PULSE(sd, sd->sd_RDY); in read_seeprom()
171 temp = sd->sd_MS; in read_seeprom()
172 SEEPROM_OUTB(sd, temp); in read_seeprom()
173 CLOCK_PULSE(sd, sd->sd_RDY); in read_seeprom()
174 SEEPROM_OUTB(sd, temp ^ sd->sd_CK); in read_seeprom()
175 CLOCK_PULSE(sd, sd->sd_RDY); in read_seeprom()
176 SEEPROM_OUTB(sd, temp); in read_seeprom()
177 CLOCK_PULSE(sd, sd->sd_RDY); in read_seeprom()