struct pci_dev *pcidev;
unsigned short vendor;
unsigned short device;
- unsigned int master;
unsigned char pci_bus;
unsigned char pci_slot;
unsigned char pci_func;
void v_pci_card_list_display(void);
int i_pci_card_data(struct pcilst_struct *amcc,
unsigned char *pci_bus, unsigned char *pci_slot, unsigned char *pci_func,
- unsigned long *io_addr, unsigned short *irq, unsigned short *master);
+ unsigned long *io_addr, unsigned short *irq);
/****************************************************************************/
amcc_devices=NULL;
last=NULL;
-#if LINUX_VERSION_CODE < 0x020300
- for(pcidev=pci_devices;pcidev;pcidev=pcidev->next){
-#elif LINUX_VERSION_CODE >= 0x020600
for(pcidev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, NULL);
pcidev != NULL ;
pcidev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pcidev)) {
-#else
- pci_for_each_dev(pcidev){
-#endif
for(i_Count=0;i_Count<2;i_Count++)
{
pci_vendor=i_ADDIDATADeviceID[i_Count];
else { amcc_devices=amcc; }
last=amcc;
-#if LINUX_VERSION_CODE < 0x020300
amcc->vendor=pcidev->vendor;
amcc->device=pcidev->device;
- amcc->master=pcidev->master;
- amcc->pci_bus=pcidev->bus->number;
- amcc->pci_slot=PCI_SLOT(pcidev->devfn);
- amcc->pci_func=PCI_FUNC(pcidev->devfn);
- for (i=0;i<5;i++)
- amcc->io_addr[i]=pcidev->base_address[i] & ~3UL;
- amcc->irq=pcidev->irq;
-#else
- amcc->vendor=pcidev->vendor;
- amcc->device=pcidev->device;
-#if 0
- amcc->master=pcidev->master; // how get this information under 2.4 kernels?
-#endif
amcc->pci_bus=pcidev->bus->number;
amcc->pci_slot=PCI_SLOT(pcidev->devfn);
amcc->pci_func=PCI_FUNC(pcidev->devfn);
for (i=0;i<5;i++)
amcc->io_addr[i]=pcidev->resource[i].start & ~3UL;
amcc->irq=pcidev->irq;
-#endif
}
}
if (!amcc) return -1;
if (amcc->used) return 1;
-#if LINUX_VERSION_CODE >= 0x020600
if (pci_enable_device(amcc->pcidev)) return -1;
if (master) pci_set_master(amcc->pcidev);
-#endif
amcc->used=1;
return 0;
struct pcilst_struct *amcc,*next;
printk("List of pci cards\n");
- printk("bus:slot:func vendor device master io_amcc io_daq irq used\n");
+ printk("bus:slot:func vendor device io_amcc io_daq irq used\n");
for (amcc=amcc_devices;amcc;amcc=next) {
next=amcc->next;
- printk("%2d %2d %2d 0x%4x 0x%4x %3s 0x%4x 0x%4x %2d %2d\n",
- amcc->pci_bus,amcc->pci_slot,amcc->pci_func,amcc->vendor,amcc->device,amcc->master?"yes":"no",
+ printk("%2d %2d %2d 0x%4x 0x%4x 0x%4x 0x%4x %2d %2d\n",
+ amcc->pci_bus,amcc->pci_slot,amcc->pci_func,amcc->vendor,amcc->device,
amcc->io_addr[0],amcc->io_addr[2],amcc->irq,amcc->used);
}
/* return all card information for driver */
int i_pci_card_data(struct pcilst_struct *amcc,
unsigned char *pci_bus, unsigned char *pci_slot, unsigned char *pci_func,
- unsigned long *io_addr, unsigned short *irq, unsigned short *master)
+ unsigned long *io_addr, unsigned short *irq)
{
int i;
for (i=0;i<5;i++)
io_addr[i]=amcc->io_addr[i];
*irq=amcc->irq;
- *master=amcc->master;
return 0;
}
int ret,pages,i,n_subdevices;
DWORD dw_Dummy;
unsigned long io_addr[5];
- unsigned short master,irq;//v_58
+ unsigned short irq;//v_58
unsigned long iobase_a,iobase_main,iobase_addon,iobase_reserved;
struct pcilst_struct *card=NULL;
unsigned char pci_bus,pci_slot,pci_func;
return -EIO;
}
- if ((i_pci_card_data(card,&pci_bus,&pci_slot,&pci_func,&io_addr[0],&irq,&master))<0)
+ if ((i_pci_card_data(card,&pci_bus,&pci_slot,&pci_func,&io_addr[0],&irq))<0)
{
i_pci_card_free(card);
printk(" - Can't get AMCC data!\n");
return -ENOMEM;
}
devpriv->amcc=card;
- devpriv->master=master; //testing
devpriv->iobase=dev->iobase;
devpriv->i_IobaseAmcc=iobase_a;//AMCC base address...
devpriv->i_IobaseAddon=iobase_addon;//ADD ON base address....
if (!devpriv->ul_DmaBufferVirtual[0])
{
rt_printk(", Can't allocate DMA buffer, DMA disabled!");
- master=0;
devpriv->us_UseDma=ADDI_DISABLE;
}