aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2007-03-28 14:26:10 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-03-28 15:37:54 -0400
commit8a2f7d932fc6a4881ff837738e23b41a1c228338 (patch)
treef8dd2b550d8b5d2462b64e1d1595493f227a9060 /drivers/firewire
parentef370ee74b7a9cb769d50bfb73b4023ee3e37719 (diff)
firewire: Fix start on cycle 0 for IT, implement start on cycle for IR.
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire')
-rw-r--r--drivers/firewire/fw-ohci.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
index afd18173cca1..b941239671d6 100644
--- a/drivers/firewire/fw-ohci.c
+++ b/drivers/firewire/fw-ohci.c
@@ -1362,28 +1362,32 @@ static int ohci_start_iso(struct fw_iso_context *base,
1362{ 1362{
1363 struct iso_context *ctx = container_of(base, struct iso_context, base); 1363 struct iso_context *ctx = container_of(base, struct iso_context, base);
1364 struct fw_ohci *ohci = ctx->context.ohci; 1364 struct fw_ohci *ohci = ctx->context.ohci;
1365 u32 cycle_match = 0; 1365 u32 control, match;
1366 int index; 1366 int index;
1367 1367
1368 if (ctx->base.type == FW_ISO_CONTEXT_TRANSMIT) { 1368 if (ctx->base.type == FW_ISO_CONTEXT_TRANSMIT) {
1369 index = ctx - ohci->it_context_list; 1369 index = ctx - ohci->it_context_list;
1370 if (cycle > 0) 1370 match = 0;
1371 cycle_match = IT_CONTEXT_CYCLE_MATCH_ENABLE | 1371 if (cycle >= 0)
1372 match = IT_CONTEXT_CYCLE_MATCH_ENABLE |
1372 (cycle & 0x7fff) << 16; 1373 (cycle & 0x7fff) << 16;
1373 1374
1374 reg_write(ohci, OHCI1394_IsoXmitIntEventClear, 1 << index); 1375 reg_write(ohci, OHCI1394_IsoXmitIntEventClear, 1 << index);
1375 reg_write(ohci, OHCI1394_IsoXmitIntMaskSet, 1 << index); 1376 reg_write(ohci, OHCI1394_IsoXmitIntMaskSet, 1 << index);
1376 context_run(&ctx->context, cycle_match); 1377 context_run(&ctx->context, match);
1377 } else { 1378 } else {
1378 index = ctx - ohci->ir_context_list; 1379 index = ctx - ohci->ir_context_list;
1380 control = IR_CONTEXT_DUAL_BUFFER_MODE | IR_CONTEXT_ISOCH_HEADER;
1381 match = (tags << 28) | (sync << 8) | ctx->base.channel;
1382 if (cycle >= 0) {
1383 match |= (cycle & 0x07fff) << 12;
1384 control |= IR_CONTEXT_CYCLE_MATCH_ENABLE;
1385 }
1379 1386
1380 reg_write(ohci, OHCI1394_IsoRecvIntEventClear, 1 << index); 1387 reg_write(ohci, OHCI1394_IsoRecvIntEventClear, 1 << index);
1381 reg_write(ohci, OHCI1394_IsoRecvIntMaskSet, 1 << index); 1388 reg_write(ohci, OHCI1394_IsoRecvIntMaskSet, 1 << index);
1382 reg_write(ohci, context_match(ctx->context.regs), 1389 reg_write(ohci, context_match(ctx->context.regs), match);
1383 (tags << 28) | (sync << 8) | ctx->base.channel); 1390 context_run(&ctx->context, control);
1384 context_run(&ctx->context,
1385 IR_CONTEXT_DUAL_BUFFER_MODE |
1386 IR_CONTEXT_ISOCH_HEADER);
1387 } 1391 }
1388 1392
1389 return 0; 1393 return 0;