patch-2.4.11-dontuse linux/drivers/ieee1394/video1394.c
Next file: linux/drivers/input/evdev.c
Previous file: linux/drivers/ieee1394/sbp2.h
Back to the patch index
Back to the overall index
- Lines: 141
- Date:
Mon Oct 1 21:24:25 2001
- Orig file:
v2.4.10/linux/drivers/ieee1394/video1394.c
- Orig date:
Sun Sep 23 11:40:58 2001
diff -u --recursive --new-file v2.4.10/linux/drivers/ieee1394/video1394.c linux/drivers/ieee1394/video1394.c
@@ -103,7 +103,7 @@
int ctxMatch;
wait_queue_head_t waitq;
spinlock_t lock;
- unsigned int syt_offset;
+ unsigned int syt_offset;
int flags;
};
@@ -488,24 +488,27 @@
int i;
/* the first descriptor will read only 4 bytes */
- ir_prg[0].control = (0x280C << 16) | 4;
+ ir_prg[0].control = DMA_CTL_INPUT_MORE | DMA_CTL_UPDATE |
+ DMA_CTL_BRANCH | 4;
/* set the sync flag */
if (flags & VIDEO1394_SYNC_FRAMES)
- ir_prg[0].control |= 0x00030000;
+ ir_prg[0].control |= DMA_CTL_WAIT;
ir_prg[0].address = kvirt_to_bus(buf);
ir_prg[0].branchAddress = (virt_to_bus(&(ir_prg[1].control))
& 0xfffffff0) | 0x1;
/* the second descriptor will read PAGE_SIZE-4 bytes */
- ir_prg[1].control = (0x280C << 16) | (PAGE_SIZE-4);
+ ir_prg[1].control = DMA_CTL_INPUT_MORE | DMA_CTL_UPDATE |
+ DMA_CTL_BRANCH | (PAGE_SIZE-4);
ir_prg[1].address = kvirt_to_bus(buf+4);
ir_prg[1].branchAddress = (virt_to_bus(&(ir_prg[2].control))
& 0xfffffff0) | 0x1;
for (i=2;i<d->nb_cmd-1;i++) {
- ir_prg[i].control = (0x280C << 16) | PAGE_SIZE;
+ ir_prg[i].control = DMA_CTL_INPUT_MORE | DMA_CTL_UPDATE |
+ DMA_CTL_BRANCH | PAGE_SIZE;
ir_prg[i].address = kvirt_to_bus(buf+(i-1)*PAGE_SIZE);
ir_prg[i].branchAddress =
@@ -514,7 +517,8 @@
}
/* the last descriptor will generate an interrupt */
- ir_prg[i].control = (0x283C << 16) | d->left_size;
+ ir_prg[i].control = DMA_CTL_INPUT_MORE | DMA_CTL_UPDATE |
+ DMA_CTL_IRQ | DMA_CTL_BRANCH | d->left_size;
ir_prg[i].address = kvirt_to_bus(buf+(i-1)*PAGE_SIZE);
}
@@ -691,13 +695,14 @@
d->last_used_cmd[n] = d->nb_cmd - 1;
for (i=0;i<d->nb_cmd;i++) {
- it_prg[i].begin.control = OUTPUT_MORE_IMMEDIATE | 8 ;
+ it_prg[i].begin.control = DMA_CTL_OUTPUT_MORE |
+ DMA_CTL_IMMEDIATE | 8 ;
it_prg[i].begin.address = 0;
it_prg[i].begin.status = 0;
it_prg[i].data[0] =
- (DMA_SPEED_100 << 16)
+ (SPEED_100 << 16)
| (/* tag */ 1 << 14)
| (d->channel << 8)
| (TCODE_ISO_DATA << 4);
@@ -706,7 +711,7 @@
it_prg[i].data[2] = 0;
it_prg[i].data[3] = 0;
- it_prg[i].end.control = 0x100c0000;
+ it_prg[i].end.control = DMA_CTL_OUTPUT_LAST | DMA_CTL_BRANCH;
it_prg[i].end.address =
kvirt_to_bus(buf+i*d->packet_size);
@@ -721,7 +726,8 @@
}
else {
/* the last prg generates an interrupt */
- it_prg[i].end.control |= 0x08300000 | d->left_size;
+ it_prg[i].end.control |= DMA_CTL_UPDATE |
+ DMA_CTL_IRQ | d->left_size;
/* the last prg doesn't branch */
it_prg[i].begin.branchAddress = 0;
it_prg[i].end.branchAddress = 0;
@@ -761,7 +767,7 @@
size = packet_sizes[i];
}
it_prg[i].data[1] = size << 16;
- it_prg[i].end.control = 0x100c0000;
+ it_prg[i].end.control = DMA_CTL_OUTPUT_LAST | DMA_CTL_BRANCH;
if (i < d->nb_cmd-1 && packet_sizes[i+1] != 0) {
it_prg[i].end.control |= size;
@@ -773,7 +779,8 @@
& 0xfffffff0) | 0x3;
} else {
/* the last prg generates an interrupt */
- it_prg[i].end.control |= 0x08300000 | size;
+ it_prg[i].end.control |= DMA_CTL_UPDATE |
+ DMA_CTL_IRQ | size;
/* the last prg doesn't branch */
it_prg[i].begin.branchAddress = 0;
it_prg[i].end.branchAddress = 0;
@@ -1560,7 +1567,6 @@
static void remove_card(struct video_card *video)
{
int i;
- unsigned long flags;
ohci1394_unregister_video(video->ohci, &video_tmpl);
@@ -1581,9 +1587,7 @@
}
kfree(video->it_context);
}
- spin_lock_irqsave(&video1394_cards_lock, flags);
list_del(&video->list);
- spin_unlock_irqrestore(&video1394_cards_lock, flags);
kfree(video);
}
@@ -1607,7 +1611,7 @@
p = list_entry(lh, struct video_card, list);
if (p ->ohci == ohci) {
remove_card(p);
- return;
+ break;
}
}
}
@@ -1639,6 +1643,7 @@
MODULE_AUTHOR("Sebastien Rougeaux <sebastien.rougeaux@anu.edu.au>");
MODULE_DESCRIPTION("driver for digital video on OHCI board");
MODULE_SUPPORTED_DEVICE(VIDEO1394_DRIVER_NAME);
+MODULE_LICENSE("GPL");
static void __exit video1394_exit_module (void)
{
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)