Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 162394
b: refs/heads/master
c: 663d8bb
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Sep 15, 2009
1 parent 7979591 commit d2148d2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 34 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: a4e80a1bcc5df3a48cb8a51dd357045c4ebbebc0
refs/heads/master: 663d8bb0a9971666875551acfc15107a9b09e986
42 changes: 9 additions & 33 deletions trunk/drivers/staging/sep/sep_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -2454,8 +2454,6 @@ static int __devinit sep_probe(struct pci_dev *pdev, const struct pci_device_id
struct sep_device *sep;
int counter;
int size; /* size of memory for allocation */
unsigned long iosize;
unsigned long bar0, end0;

edbg("Sep pci probe starting\n");
if (sep_dev != NULL) {
Expand Down Expand Up @@ -2496,6 +2494,8 @@ static int __devinit sep_probe(struct pci_dev *pdev, const struct pci_device_id
}
/* now set the memory regions */
#if (SEP_DRIVER_RECONFIG_MESSAGE_AREA == 1)
/* Note: this test section will need moving before it could ever
work as the registers are not yet mapped ! */
/* send the new SHARED MESSAGE AREA to the SEP */
sep_write_reg(sep, HW_HOST_HOST_SEP_GPR1_REG_ADDR, sep->shared_bus);

Expand All @@ -2521,43 +2521,19 @@ static int __devinit sep_probe(struct pci_dev *pdev, const struct pci_device_id
goto end_function_deallocate_sep_shared_area;
}
edbg("SEP Driver: create flow workqueue \n");
/* load the rom code */
sep_load_rom_code(sep);

sep->pdev = pci_dev_get(pdev);

/* get the io memory start address */
bar0 = pci_resource_start(pdev, 0);
if (!bar0) {
edbg("SEP Driver error pci resource start\n");
goto end_function_deallocate_sep_shared_area;
}

/* get the io memory end address */
end0 = pci_resource_end(pdev, 0);
if (!end0) {
edbg("SEP Driver error pci resource end\n");
goto end_function_deallocate_sep_shared_area;
}

iosize = end0 - bar0 + 1;

edbg("SEP Driver:io_bus is %08lx\n", bar0);

edbg("SEP Driver:io_memory_end_phyaical_address is %08lx\n", end0);

edbg("SEP Driver:io_memory_size is %08lx\n", iosize);

sep->reg_addr = ioremap_nocache(bar0, iosize);
sep->reg_addr = pci_ioremap_bar(pdev, 0);
if (!sep->reg_addr) {
edbg("SEP Driver error ioremap of io memory\n");
edbg("sep: ioremap of registers failed.\n");
goto end_function_deallocate_sep_shared_area;
}
edbg("SEP Driver:reg_addr is %p\n", sep->reg_addr);

edbg("SEP Driver:io_addr is %p\n", sep->reg_addr);
/* load the rom code */
sep_load_rom_code(sep);

/* set up system base address and shared memory location */

sep->rar_addr = dma_alloc_coherent(&sep->pdev->dev,
2 * SEP_RAR_IO_MEM_REGION_SIZE,
&sep->rar_bus, GFP_KERNEL);
Expand All @@ -2567,6 +2543,7 @@ static int __devinit sep_probe(struct pci_dev *pdev, const struct pci_device_id
goto end_function_uniomap;
}


edbg("SEP Driver:rar_bus is %08llx\n", (unsigned long long)sep->rar_bus);
edbg("SEP Driver:rar_virtual is %p\n", sep->rar_addr);

Expand All @@ -2585,8 +2562,7 @@ static int __devinit sep_probe(struct pci_dev *pdev, const struct pci_device_id
error = request_irq(pdev->irq, sep_inthandler, IRQF_SHARED, "sep_driver", sep);
if (error)
goto end_function_free_res;

goto end_function;
return 0;
edbg("SEP Driver: about to write IMR REG_ADDR");

/* set the IMR register - open only GPR 2 */
Expand Down

0 comments on commit d2148d2

Please sign in to comment.