diff options
Diffstat (limited to 'drivers/staging/sep/sep_driver.c')
-rw-r--r-- | drivers/staging/sep/sep_driver.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c index 2bb381fc063..0cd7114e4e2 100644 --- a/drivers/staging/sep/sep_driver.c +++ b/drivers/staging/sep/sep_driver.c @@ -261,26 +261,12 @@ static void sep_unmap_and_free_shared_area(struct sep_device *sep) } /** - * sep_shared_virt_to_bus - convert bus/virt addresses - * - * Returns the bus address inside the shared area according - * to the virtual address. - */ - -static dma_addr_t sep_shared_virt_to_bus(struct sep_device *sep, - void *virt_address) -{ - dma_addr_t pa = sep->shared_bus + (virt_address - sep->shared_addr); - edbg("sep: virt to bus b %08llx v %p\n", (unsigned long long) pa, - virt_address); - return pa; -} - -/** * sep_shared_bus_to_virt - convert bus/virt addresses * * Returns virtual address inside the shared area according * to the bus address. + * @sep: pointer to struct sep_device + * @bus_address: address to convert */ static void *sep_shared_bus_to_virt(struct sep_device *sep, @@ -289,7 +275,6 @@ static void *sep_shared_bus_to_virt(struct sep_device *sep, return sep->shared_addr + (bus_address - sep->shared_bus); } - /** * sep_try_open - attempt to open a SEP device * @sep: device to attempt to open @@ -1179,14 +1164,12 @@ static int sep_prepare_input_dma_table(struct sep_device *sep, if (info_entry_ptr == 0) { /* set the output parameters to physical addresses */ - *lli_table_ptr = sep_shared_virt_to_bus(sep, in_lli_table_ptr); *num_entries_ptr = num_entries_in_table; *table_data_size_ptr = table_data_size; edbg("SEP Driver:output lli_table_in_ptr is %08lx\n", *lli_table_ptr); } else { /* update the info entry of the previous in table */ - info_entry_ptr->physical_address = sep_shared_virt_to_bus(sep, in_lli_table_ptr); info_entry_ptr->block_size = ((num_entries_in_table) << 24) | (table_data_size); } @@ -1296,9 +1279,7 @@ static int sep_construct_dma_tables_from_lli(struct sep_device *sep, /* if info entry is null - this is the first table built */ if (info_in_entry_ptr == 0) { /* set the output parameters to physical addresses */ - *lli_table_in_ptr = sep_shared_virt_to_bus(sep, in_lli_table_ptr); *in_num_entries_ptr = num_entries_in_table; - *lli_table_out_ptr = sep_shared_virt_to_bus(sep, out_lli_table_ptr); *out_num_entries_ptr = num_entries_out_table; *table_data_size_ptr = table_data_size; @@ -1306,11 +1287,9 @@ static int sep_construct_dma_tables_from_lli(struct sep_device *sep, edbg("SEP Driver:output lli_table_out_ptr is %08lx\n", *lli_table_out_ptr); } else { /* update the info entry of the previous in table */ - info_in_entry_ptr->physical_address = sep_shared_virt_to_bus(sep, in_lli_table_ptr); info_in_entry_ptr->block_size = ((num_entries_in_table) << 24) | (table_data_size); /* update the info entry of the previous in table */ - info_out_entry_ptr->physical_address = sep_shared_virt_to_bus(sep, out_lli_table_ptr); info_out_entry_ptr->block_size = ((num_entries_out_table) << 24) | (table_data_size); } |