diff options
Diffstat (limited to 'drivers/net/sfc/falcon.h')
-rw-r--r-- | drivers/net/sfc/falcon.h | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/drivers/net/sfc/falcon.h b/drivers/net/sfc/falcon.h index ea6ac06fa26a..b331889ca46c 100644 --- a/drivers/net/sfc/falcon.h +++ b/drivers/net/sfc/falcon.h | |||
@@ -31,29 +31,41 @@ static inline int falcon_rev(struct efx_nic *efx) | |||
31 | } | 31 | } |
32 | 32 | ||
33 | /** | 33 | /** |
34 | * struct falcon_board - board information | 34 | * struct falcon_board_type - board operations and type information |
35 | * @type: Board model type | 35 | * @id: Board type id, as found in NVRAM |
36 | * @major: Major rev. ('A', 'B' ...) | 36 | * @ref_model: Model number of Solarflare reference design |
37 | * @minor: Minor rev. (0, 1, ...) | 37 | * @gen_type: Generic board type description |
38 | * @init: Allocate resources and initialise peripheral hardware | 38 | * @init: Allocate resources and initialise peripheral hardware |
39 | * @init_phy: Do board-specific PHY initialisation | 39 | * @init_phy: Do board-specific PHY initialisation |
40 | * @fini: Shut down hardware and free resources | ||
40 | * @set_id_led: Set state of identifying LED or revert to automatic function | 41 | * @set_id_led: Set state of identifying LED or revert to automatic function |
41 | * @monitor: Board-specific health check function | 42 | * @monitor: Board-specific health check function |
42 | * @fini: Shut down hardware and free resources | 43 | */ |
44 | struct falcon_board_type { | ||
45 | u8 id; | ||
46 | const char *ref_model; | ||
47 | const char *gen_type; | ||
48 | int (*init) (struct efx_nic *nic); | ||
49 | void (*init_phy) (struct efx_nic *efx); | ||
50 | void (*fini) (struct efx_nic *nic); | ||
51 | void (*set_id_led) (struct efx_nic *efx, enum efx_led_mode mode); | ||
52 | int (*monitor) (struct efx_nic *nic); | ||
53 | }; | ||
54 | |||
55 | /** | ||
56 | * struct falcon_board - board information | ||
57 | * @type: Type of board | ||
58 | * @major: Major rev. ('A', 'B' ...) | ||
59 | * @minor: Minor rev. (0, 1, ...) | ||
43 | * @i2c_adap: I2C adapter for on-board peripherals | 60 | * @i2c_adap: I2C adapter for on-board peripherals |
44 | * @i2c_data: Data for bit-banging algorithm | 61 | * @i2c_data: Data for bit-banging algorithm |
45 | * @hwmon_client: I2C client for hardware monitor | 62 | * @hwmon_client: I2C client for hardware monitor |
46 | * @ioexp_client: I2C client for power/port control | 63 | * @ioexp_client: I2C client for power/port control |
47 | */ | 64 | */ |
48 | struct falcon_board { | 65 | struct falcon_board { |
49 | int type; | 66 | const struct falcon_board_type *type; |
50 | int major; | 67 | int major; |
51 | int minor; | 68 | int minor; |
52 | int (*init) (struct efx_nic *nic); | ||
53 | void (*init_phy) (struct efx_nic *efx); | ||
54 | void (*set_id_led) (struct efx_nic *efx, enum efx_led_mode mode); | ||
55 | int (*monitor) (struct efx_nic *nic); | ||
56 | void (*fini) (struct efx_nic *nic); | ||
57 | struct i2c_adapter i2c_adap; | 69 | struct i2c_adapter i2c_adap; |
58 | struct i2c_algo_bit_data i2c_data; | 70 | struct i2c_algo_bit_data i2c_data; |
59 | struct i2c_client *hwmon_client, *ioexp_client; | 71 | struct i2c_client *hwmon_client, *ioexp_client; |