Lines Matching refs:tp
54 void t1_tp_destroy(struct petp *tp) in t1_tp_destroy() argument
56 kfree(tp); in t1_tp_destroy()
61 struct petp *tp = kzalloc(sizeof(*tp), GFP_KERNEL); in t1_tp_create() local
63 if (!tp) in t1_tp_create()
66 tp->adapter = adapter; in t1_tp_create()
68 return tp; in t1_tp_create()
71 void t1_tp_intr_enable(struct petp *tp) in t1_tp_intr_enable() argument
73 u32 tp_intr = readl(tp->adapter->regs + A_PL_ENABLE); in t1_tp_intr_enable()
76 if (!t1_is_asic(tp->adapter)) { in t1_tp_intr_enable()
79 tp->adapter->regs + FPGA_TP_ADDR_INTERRUPT_ENABLE); in t1_tp_intr_enable()
81 tp->adapter->regs + A_PL_ENABLE); in t1_tp_intr_enable()
86 writel(0, tp->adapter->regs + A_TP_INT_ENABLE); in t1_tp_intr_enable()
88 tp->adapter->regs + A_PL_ENABLE); in t1_tp_intr_enable()
92 void t1_tp_intr_disable(struct petp *tp) in t1_tp_intr_disable() argument
94 u32 tp_intr = readl(tp->adapter->regs + A_PL_ENABLE); in t1_tp_intr_disable()
97 if (!t1_is_asic(tp->adapter)) { in t1_tp_intr_disable()
99 writel(0, tp->adapter->regs + FPGA_TP_ADDR_INTERRUPT_ENABLE); in t1_tp_intr_disable()
101 tp->adapter->regs + A_PL_ENABLE); in t1_tp_intr_disable()
105 writel(0, tp->adapter->regs + A_TP_INT_ENABLE); in t1_tp_intr_disable()
107 tp->adapter->regs + A_PL_ENABLE); in t1_tp_intr_disable()
111 void t1_tp_intr_clear(struct petp *tp) in t1_tp_intr_clear() argument
114 if (!t1_is_asic(tp->adapter)) { in t1_tp_intr_clear()
116 tp->adapter->regs + FPGA_TP_ADDR_INTERRUPT_CAUSE); in t1_tp_intr_clear()
117 writel(FPGA_PCIX_INTERRUPT_TP, tp->adapter->regs + A_PL_CAUSE); in t1_tp_intr_clear()
121 writel(0xffffffff, tp->adapter->regs + A_TP_INT_CAUSE); in t1_tp_intr_clear()
122 writel(F_PL_INTR_TP, tp->adapter->regs + A_PL_CAUSE); in t1_tp_intr_clear()
125 int t1_tp_intr_handler(struct petp *tp) in t1_tp_intr_handler() argument
131 if (!t1_is_asic(tp->adapter)) in t1_tp_intr_handler()
135 cause = readl(tp->adapter->regs + A_TP_INT_CAUSE); in t1_tp_intr_handler()
136 writel(cause, tp->adapter->regs + A_TP_INT_CAUSE); in t1_tp_intr_handler()
140 static void set_csum_offload(struct petp *tp, u32 csum_bit, int enable) in set_csum_offload() argument
142 u32 val = readl(tp->adapter->regs + A_TP_GLOBAL_CONFIG); in set_csum_offload()
148 writel(val, tp->adapter->regs + A_TP_GLOBAL_CONFIG); in set_csum_offload()
151 void t1_tp_set_ip_checksum_offload(struct petp *tp, int enable) in t1_tp_set_ip_checksum_offload() argument
153 set_csum_offload(tp, F_IP_CSUM, enable); in t1_tp_set_ip_checksum_offload()
156 void t1_tp_set_tcp_checksum_offload(struct petp *tp, int enable) in t1_tp_set_tcp_checksum_offload() argument
158 set_csum_offload(tp, F_TCP_CSUM, enable); in t1_tp_set_tcp_checksum_offload()
165 int t1_tp_reset(struct petp *tp, struct tp_params *p, unsigned int tp_clk) in t1_tp_reset() argument
167 adapter_t *adapter = tp->adapter; in t1_tp_reset()