Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 337027
b: refs/heads/master
c: 84a08fa
h: refs/heads/master
i:
  337025: a0c846d
  337023: 6da1d79
v: v3
  • Loading branch information
Jens Taprogge authored and Greg Kroah-Hartman committed Oct 19, 2012
1 parent 9c9fdc6 commit 9fe5391
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 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: bb29ab86d18da68e5c7f05814c07d5eb8bdb4652
refs/heads/master: 84a08fa9eb330969b661305bd5a5fcae06d98cba
26 changes: 17 additions & 9 deletions trunk/drivers/staging/ipack/bridges/tpci200.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ static int tpci200_register(struct tpci200_board *tpci200)
int i;
int res;
phys_addr_t ioidint_base;
phys_addr_t mem_base;
unsigned short slot_ctrl;

if (pci_enable_device(tpci200->info->pdev) < 0)
Expand Down Expand Up @@ -293,7 +292,12 @@ static int tpci200_register(struct tpci200_board *tpci200)

ioidint_base = pci_resource_start(tpci200->info->pdev,
TPCI200_IO_ID_INT_SPACES_BAR);
mem_base = pci_resource_start(tpci200->info->pdev,
tpci200->mod_mem[IPACK_IO_SPACE] = ioidint_base + TPCI200_IO_SPACE_OFF;
tpci200->mod_mem[IPACK_ID_SPACE] = ioidint_base + TPCI200_ID_SPACE_OFF;
tpci200->mod_mem[IPACK_INT_SPACE] =
ioidint_base + TPCI200_INT_SPACE_OFF;
tpci200->mod_mem[IPACK_MEM_SPACE] =
pci_resource_start(tpci200->info->pdev,
TPCI200_MEM8_SPACE_BAR);

/* Set the default parameters of the slot
Expand All @@ -308,19 +312,23 @@ static int tpci200_register(struct tpci200_board *tpci200)

/* Set all slot physical address space */
for (i = 0; i < TPCI200_NB_SLOT; i++) {
tpci200->slots[i].io_phys.start = ioidint_base +
TPCI200_IO_SPACE_OFF + TPCI200_IO_SPACE_GAP*i;
tpci200->slots[i].io_phys.start =
tpci200->mod_mem[IPACK_IO_SPACE] +
TPCI200_IO_SPACE_GAP * i;
tpci200->slots[i].io_phys.size = TPCI200_IO_SPACE_SIZE;

tpci200->slots[i].id_phys.start = ioidint_base +
TPCI200_ID_SPACE_OFF + TPCI200_ID_SPACE_GAP*i;
tpci200->slots[i].id_phys.start =
tpci200->mod_mem[IPACK_ID_SPACE] +
TPCI200_ID_SPACE_GAP * i;
tpci200->slots[i].id_phys.size = TPCI200_ID_SPACE_SIZE;

tpci200->slots[i].int_phys.start = ioidint_base +
TPCI200_INT_SPACE_OFF + TPCI200_INT_SPACE_GAP * i;
tpci200->slots[i].int_phys.start =
tpci200->mod_mem[IPACK_INT_SPACE] +
TPCI200_INT_SPACE_GAP * i;
tpci200->slots[i].int_phys.size = TPCI200_INT_SPACE_SIZE;

tpci200->slots[i].mem_phys.start = mem_base +
tpci200->slots[i].mem_phys.start =
tpci200->mod_mem[IPACK_MEM_SPACE] +
TPCI200_MEM8_GAP * i;
tpci200->slots[i].mem_phys.size = TPCI200_MEM8_SIZE;

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/staging/ipack/bridges/tpci200.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ struct tpci200_board {
spinlock_t regs_lock;
struct tpci200_slot *slots;
struct tpci200_infos *info;
phys_addr_t mod_mem[IPACK_SPACE_COUNT];
};

#endif /* _TPCI200_H_ */
7 changes: 5 additions & 2 deletions trunk/drivers/staging/ipack/ipack.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@ struct ipack_driver;

enum ipack_space {
IPACK_IO_SPACE = 0,
IPACK_ID_SPACE = 1,
IPACK_MEM_SPACE = 2,
IPACK_ID_SPACE,
IPACK_MEM_SPACE,
IPACK_INT_SPACE,
/* Dummy for counting the number of entries. Must remain the last
* entry */
IPACK_SPACE_COUNT,
};

/**
Expand Down

0 comments on commit 9fe5391

Please sign in to comment.