diff options
Diffstat (limited to 'drivers/media/dvb/bt8xx/bt878.c')
-rw-r--r-- | drivers/media/dvb/bt8xx/bt878.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/drivers/media/dvb/bt8xx/bt878.c b/drivers/media/dvb/bt8xx/bt878.c index 213ff7902024..3c5a8e273c4a 100644 --- a/drivers/media/dvb/bt8xx/bt878.c +++ b/drivers/media/dvb/bt8xx/bt878.c | |||
@@ -4,27 +4,27 @@ | |||
4 | * Copyright (C) 2002 Peter Hettkamp <peter.hettkamp@t-online.de> | 4 | * Copyright (C) 2002 Peter Hettkamp <peter.hettkamp@t-online.de> |
5 | * | 5 | * |
6 | * large parts based on the bttv driver | 6 | * large parts based on the bttv driver |
7 | * Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de) | 7 | * Copyright (C) 1996,97,98 Ralph Metzler (rjkm@metzlerbros.de) |
8 | * & Marcus Metzler (mocm@thp.uni-koeln.de) | 8 | * & Marcus Metzler (mocm@metzlerbros.de) |
9 | * (c) 1999,2000 Gerd Knorr <kraxel@goldbach.in-berlin.de> | 9 | * (c) 1999,2000 Gerd Knorr <kraxel@goldbach.in-berlin.de> |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or | 11 | * This program is free software; you can redistribute it and/or |
12 | * modify it under the terms of the GNU General Public License | 12 | * modify it under the terms of the GNU General Public License |
13 | * as published by the Free Software Foundation; either version 2 | 13 | * as published by the Free Software Foundation; either version 2 |
14 | * of the License, or (at your option) any later version. | 14 | * of the License, or (at your option) any later version. |
15 | * | 15 | * |
16 | 16 | ||
17 | * This program is distributed in the hope that it will be useful, | 17 | * This program is distributed in the hope that it will be useful, |
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
20 | * GNU General Public License for more details. | 20 | * GNU General Public License for more details. |
21 | * | 21 | * |
22 | 22 | ||
23 | * You should have received a copy of the GNU General Public License | 23 | * You should have received a copy of the GNU General Public License |
24 | * along with this program; if not, write to the Free Software | 24 | * along with this program; if not, write to the Free Software |
25 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 25 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
26 | * Or, point your browser to http://www.gnu.org/copyleft/gpl.html | 26 | * Or, point your browser to http://www.gnu.org/copyleft/gpl.html |
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
@@ -58,7 +58,7 @@ module_param_named(verbose, bt878_verbose, int, 0444); | |||
58 | MODULE_PARM_DESC(verbose, | 58 | MODULE_PARM_DESC(verbose, |
59 | "verbose startup messages, default is 1 (yes)"); | 59 | "verbose startup messages, default is 1 (yes)"); |
60 | module_param_named(debug, bt878_debug, int, 0644); | 60 | module_param_named(debug, bt878_debug, int, 0644); |
61 | MODULE_PARM_DESC(debug, "Turn on/off debugging (default:off)."); | 61 | MODULE_PARM_DESC(debug, "Turn on/off debugging, default is 0 (off)."); |
62 | 62 | ||
63 | int bt878_num; | 63 | int bt878_num; |
64 | struct bt878 bt878[BT878_MAX]; | 64 | struct bt878 bt878[BT878_MAX]; |
@@ -128,21 +128,21 @@ static int bt878_mem_alloc(struct bt878 *bt) | |||
128 | } | 128 | } |
129 | 129 | ||
130 | /* RISC instructions */ | 130 | /* RISC instructions */ |
131 | #define RISC_WRITE (0x01 << 28) | 131 | #define RISC_WRITE (0x01 << 28) |
132 | #define RISC_JUMP (0x07 << 28) | 132 | #define RISC_JUMP (0x07 << 28) |
133 | #define RISC_SYNC (0x08 << 28) | 133 | #define RISC_SYNC (0x08 << 28) |
134 | 134 | ||
135 | /* RISC bits */ | 135 | /* RISC bits */ |
136 | #define RISC_WR_SOL (1 << 27) | 136 | #define RISC_WR_SOL (1 << 27) |
137 | #define RISC_WR_EOL (1 << 26) | 137 | #define RISC_WR_EOL (1 << 26) |
138 | #define RISC_IRQ (1 << 24) | 138 | #define RISC_IRQ (1 << 24) |
139 | #define RISC_STATUS(status) ((((~status) & 0x0F) << 20) | ((status & 0x0F) << 16)) | 139 | #define RISC_STATUS(status) ((((~status) & 0x0F) << 20) | ((status & 0x0F) << 16)) |
140 | #define RISC_SYNC_RESYNC (1 << 15) | 140 | #define RISC_SYNC_RESYNC (1 << 15) |
141 | #define RISC_SYNC_FM1 0x06 | 141 | #define RISC_SYNC_FM1 0x06 |
142 | #define RISC_SYNC_VRO 0x0C | 142 | #define RISC_SYNC_VRO 0x0C |
143 | 143 | ||
144 | #define RISC_FLUSH() bt->risc_pos = 0 | 144 | #define RISC_FLUSH() bt->risc_pos = 0 |
145 | #define RISC_INSTR(instr) bt->risc_cpu[bt->risc_pos++] = cpu_to_le32(instr) | 145 | #define RISC_INSTR(instr) bt->risc_cpu[bt->risc_pos++] = cpu_to_le32(instr) |
146 | 146 | ||
147 | static int bt878_make_risc(struct bt878 *bt) | 147 | static int bt878_make_risc(struct bt878 *bt) |
148 | { | 148 | { |
@@ -173,7 +173,7 @@ static void bt878_risc_program(struct bt878 *bt, u32 op_sync_orin) | |||
173 | RISC_INSTR(RISC_SYNC | RISC_SYNC_FM1 | op_sync_orin); | 173 | RISC_INSTR(RISC_SYNC | RISC_SYNC_FM1 | op_sync_orin); |
174 | RISC_INSTR(0); | 174 | RISC_INSTR(0); |
175 | 175 | ||
176 | dprintk("bt878: risc len lines %u, bytes per line %u\n", | 176 | dprintk("bt878: risc len lines %u, bytes per line %u\n", |
177 | bt->line_count, bt->line_bytes); | 177 | bt->line_count, bt->line_bytes); |
178 | for (line = 0; line < bt->line_count; line++) { | 178 | for (line = 0; line < bt->line_count; line++) { |
179 | // At the beginning of every block we issue an IRQ with previous (finished) block number set | 179 | // At the beginning of every block we issue an IRQ with previous (finished) block number set |
@@ -228,14 +228,14 @@ void bt878_start(struct bt878 *bt, u32 controlreg, u32 op_sync_orin, | |||
228 | * Hacked for DST to: | 228 | * Hacked for DST to: |
229 | * SCERR | OCERR | FDSR | FTRGT | FBUS | RISCI | 229 | * SCERR | OCERR | FDSR | FTRGT | FBUS | RISCI |
230 | */ | 230 | */ |
231 | int_mask = BT878_ASCERR | BT878_AOCERR | BT878_APABORT | | 231 | int_mask = BT878_ASCERR | BT878_AOCERR | BT878_APABORT | |
232 | BT878_ARIPERR | BT878_APPERR | BT878_AFDSR | BT878_AFTRGT | | 232 | BT878_ARIPERR | BT878_APPERR | BT878_AFDSR | BT878_AFTRGT | |
233 | BT878_AFBUS | BT878_ARISCI; | 233 | BT878_AFBUS | BT878_ARISCI; |
234 | 234 | ||
235 | 235 | ||
236 | /* ignore pesky bits */ | 236 | /* ignore pesky bits */ |
237 | int_mask &= ~irq_err_ignore; | 237 | int_mask &= ~irq_err_ignore; |
238 | 238 | ||
239 | btwrite(int_mask, BT878_AINT_MASK); | 239 | btwrite(int_mask, BT878_AINT_MASK); |
240 | btwrite(controlreg, BT878_AGPIO_DMA_CTL); | 240 | btwrite(controlreg, BT878_AGPIO_DMA_CTL); |
241 | } | 241 | } |
@@ -461,9 +461,9 @@ static int __devinit bt878_probe(struct pci_dev *dev, | |||
461 | pci_set_drvdata(dev, bt); | 461 | pci_set_drvdata(dev, bt); |
462 | 462 | ||
463 | /* if(init_bt878(btv) < 0) { | 463 | /* if(init_bt878(btv) < 0) { |
464 | bt878_remove(dev); | 464 | bt878_remove(dev); |
465 | return -EIO; | 465 | return -EIO; |
466 | } | 466 | } |
467 | */ | 467 | */ |
468 | 468 | ||
469 | if ((result = bt878_mem_alloc(bt))) { | 469 | if ((result = bt878_mem_alloc(bt))) { |
@@ -536,10 +536,10 @@ static struct pci_device_id bt878_pci_tbl[] __devinitdata = { | |||
536 | MODULE_DEVICE_TABLE(pci, bt878_pci_tbl); | 536 | MODULE_DEVICE_TABLE(pci, bt878_pci_tbl); |
537 | 537 | ||
538 | static struct pci_driver bt878_pci_driver = { | 538 | static struct pci_driver bt878_pci_driver = { |
539 | .name = "bt878", | 539 | .name = "bt878", |
540 | .id_table = bt878_pci_tbl, | 540 | .id_table = bt878_pci_tbl, |
541 | .probe = bt878_probe, | 541 | .probe = bt878_probe, |
542 | .remove = bt878_remove, | 542 | .remove = bt878_remove, |
543 | }; | 543 | }; |
544 | 544 | ||
545 | static int bt878_pci_driver_registered = 0; | 545 | static int bt878_pci_driver_registered = 0; |
@@ -558,7 +558,7 @@ static int bt878_init_module(void) | |||
558 | (BT878_VERSION_CODE >> 8) & 0xff, | 558 | (BT878_VERSION_CODE >> 8) & 0xff, |
559 | BT878_VERSION_CODE & 0xff); | 559 | BT878_VERSION_CODE & 0xff); |
560 | /* | 560 | /* |
561 | bt878_check_chipset(); | 561 | bt878_check_chipset(); |
562 | */ | 562 | */ |
563 | /* later we register inside of bt878_find_audio_dma() | 563 | /* later we register inside of bt878_find_audio_dma() |
564 | * because we may want to ignore certain cards */ | 564 | * because we may want to ignore certain cards */ |