static int xlnk_devregister(char *name, unsigned int id,
unsigned long base, unsigned int size,
unsigned int *irqs,
- xlnk_handle_t *handle)
+ u32 *handle)
{
unsigned int nres;
unsigned int nirq;
devpack = xlnk_devpacks_find(base);
if (devpack) {
- *handle = (xlnk_handle_t)devpack;
+ *handle = (u32)devpack;
return 0;
}
nirq = 0;
*handle = 0;
} else {
xlnk_devpacks_add(devpack);
- *handle = (xlnk_handle_t)devpack;
+ *handle = (u32)devpack;
}
return status;
}
unsigned int chan1_poll_mode,
unsigned int chan1_include_dre,
unsigned int chan1_data_width,
- xlnk_handle_t *handle)
+ u32 *handle)
{
int status = -1;
devpack = xlnk_devpacks_find(base);
if (devpack) {
- *handle = (xlnk_handle_t)devpack;
+ *handle = (u32)devpack;
return 0;
}
*handle = 0;
} else {
xlnk_devpacks_add(devpack);
- *handle = (xlnk_handle_t)devpack;
+ *handle = (u32)devpack;
}
#endif
unsigned int mm2s_chan_irq,
unsigned int s2mm_chan_num,
unsigned int s2mm_chan_irq,
- xlnk_handle_t *handle)
+ u32 *handle)
{
int status = -1;
devpack = xlnk_devpacks_find(base);
if (devpack) {
- *handle = (xlnk_handle_t)devpack;
+ *handle = (u32)devpack;
return 0;
}
*handle = 0;
} else {
xlnk_devpacks_add(devpack);
- *handle = (xlnk_handle_t)devpack;
+ *handle = (u32)devpack;
}
#endif
return -ENOMEM;
}
- temp_args.dmarequest.dmachan = (xlnk_handle_t)chan;
+ temp_args.dmarequest.dmachan = (u32)chan;
temp_args.dmarequest.bd_space_phys_addr = chan->bd_phys_addr;
temp_args.dmarequest.bd_space_size = chan->bd_chain_size;
&dmahead);
if (!status) {
- temp_args.dmasubmit.dmahandle = (xlnk_handle_t)dmahead;
+ temp_args.dmasubmit.dmahandle = (u32)dmahead;
temp_args.dmasubmit.last_bd_index =
- (xlnk_handle_t)dmahead->last_bd_index;
+ (u32)dmahead->last_bd_index;
copy_to_user((void *)args, &temp_args, sizeof(xlnk_args));
+
return 0;
}
#endif
{
xlnk_args temp_args;
int status;
- xlnk_handle_t handle;
+ u32 handle;
status = copy_from_user(&temp_args, (xlnk_args *)args,
sizeof(xlnk_args));
{
xlnk_args temp_args;
int status;
- xlnk_handle_t handle;
+ u32 handle;
status = copy_from_user(&temp_args, (xlnk_args *)args,
sizeof(xlnk_args));
{
xlnk_args temp_args;
int status;
- xlnk_handle_t handle;
+ u32 handle;
status = copy_from_user(&temp_args, (xlnk_args *)args,
sizeof(xlnk_args));
extern void xlnk_record_event(u32 event_id);
-typedef unsigned long xlnk_handle_t;
enum xlnk_dma_direction {
XLNK_DMA_BI = 0,
} freebuf;
struct {
char name[64]; /* max length of 64 */
- xlnk_handle_t dmachan; /* return value */
unsigned int bd_space_phys_addr;/*for bd chain used by dmachan*/
unsigned int bd_space_size; /* bd chain size in bytes */
+ u32 dmachan; /* return value */
} dmarequest;
#define XLNK_MAX_APPWORDS 5
struct {
- xlnk_handle_t dmachan;
+ u32 dmachan;
void *buf; /* buffer base address */
void *buf2; /* used to point src_buf in cdma case */
unsigned int buf_offset; /* used on kernel allocated buffers */
unsigned int len;
unsigned int bufflag; /* zero all the time so far */
- xlnk_handle_t sglist; /* ignored */
unsigned int sgcnt; /* ignored */
+ u32 sglist; /* ignored */
enum xlnk_dma_direction dmadir;
unsigned int nappwords_i; /* n appwords passed to BD */
unsigned int appwords_i[XLNK_MAX_APPWORDS];
unsigned int nappwords_o; /* n appwords passed from BD */
/* appwords array we only accept 5 max */
unsigned int flag;
- xlnk_handle_t dmahandle; /* return value */
unsigned int last_bd_index; /*index of last bd used by request*/
+ u32 dmahandle; /* return value */
} dmasubmit;
struct {
- xlnk_handle_t dmahandle;
unsigned int nappwords; /* n appwords read from BD */
unsigned int appwords[XLNK_MAX_APPWORDS];
+ u32 dmahandle;
/* appwords array we only accept 5 max */
} dmawait;
struct {
- xlnk_handle_t dmachan;
+ u32 dmachan;
} dmarelease;
struct {
unsigned long base;