diff options
Diffstat (limited to 'sys/mips/nlm/board.h')
-rw-r--r-- | sys/mips/nlm/board.h | 73 |
1 files changed, 69 insertions, 4 deletions
diff --git a/sys/mips/nlm/board.h b/sys/mips/nlm/board.h index 3a2ae24ee68e..4ef4b3780b8e 100644 --- a/sys/mips/nlm/board.h +++ b/sys/mips/nlm/board.h @@ -32,9 +32,8 @@ #ifndef __NLM_BOARD_H__ #define __NLM_BOARD_H__ -#define XLP_NAE_NBLOCKS 5 -#define XLP_NAE_NPORTS 4 -#define XLP_I2C_MAXDEVICES 8 +#define XLP_NAE_NBLOCKS 5 +#define XLP_NAE_NPORTS 4 /* * EVP board EEPROM info @@ -44,13 +43,62 @@ #define EEPROM_SIZE 48 #define EEPROM_MACADDR_OFFSET 2 +/* + * EVP board CPLD chip select and daughter card info field + */ +#define XLP_EVB_CPLD_CHIPSELECT 2 + +#define DCARD_ILAKEN 0x0 +#define DCARD_SGMII 0x1 +#define DCARD_XAUI 0x2 +#define DCARD_NOT_PRSNT 0x3 + #if !defined(LOCORE) && !defined(__ASSEMBLY__) +/* + * NAE configuration + */ struct xlp_port_ivars { int port; int block; + int node; int type; int phy_addr; + int mdio_bus; + int loopback_mode; + int num_channels; + int free_desc_sizes; + int num_free_descs; + int pseq_fifo_size; + int iface_fifo_size; + int rxbuf_size; + int rx_slots_reqd; + int tx_slots_reqd; + int vlan_pri_en; + int stg2_fifo_size; + int eh_fifo_size; + int frout_fifo_size; + int ms_fifo_size; + int pkt_fifo_size; + int pktlen_fifo_size; + int max_stg2_offset; + int max_eh_offset; + int max_frout_offset; + int max_ms_offset; + int max_pmem_offset; + int stg1_2_credit; + int stg2_eh_credit; + int stg2_frout_credit; + int stg2_ms_credit; + int hw_parser_en; + u_int ieee1588_inc_intg; + u_int ieee1588_inc_den; + u_int ieee1588_inc_num; + uint64_t ieee1588_userval; + uint64_t ieee1588_ptpoff; + uint64_t ieee1588_tmr1; + uint64_t ieee1588_tmr2; + uint64_t ieee1588_tmr3; }; struct xlp_block_ivars { @@ -62,7 +110,16 @@ struct xlp_block_ivars { struct xlp_nae_ivars { int node; + int nblocks; u_int blockmask; + u_int xauimask; + u_int sgmiimask; + int freq; + u_int flow_crc_poly; + u_int hw_parser_en; + u_int prepad_en; + u_int prepad_size; /* size in 16 byte units */ + u_int ieee_1588_en; struct xlp_block_ivars block_ivars[XLP_NAE_NBLOCKS]; }; @@ -73,8 +130,16 @@ struct xlp_board_info { } nodes[XLP_MAX_NODES]; }; +extern struct xlp_board_info xlp_board_info; + +/* Network configuration */ +int nlm_get_vfbid_mapping(int); +int nlm_get_poe_distvec(int vec, uint32_t *distvec); +void xlpge_get_macaddr(uint8_t *macaddr); + int nlm_board_info_setup(void); +/* EEPROM & CPLD */ int nlm_board_eeprom_read(int node, int i2cbus, int addr, int offs, uint8_t *buf,int sz); uint64_t nlm_board_cpld_base(int node, int chipselect); @@ -82,6 +147,6 @@ int nlm_board_cpld_majorversion(uint64_t cpldbase); int nlm_board_cpld_minorversion(uint64_t cpldbase); void nlm_board_cpld_reset(uint64_t cpldbase); int nlm_board_cpld_dboard_type(uint64_t cpldbase, int slot); -#endif #endif +#endif |