Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235950
b: refs/heads/master
c: dab7f7f
h: refs/heads/master
v: v3
  • Loading branch information
Rene Sapiens authored and Omar Ramirez Luna committed Feb 5, 2011
1 parent 24bb89e commit ae447e0
Show file tree
Hide file tree
Showing 19 changed files with 124 additions and 124 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: 09f133045c57c479cad02d44791534df3b5b056e
refs/heads/master: dab7f7fee09b28034af3cac527b16927e4e2a193
50 changes: 25 additions & 25 deletions trunk/drivers/staging/tidspbridge/core/io_sm.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ struct io_mgr {
u32 ul_gpp_read_pointer; /* GPP Read pointer to Trace buffer */
u8 *pmsg;
u32 ul_gpp_va;
u32 ul_dsp_va;
u32 dsp_va;
#endif
/* IO Dpc */
u32 dpc_req; /* Number of requested DPC's. */
Expand Down Expand Up @@ -421,7 +421,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
ul_gpp_va = host_res->mem_base[1];
/* This is the virtual uncached ioremapped address!!! */
/* Why can't we directly take the DSPVA from the symbols? */
ul_dsp_va = hio_mgr->ext_proc_info.ty_tlb[0].ul_dsp_virt;
ul_dsp_va = hio_mgr->ext_proc_info.ty_tlb[0].dsp_virt;
ul_seg_size = (shm0_end - ul_dsp_va) * hio_mgr->word_size;
ul_seg1_size =
(ul_ext_end - ul_dyn_ext_base) * hio_mgr->word_size;
Expand Down Expand Up @@ -527,23 +527,23 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
* This is the physical address written to
* DSP MMU.
*/
ae_proc[ndx].ul_gpp_pa = pa_curr;
ae_proc[ndx].gpp_pa = pa_curr;
/*
* This is the virtual uncached ioremapped
* address!!!
*/
ae_proc[ndx].ul_gpp_va = gpp_va_curr;
ae_proc[ndx].ul_dsp_va =
ae_proc[ndx].dsp_va =
va_curr / hio_mgr->word_size;
ae_proc[ndx].ul_size = page_size[i];
ae_proc[ndx].endianism = HW_LITTLE_ENDIAN;
ae_proc[ndx].elem_size = HW_ELEM_SIZE16BIT;
ae_proc[ndx].mixed_mode = HW_MMU_CPUES;
dev_dbg(bridge, "shm MMU TLB entry PA %x"
" VA %x DSP_VA %x Size %x\n",
ae_proc[ndx].ul_gpp_pa,
ae_proc[ndx].gpp_pa,
ae_proc[ndx].ul_gpp_va,
ae_proc[ndx].ul_dsp_va *
ae_proc[ndx].dsp_va *
hio_mgr->word_size, page_size[i]);
ndx++;
} else {
Expand All @@ -556,9 +556,9 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
dev_dbg(bridge,
"shm MMU PTE entry PA %x"
" VA %x DSP_VA %x Size %x\n",
ae_proc[ndx].ul_gpp_pa,
ae_proc[ndx].gpp_pa,
ae_proc[ndx].ul_gpp_va,
ae_proc[ndx].ul_dsp_va *
ae_proc[ndx].dsp_va *
hio_mgr->word_size, page_size[i]);
if (status)
goto func_end;
Expand Down Expand Up @@ -587,40 +587,40 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
ul_gpp_pa - 0x100000
&& hio_mgr->ext_proc_info.ty_tlb[i].ul_gpp_phys <=
ul_gpp_pa + ul_seg_size)
|| (hio_mgr->ext_proc_info.ty_tlb[i].ul_dsp_virt >
|| (hio_mgr->ext_proc_info.ty_tlb[i].dsp_virt >
ul_dsp_va - 0x100000 / hio_mgr->word_size
&& hio_mgr->ext_proc_info.ty_tlb[i].ul_dsp_virt <=
&& hio_mgr->ext_proc_info.ty_tlb[i].dsp_virt <=
ul_dsp_va + ul_seg_size / hio_mgr->word_size)) {
dev_dbg(bridge,
"CDB MMU entry %d conflicts with "
"shm.\n\tCDB: GppPa %x, DspVa %x.\n\tSHM: "
"GppPa %x, DspVa %x, Bytes %x.\n", i,
hio_mgr->ext_proc_info.ty_tlb[i].ul_gpp_phys,
hio_mgr->ext_proc_info.ty_tlb[i].ul_dsp_virt,
hio_mgr->ext_proc_info.ty_tlb[i].dsp_virt,
ul_gpp_pa, ul_dsp_va, ul_seg_size);
status = -EPERM;
} else {
if (ndx < MAX_LOCK_TLB_ENTRIES) {
ae_proc[ndx].ul_dsp_va =
ae_proc[ndx].dsp_va =
hio_mgr->ext_proc_info.ty_tlb[i].
ul_dsp_virt;
ae_proc[ndx].ul_gpp_pa =
dsp_virt;
ae_proc[ndx].gpp_pa =
hio_mgr->ext_proc_info.ty_tlb[i].
ul_gpp_phys;
ae_proc[ndx].ul_gpp_va = 0;
/* 1 MB */
ae_proc[ndx].ul_size = 0x100000;
dev_dbg(bridge, "shm MMU entry PA %x "
"DSP_VA 0x%x\n", ae_proc[ndx].ul_gpp_pa,
ae_proc[ndx].ul_dsp_va);
"DSP_VA 0x%x\n", ae_proc[ndx].gpp_pa,
ae_proc[ndx].dsp_va);
ndx++;
} else {
status = hio_mgr->intf_fxns->brd_mem_map
(hio_mgr->hbridge_context,
hio_mgr->ext_proc_info.ty_tlb[i].
ul_gpp_phys,
hio_mgr->ext_proc_info.ty_tlb[i].
ul_dsp_virt, 0x100000, map_attrs,
dsp_virt, 0x100000, map_attrs,
NULL);
}
}
Expand All @@ -647,8 +647,8 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
}

for (i = ndx; i < BRDIOCTL_NUMOFMMUTLB; i++) {
ae_proc[i].ul_dsp_va = 0;
ae_proc[i].ul_gpp_pa = 0;
ae_proc[i].dsp_va = 0;
ae_proc[i].gpp_pa = 0;
ae_proc[i].ul_gpp_va = 0;
ae_proc[i].ul_size = 0;
}
Expand All @@ -668,12 +668,12 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
status = -EFAULT;
goto func_end;
} else {
if (ae_proc[0].ul_dsp_va > ul_shm_base) {
if (ae_proc[0].dsp_va > ul_shm_base) {
status = -EPERM;
goto func_end;
}
/* ul_shm_base may not be at ul_dsp_va address */
ul_shm_base_offset = (ul_shm_base - ae_proc[0].ul_dsp_va) *
ul_shm_base_offset = (ul_shm_base - ae_proc[0].dsp_va) *
hio_mgr->word_size;
/*
* bridge_dev_ctrl() will set dev context dsp-mmu info. In
Expand All @@ -698,7 +698,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
}
/* Register SM */
status =
register_shm_segs(hio_mgr, cod_man, ae_proc[0].ul_gpp_pa);
register_shm_segs(hio_mgr, cod_man, ae_proc[0].gpp_pa);
}

hio_mgr->shared_mem = (struct shm *)ul_shm_base;
Expand Down Expand Up @@ -771,7 +771,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
if (!hio_mgr->pmsg)
status = -ENOMEM;

hio_mgr->ul_dsp_va = ul_dsp_va;
hio_mgr->dsp_va = ul_dsp_va;
hio_mgr->ul_gpp_va = (ul_gpp_va + ul_seg1_size + ul_pad_size);

#endif
Expand Down Expand Up @@ -1544,7 +1544,7 @@ static int register_shm_segs(struct io_mgr *hio_mgr,
ul_gpp_phys = hio_mgr->ext_proc_info.ty_tlb[0].ul_gpp_phys;
/* Get size in bytes */
ul_dsp_virt =
hio_mgr->ext_proc_info.ty_tlb[0].ul_dsp_virt *
hio_mgr->ext_proc_info.ty_tlb[0].dsp_virt *
hio_mgr->word_size;
/*
* Calc byte offset used to convert GPP phys <-> DSP byte
Expand Down Expand Up @@ -1694,7 +1694,7 @@ void print_dsp_debug_trace(struct io_mgr *hio_mgr)
*(u32 *) (hio_mgr->ul_trace_buffer_current);
ul_gpp_cur_pointer =
hio_mgr->ul_gpp_va + (ul_gpp_cur_pointer -
hio_mgr->ul_dsp_va);
hio_mgr->dsp_va);

/* No new debug messages available yet */
if (ul_gpp_cur_pointer == hio_mgr->ul_gpp_read_pointer) {
Expand Down
16 changes: 8 additions & 8 deletions trunk/drivers/staging/tidspbridge/core/tiomap3430.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt,
ul_shm_base_virt *= DSPWORDSIZE;
DBC_ASSERT(ul_shm_base_virt != 0);
/* DSP Virtual address */
ul_tlb_base_virt = dev_context->atlb_entry[0].ul_dsp_va;
ul_tlb_base_virt = dev_context->atlb_entry[0].dsp_va;
DBC_ASSERT(ul_tlb_base_virt <= ul_shm_base_virt);
ul_shm_offset_virt =
ul_shm_base_virt - (ul_tlb_base_virt * DSPWORDSIZE);
Expand Down Expand Up @@ -466,19 +466,19 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt,
.mixed_size = e->mixed_mode,
};

if (!e->ul_gpp_pa || !e->ul_dsp_va)
if (!e->gpp_pa || !e->dsp_va)
continue;

dev_dbg(bridge,
"MMU %d, pa: 0x%x, va: 0x%x, size: 0x%x",
itmp_entry_ndx,
e->ul_gpp_pa,
e->ul_dsp_va,
e->gpp_pa,
e->dsp_va,
e->ul_size);

hw_mmu_tlb_add(dev_context->dsp_mmu_base,
e->ul_gpp_pa,
e->ul_dsp_va,
e->gpp_pa,
e->dsp_va,
e->ul_size,
itmp_entry_ndx,
&map_attrs, 1, 1);
Expand Down Expand Up @@ -771,8 +771,8 @@ static int bridge_dev_create(struct bridge_dev_context
/* Clear dev context MMU table entries.
* These get set on bridge_io_on_loaded() call after program loaded. */
for (entry_ndx = 0; entry_ndx < BRDIOCTL_NUMOFMMUTLB; entry_ndx++) {
dev_context->atlb_entry[entry_ndx].ul_gpp_pa =
dev_context->atlb_entry[entry_ndx].ul_dsp_va = 0;
dev_context->atlb_entry[entry_ndx].gpp_pa =
dev_context->atlb_entry[entry_ndx].dsp_va = 0;
}
dev_context->dsp_base_addr = (u32) MEM_LINEAR_ADDRESS((void *)
(config_param->
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/tidspbridge/core/tiomap_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt,

if (!status) {
ul_tlb_base_virt =
dev_context->atlb_entry[0].ul_dsp_va * DSPWORDSIZE;
dev_context->atlb_entry[0].dsp_va * DSPWORDSIZE;
DBC_ASSERT(ul_tlb_base_virt <= ul_shm_base_virt);
dw_ext_prog_virt_mem =
dev_context->atlb_entry[0].ul_gpp_va;
Expand Down Expand Up @@ -319,7 +319,7 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context,

if (!ret) {
ul_tlb_base_virt =
dev_context->atlb_entry[0].ul_dsp_va * DSPWORDSIZE;
dev_context->atlb_entry[0].dsp_va * DSPWORDSIZE;
DBC_ASSERT(ul_tlb_base_virt <= ul_shm_base_virt);

if (symbols_reloaded) {
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/tidspbridge/gen/uuidutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void uuid_uuid_to_string(struct dsp_uuid *uuid_obj, char *sz_uuid,

i = snprintf(sz_uuid, size,
"%.8X_%.4X_%.4X_%.2X%.2X_%.2X%.2X%.2X%.2X%.2X%.2X",
uuid_obj->ul_data1, uuid_obj->us_data2, uuid_obj->us_data3,
uuid_obj->data1, uuid_obj->us_data2, uuid_obj->us_data3,
uuid_obj->uc_data4, uuid_obj->uc_data5,
uuid_obj->uc_data6[0], uuid_obj->uc_data6[1],
uuid_obj->uc_data6[2], uuid_obj->uc_data6[3],
Expand Down Expand Up @@ -79,7 +79,7 @@ void uuid_uuid_from_string(char *sz_uuid, struct dsp_uuid *uuid_obj)
{
s32 j;

uuid_obj->ul_data1 = uuid_hex_to_bin(sz_uuid, 8);
uuid_obj->data1 = uuid_hex_to_bin(sz_uuid, 8);
sz_uuid += 8;

/* Step over underscore */
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/tidspbridge/include/dspbridge/cmmdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct cmm_mgrattrs {
/* Attributes for CMM_AllocBuf() & CMM_AllocDesc() */
struct cmm_attrs {
u32 ul_seg_id; /* 1,2... are SM segments. 0 is not. */
u32 ul_alignment; /* 0,1,2,4....ul_min_block_size */
u32 alignment; /* 0,1,2,4....ul_min_block_size */
};

/*
Expand Down Expand Up @@ -57,7 +57,7 @@ struct cmm_seginfo {
u32 gpp_base_pa; /* Start Phys addr of Gpp SM seg */
u32 ul_gpp_size; /* Size of Gpp SM seg in bytes */
u32 dsp_base_va; /* DSP virt base byte address */
u32 ul_dsp_size; /* DSP seg size in bytes */
u32 dsp_size; /* DSP seg size in bytes */
/* # of current GPP allocations from this segment */
u32 ul_in_use_cnt;
u32 seg_base_va; /* Start Virt address of SM seg */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ struct dcd_nodeprops {

/* Dynamic load properties */
u16 us_load_type; /* Static, dynamic, overlay */
u32 ul_data_mem_seg_mask; /* Data memory requirements */
u32 ul_code_mem_seg_mask; /* Code memory requirements */
u32 data_mem_seg_mask; /* Data memory requirements */
u32 code_mem_seg_mask; /* Code memory requirements */
};

/* DCD Generic Object Type */
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/tidspbridge/include/dspbridge/dbdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static inline bool is_valid_proc_event(u32 x)

/* The Node UUID structure */
struct dsp_uuid {
u32 ul_data1;
u32 data1;
u16 us_data2;
u16 us_data3;
u8 uc_data4;
Expand Down Expand Up @@ -359,7 +359,7 @@ struct dsp_processorinfo {
int processor_type;
u32 clock_rate;
u32 ul_internal_mem_size;
u32 ul_external_mem_size;
u32 external_mem_size;
u32 processor_id;
int ty_running_rtos;
s32 node_min_priority;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/tidspbridge/include/dspbridge/disp.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ struct disp_object;

/* Node Dispatcher attributes */
struct disp_attr {
u32 ul_chnl_offset; /* Offset of channel ids reserved for RMS */
u32 chnl_offset; /* Offset of channel ids reserved for RMS */
/* Size of buffer for sending data to RMS */
u32 ul_chnl_buf_size;
u32 chnl_buf_size;
int proc_family; /* eg, 5000 */
int proc_type; /* eg, 5510 */
void *reserved1; /* Reserved for future use. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
#define BRDIOCTL_NUMOFMMUTLB 32

struct bridge_ioctl_extproc {
u32 ul_dsp_va; /* DSP virtual address */
u32 ul_gpp_pa; /* GPP physical address */
u32 dsp_va; /* DSP virtual address */
u32 gpp_pa; /* GPP physical address */
/* GPP virtual address. __va does not work for ioremapped addresses */
u32 ul_gpp_va;
u32 ul_size; /* Size of the mapped memory in bytes */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
struct mgr_object;

struct mgr_tlbentry {
u32 ul_dsp_virt; /* DSP virtual address */
u32 dsp_virt; /* DSP virtual address */
u32 ul_gpp_phys; /* GPP physical address */
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ typedef u32(*nldr_writefxn) (void *priv_ref,
*/
struct nldr_attrs {
nldr_ovlyfxn ovly;
nldr_writefxn pfn_write;
nldr_writefxn write;
u16 us_dsp_word_size;
u16 us_dsp_mau_size;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ struct node_taskargs {
u32 profile_id; /* Profile ID */
u32 num_inputs;
u32 num_outputs;
u32 ul_dais_arg; /* Address of iAlg object */
u32 dais_arg; /* Address of iAlg object */
struct node_strmdef *strm_in_def;
struct node_strmdef *strm_out_def;
};
Expand Down
Loading

0 comments on commit ae447e0

Please sign in to comment.