Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 337035
b: refs/heads/master
c: 48a9735
h: refs/heads/master
i:
  337033: f9df493
  337031: 33e8777
v: v3
  • Loading branch information
Jens Taprogge authored and Greg Kroah-Hartman committed Oct 19, 2012
1 parent b711326 commit e7135da
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fe4a3ed0d5ce09de5b61335ce51c74caa2a92911
refs/heads/master: 48a97352e18f6ec90355ce1ea70a3f750664adfc
19 changes: 19 additions & 0 deletions trunk/drivers/staging/ipack/bridges/tpci200.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ static const size_t tpci200_space_size[IPACK_SPACE_COUNT] = {
[IPACK_ID_SPACE] = TPCI200_ID_SPACE_SIZE,
[IPACK_INT_SPACE] = TPCI200_INT_SPACE_SIZE,
[IPACK_MEM8_SPACE] = TPCI200_MEM8_SPACE_SIZE,
[IPACK_MEM16_SPACE] = TPCI200_MEM16_SPACE_SIZE,
};

static const size_t tpci200_space_interval[IPACK_SPACE_COUNT] = {
[IPACK_IO_SPACE] = TPCI200_IO_SPACE_INTERVAL,
[IPACK_ID_SPACE] = TPCI200_ID_SPACE_INTERVAL,
[IPACK_INT_SPACE] = TPCI200_INT_SPACE_INTERVAL,
[IPACK_MEM8_SPACE] = TPCI200_MEM8_SPACE_INTERVAL,
[IPACK_MEM16_SPACE] = TPCI200_MEM16_SPACE_INTERVAL,
};

static struct tpci200_board *check_slot(struct ipack_device *dev)
Expand Down Expand Up @@ -94,6 +96,7 @@ static void tpci200_unregister(struct tpci200_board *tpci200)

pci_release_region(tpci200->info->pdev, TPCI200_IP_INTERFACE_BAR);
pci_release_region(tpci200->info->pdev, TPCI200_IO_ID_INT_SPACES_BAR);
pci_release_region(tpci200->info->pdev, TPCI200_MEM16_SPACE_BAR);
pci_release_region(tpci200->info->pdev, TPCI200_MEM8_SPACE_BAR);
pci_release_region(tpci200->info->pdev, TPCI200_CFG_MEM_BAR);

Expand Down Expand Up @@ -282,6 +285,17 @@ static int tpci200_register(struct tpci200_board *tpci200)
goto out_release_ioid_int_space;
}

/* Request MEM16 space (Bar 4) */
res = pci_request_region(tpci200->info->pdev, TPCI200_MEM16_SPACE_BAR,
"Carrier MEM16 space");
if (res) {
dev_err(&tpci200->info->pdev->dev,
"(bn 0x%X, sn 0x%X) failed to allocate PCI resource for BAR 4!",
tpci200->info->pdev->bus->number,
tpci200->info->pdev->devfn);
goto out_release_mem8_space;
}

/* Map internal tpci200 driver user space */
tpci200->info->interface_regs =
ioremap_nocache(pci_resource_start(tpci200->info->pdev,
Expand All @@ -300,6 +314,9 @@ static int tpci200_register(struct tpci200_board *tpci200)
tpci200->mod_mem[IPACK_MEM8_SPACE] =
pci_resource_start(tpci200->info->pdev,
TPCI200_MEM8_SPACE_BAR);
tpci200->mod_mem[IPACK_MEM16_SPACE] =
pci_resource_start(tpci200->info->pdev,
TPCI200_MEM16_SPACE_BAR);

/* Set the default parameters of the slot
* INT0 disabled, level sensitive
Expand All @@ -326,6 +343,8 @@ static int tpci200_register(struct tpci200_board *tpci200)

return 0;

out_release_mem8_space:
pci_release_region(tpci200->info->pdev, TPCI200_MEM8_SPACE_BAR);
out_release_ioid_int_space:
pci_release_region(tpci200->info->pdev, TPCI200_IO_ID_INT_SPACES_BAR);
out_release_ip_space:
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/staging/ipack/ipack.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ enum ipack_space {
IPACK_ID_SPACE,
IPACK_INT_SPACE,
IPACK_MEM8_SPACE,
IPACK_MEM16_SPACE,
/* Dummy for counting the number of entries. Must remain the last
* entry */
IPACK_SPACE_COUNT,
Expand Down

0 comments on commit e7135da

Please sign in to comment.