aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/falcon.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2009-11-23 11:05:45 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-24 13:58:48 -0500
commit3759433db2f7340ddec3abd55ebb1178600d014e (patch)
tree7681280a1dbac4a4898b1f615c0185b751eb853e /drivers/net/sfc/falcon.h
parent5c16a96c4f31a0be287c5db3f36d1099dea9b2bd (diff)
sfc: Move struct falcon_board into struct falcon_nic_data
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/falcon.h')
-rw-r--r--drivers/net/sfc/falcon.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/drivers/net/sfc/falcon.h b/drivers/net/sfc/falcon.h
index 46dd43bbbfd9..3e9696c12caa 100644
--- a/drivers/net/sfc/falcon.h
+++ b/drivers/net/sfc/falcon.h
@@ -31,18 +31,46 @@ static inline int falcon_rev(struct efx_nic *efx)
31} 31}
32 32
33/** 33/**
34 * struct falcon_board - board information
35 * @type: Board model type
36 * @major: Major rev. ('A', 'B' ...)
37 * @minor: Minor rev. (0, 1, ...)
38 * @init: Allocate resources and initialise peripheral hardware
39 * @init_phy: Do board-specific PHY initialisation
40 * @set_id_led: Set state of identifying LED or revert to automatic function
41 * @monitor: Board-specific health check function
42 * @fini: Shut down hardware and free resources
43 * @hwmon_client: I2C client for hardware monitor
44 * @ioexp_client: I2C client for power/port control
45 */
46struct falcon_board {
47 int type;
48 int major;
49 int minor;
50 int (*init) (struct efx_nic *nic);
51 void (*init_phy) (struct efx_nic *efx);
52 void (*set_id_led) (struct efx_nic *efx, enum efx_led_mode mode);
53 int (*monitor) (struct efx_nic *nic);
54 void (*fini) (struct efx_nic *nic);
55 struct i2c_client *hwmon_client, *ioexp_client;
56};
57
58/**
34 * struct falcon_nic_data - Falcon NIC state 59 * struct falcon_nic_data - Falcon NIC state
35 * @pci_dev2: The secondary PCI device if present 60 * @pci_dev2: The secondary PCI device if present
36 * @i2c_data: Operations and state for I2C bit-bashing algorithm 61 * @i2c_data: Operations and state for I2C bit-bashing algorithm
62 * @board: Board state and functions
37 */ 63 */
38struct falcon_nic_data { 64struct falcon_nic_data {
39 struct pci_dev *pci_dev2; 65 struct pci_dev *pci_dev2;
40 struct i2c_algo_bit_data i2c_data; 66 struct i2c_algo_bit_data i2c_data;
67 struct falcon_board board;
41}; 68};
42 69
43static inline struct falcon_board *falcon_board(struct efx_nic *efx) 70static inline struct falcon_board *falcon_board(struct efx_nic *efx)
44{ 71{
45 return &efx->board_info; 72 struct falcon_nic_data *data = efx->nic_data;
73 return &data->board;
46} 74}
47 75
48extern struct efx_nic_type falcon_a_nic_type; 76extern struct efx_nic_type falcon_a_nic_type;