comparison driver/pt1_pci.c @ 79:3c2123189edf

improve PT2 support. - update read check in initialization - PT2 specific RAM phase initialization
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Mon, 07 Dec 2009 15:01:57 +0900
parents 272a8fba970b
children f336fd2dcf28
comparison
equal deleted inserted replaced
78:5a0126d8af17 79:3c2123189edf
684 // PCIアドレスをマップする 684 // PCIアドレスをマップする
685 dev_conf->mmio_start = pci_resource_start(pdev, 0); 685 dev_conf->mmio_start = pci_resource_start(pdev, 0);
686 dev_conf->mmio_len = pci_resource_len(pdev, 0); 686 dev_conf->mmio_len = pci_resource_len(pdev, 0);
687 dummy = request_mem_region(dev_conf->mmio_start, dev_conf->mmio_len, DEV_NAME); 687 dummy = request_mem_region(dev_conf->mmio_start, dev_conf->mmio_len, DEV_NAME);
688 if (!dummy) { 688 if (!dummy) {
689 printk(KERN_ERR "PT1: cannot request iomem (0x%llx).\n", (unsigned long long) dev_conf->mmio_start); 689 printk(KERN_ERR "PT1:cannot request iomem (0x%llx).\n", (unsigned long long) dev_conf->mmio_start);
690 goto out_err_regbase; 690 goto out_err_regbase;
691 } 691 }
692 692
693 dev_conf->regs = ioremap(dev_conf->mmio_start, dev_conf->mmio_len); 693 dev_conf->regs = ioremap(dev_conf->mmio_start, dev_conf->mmio_len);
694 if (!dev_conf->regs){ 694 if (!dev_conf->regs){
695 printk(KERN_ERR "pt1: Can't remap register area.\n"); 695 printk(KERN_ERR "pt1:Can't remap register area.\n");
696 goto out_err_regbase; 696 goto out_err_regbase;
697 } 697 }
698 // 初期化処理 698 // 初期化処理
699 if(xc3s_init(dev_conf->regs)){ 699 if(xc3s_init(dev_conf->regs, dev_conf->cardtype)){
700 printk(KERN_ERR "Error xc3s_init\n"); 700 printk(KERN_ERR "Error xc3s_init\n");
701 goto out_err_fpga; 701 goto out_err_fpga;
702 } 702 }
703 // チューナリセット 703 // チューナリセット
704 settuner_reset(dev_conf->regs, dev_conf->cardtype, LNB_OFF, TUNER_POWER_ON_RESET_ENABLE); 704 settuner_reset(dev_conf->regs, dev_conf->cardtype, LNB_OFF, TUNER_POWER_ON_RESET_ENABLE);
732 init_waitqueue_head(&dev_conf->dma_wait_q); 732 init_waitqueue_head(&dev_conf->dma_wait_q);
733 733
734 minor = MINOR(dev_conf->dev) ; 734 minor = MINOR(dev_conf->dev) ;
735 dev_conf->base_minor = minor ; 735 dev_conf->base_minor = minor ;
736 for(lp = 0 ; lp < MAX_PCI_DEVICE ; lp++){ 736 for(lp = 0 ; lp < MAX_PCI_DEVICE ; lp++){
737 printk(KERN_INFO "PT1: device[%d]=%p\n", lp, device[lp]); 737 printk(KERN_INFO "PT1:device[%d]=%p\n", lp, device[lp]);
738 if(device[lp] == NULL){ 738 if(device[lp] == NULL){
739 device[lp] = dev_conf ; 739 device[lp] = dev_conf ;
740 dev_conf->card_number = lp; 740 dev_conf->card_number = lp;
741 break ; 741 break ;
742 } 742 }
783 } 783 }
784 if(channel->buf == NULL){ 784 if(channel->buf == NULL){
785 goto out_err_v4l; 785 goto out_err_v4l;
786 } 786 }
787 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) 787 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
788 printk(KERN_INFO "PT1: card_number = %d\n", 788 printk(KERN_INFO "PT1:card_number = %d\n",
789 dev_conf->card_number); 789 dev_conf->card_number);
790 device_create(pt1video_class, 790 device_create(pt1video_class,
791 NULL, 791 NULL,
792 MKDEV(MAJOR(dev_conf->dev), 792 MKDEV(MAJOR(dev_conf->dev),
793 (MINOR(dev_conf->dev) + lp)), 793 (MINOR(dev_conf->dev) + lp)),