Lines Matching refs:proto
31 pi->proto->connect(pi); in pi_connect()
36 pi->proto->disconnect(pi); in pi_disconnect()
50 pi->proto->write_regr(pi, 0, ATA_REG_DEVICE, tmp); in pata_parport_dev_select()
58 pi->proto->write_regr(pi, 1, 6, ctl); in pata_parport_set_devctl()
68 pi->proto->write_regr(pi, 0, ATA_REG_NSECT, 0x55); in pata_parport_devchk()
69 pi->proto->write_regr(pi, 0, ATA_REG_LBAL, 0xaa); in pata_parport_devchk()
71 pi->proto->write_regr(pi, 0, ATA_REG_NSECT, 0xaa); in pata_parport_devchk()
72 pi->proto->write_regr(pi, 0, ATA_REG_LBAL, 0x55); in pata_parport_devchk()
74 pi->proto->write_regr(pi, 0, ATA_REG_NSECT, 0x55); in pata_parport_devchk()
75 pi->proto->write_regr(pi, 0, ATA_REG_LBAL, 0xaa); in pata_parport_devchk()
77 nsect = pi->proto->read_regr(pi, 0, ATA_REG_NSECT); in pata_parport_devchk()
78 lbal = pi->proto->read_regr(pi, 0, ATA_REG_LBAL); in pata_parport_devchk()
124 nsect = pi->proto->read_regr(pi, 0, ATA_REG_NSECT); in pata_parport_wait_after_reset()
125 lbal = pi->proto->read_regr(pi, 0, ATA_REG_LBAL); in pata_parport_wait_after_reset()
155 pi->proto->write_regr(pi, 1, 6, ap->ctl); in pata_parport_bus_softreset()
157 pi->proto->write_regr(pi, 1, 6, ap->ctl | ATA_SRST); in pata_parport_bus_softreset()
159 pi->proto->write_regr(pi, 1, 6, ap->ctl); in pata_parport_bus_softreset()
204 return pi->proto->read_regr(pi, 0, ATA_REG_STATUS); in pata_parport_check_status()
211 return pi->proto->read_regr(pi, 1, 6); in pata_parport_check_altstatus()
220 pi->proto->write_regr(pi, 1, 6, tf->ctl); in pata_parport_tf_load()
227 pi->proto->write_regr(pi, 0, ATA_REG_FEATURE, in pata_parport_tf_load()
229 pi->proto->write_regr(pi, 0, ATA_REG_NSECT, in pata_parport_tf_load()
231 pi->proto->write_regr(pi, 0, ATA_REG_LBAL, in pata_parport_tf_load()
233 pi->proto->write_regr(pi, 0, ATA_REG_LBAM, in pata_parport_tf_load()
235 pi->proto->write_regr(pi, 0, ATA_REG_LBAH, in pata_parport_tf_load()
238 pi->proto->write_regr(pi, 0, ATA_REG_FEATURE, tf->feature); in pata_parport_tf_load()
239 pi->proto->write_regr(pi, 0, ATA_REG_NSECT, tf->nsect); in pata_parport_tf_load()
240 pi->proto->write_regr(pi, 0, ATA_REG_LBAL, tf->lbal); in pata_parport_tf_load()
241 pi->proto->write_regr(pi, 0, ATA_REG_LBAM, tf->lbam); in pata_parport_tf_load()
242 pi->proto->write_regr(pi, 0, ATA_REG_LBAH, tf->lbah); in pata_parport_tf_load()
246 pi->proto->write_regr(pi, 0, ATA_REG_DEVICE, tf->device); in pata_parport_tf_load()
255 tf->status = pi->proto->read_regr(pi, 0, ATA_REG_STATUS); in pata_parport_tf_read()
256 tf->error = pi->proto->read_regr(pi, 0, ATA_REG_ERR); in pata_parport_tf_read()
257 tf->nsect = pi->proto->read_regr(pi, 0, ATA_REG_NSECT); in pata_parport_tf_read()
258 tf->lbal = pi->proto->read_regr(pi, 0, ATA_REG_LBAL); in pata_parport_tf_read()
259 tf->lbam = pi->proto->read_regr(pi, 0, ATA_REG_LBAM); in pata_parport_tf_read()
260 tf->lbah = pi->proto->read_regr(pi, 0, ATA_REG_LBAH); in pata_parport_tf_read()
261 tf->device = pi->proto->read_regr(pi, 0, ATA_REG_DEVICE); in pata_parport_tf_read()
264 pi->proto->write_regr(pi, 1, 6, tf->ctl | ATA_HOB); in pata_parport_tf_read()
265 tf->hob_feature = pi->proto->read_regr(pi, 0, ATA_REG_ERR); in pata_parport_tf_read()
266 tf->hob_nsect = pi->proto->read_regr(pi, 0, ATA_REG_NSECT); in pata_parport_tf_read()
267 tf->hob_lbal = pi->proto->read_regr(pi, 0, ATA_REG_LBAL); in pata_parport_tf_read()
268 tf->hob_lbam = pi->proto->read_regr(pi, 0, ATA_REG_LBAM); in pata_parport_tf_read()
269 tf->hob_lbah = pi->proto->read_regr(pi, 0, ATA_REG_LBAH); in pata_parport_tf_read()
270 pi->proto->write_regr(pi, 1, 6, tf->ctl); in pata_parport_tf_read()
280 pi->proto->write_regr(pi, 0, ATA_REG_CMD, tf->command); in pata_parport_exec_command()
291 pi->proto->read_block(pi, buf, buflen); in pata_parport_data_xfer()
293 pi->proto->write_block(pi, buf, buflen); in pata_parport_data_xfer()
314 pi->proto->read_block(pi, junk, 2); in pata_parport_drain_fifo()
348 if (pi->proto->release_proto) in pi_release()
349 pi->proto->release_proto(pi); in pi_release()
350 module_put(pi->proto->owner); in pi_release()
358 pi->proto->connect(pi); in default_test_proto()
361 pi->proto->write_regr(pi, 0, 6, 0xa0 + j * 0x10); in default_test_proto()
363 pi->proto->write_regr(pi, 0, 2, k ^ 0xaa); in default_test_proto()
364 pi->proto->write_regr(pi, 0, 3, k ^ 0x55); in default_test_proto()
365 if (pi->proto->read_regr(pi, 0, 2) != (k ^ 0xaa)) in default_test_proto()
369 pi->proto->disconnect(pi); in default_test_proto()
372 pi->proto->name, pi->port, pi->mode, e[0], e[1]); in default_test_proto()
382 if (pi->proto->test_proto) in pi_test_proto()
383 res = pi->proto->test_proto(pi); in pi_test_proto()
399 if (pi->mode >= pi->proto->epp_first) in pi_probe_mode()
408 if (pi->mode >= pi->proto->epp_first) in pi_probe_mode()
428 e = pi->proto->max_units; in pi_probe_unit()
431 if (pi->proto->test_port) { in pi_probe_unit()
433 max = pi->proto->test_port(pi); in pi_probe_unit()
436 max = pi->proto->max_mode; in pi_probe_unit()
439 if (pi->proto->probe_unit) { in pi_probe_unit()
442 if (pi->proto->probe_unit(pi)) { in pi_probe_unit()
482 struct pi_protocol *proto; member
490 return pi->pardev->port == match->parport && pi->proto == match->proto; in pi_find_dev()
500 struct pi_device_match match = { .parport = parport, .proto = pr }; in pi_init_one()
533 pi->proto = pr; in pi_init_one()
535 if (!try_module_get(pi->proto->owner)) in pi_init_one()
537 if (pi->proto->init_proto && pi->proto->init_proto(pi) < 0) in pi_init_one()
540 pi->delay = (delay == -1) ? pi->proto->default_delay : delay; in pi_init_one()
554 pi->proto->log_adapter(pi); in pi_init_one()
563 ata_port_desc(host->ports[0], "protocol %s", pi->proto->name); in pi_init_one()
575 if (pi->proto->release_proto) in pi_init_one()
576 pi->proto->release_proto(pi); in pi_init_one()
578 module_put(pi->proto->owner); in pi_init_one()