12 #ifndef __GR1553BC_LIST_H__ 13 #define __GR1553BC_LIST_H__ 196 #include "gr1553bc.h" 203 #define GR1553BC_TIMESLOT 205 #define GR1553BC_MINOR_MAX 256 206 #define GR1553BC_SLOT_MAX 32 229 unsigned char rt_timeout[31];
230 unsigned char bc_timeout;
232 int tropt_irq_on_err;
233 int tropt_pause_on_err;
244 unsigned int table_hw;
245 unsigned int table_cpu;
248 unsigned char rt_timeout[32];
263 extern int gr1553bc_list_alloc(
struct gr1553bc_list **list,
int max_major);
275 extern int gr1553bc_list_config
287 extern void gr1553bc_list_link_major(
296 extern int gr1553bc_list_set_major(
302 extern int gr1553bc_minor_table_size(
struct gr1553bc_minor *minor);
306 extern int gr1553bc_list_table_size(
struct gr1553bc_list *list);
318 extern int gr1553bc_list_table_alloc
325 extern void gr1553bc_list_table_free(
struct gr1553bc_list *list);
330 extern int gr1553bc_list_table_build(
struct gr1553bc_list *list);
352 extern int gr1553bc_major_alloc_skel
365 #define GR1553BC_ID(major_num, minor_num, slot_num) \ 366 ((((major_num)<<16)&0xff0000) | (((minor_num)<<8)&0xff00) | \ 368 #define GR1553BC_MINOR_ID(major_num, minor_num) \ 369 GR1553BC_ID(major_num, minor_num, 0xff) 370 #define GR1553BC_MAJOR_ID(major_num) \ 371 GR1553BC_ID(major_num, 0xff, 0xff) 373 #define GR1553BC_MAJID_FROM_ID(mid) (((mid) >> 16) & 0xff) 374 #define GR1553BC_MINID_FROM_ID(mid) (((mid) >> 8) & 0xff) 375 #define GR1553BC_SLOTID_FROM_ID(mid) ((mid) & 0xff) 376 #define GR1553BC_ID_SET_SLOT(mid, slot_num) (((mid) & ~0xff) | ((slot_num) & 0xff)) 391 extern int gr1553bc_list_freetime(
struct gr1553bc_list *list,
int mid);
408 extern int gr1553bc_slot_alloc(
417 extern int gr1553bc_slot_alloc2(
428 extern int gr1553bc_slot_free(
struct gr1553bc_list *list,
int mid);
429 extern int gr1553bc_slot_free2(
struct gr1553bc_minor *minor,
int mid);
450 extern int gr1553bc_mid_from_bd(
466 typedef void (*bcirq_func_t)(
union gr1553bc_bd *bd,
void *data);
471 extern int gr1553bc_slot_irq_prepare
480 extern int gr1553bc_slot_irq_enable(
struct gr1553bc_list *list,
int mid);
486 extern int gr1553bc_slot_irq_disable(
struct gr1553bc_list *list,
int mid);
493 extern int gr1553bc_slot_jump
504 extern int gr1553bc_slot_exttrig(
struct gr1553bc_list *list,
int mid);
542 extern int gr1553bc_slot_transfer(
553 extern int gr1553bc_slot_dummy(
556 unsigned int *dummy);
561 extern int gr1553bc_slot_empty(
struct gr1553bc_list *list,
int mid);
580 extern int gr1553bc_slot_update(
592 extern int gr1553bc_slot_raw
607 #define GR1553BC_BC2RT(rtadr, subadr, word_count) \ 608 ((rtadr<<11) | (subadr<<5) | (0x1f<<21) | (0<<10) | \ 609 ((word_count>=32) ? 0 : word_count)) 612 #define GR1553BC_RT2BC(rtadr, subadr, word_count) \ 613 ((rtadr<<11) | (subadr<<5) | (0x1f<<21) | (1<<10) | \ 614 ((word_count>=32) ? 0 : word_count)) 617 #define GR1553BC_RT2RT(tx_rtadr, tx_subadr, rx_rtadr, rx_subadr, word_count) \ 618 ((rx_rtadr<<11) | (rx_subadr<<5) | \ 619 (tx_rtadr<<21) | (tx_subadr<<16) | \ 621 ((word_count>=32) ? 0 : word_count)) 626 #define GR1553BC_MC_NODATA(rtadr, modecode) \ 627 ((rtadr<<11) | (0x1f<<5) | (0x1f<<21) | \ 628 (modecode<<0) | (1<<10)) 633 #define GR1553BC_MC_RT2BC(rtadr, modecode) \ 634 ((rtadr<<11) | (0x1f<<5) | (0x1f<<21) | \ 635 (modecode<<0) | (1<<10)) 640 #define GR1553BC_MC_BC2RT(rtadr, modecode) \ 641 ((rtadr<<11) | (0x1f<<5) | (0x1f<<21) | \ 642 (modecode<<0) | (0<<10)) 645 #define GR1553BC_BC_BC2RT(subadr, word_count) \ 646 ((0x1f<<11) | (subadr<<5) | (0x1f<<21) | \ 648 ((word_count>=32) ? 0 : word_count)) 651 #define GR1553BC_BC_RT2RT(tx_rtadr, tx_subadr, rx_subadr, word_count) \ 652 ((0x1f<<11) | (rx_subadr<<5) | \ 653 (tx_rtadr<<21) | (tx_subadr<<16) | \ 655 ((word_count>=32) ? 0 : word_count)) 660 #define GR1553BC_BC_MC_NODATA(modecode) \ 661 ((0x1f<<11) | (0x1f<<5) | (0x1f<<21) | \ 662 ((modecode)<<0) | (1<<10)) 667 #define GR1553BC_BC_MC_BC2RT(modecode) \ 668 ((0x1f<<11) | (0x1f<<5) | (0x1f<<21) | \ 669 ((modecode)<<0) | (0<<10)) 675 #define GR1553BC_OPT_DUMMY (1<<1) 678 #define GR1553BC_RETRY_SAME 0x0 679 #define GR1553BC_RETRY_ALTER 0x1 680 #define GR1553BC_RETRY_ATTEMPT 0x2 683 #define GR1553BC_RETRY_CNT_MAX 6 690 #define GR1553BC_OPTIONS(dummy, exttrig, exclusive, retrymode, nretry, bus) \ 691 ((((exttrig) & 0x1) << 30) | (((exclusive) & 0x1) << 29) | \ 692 ((retrymode) << 23) | ((nretry) << 20) | \ 693 ((bus) & 1) | (((dummy) & 0x1) << 1)) 695 #define GR1553BC_OPTIONS_BUSA GR1553BC_OPTIONS(0,0,0,GR1553BC_RETRY_SAME,0,0) 696 #define GR1553BC_OPTIONS_BUSB GR1553BC_OPTIONS(0,0,0,GR1553BC_RETRY_SAME,0,1) 697 #define GR1553BC_OPTIONS_BUSA_DUM GR1553BC_OPTIONS(1,0,0,GR1553BC_RETRY_SAME,0,0) 698 #define GR1553BC_OPTIONS_BUSB_DUM GR1553BC_OPTIONS(1,0,0,GR1553BC_RETRY_SAME,0,1) 701 extern void gr1553bc_show_list(
struct gr1553bc_list *list,
int options);
Definition: gr1553bc.h:72
Definition: gr1553bc_list.h:223
Definition: gr1553bc_list.h:340
Definition: gr1553bc_list.h:218
Definition: gr1553bc_list.h:228
Definition: gr1553bc_list.h:333
Definition: gr1553bc_list.h:241