Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 364112
b: refs/heads/master
c: cc37508
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Apr 11, 2013
1 parent 1cba4aa commit 520e3c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b153c68dce2a213b964505757518405af1372498
refs/heads/master: cc3750883c161b595be02bf235bd38747a68f0d7
21 changes: 5 additions & 16 deletions trunk/drivers/staging/comedi/drivers/mite.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@
#include "comedi_fc.h"
#include "mite.h"

#define PCI_MITE_SIZE 4096
#define PCI_DAQ_SIZE 4096
#define PCI_DAQ_SIZE_660X 8192

#define TOP_OF_PAGE(x) ((x)|(~(PAGE_MASK)))

struct mite_struct *mite_alloc(struct pci_dev *pcidev)
Expand Down Expand Up @@ -104,35 +100,28 @@ static unsigned mite_fifo_size(struct mite_struct *mite, unsigned channel)
int mite_setup2(struct mite_struct *mite, unsigned use_iodwbsr_1)
{
unsigned long length;
resource_size_t addr;
int i;
u32 csigr_bits;
unsigned unknown_dma_burst_bits;

pci_set_master(mite->pcidev);

addr = pci_resource_start(mite->pcidev, 0);
mite->mite_phys_addr = addr;
mite->mite_io_addr = ioremap(addr, PCI_MITE_SIZE);
mite->mite_io_addr = pci_ioremap_bar(mite->pcidev, 0);
if (!mite->mite_io_addr) {
dev_err(&mite->pcidev->dev,
"Failed to remap mite io memory address\n");
return -ENOMEM;
}
mite->mite_phys_addr = pci_resource_start(mite->pcidev, 0);

addr = pci_resource_start(mite->pcidev, 1);
mite->daq_phys_addr = addr;
length = pci_resource_len(mite->pcidev, 1);
/*
* In case of a 660x board, DAQ size is 8k instead of 4k
* (see as shown by lspci output)
*/
mite->daq_io_addr = ioremap(mite->daq_phys_addr, length);
mite->daq_io_addr = pci_ioremap_bar(mite->pcidev, 1);
if (!mite->daq_io_addr) {
dev_err(&mite->pcidev->dev,
"Failed to remap daq io memory address\n");
return -ENOMEM;
}
mite->daq_phys_addr = pci_resource_start(mite->pcidev, 1);
length = pci_resource_len(mite->pcidev, 1);

if (use_iodwbsr_1) {
writel(0, mite->mite_io_addr + MITE_IODWBSR);
Expand Down

0 comments on commit 520e3c9

Please sign in to comment.