support.h (1321B)
1 /* 2 * 3 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 4 * 5 * Copyright 2007-2019 Broadcom Inc. All rights reserved. 6 * 7 * File: support.h 8 * Purpose: Public board support functions 9 */ 10 11 #ifndef _BOARD_SUPPORT_H_ 12 #define _BOARD_SUPPORT_H_ 13 14 #include <board/board.h> 15 16 extern int board_connections_discover(int max_num, 17 board_connection_t *connection, 18 int *actual); 19 extern int board_connection_setup(void); 20 extern int board_device_cpu_port_get(int unit, bcm_gport_t *cpu); 21 extern int board_device_init(int unit); 22 extern int board_device_deinit(int unit); 23 extern int board_port_init(int unit); 24 extern int board_port_deinit(int unit); 25 extern const char *board_device_name(int unit); 26 27 /* I2C */ 28 #if defined(INCLUDE_I2C) 29 typedef void (*board_i2c_device_cb)(int unit, int idx, 30 int devid, char *name, char *desc, 31 void *user_data); 32 extern int board_i2c_device_init(int unit); 33 extern int board_i2c_device_traverse(int unit, 34 board_i2c_device_cb func, 35 void *user_data); 36 #endif 37 38 #endif /* _BOARD_SUPPORT_H_ */