summaryrefslogtreecommitdiff
path: root/drivers/net/sfc/falcon.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2009-11-23 16:05:45 +0000
committerDavid S. Miller <davem@davemloft.net>2009-11-24 10:58:48 -0800
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)
}
/**
+ * struct falcon_board - board information
+ * @type: Board model type
+ * @major: Major rev. ('A', 'B' ...)
+ * @minor: Minor rev. (0, 1, ...)
+ * @init: Allocate resources and initialise peripheral hardware
+ * @init_phy: Do board-specific PHY initialisation
+ * @set_id_led: Set state of identifying LED or revert to automatic function
+ * @monitor: Board-specific health check function
+ * @fini: Shut down hardware and free resources
+ * @hwmon_client: I2C client for hardware monitor
+ * @ioexp_client: I2C client for power/port control
+ */
+struct falcon_board {
+ int type;
+ int major;
+ int minor;
+ int (*init) (struct efx_nic *nic);
+ void (*init_phy) (struct efx_nic *efx);
+ void (*set_id_led) (struct efx_nic *efx, enum efx_led_mode mode);
+ int (*monitor) (struct efx_nic *nic);
+ void (*fini) (struct efx_nic *nic);
+ struct i2c_client *hwmon_client, *ioexp_client;
+};
+
+/**
* struct falcon_nic_data - Falcon NIC state
* @pci_dev2: The secondary PCI device if present
* @i2c_data: Operations and state for I2C bit-bashing algorithm
+ * @board: Board state and functions
*/
struct falcon_nic_data {
struct pci_dev *pci_dev2;
struct i2c_algo_bit_data i2c_data;
+ struct falcon_board board;
};
static inline struct falcon_board *falcon_board(struct efx_nic *efx)
{
- return &efx->board_info;
+ struct falcon_nic_data *data = efx->nic_data;
+ return &data->board;
}
extern struct efx_nic_type falcon_a_nic_type;