Lines Matching +full:0 +full:x1fe00000
30 #define QUEUE_OLD_CONTROL 0
37 #define MSYNC_PEER 0x00 /* ICAN only */
38 #define MSYNC_LOCL 0x01 /* host only */
39 #define TARGET_RUNNING 0x02
40 #define FIRMWARE_STAMP 0x60 /* big endian firmware stamp */
42 #define MSYNC_RB0 0x01
43 #define MSYNC_RB1 0x02
44 #define MSYNC_RBLW 0x04
47 #define MSYNC_WB0 0x10
48 #define MSYNC_WB1 0x20
49 #define MSYNC_WBLW 0x40
62 #define DESC_VALID 0x80
63 #define DESC_WRAP 0x40
64 #define DESC_INTERRUPT 0x20
65 #define DESC_IVALID 0x10
69 #define MSG_CONNECTI 0x02
70 #define MSG_DISCONNECT 0x03
71 #define MSG_IDVERS 0x04
72 #define MSG_MSGLOST 0x05
73 #define MSG_NEWHOSTIF 0x08
74 #define MSG_INQUIRY 0x0a
75 #define MSG_SETAFILMASK 0x10
76 #define MSG_INITFDPMQUEUE 0x11
77 #define MSG_HWCONF 0x12
78 #define MSG_FMSGLOST 0x15
79 #define MSG_CEVTIND 0x37
80 #define MSG_CBTRREQ 0x41
81 #define MSG_COFFREQ 0x42
82 #define MSG_CONREQ 0x43
83 #define MSG_CCONFREQ 0x47
84 #define MSG_NMTS 0xb0
85 #define MSG_LMTS 0xb4
95 #define INQUIRY_STATUS 0x00
96 #define INQUIRY_TERMINATION 0x01
97 #define INQUIRY_EXTENDED 0x04
100 #define SETAFILMASK_REJECT 0x00
101 #define SETAFILMASK_FASTIF 0x02
104 #define HWCONF_TERMINATE_ON 0x01
105 #define HWCONF_TERMINATE_OFF 0x00
108 #define CEVTIND_EI 0x01
109 #define CEVTIND_DOI 0x02
110 #define CEVTIND_LOST 0x04
111 #define CEVTIND_FULL 0x08
112 #define CEVTIND_BEI 0x10
114 #define CEVTIND_CHIP_SJA1000 0x02
119 #define ICAN3_SNGL 0x02
120 #define ICAN3_ECHO 0x10
121 #define ICAN3_EFF_RTR 0x40
122 #define ICAN3_SFF_RTR 0x10
123 #define ICAN3_EFF 0x80
125 #define ICAN3_CAN_TYPE_MASK 0x0f
126 #define ICAN3_CAN_TYPE_SFF 0x00
127 #define ICAN3_CAN_TYPE_EFF 0x01
129 #define ICAN3_CAN_DLC_MASK 0x0f
132 #define NMTS_CREATE_NODE_REQ 0x0
133 #define NMTS_SLAVE_STATE_IND 0x8
134 #define NMTS_SLAVE_EVENT_IND 0x9
137 #define LMTS_BUSON_REQ 0x0
138 #define LMTS_BUSOFF_REQ 0x1
139 #define LMTS_CAN_CONF_REQ 0x2
142 #define NE_LOCAL_OCCURRED 0x3
143 #define NE_LOCAL_RESOLVED 0x2
144 #define NE_REMOTE_OCCURRED 0xc
145 #define NE_REMOTE_RESOLVED 0x8
154 #define SR_BS 0x80
155 #define SR_ES 0x40
156 #define SR_TS 0x20
157 #define SR_RS 0x10
158 #define SR_TCS 0x08
159 #define SR_TBS 0x04
160 #define SR_DOS 0x02
161 #define SR_RBS 0x01
166 #define ECC_SEG 0x1F
167 #define ECC_DIR 0x20
169 #define ECC_BIT 0x00
170 #define ECC_FORM 0x40
171 #define ECC_STUFF 0x80
172 #define ECC_MASK 0xc0
193 /* DPM Control Registers -- starts at offset 0x100 in the MODULbus registers */
307 * returns 0 on success, -ENOMEM when no message exists
320 if ((xord & MSYNC_RB_MASK) == 0x00) { in ican3_old_recv_msg()
344 return 0; in ican3_old_recv_msg()
352 * returns 0 on success, -ENOMEM when no free space exists
384 return 0; in ican3_old_send_msg()
401 mod->rx_num = 0; in ican3_init_new_host_interface()
402 mod->rx_int = 0; in ican3_init_new_host_interface()
409 for (i = 0; i < ICAN3_NEW_BUFFERS; i++) { in ican3_init_new_host_interface()
427 mod->tx_num = 0; in ican3_init_new_host_interface()
430 for (i = 0; i < ICAN3_NEW_BUFFERS; i++) { in ican3_init_new_host_interface()
482 mod->fastrx_num = 0; in ican3_init_fast_host_interface()
485 memset(&desc, 0, sizeof(desc)); in ican3_init_fast_host_interface()
486 desc.control = 0x00; in ican3_init_fast_host_interface()
490 addr = 0; in ican3_init_fast_host_interface()
491 for (i = 0; i < ICAN3_RX_BUFFERS; i++) { in ican3_init_fast_host_interface()
507 addr = 0; in ican3_init_fast_host_interface()
513 if (addr != 0) in ican3_init_fast_host_interface()
518 mod->fasttx_num = 0; in ican3_init_fast_host_interface()
521 memset(&desc, 0, sizeof(desc)); in ican3_init_fast_host_interface()
526 addr = 0; in ican3_init_fast_host_interface()
527 for (i = 0; i < ICAN3_TX_BUFFERS; i++) { in ican3_init_fast_host_interface()
543 addr = 0; in ican3_init_fast_host_interface()
582 mod->tx_num = (desc.control & DESC_WRAP) ? 0 : (mod->tx_num + 1); in ican3_new_send_msg()
583 return 0; in ican3_new_send_msg()
613 mod->rx_num = (desc.control & DESC_WRAP) ? 0 : (mod->rx_num + 1); in ican3_new_recv_msg()
614 return 0; in ican3_new_recv_msg()
628 if (mod->iftype == 0) in ican3_send_msg()
644 if (mod->iftype == 0) in ican3_recv_msg()
661 memset(&msg, 0, sizeof(msg)); in ican3_msg_connect()
663 msg.len = cpu_to_le16(0); in ican3_msg_connect()
672 memset(&msg, 0, sizeof(msg)); in ican3_msg_disconnect()
674 msg.len = cpu_to_le16(0); in ican3_msg_disconnect()
684 memset(&msg, 0, sizeof(msg)); in ican3_msg_newhostif()
686 msg.len = cpu_to_le16(0); in ican3_msg_newhostif()
689 WARN_ON(mod->iftype != 0); in ican3_msg_newhostif()
697 return 0; in ican3_msg_newhostif()
705 memset(&msg, 0, sizeof(msg)); in ican3_msg_fasthostif()
711 msg.data[0] = addr & 0xff; in ican3_msg_fasthostif()
712 msg.data[1] = (addr >> 8) & 0xff; in ican3_msg_fasthostif()
713 msg.data[2] = (addr >> 16) & 0xff; in ican3_msg_fasthostif()
714 msg.data[3] = (addr >> 24) & 0xff; in ican3_msg_fasthostif()
718 msg.data[4] = addr & 0xff; in ican3_msg_fasthostif()
719 msg.data[5] = (addr >> 8) & 0xff; in ican3_msg_fasthostif()
720 msg.data[6] = (addr >> 16) & 0xff; in ican3_msg_fasthostif()
721 msg.data[7] = (addr >> 24) & 0xff; in ican3_msg_fasthostif()
739 memset(&msg, 0, sizeof(msg)); in ican3_set_id_filter()
742 msg.data[0] = 0x00; /* IDLo LSB */ in ican3_set_id_filter()
743 msg.data[1] = 0x00; /* IDLo MSB */ in ican3_set_id_filter()
744 msg.data[2] = 0xff; /* IDHi LSB */ in ican3_set_id_filter()
745 msg.data[3] = 0x07; /* IDHi MSB */ in ican3_set_id_filter()
755 memset(&msg, 0, sizeof(msg)); in ican3_set_id_filter()
758 msg.data[0] = 0; /* MUX = 0 */ in ican3_set_id_filter()
759 msg.data[1] = 0x00; /* IDLo LSB */ in ican3_set_id_filter()
760 msg.data[2] = 0x00; in ican3_set_id_filter()
761 msg.data[3] = 0x00; in ican3_set_id_filter()
762 msg.data[4] = 0x20; /* IDLo MSB */ in ican3_set_id_filter()
763 msg.data[5] = 0xff; /* IDHi LSB */ in ican3_set_id_filter()
764 msg.data[6] = 0xff; in ican3_set_id_filter()
765 msg.data[7] = 0xff; in ican3_set_id_filter()
766 msg.data[8] = 0x3f; /* IDHi MSB */ in ican3_set_id_filter()
787 btr0 = ((bt->brp - 1) & 0x3f) | (((bt->sjw - 1) & 0x3) << 6); in ican3_set_bus_state()
788 btr1 = ((bt->prop_seg + bt->phase_seg1 - 1) & 0xf) | in ican3_set_bus_state()
789 (((bt->phase_seg2 - 1) & 0x7) << 4); in ican3_set_bus_state()
791 btr1 |= 0x80; in ican3_set_bus_state()
796 memset(&msg, 0, sizeof(msg)); in ican3_set_bus_state()
799 msg.data[0] = 0x00; in ican3_set_bus_state()
800 msg.data[1] = 0x00; in ican3_set_bus_state()
810 memset(&msg, 0, sizeof(msg)); in ican3_set_bus_state()
812 msg.len = cpu_to_le16(0); in ican3_set_bus_state()
818 memset(&msg, 0, sizeof(msg)); in ican3_set_bus_state()
822 msg.data[0] = LMTS_BUSON_REQ; in ican3_set_bus_state()
823 msg.data[1] = 0; in ican3_set_bus_state()
828 msg.data[0] = LMTS_BUSOFF_REQ; in ican3_set_bus_state()
829 msg.data[1] = 0; in ican3_set_bus_state()
841 memset(&msg, 0, sizeof(msg)); in ican3_set_bus_state()
844 msg.data[0] = NMTS_CREATE_NODE_REQ; in ican3_set_bus_state()
845 msg.data[1] = 0; in ican3_set_bus_state()
851 return 0; in ican3_set_bus_state()
860 memset(&msg, 0, sizeof(msg)); in ican3_set_termination()
863 msg.data[0] = 0x00; in ican3_set_termination()
873 memset(&msg, 0, sizeof(msg)); in ican3_send_inquiry()
876 msg.data[0] = subspec; in ican3_send_inquiry()
877 msg.data[1] = 0x00; in ican3_send_inquiry()
887 memset(&msg, 0, sizeof(msg)); in ican3_set_buserror()
890 msg.data[0] = 0x00; in ican3_set_buserror()
893 memset(&msg, 0, sizeof(msg)); in ican3_set_buserror()
896 msg.data[0] = LMTS_CAN_CONF_REQ; in ican3_set_buserror()
897 msg.data[1] = 0x00; in ican3_set_buserror()
898 msg.data[2] = 0x00; in ican3_set_buserror()
918 cf->can_id |= desc->data[0] << 3; in ican3_to_can_frame()
919 cf->can_id |= (desc->data[1] & 0xe0) >> 5; in ican3_to_can_frame()
923 cf->len = can_cc_dlc2len(desc->data[0] & ICAN3_CAN_DLC_MASK); in ican3_to_can_frame()
924 if (desc->data[0] & ICAN3_EFF_RTR) in ican3_to_can_frame()
927 if (desc->data[0] & ICAN3_EFF) { in ican3_to_can_frame()
932 cf->can_id |= (desc->data[5] & 0xf8) >> 3; in ican3_to_can_frame()
935 cf->can_id |= desc->data[3] >> 5; /* 2-0 */ in ican3_to_can_frame()
947 memset(desc->data, 0, sizeof(desc->data)); in can_frame_to_ican3()
951 desc->data[0] |= cf->len; in can_frame_to_ican3()
959 desc->data[0] |= ICAN3_EFF_RTR; in can_frame_to_ican3()
963 desc->data[0] |= ICAN3_EFF; in can_frame_to_ican3()
964 desc->data[2] = (cf->can_id & 0x1fe00000) >> 21; /* 28-21 */ in can_frame_to_ican3()
965 desc->data[3] = (cf->can_id & 0x001fe000) >> 13; /* 20-13 */ in can_frame_to_ican3()
966 desc->data[4] = (cf->can_id & 0x00001fe0) >> 5; /* 12-5 */ in can_frame_to_ican3()
967 desc->data[5] = (cf->can_id & 0x0000001f) << 3; /* 4-0 */ in can_frame_to_ican3()
969 desc->data[2] = (cf->can_id & 0x7F8) >> 3; /* bits 10-3 */ in can_frame_to_ican3()
970 desc->data[3] = (cf->can_id & 0x007) << 5; /* bits 2-0 */ in can_frame_to_ican3()
1004 netdev_err(mod->ndev, "lost %d control messages\n", msg->data[0]); in ican3_handle_msglost()
1054 isrc = msg->data[0]; in ican3_handle_cevtind()
1094 return 0; in ican3_handle_cevtind()
1176 return 0; in ican3_handle_cevtind()
1181 switch (msg->data[0]) { in ican3_handle_inquiry()
1203 subspec = msg->data[0] + msg->data[1] * 0x100; in ican3_handle_nmtsind()
1236 netdev_warn(mod->ndev, "received unknown message: spec 0x%.2x length %d\n", in ican3_handle_unknown_message()
1245 netdev_dbg(mod->ndev, "%s: modno %d spec 0x%.2x len %d bytes\n", __func__, in ican3_handle_message()
1291 u8 dlc = 0; in ican3_get_echo_skb()
1296 return 0; in ican3_get_echo_skb()
1342 return memcmp(cf->data, echo_cf->data, cf->len) == 0; in ican3_echo_skb_matches()
1442 mod->fastrx_num = (desc.control & DESC_WRAP) ? 0 in ican3_recv_skb()
1447 return 0; in ican3_recv_skb()
1454 int received = 0; in ican3_napi()
1540 iowrite8(0x00, &mod->dpmctrl->hwreset); in ican3_reset_module()
1547 if (runnew == (runold ^ 0xff)) in ican3_reset_module()
1548 return 0; in ican3_reset_module()
1630 return 0; in ican3_startup_module()
1661 return 0; in ican3_open()
1685 return 0; in ican3_stop()
1711 memset(&desc, 0, sizeof(desc)); in ican3_xmit()
1734 iowrite8(0x01, &mod->dpmctrl->interrupt); in ican3_xmit()
1740 mod->fasttx_num = (desc.control & DESC_WRAP) ? 0 in ican3_xmit()
1800 return 0; in ican3_set_mode()
1820 return 0; in ican3_get_berr_counter()
1854 if (kstrtoul(buf, 0, &enable)) in termination_store()
1909 ndev = alloc_candev(sizeof(*mod), 0); in ican3_probe()
1927 ndev->sysfs_groups[0] = &ican3_sysfs_attr_group; in ican3_probe()
1946 mod->irq = platform_get_irq(pdev, 0); in ican3_probe()
1947 if (mod->irq < 0) { in ican3_probe()
1955 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); in ican3_probe()
2010 return 0; in ican3_probe()