You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mlx_icmd.h 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef MLXUTILS_INCLUDE_PUBLIC_MLX_ICMD_H_
  2. #define MLXUTILS_INCLUDE_PUBLIC_MLX_ICMD_H_
  3. /*
  4. * Copyright (C) 2015 Mellanox Technologies Ltd.
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License as
  8. * published by the Free Software Foundation; either version 2 of the
  9. * License, or any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  19. * 02110-1301, USA.
  20. */
  21. FILE_LICENCE ( GPL2_OR_LATER );
  22. #include "mlx_utils.h"
  23. #define MLX_ICMD_MB_ADDR 0x100000
  24. #define MLX_ICMD_MB_SIZE_ADDR 0x1000
  25. #define MLX_ICMD_CTRL_ADDR 0x0
  26. #define MLX_ICMD_SEMAPHORE_ADDR 0x0
  27. #define MLX_ICMD_SEMAPHORE_ID 1234
  28. enum {
  29. FLASH_REG_ACCESS = 0x9001,
  30. GET_FW_INFO = 0x8007,
  31. QUERY_VIRTUAL_MAC = 0x9003,
  32. SET_VIRTUAL_MAC = 0x9004,
  33. QUERY_WOL_ROL = 0x9005,
  34. SET_WOL_ROL = 0x9006,
  35. OCBB_INIT = 0x9007,
  36. OCBB_QUERY_HEADER_STATUS = 0x9008,
  37. OCBB_QUERY_ETOC_STATUS = 0x9009,
  38. OCBB_QUERY_SET_EVENT = 0x900A,
  39. OCSD_INIT = 0xf004,
  40. };
  41. struct mlx_icmd_ocsd {
  42. mlx_uint32 reserved;
  43. mlx_uint64 address;
  44. };
  45. mlx_status
  46. mlx_icmd_send_command(
  47. IN mlx_utils *utils,
  48. IN mlx_uint16 opcode,
  49. IN OUT mlx_void* data,
  50. IN mlx_uint32 write_data_size,
  51. IN mlx_uint32 read_data_size
  52. );
  53. #endif /* MLXUTILS_INCLUDE_PUBLIC_MLX_ICMD_H_ */