Lines Matching +full:0 +full:xfffffe00

26 static unsigned int card[] = {[0 ... (CX25821_MAXBOARDS - 1)] = UNSET };
330 pr_cont("0x%08x [ %s", in cx25821_risc_decode()
332 for (i = ARRAY_SIZE(bits) - 1; i >= 0; i--) { in cx25821_risc_decode()
336 pr_cont(" count=%d ]\n", risc & 0xfff); in cx25821_risc_decode()
345 cx_write(DEV_CNTRL2, 0x20); in cx25821_registers_init()
350 cx_write(PCI_INT_MSK, 0x2001FFFF); in cx25821_registers_init()
357 cx_write(PLL_A_INT_FRAC, 0x9807A58B); in cx25821_registers_init()
359 /* PLL_A_POST = 0x1C, PLL_A_OUT_TO_PIN = 0x1 */ in cx25821_registers_init()
360 cx_write(PLL_A_POST_STAT_BIST, 0x8000019C); in cx25821_registers_init()
364 cx_write(PLL_A_INT_FRAC, tmp & 0x7FFFFFFF); in cx25821_registers_init()
367 cx_write(PLL_B_INT_FRAC, 0x9883A86F); in cx25821_registers_init()
369 /* PLL_B_POST = 0xD, PLL_B_OUT_TO_PIN = 0x0 */ in cx25821_registers_init()
370 cx_write(PLL_B_POST_STAT_BIST, 0x8000018D); in cx25821_registers_init()
374 cx_write(PLL_B_INT_FRAC, tmp & 0x7FFFFFFF); in cx25821_registers_init()
377 cx_write(PLL_C_INT_FRAC, 0x96A0EA3F); in cx25821_registers_init()
379 /* PLL_C_POST = 0x3, PLL_C_OUT_TO_PIN = 0x0 */ in cx25821_registers_init()
380 cx_write(PLL_C_POST_STAT_BIST, 0x80000103); in cx25821_registers_init()
384 cx_write(PLL_C_INT_FRAC, tmp & 0x7FFFFFFF); in cx25821_registers_init()
387 cx_write(PLL_D_INT_FRAC, 0x98757F5B); in cx25821_registers_init()
389 /* PLL_D_POST = 0x13, PLL_D_OUT_TO_PIN = 0x0 */ in cx25821_registers_init()
390 cx_write(PLL_D_POST_STAT_BIST, 0x80000113); in cx25821_registers_init()
394 cx_write(PLL_D_INT_FRAC, tmp & 0x7FFFFFFF); in cx25821_registers_init()
399 cx_write(VID_CH_CLK_SEL, (tmp & 0x00FFFFFF) | 0x24000000); in cx25821_registers_init()
405 /* cx_write( VID_CH_MODE_SEL, tmp | 0x1B0001FF); */ in cx25821_registers_init()
406 cx_write(VID_CH_MODE_SEL, tmp & 0xFFFFFE00); in cx25821_registers_init()
424 if (ch->cmds_start == 0) { in cx25821_sram_channel_setup()
425 cx_write(ch->ptr1_reg, 0); in cx25821_sram_channel_setup()
426 cx_write(ch->ptr2_reg, 0); in cx25821_sram_channel_setup()
427 cx_write(ch->cnt2_reg, 0); in cx25821_sram_channel_setup()
428 cx_write(ch->cnt1_reg, 0); in cx25821_sram_channel_setup()
429 return 0; in cx25821_sram_channel_setup()
441 cx_write(8 + 0, RISC_JUMP | RISC_IRQ1 | RISC_CNT_INC); in cx25821_sram_channel_setup()
443 cx_write(8 + 8, 0); in cx25821_sram_channel_setup()
446 for (i = 0; i < lines; i++) { in cx25821_sram_channel_setup()
448 cx_write(cdt + 16 * i + 4, 0); in cx25821_sram_channel_setup()
449 cx_write(cdt + 16 * i + 8, 0); in cx25821_sram_channel_setup()
450 cx_write(cdt + 16 * i + 12, 0); in cx25821_sram_channel_setup()
454 for (i = 0; i < 128; i++) in cx25821_sram_channel_setup()
459 cx_write(ch->cmds_start + 0, 8); in cx25821_sram_channel_setup()
461 cx_write(ch->cmds_start + 0, risc); in cx25821_sram_channel_setup()
463 cx_write(ch->cmds_start + 4, 0); /* 64 bits 63-32 */ in cx25821_sram_channel_setup()
469 cx_write(ch->cmds_start + 20, 0x80000000 | (64 >> 2)); in cx25821_sram_channel_setup()
474 cx_write(ch->cmds_start + i, 0); in cx25821_sram_channel_setup()
482 return 0; in cx25821_sram_channel_setup()
492 if (ch->cmds_start == 0) { in cx25821_sram_channel_setup_audio()
493 cx_write(ch->ptr1_reg, 0); in cx25821_sram_channel_setup_audio()
494 cx_write(ch->ptr2_reg, 0); in cx25821_sram_channel_setup_audio()
495 cx_write(ch->cnt2_reg, 0); in cx25821_sram_channel_setup_audio()
496 cx_write(ch->cnt1_reg, 0); in cx25821_sram_channel_setup_audio()
497 return 0; in cx25821_sram_channel_setup_audio()
509 cx_write(8 + 0, RISC_JUMP | RISC_IRQ1 | RISC_CNT_INC); in cx25821_sram_channel_setup_audio()
511 cx_write(8 + 8, 0); in cx25821_sram_channel_setup_audio()
514 for (i = 0; i < lines; i++) { in cx25821_sram_channel_setup_audio()
516 cx_write(cdt + 16 * i + 4, 0); in cx25821_sram_channel_setup_audio()
517 cx_write(cdt + 16 * i + 8, 0); in cx25821_sram_channel_setup_audio()
518 cx_write(cdt + 16 * i + 12, 0); in cx25821_sram_channel_setup_audio()
523 cx_write(ch->cmds_start + 0, 8); in cx25821_sram_channel_setup_audio()
525 cx_write(ch->cmds_start + 0, risc); in cx25821_sram_channel_setup_audio()
527 cx_write(ch->cmds_start + 4, 0); /* 64 bits 63-32 */ in cx25821_sram_channel_setup_audio()
534 cx_write(ch->cmds_start + 20, 0x80000000 | (64 >> 2)); in cx25821_sram_channel_setup_audio()
540 cx_write(ch->cmds_start + i, 0); in cx25821_sram_channel_setup_audio()
548 return 0; in cx25821_sram_channel_setup_audio()
574 for (i = 0; i < ARRAY_SIZE(name); i++) in cx25821_sram_channel_dump()
575 pr_warn("cmds + 0x%2x: %-15s: 0x%08x\n", in cx25821_sram_channel_dump()
579 for (i = 0; i < 4;) { in cx25821_sram_channel_dump()
581 pr_warn("cmds + 0x%2x: risc%d: ", j + i * 4, i); in cx25821_sram_channel_dump()
585 for (i = 0; i < (64 >> 2); i += n) { in cx25821_sram_channel_dump()
589 pr_warn("ctrl + 0x%2x (0x%08x): iq %x: ", in cx25821_sram_channel_dump()
594 pr_warn("ctrl + 0x%2x : iq %x: 0x%08x [ arg #%d ]\n", in cx25821_sram_channel_dump()
599 pr_warn(" : fifo: 0x%08x -> 0x%x\n", in cx25821_sram_channel_dump()
601 pr_warn(" : ctrl: 0x%08x -> 0x%x\n", in cx25821_sram_channel_dump()
603 pr_warn(" : ptr1_reg: 0x%08x\n", in cx25821_sram_channel_dump()
605 pr_warn(" : ptr2_reg: 0x%08x\n", in cx25821_sram_channel_dump()
607 pr_warn(" : cnt1_reg: 0x%08x\n", in cx25821_sram_channel_dump()
609 pr_warn(" : cnt2_reg: 0x%08x\n", in cx25821_sram_channel_dump()
639 for (i = 0; i < ARRAY_SIZE(name); i++) in cx25821_sram_channel_dump_audio()
640 pr_info("%s: cmds + 0x%2x: %-15s: 0x%08x\n", in cx25821_sram_channel_dump_audio()
645 for (i = 0; i < 4;) { in cx25821_sram_channel_dump_audio()
647 pr_warn("cmds + 0x%2x: risc%d: ", j + i * 4, i); in cx25821_sram_channel_dump_audio()
651 for (i = 0; i < (64 >> 2); i += n) { in cx25821_sram_channel_dump_audio()
655 pr_warn("ctrl + 0x%2x (0x%08x): iq %x: ", in cx25821_sram_channel_dump_audio()
661 pr_warn("ctrl + 0x%2x : iq %x: 0x%08x [ arg #%d ]\n", in cx25821_sram_channel_dump_audio()
666 pr_warn(" : fifo: 0x%08x -> 0x%x\n", in cx25821_sram_channel_dump_audio()
668 pr_warn(" : ctrl: 0x%08x -> 0x%x\n", in cx25821_sram_channel_dump_audio()
670 pr_warn(" : ptr1_reg: 0x%08x\n", in cx25821_sram_channel_dump_audio()
672 pr_warn(" : ptr2_reg: 0x%08x\n", in cx25821_sram_channel_dump_audio()
674 pr_warn(" : cnt1_reg: 0x%08x\n", in cx25821_sram_channel_dump_audio()
676 pr_warn(" : cnt2_reg: 0x%08x\n", in cx25821_sram_channel_dump_audio()
679 for (i = 0; i < 4; i++) { in cx25821_sram_channel_dump_audio()
681 pr_warn("instruction %d = 0x%x\n", i, risc); in cx25821_sram_channel_dump_audio()
686 pr_warn("\nread cdt loc=0x%x\n", risc); in cx25821_sram_channel_dump_audio()
687 for (i = 0; i < 8; i++) { in cx25821_sram_channel_dump_audio()
689 pr_cont("0x%x ", n); in cx25821_sram_channel_dump_audio()
694 CX25821_INFO(" CLK_RST = 0x%x\n\n", value); in cx25821_sram_channel_dump_audio()
697 CX25821_INFO(" PLL_A_POST_STAT_BIST = 0x%x\n\n", value); in cx25821_sram_channel_dump_audio()
699 CX25821_INFO(" PLL_A_INT_FRAC = 0x%x\n\n", value); in cx25821_sram_channel_dump_audio()
702 CX25821_INFO(" PLL_B_POST_STAT_BIST = 0x%x\n\n", value); in cx25821_sram_channel_dump_audio()
704 CX25821_INFO(" PLL_B_INT_FRAC = 0x%x\n\n", value); in cx25821_sram_channel_dump_audio()
707 CX25821_INFO(" PLL_C_POST_STAT_BIST = 0x%x\n\n", value); in cx25821_sram_channel_dump_audio()
709 CX25821_INFO(" PLL_C_INT_FRAC = 0x%x\n\n", value); in cx25821_sram_channel_dump_audio()
712 CX25821_INFO(" PLL_D_POST_STAT_BIST = 0x%x\n\n", value); in cx25821_sram_channel_dump_audio()
714 CX25821_INFO(" PLL_D_INT_FRAC = 0x%x\n\n", value); in cx25821_sram_channel_dump_audio()
716 value = cx25821_i2c_read(&dev->i2c_bus[0], AFE_AB_DIAG_CTRL, &tmp); in cx25821_sram_channel_dump_audio()
717 CX25821_INFO(" AFE_AB_DIAG_CTRL (0x10900090) = 0x%x\n\n", value); in cx25821_sram_channel_dump_audio()
726 cx_write(DEV_CNTRL2, 0); in cx25821_shutdown()
729 for (i = 0; i < VID_CHANNEL_NUM; i++) { in cx25821_shutdown()
730 cx_write(dev->channels[i].sram_channels->dma_ctl, 0); in cx25821_shutdown()
731 cx_write(dev->channels[i].sram_channels->int_msk, 0); in cx25821_shutdown()
736 cx_write(dev->channels[i].sram_channels->dma_ctl, 0); in cx25821_shutdown()
737 cx_write(dev->channels[i].sram_channels->int_msk, 0); in cx25821_shutdown()
741 cx_write(AUD_INT_DMA_CTL, 0); in cx25821_shutdown()
744 cx_write(UART_CTL, 0); in cx25821_shutdown()
747 cx_write(PCI_INT_MSK, 0); in cx25821_shutdown()
748 cx_write(AUD_A_INT_MSK, 0); in cx25821_shutdown()
754 if (channel_select <= 7 && channel_select >= 0) { in cx25821_set_pixel_format()
775 cx_write(PCI_INT_STAT, 0xffffffff); in cx25821_initialize()
777 for (i = 0; i < VID_CHANNEL_NUM; i++) in cx25821_initialize()
778 cx_write(dev->channels[i].sram_channels->int_stat, 0xffffffff); in cx25821_initialize()
780 cx_write(AUD_A_INT_STAT, 0xffffffff); in cx25821_initialize()
781 cx_write(AUD_B_INT_STAT, 0xffffffff); in cx25821_initialize()
782 cx_write(AUD_C_INT_STAT, 0xffffffff); in cx25821_initialize()
783 cx_write(AUD_D_INT_STAT, 0xffffffff); in cx25821_initialize()
784 cx_write(AUD_E_INT_STAT, 0xffffffff); in cx25821_initialize()
786 cx_write(CLK_DELAY, cx_read(CLK_DELAY) & 0x80000000); in cx25821_initialize()
787 cx_write(PAD_CTRL, 0x12); /* for I2C */ in cx25821_initialize()
791 for (i = 0; i < VID_CHANNEL_NUM; i++) { in cx25821_initialize()
794 1440, 0); in cx25821_initialize()
796 dev->channels[i].use_cif_resolution = 0; in cx25821_initialize()
807 dev->channels[SRAM_CH08].sram_channels, 128, 0); in cx25821_initialize()
814 if (request_mem_region(pci_resource_start(dev->pci, 0), in cx25821_get_resources()
815 pci_resource_len(dev->pci, 0), dev->name)) in cx25821_get_resources()
816 return 0; in cx25821_get_resources()
818 pr_err("%s: can't get MMIO memory @ 0x%llx\n", in cx25821_get_resources()
819 dev->name, (unsigned long long)pci_resource_start(dev->pci, 0)); in cx25821_get_resources()
826 dev->hwrevision = cx_read(RDR_CFG2) & 0xff; in cx25821_dev_checkrevision()
828 pr_info("Hardware revision = 0x%02x\n", dev->hwrevision); in cx25821_dev_checkrevision()
857 if (dev->pci->device != 0x8210) { in cx25821_dev_setup()
858 pr_info("%s(): Exiting. Incorrect Hardware device = 0x%02x\n", in cx25821_dev_setup()
862 pr_info("Athena Hardware device = 0x%02x\n", dev->pci->device); in cx25821_dev_setup()
866 for (i = 0; i < MAX_VID_CHANNEL_NUM; i++) { in cx25821_dev_setup()
878 dev->pci_irqmask = 0x001f00; in cx25821_dev_setup()
881 dev->i2c_bus[0].nr = 0; in cx25821_dev_setup()
882 dev->i2c_bus[0].dev = dev; in cx25821_dev_setup()
883 dev->i2c_bus[0].reg_stat = I2C1_STAT; in cx25821_dev_setup()
884 dev->i2c_bus[0].reg_ctrl = I2C1_CTRL; in cx25821_dev_setup()
885 dev->i2c_bus[0].reg_addr = I2C1_ADDR; in cx25821_dev_setup()
886 dev->i2c_bus[0].reg_rdata = I2C1_RDATA; in cx25821_dev_setup()
887 dev->i2c_bus[0].reg_wdata = I2C1_WDATA; in cx25821_dev_setup()
888 dev->i2c_bus[0].i2c_period = (0x07 << 24); /* 1.95MHz */ in cx25821_dev_setup()
890 if (cx25821_get_resources(dev) < 0) { in cx25821_dev_setup()
900 dev->base_io_addr = pci_resource_start(dev->pci, 0); in cx25821_dev_setup()
907 dev->lmmio = ioremap(dev->base_io_addr, pci_resource_len(dev->pci, 0)); in cx25821_dev_setup()
926 cx25821_i2c_register(&dev->i2c_bus[0]); in cx25821_dev_setup()
930 if (medusa_video_init(dev) < 0) in cx25821_dev_setup()
936 return 0; in cx25821_dev_setup()
946 release_mem_region(dev->base_io_addr, pci_resource_len(dev->pci, 0)); in cx25821_dev_unregister()
948 for (i = 0; i < MAX_VID_CAP_CHANNEL_NUM - 1; i++) { in cx25821_dev_unregister()
960 cx25821_i2c_unregister(&dev->i2c_bus[0]); in cx25821_dev_unregister()
970 dma_addr_t dma = 0; in cx25821_riscmem_alloc()
984 return 0; in cx25821_riscmem_alloc()
998 *(rp++) = cpu_to_le32(0); in cx25821_risc_field()
999 *(rp++) = cpu_to_le32(0); /* bits 63-32 */ in cx25821_risc_field()
1008 for (line = 0; line < lines; line++) { in cx25821_risc_field()
1018 *(rp++) = cpu_to_le32(0); /* bits 63-32 */ in cx25821_risc_field()
1026 *(rp++) = cpu_to_le32(0); /* bits 63-32 */ in cx25821_risc_field()
1028 offset = 0; in cx25821_risc_field()
1034 *(rp++) = cpu_to_le32(0); /* bits 63-32 */ in cx25821_risc_field()
1040 *(rp++) = cpu_to_le32(0); /* bits 63-32 */ in cx25821_risc_field()
1060 fields = 0; in cx25821_risc_buffer()
1076 if (rc < 0) in cx25821_risc_buffer()
1083 rp = cx25821_risc_field(rp, sglist, top_offset, 0, bpl, padding, in cx25821_risc_buffer()
1088 rp = cx25821_risc_field(rp, sglist, bottom_offset, 0x200, bpl, in cx25821_risc_buffer()
1096 return 0; in cx25821_risc_buffer()
1113 for (line = 0; line < lines; line++) { in cx25821_risc_field_audio()
1119 if (lpi && line > 0 && !(line % lpi)) in cx25821_risc_field_audio()
1129 *(rp++) = cpu_to_le32(0); /* bits 63-32 */ in cx25821_risc_field_audio()
1137 *(rp++) = cpu_to_le32(0); /* bits 63-32 */ in cx25821_risc_field_audio()
1139 offset = 0; in cx25821_risc_field_audio()
1145 *(rp++) = cpu_to_le32(0); /* bits 63-32 */ in cx25821_risc_field_audio()
1151 *(rp++) = cpu_to_le32(0); /* bits 63-32 */ in cx25821_risc_field_audio()
1179 if (rc < 0) in cx25821_risc_databuffer_audio()
1184 rp = cx25821_risc_field_audio(rp, sglist, 0, NO_SYNC_LINE, bpl, 0, in cx25821_risc_databuffer_audio()
1190 return 0; in cx25821_risc_databuffer_audio()
1196 if (WARN_ON(buf->risc.size == 0)) in cx25821_free_buffer()
1200 memset(&buf->risc, 0, sizeof(buf->risc)); in cx25821_free_buffer()
1208 int i, handled = 0; in cx25821_irq()
1213 if (pci_status == 0) in cx25821_irq()
1216 for (i = 0; i < VID_CHANNEL_NUM; i++) { in cx25821_irq()
1238 printk(KERN_DEBUG pr_fmt("%s: %s [0x%x]"), name, tag, bits); in cx25821_print_irqbits()
1240 for (i = 0; i < len; i++) { in cx25821_print_irqbits()
1266 int err = 0; in cx25821_initdev()
1273 if (err < 0) in cx25821_initdev()
1293 pr_info("%s/0: found at %s, rev: %d, irq: %d, latency: %d, mmio: 0x%llx\n", in cx25821_initdev()
1298 err = dma_set_mask(&pci_dev->dev, 0xffffffff); in cx25821_initdev()
1300 pr_err("%s/0: Oops: no 32bit PCI DMA ???\n", dev->name); in cx25821_initdev()
1308 if (err < 0) { in cx25821_initdev()
1313 return 0; in cx25821_initdev()
1349 .vendor = 0x14f1,
1350 .device = 0x8210,
1351 .subvendor = 0x14f1,
1352 .subdevice = 0x0920,
1355 .vendor = 0x14f1,
1356 .device = 0x8210,
1357 .subvendor = 0x0000,
1358 .subdevice = 0x0000,