]> git.proxmox.com Git - ceph.git/blame - ceph/src/dpdk/drivers/net/qede/base/ecore_mcp_api.h
bump version to 12.2.12-pve1
[ceph.git] / ceph / src / dpdk / drivers / net / qede / base / ecore_mcp_api.h
CommitLineData
7c673cae
FG
1/*
2 * Copyright (c) 2016 QLogic Corporation.
3 * All rights reserved.
4 * www.qlogic.com
5 *
6 * See LICENSE.qede_pmd for copyright and licensing details.
7 */
8
9#ifndef __ECORE_MCP_API_H__
10#define __ECORE_MCP_API_H__
11
12#include "ecore_status.h"
13
14struct ecore_mcp_link_speed_params {
15 bool autoneg;
16 u32 advertised_speeds; /* bitmask of DRV_SPEED_CAPABILITY */
17 u32 forced_speed; /* In Mb/s */
18};
19
20struct ecore_mcp_link_pause_params {
21 bool autoneg;
22 bool forced_rx;
23 bool forced_tx;
24};
25
26struct ecore_mcp_link_params {
27 struct ecore_mcp_link_speed_params speed;
28 struct ecore_mcp_link_pause_params pause;
29 u32 loopback_mode; /* in PMM_LOOPBACK values */
30};
31
32struct ecore_mcp_link_capabilities {
33 u32 speed_capabilities;
34 bool default_speed_autoneg; /* In Mb/s */
35 u32 default_speed; /* In Mb/s */
36};
37
38struct ecore_mcp_link_state {
39 bool link_up;
40
41 u32 line_speed; /* In Mb/s */
42 u32 min_pf_rate; /* In Mb/s */
43 u32 speed; /* In Mb/s */
44 bool full_duplex;
45
46 bool an;
47 bool an_complete;
48 bool parallel_detection;
49 bool pfc_enabled;
50
51#define ECORE_LINK_PARTNER_SPEED_1G_HD (1 << 0)
52#define ECORE_LINK_PARTNER_SPEED_1G_FD (1 << 1)
53#define ECORE_LINK_PARTNER_SPEED_10G (1 << 2)
54#define ECORE_LINK_PARTNER_SPEED_20G (1 << 3)
55#define ECORE_LINK_PARTNER_SPEED_25G (1 << 4)
56#define ECORE_LINK_PARTNER_SPEED_40G (1 << 5)
57#define ECORE_LINK_PARTNER_SPEED_50G (1 << 6)
58#define ECORE_LINK_PARTNER_SPEED_100G (1 << 7)
59 u32 partner_adv_speed;
60
61 bool partner_tx_flow_ctrl_en;
62 bool partner_rx_flow_ctrl_en;
63
64#define ECORE_LINK_PARTNER_SYMMETRIC_PAUSE (1)
65#define ECORE_LINK_PARTNER_ASYMMETRIC_PAUSE (2)
66#define ECORE_LINK_PARTNER_BOTH_PAUSE (3)
67 u8 partner_adv_pause;
68
69 bool sfp_tx_fault;
70};
71
72struct ecore_mcp_function_info {
73 u8 pause_on_host;
74
75 enum ecore_pci_personality protocol;
76
77 u8 bandwidth_min;
78 u8 bandwidth_max;
79
80 u8 mac[ETH_ALEN];
81
82 u64 wwn_port;
83 u64 wwn_node;
84
85#define ECORE_MCP_VLAN_UNSET (0xffff)
86 u16 ovlan;
87};
88
89struct ecore_mcp_nvm_common {
90 u32 offset;
91 u32 param;
92 u32 resp;
93 u32 cmd;
94};
95
96struct ecore_mcp_nvm_rd {
97 u32 *buf_size;
98 u32 *buf;
99};
100
101struct ecore_mcp_nvm_wr {
102 u32 buf_size;
103 u32 *buf;
104};
105
106struct ecore_mcp_nvm_params {
107#define ECORE_MCP_CMD (1 << 0)
108#define ECORE_MCP_NVM_RD (1 << 1)
109#define ECORE_MCP_NVM_WR (1 << 2)
110 u8 type;
111
112 struct ecore_mcp_nvm_common nvm_common;
113
114 union {
115 struct ecore_mcp_nvm_rd nvm_rd;
116 struct ecore_mcp_nvm_wr nvm_wr;
117 };
118};
119
120#ifndef __EXTRACT__LINUX__
121enum ecore_nvm_images {
122 ECORE_NVM_IMAGE_ISCSI_CFG,
123 ECORE_NVM_IMAGE_FCOE_CFG,
124};
125#endif
126
127struct ecore_mcp_drv_version {
128 u32 version;
129 u8 name[MCP_DRV_VER_STR_SIZE - 4];
130};
131
132struct ecore_mcp_lan_stats {
133 u64 ucast_rx_pkts;
134 u64 ucast_tx_pkts;
135 u32 fcs_err;
136};
137
138#ifndef ECORE_PROTO_STATS
139#define ECORE_PROTO_STATS
140struct ecore_mcp_fcoe_stats {
141 u64 rx_pkts;
142 u64 tx_pkts;
143 u32 fcs_err;
144 u32 login_failure;
145};
146
147struct ecore_mcp_iscsi_stats {
148 u64 rx_pdus;
149 u64 tx_pdus;
150 u64 rx_bytes;
151 u64 tx_bytes;
152};
153
154struct ecore_mcp_rdma_stats {
155 u64 rx_pkts;
156 u64 tx_pkts;
157 u64 rx_bytes;
158 u64 tx_byts;
159};
160
161enum ecore_mcp_protocol_type {
162 ECORE_MCP_LAN_STATS,
163 ECORE_MCP_FCOE_STATS,
164 ECORE_MCP_ISCSI_STATS,
165 ECORE_MCP_RDMA_STATS
166};
167
168union ecore_mcp_protocol_stats {
169 struct ecore_mcp_lan_stats lan_stats;
170 struct ecore_mcp_fcoe_stats fcoe_stats;
171 struct ecore_mcp_iscsi_stats iscsi_stats;
172 struct ecore_mcp_rdma_stats rdma_stats;
173};
174#endif
175
176enum ecore_ov_config_method {
177 ECORE_OV_CONFIG_MTU,
178 ECORE_OV_CONFIG_MAC,
179 ECORE_OV_CONFIG_WOL
180};
181
182enum ecore_ov_client {
183 ECORE_OV_CLIENT_DRV,
184 ECORE_OV_CLIENT_USER
185};
186
187enum ecore_ov_driver_state {
188 ECORE_OV_DRIVER_STATE_NOT_LOADED,
189 ECORE_OV_DRIVER_STATE_DISABLED,
190 ECORE_OV_DRIVER_STATE_ACTIVE
191};
192
193#define ECORE_MAX_NPIV_ENTRIES 128
194#define ECORE_WWN_SIZE 8
195struct ecore_fc_npiv_tbl {
196 u32 count;
197 u8 wwpn[ECORE_MAX_NPIV_ENTRIES][ECORE_WWN_SIZE];
198 u8 wwnn[ECORE_MAX_NPIV_ENTRIES][ECORE_WWN_SIZE];
199};
200
201#ifndef __EXTRACT__LINUX__
202enum ecore_led_mode {
203 ECORE_LED_MODE_OFF,
204 ECORE_LED_MODE_ON,
205 ECORE_LED_MODE_RESTORE
206};
207#endif
208
209struct ecore_temperature_sensor {
210 u8 sensor_location;
211 u8 threshold_high;
212 u8 critical;
213 u8 current_temp;
214};
215
216#define ECORE_MAX_NUM_OF_SENSORS 7
217struct ecore_temperature_info {
218 u32 num_sensors;
219 struct ecore_temperature_sensor sensors[ECORE_MAX_NUM_OF_SENSORS];
220};
221
222enum ecore_mba_img_idx {
223 ECORE_MBA_LEGACY_IDX,
224 ECORE_MBA_PCI3CLP_IDX,
225 ECORE_MBA_PCI3_IDX,
226 ECORE_MBA_FCODE_IDX,
227 ECORE_EFI_X86_IDX,
228 ECORE_EFI_IPF_IDX,
229 ECORE_EFI_EBC_IDX,
230 ECORE_EFI_X64_IDX,
231 ECORE_MAX_NUM_OF_ROMIMG
232};
233
234struct ecore_mba_vers {
235 u32 mba_vers[ECORE_MAX_NUM_OF_ROMIMG];
236};
237
238/**
239 * @brief - returns the link params of the hw function
240 *
241 * @param p_hwfn
242 *
243 * @returns pointer to link params
244 */
245struct ecore_mcp_link_params *ecore_mcp_get_link_params(struct ecore_hwfn *);
246
247/**
248 * @brief - return the link state of the hw function
249 *
250 * @param p_hwfn
251 *
252 * @returns pointer to link state
253 */
254struct ecore_mcp_link_state *ecore_mcp_get_link_state(struct ecore_hwfn *);
255
256/**
257 * @brief - return the link capabilities of the hw function
258 *
259 * @param p_hwfn
260 *
261 * @returns pointer to link capabilities
262 */
263struct ecore_mcp_link_capabilities
264*ecore_mcp_get_link_capabilities(struct ecore_hwfn *p_hwfn);
265
266/**
267 * @brief Request the MFW to set the the link according to 'link_input'.
268 *
269 * @param p_hwfn
270 * @param p_ptt
271 * @param b_up - raise link if `true'. Reset link if `false'.
272 *
273 * @return enum _ecore_status_t
274 */
275enum _ecore_status_t ecore_mcp_set_link(struct ecore_hwfn *p_hwfn,
276 struct ecore_ptt *p_ptt,
277 bool b_up);
278
279/**
280 * @brief Get the management firmware version value
281 *
282 * @param p_hwfn
283 * @param p_ptt
284 * @param p_mfw_ver - mfw version value
285 * @param p_running_bundle_id - image id in nvram; Optional.
286 *
287 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
288 */
289enum _ecore_status_t ecore_mcp_get_mfw_ver(struct ecore_hwfn *p_hwfn,
290 struct ecore_ptt *p_ptt,
291 u32 *p_mfw_ver,
292 u32 *p_running_bundle_id);
293
294/**
295 * @brief Get media type value of the port.
296 *
297 * @param p_dev - ecore dev pointer
298 * @param mfw_ver - media type value
299 *
300 * @return enum _ecore_status_t -
301 * ECORE_SUCCESS - Operation was successful.
302 * ECORE_BUSY - Operation failed
303 */
304enum _ecore_status_t ecore_mcp_get_media_type(struct ecore_dev *p_dev,
305 u32 *media_type);
306
307/**
308 * @brief - Sends a command to the MCP mailbox.
309 *
310 * @param p_hwfn - hw function
311 * @param p_ptt - PTT required for register access
312 * @param cmd - command to be sent to the MCP
313 * @param param - optional param
314 * @param o_mcp_resp - the MCP response code (exclude sequence)
315 * @param o_mcp_param - optional parameter provided by the MCP response
316 *
317 * @return enum _ecore_status_t -
318 * ECORE_SUCCESS - operation was successful
319 * ECORE_BUSY - operation failed
320 */
321enum _ecore_status_t ecore_mcp_cmd(struct ecore_hwfn *p_hwfn,
322 struct ecore_ptt *p_ptt, u32 cmd, u32 param,
323 u32 *o_mcp_resp, u32 *o_mcp_param);
324
325/**
326 * @brief - drains the nig, allowing completion to pass in case of pauses.
327 * (Should be called only from sleepable context)
328 *
329 * @param p_hwfn
330 * @param p_ptt
331 */
332enum _ecore_status_t ecore_mcp_drain(struct ecore_hwfn *p_hwfn,
333 struct ecore_ptt *p_ptt);
334
335#ifndef LINUX_REMOVE
336/**
337 * @brief - return the mcp function info of the hw function
338 *
339 * @param p_hwfn
340 *
341 * @returns pointer to mcp function info
342 */
343const struct ecore_mcp_function_info
344*ecore_mcp_get_function_info(struct ecore_hwfn *p_hwfn);
345#endif
346
347/**
348 * @brief - Function for reading/manipulating the nvram. Following are supported
349 * functionalities.
350 * 1. Read: Read the specified nvram offset.
351 * input values:
352 * type - ECORE_MCP_NVM_RD
353 * cmd - command code (e.g. DRV_MSG_CODE_NVM_READ_NVRAM)
354 * offset - nvm offset
355 *
356 * output values:
357 * buf - buffer
358 * buf_size - buffer size
359 *
360 * 2. Write: Write the data at the specified nvram offset
361 * input values:
362 * type - ECORE_MCP_NVM_WR
363 * cmd - command code (e.g. DRV_MSG_CODE_NVM_WRITE_NVRAM)
364 * offset - nvm offset
365 * buf - buffer
366 * buf_size - buffer size
367 *
368 * 3. Command: Send the NVM command to MCP.
369 * input values:
370 * type - ECORE_MCP_CMD
371 * cmd - command code (e.g. DRV_MSG_CODE_NVM_DEL_FILE)
372 * offset - nvm offset
373 *
374 *
375 * @param p_hwfn
376 * @param p_ptt
377 * @param params
378 *
379 * @return ECORE_SUCCESS - operation was successful.
380 */
381enum _ecore_status_t ecore_mcp_nvm_command(struct ecore_hwfn *p_hwfn,
382 struct ecore_ptt *p_ptt,
383 struct ecore_mcp_nvm_params *params);
384
385#ifndef LINUX_REMOVE
386/**
387 * @brief - count number of function with a matching personality on engine.
388 *
389 * @param p_hwfn
390 * @param p_ptt
391 * @param personalities - a bitmask of ecore_pci_personality values
392 *
393 * @returns the count of all devices on engine whose personality match one of
394 * the bitsmasks.
395 */
396int ecore_mcp_get_personality_cnt(struct ecore_hwfn *p_hwfn,
397 struct ecore_ptt *p_ptt,
398 u32 personalities);
399#endif
400
401/**
402 * @brief Get the flash size value
403 *
404 * @param p_hwfn
405 * @param p_ptt
406 * @param p_flash_size - flash size in bytes to be filled.
407 *
408 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
409 */
410enum _ecore_status_t ecore_mcp_get_flash_size(struct ecore_hwfn *p_hwfn,
411 struct ecore_ptt *p_ptt,
412 u32 *p_flash_size);
413
414/**
415 * @brief Send driver version to MFW
416 *
417 * @param p_hwfn
418 * @param p_ptt
419 * @param version - Version value
420 * @param name - Protocol driver name
421 *
422 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
423 */
424enum _ecore_status_t
425ecore_mcp_send_drv_version(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
426 struct ecore_mcp_drv_version *p_ver);
427
428/**
429 * @brief Read the MFW process kill counter
430 *
431 * @param p_hwfn
432 * @param p_ptt
433 *
434 * @return u32
435 */
436u32 ecore_get_process_kill_counter(struct ecore_hwfn *p_hwfn,
437 struct ecore_ptt *p_ptt);
438
439/**
440 * @brief Trigger a recovery process
441 *
442 * @param p_hwfn
443 * @param p_ptt
444 *
445 * @return enum _ecore_status_t
446 */
447enum _ecore_status_t ecore_start_recovery_process(struct ecore_hwfn *p_hwfn,
448 struct ecore_ptt *p_ptt);
449
450/**
451 * @brief Notify MFW about the change in base device properties
452 *
453 * @param p_hwfn
454 * @param p_ptt
455 * @param config - Configuation that has been updated
456 * @param client - ecore client type
457 *
458 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
459 */
460enum _ecore_status_t
461ecore_mcp_ov_update_current_config(struct ecore_hwfn *p_hwfn,
462 struct ecore_ptt *p_ptt,
463 enum ecore_ov_config_method config,
464 enum ecore_ov_client client);
465
466/**
467 * @brief Notify MFW about the driver state
468 *
469 * @param p_hwfn
470 * @param p_ptt
471 * @param drv_state - Driver state
472 *
473 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
474 */
475enum _ecore_status_t
476ecore_mcp_ov_update_driver_state(struct ecore_hwfn *p_hwfn,
477 struct ecore_ptt *p_ptt,
478 enum ecore_ov_driver_state drv_state);
479
480/**
481 * @brief Read NPIV settings form the MFW
482 *
483 * @param p_hwfn
484 * @param p_ptt
485 * @param p_table - Array to hold the FC NPIV data. Client need allocate the
486 * required buffer. The field 'count' specifies number of NPIV
487 * entries. A value of 0 means the table was not populated.
488 *
489 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
490 */
491enum _ecore_status_t
492ecore_mcp_ov_get_fc_npiv(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
493 struct ecore_fc_npiv_tbl *p_table);
494
495/**
496 * @brief Send MTU size to MFW
497 *
498 * @param p_hwfn
499 * @param p_ptt
500 * @param mtu - MTU size
501 *
502 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
503 */
504enum _ecore_status_t ecore_mcp_ov_update_mtu(struct ecore_hwfn *p_hwfn,
505 struct ecore_ptt *p_ptt, u16 mtu);
506
507/**
508 * @brief Set LED status
509 *
510 * @param p_hwfn
511 * @param p_ptt
512 * @param mode - LED mode
513 *
514 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
515 */
516enum _ecore_status_t ecore_mcp_set_led(struct ecore_hwfn *p_hwfn,
517 struct ecore_ptt *p_ptt,
518 enum ecore_led_mode mode);
519
520/**
521 * @brief Set secure mode
522 *
523 * @param p_dev
524 * @param addr - nvm offset
525 *
526 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
527 */
528enum _ecore_status_t ecore_mcp_nvm_set_secure_mode(struct ecore_dev *p_dev,
529 u32 addr);
530
531/**
532 * @brief Write to phy
533 *
534 * @param p_dev
535 * @param addr - nvm offset
536 * @param cmd - nvm command
537 * @param p_buf - nvm write buffer
538 * @param len - buffer len
539 *
540 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
541 */
542enum _ecore_status_t ecore_mcp_phy_write(struct ecore_dev *p_dev, u32 cmd,
543 u32 addr, u8 *p_buf, u32 len);
544
545/**
546 * @brief Write to nvm
547 *
548 * @param p_dev
549 * @param addr - nvm offset
550 * @param cmd - nvm command
551 * @param p_buf - nvm write buffer
552 * @param len - buffer len
553 *
554 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
555 */
556enum _ecore_status_t ecore_mcp_nvm_write(struct ecore_dev *p_dev, u32 cmd,
557 u32 addr, u8 *p_buf, u32 len);
558
559/**
560 * @brief Put file begin
561 *
562 * @param p_dev
563 * @param addr - nvm offset
564 *
565 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
566 */
567enum _ecore_status_t ecore_mcp_nvm_put_file_begin(struct ecore_dev *p_dev,
568 u32 addr);
569
570/**
571 * @brief Delete file
572 *
573 * @param p_dev
574 * @param addr - nvm offset
575 *
576 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
577 */
578enum _ecore_status_t ecore_mcp_nvm_del_file(struct ecore_dev *p_dev,
579 u32 addr);
580
581/**
582 * @brief Check latest response
583 *
584 * @param p_dev
585 * @param p_buf - nvm write buffer
586 *
587 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
588 */
589enum _ecore_status_t ecore_mcp_nvm_resp(struct ecore_dev *p_dev, u8 *p_buf);
590
591/**
592 * @brief Read from phy
593 *
594 * @param p_dev
595 * @param addr - nvm offset
596 * @param cmd - nvm command
597 * @param p_buf - nvm write buffer
598 * @param len - buffer len
599 *
600 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
601 */
602enum _ecore_status_t ecore_mcp_phy_read(struct ecore_dev *p_dev, u32 cmd,
603 u32 addr, u8 *p_buf, u32 len);
604
605/**
606 * @brief Read from nvm
607 *
608 * @param p_dev
609 * @param addr - nvm offset
610 * @param p_buf - nvm write buffer
611 * @param len - buffer len
612 *
613 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
614 */
615enum _ecore_status_t ecore_mcp_nvm_read(struct ecore_dev *p_dev, u32 addr,
616 u8 *p_buf, u32 len);
617
618/**
619 * @brief Read from sfp
620 *
621 * @param p_hwfn - hw function
622 * @param p_ptt - PTT required for register access
623 * @param port - transceiver port
624 * @param addr - I2C address
625 * @param offset - offset in sfp
626 * @param len - buffer length
627 * @param p_buf - buffer to read into
628 *
629 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
630 */
631enum _ecore_status_t ecore_mcp_phy_sfp_read(struct ecore_hwfn *p_hwfn,
632 struct ecore_ptt *p_ptt,
633 u32 port, u32 addr, u32 offset,
634 u32 len, u8 *p_buf);
635
636/**
637 * @brief Write to sfp
638 *
639 * @param p_hwfn - hw function
640 * @param p_ptt - PTT required for register access
641 * @param port - transceiver port
642 * @param addr - I2C address
643 * @param offset - offset in sfp
644 * @param len - buffer length
645 * @param p_buf - buffer to write from
646 *
647 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
648 */
649enum _ecore_status_t ecore_mcp_phy_sfp_write(struct ecore_hwfn *p_hwfn,
650 struct ecore_ptt *p_ptt,
651 u32 port, u32 addr, u32 offset,
652 u32 len, u8 *p_buf);
653
654/**
655 * @brief Gpio read
656 *
657 * @param p_hwfn - hw function
658 * @param p_ptt - PTT required for register access
659 * @param gpio - gpio number
660 * @param gpio_val - value read from gpio
661 *
662 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
663 */
664enum _ecore_status_t ecore_mcp_gpio_read(struct ecore_hwfn *p_hwfn,
665 struct ecore_ptt *p_ptt,
666 u16 gpio, u32 *gpio_val);
667
668/**
669 * @brief Gpio write
670 *
671 * @param p_hwfn - hw function
672 * @param p_ptt - PTT required for register access
673 * @param gpio - gpio number
674 * @param gpio_val - value to write to gpio
675 *
676 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
677 */
678enum _ecore_status_t ecore_mcp_gpio_write(struct ecore_hwfn *p_hwfn,
679 struct ecore_ptt *p_ptt,
680 u16 gpio, u16 gpio_val);
681
682/**
683 * @brief Gpio get information
684 *
685 * @param p_hwfn - hw function
686 * @param p_ptt - PTT required for register access
687 * @param gpio - gpio number
688 * @param gpio_direction - gpio is output (0) or input (1)
689 * @param gpio_ctrl - gpio control is uninitialized (0),
690 * path 0 (1), path 1 (2) or shared(3)
691 *
692 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
693 */
694enum _ecore_status_t ecore_mcp_gpio_info(struct ecore_hwfn *p_hwfn,
695 struct ecore_ptt *p_ptt,
696 u16 gpio, u32 *gpio_direction,
697 u32 *gpio_ctrl);
698
699/**
700 * @brief Bist register test
701 *
702 * @param p_hwfn - hw function
703 * @param p_ptt - PTT required for register access
704 *
705 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
706 */
707enum _ecore_status_t ecore_mcp_bist_register_test(struct ecore_hwfn *p_hwfn,
708 struct ecore_ptt *p_ptt);
709
710/**
711 * @brief Bist clock test
712 *
713 * @param p_hwfn - hw function
714 * @param p_ptt - PTT required for register access
715 *
716 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
717 */
718enum _ecore_status_t ecore_mcp_bist_clock_test(struct ecore_hwfn *p_hwfn,
719 struct ecore_ptt *p_ptt);
720
721/**
722 * @brief Bist nvm test - get number of images
723 *
724 * @param p_hwfn - hw function
725 * @param p_ptt - PTT required for register access
726 * @param num_images - number of images if operation was
727 * successful. 0 if not.
728 *
729 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
730 */
731enum _ecore_status_t ecore_mcp_bist_nvm_test_get_num_images(
732 struct ecore_hwfn *p_hwfn,
733 struct ecore_ptt *p_ptt,
734 u32 *num_images);
735
736/**
737 * @brief Bist nvm test - get image attributes by index
738 *
739 * @param p_hwfn - hw function
740 * @param p_ptt - PTT required for register access
741 * @param p_image_att - Attributes of image
742 * @param image_index - Index of image to get information for
743 *
744 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
745 */
746enum _ecore_status_t ecore_mcp_bist_nvm_test_get_image_att(
747 struct ecore_hwfn *p_hwfn,
748 struct ecore_ptt *p_ptt,
749 struct bist_nvm_image_att *p_image_att,
750 u32 image_index);
751
752/**
753 * @brief ecore_mcp_get_temperature_info - get the status of the temperature
754 * sensors
755 *
756 * @param p_hwfn - hw function
757 * @param p_ptt - PTT required for register access
758 * @param p_temp_status - A pointer to an ecore_temperature_info structure to
759 * be filled with the temperature data
760 *
761 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
762 */
763enum _ecore_status_t
764ecore_mcp_get_temperature_info(struct ecore_hwfn *p_hwfn,
765 struct ecore_ptt *p_ptt,
766 struct ecore_temperature_info *p_temp_info);
767
768/**
769 * @brief Get MBA versions - get MBA sub images versions
770 *
771 * @param p_hwfn - hw function
772 * @param p_ptt - PTT required for register access
773 * @param p_mba_vers - MBA versions array to fill
774 *
775 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
776 */
777enum _ecore_status_t ecore_mcp_get_mba_versions(
778 struct ecore_hwfn *p_hwfn,
779 struct ecore_ptt *p_ptt,
780 struct ecore_mba_vers *p_mba_vers);
781
782/**
783 * @brief Count memory ecc events
784 *
785 * @param p_hwfn - hw function
786 * @param p_ptt - PTT required for register access
787 * @param num_events - number of memory ecc events
788 *
789 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
790 */
791enum _ecore_status_t ecore_mcp_mem_ecc_events(struct ecore_hwfn *p_hwfn,
792 struct ecore_ptt *p_ptt,
793 u64 *num_events);
794
795/**
796 * @brief Sets whether a critical error notification from the MFW is acked, or
797 * is it being ignored and thus allowing the MFW crash dump.
798 *
799 * @param p_dev
800 * @param mdump_enable
801 *
802 */
803void ecore_mcp_mdump_enable(struct ecore_dev *p_dev, bool mdump_enable);
804
805#endif