Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 162378
b: refs/heads/master
c: 8c7ff81
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Sep 15, 2009
1 parent 0048aa3 commit d282b1d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 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: ca605bb68ccd1216871659371497f1e6a2543dc4
refs/heads/master: 8c7ff81ac371a9d90faa985241867ce5af67fc8b
26 changes: 13 additions & 13 deletions trunk/drivers/staging/sep/sep_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,7 @@ static int sep_copy_cache_resident_to_area(struct sep_device *sep,
- the physical address of the shared area
*/
static int sep_map_and_alloc_shared_area(struct sep_device *sep,
unsigned long shared_area_size,
unsigned long *kernel_shared_area_addr_ptr,
unsigned long *phys_shared_area_addr_ptr)
unsigned long shared_area_size)
{
/* shared_addr = ioremap_nocache(0xda00000,shared_area_size); */
sep->shared_addr = kmalloc(shared_area_size, GFP_KERNEL);
Expand All @@ -298,14 +296,14 @@ static int sep_map_and_alloc_shared_area(struct sep_device *sep,
return -1;
}
/* FIXME */
sep_dev->shared_bus = __pa(sep->shared_addr);
sep->shared_bus = __pa(sep->shared_addr);
/* shared_bus = 0xda00000; */
*kernel_shared_area_addr_ptr = (unsigned long) sep->shared_addr;
sep->shared_area = (unsigned long)sep->shared_addr;
/* set the physical address of the shared area */
*phys_shared_area_addr_ptr = sep->shared_bus;
sep->shared_area_bus = sep->shared_bus;
edbg("SEP Driver:shared_addr is %p\n", sep->shared_addr);
edbg("SEP Driver:shared_region_size is %08lx\n", shared_area_size);
edbg("SEP Driver:shared_physical_addr is %08lx\n", *phys_shared_area_addr_ptr);
edbg("SEP Driver:shared_physical_addr is %08lx\n", sep->shared_bus);

return 0;
}
Expand All @@ -318,9 +316,9 @@ static int sep_map_and_alloc_shared_area(struct sep_device *sep,
shared area,phys_shared_area_addr_ptr - the physical address of
the shared area
*/
static void sep_unmap_and_free_shared_area(unsigned long shared_area_size, unsigned long kernel_shared_area_addr, unsigned long phys_shared_area_addr)
static void sep_unmap_and_free_shared_area(struct sep_device *sep, int size)
{
kfree((void *) kernel_shared_area_addr);
kfree((void *)sep->shared_area);
}

/*
Expand Down Expand Up @@ -2440,7 +2438,7 @@ static irqreturn_t sep_inthandler(int irq, void *dev_id)




#if 0

static void sep_wait_busy(struct sep_device *sep)
{
Expand Down Expand Up @@ -2480,6 +2478,8 @@ static void sep_configure_dma_burst(struct sep_device *sep)

}

#endif

/*
Function that is activaed on the succesful probe of the SEP device
*/
Expand Down Expand Up @@ -2522,7 +2522,7 @@ static int __devinit sep_probe(struct pci_dev *pdev, const struct pci_device_id
SEP_DRIVER_SYNCHRONIC_DMA_TABLES_AREA_SIZE_IN_BYTES + SEP_DRIVER_DATA_POOL_SHARED_AREA_SIZE_IN_BYTES + SEP_DRIVER_FLOW_DMA_TABLES_AREA_SIZE_IN_BYTES + SEP_DRIVER_STATIC_AREA_SIZE_IN_BYTES + SEP_DRIVER_SYSTEM_DATA_MEMORY_SIZE_IN_BYTES;

/* allocate the shared area */
if (sep_map_and_alloc_shared_area(sep, size, &sep->shared_area, &sep->shared_area_bus)) {
if (sep_map_and_alloc_shared_area(sep, size)) {
error = -ENOMEM;
/* allocation failed */
goto end_function_error;
Expand Down Expand Up @@ -2638,7 +2638,7 @@ static int __devinit sep_probe(struct pci_dev *pdev, const struct pci_device_id
iounmap(sep->io_addr);
end_function_deallocate_sep_shared_area:
/* de-allocate shared area */
sep_unmap_and_free_shared_area(size, sep->shared_area, sep->shared_area_bus);
sep_unmap_and_free_shared_area(sep, size);
end_function_error:
sep_dev = NULL;
end_function:
Expand Down Expand Up @@ -2762,7 +2762,7 @@ static void __exit sep_exit(void)
/* FIXME: We need to do this in the unload for the device */
/* free shared area */
if (sep_dev) {
sep_unmap_and_free_shared_area(size, sep_dev->shared_area, sep_dev->shared_area_bus);
sep_unmap_and_free_shared_area(sep_dev, size);
edbg("SEP Driver: free pages SEP SHARED AREA \n");
iounmap((void *) sep_dev->reg_addr);
edbg("SEP Driver: iounmap \n");
Expand Down

0 comments on commit d282b1d

Please sign in to comment.