siena: Make HWMON support specific for Siena
Add a Siena Kconfig option and use it in stead of the sfc one. Signed-off-by: Martin Habets <habetsm.xilinx@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
dfb1cfbd49
commit
f62a074525
@@ -40,7 +40,7 @@ config SFC_MTD
|
|||||||
(e.g. /dev/mtd1). This is required to update the firmware or
|
(e.g. /dev/mtd1). This is required to update the firmware or
|
||||||
the boot configuration under Linux.
|
the boot configuration under Linux.
|
||||||
config SFC_MCDI_MON
|
config SFC_MCDI_MON
|
||||||
bool "Solarflare SFC9000/SFC9100-family hwmon support"
|
bool "Solarflare SFC9100-family hwmon support"
|
||||||
depends on SFC && HWMON && !(SFC=y && HWMON=m)
|
depends on SFC && HWMON && !(SFC=y && HWMON=m)
|
||||||
default y
|
default y
|
||||||
help
|
help
|
||||||
|
|||||||
@@ -18,6 +18,13 @@ config SFC_SIENA_MTD
|
|||||||
This exposes the on-board flash and/or EEPROM as MTD devices
|
This exposes the on-board flash and/or EEPROM as MTD devices
|
||||||
(e.g. /dev/mtd1). This is required to update the firmware or
|
(e.g. /dev/mtd1). This is required to update the firmware or
|
||||||
the boot configuration under Linux.
|
the boot configuration under Linux.
|
||||||
|
config SFC_SIENA_MCDI_MON
|
||||||
|
bool "Solarflare SFC9000-family hwmon support"
|
||||||
|
depends on SFC_SIENA && HWMON && !(SFC_SIENA=y && HWMON=m)
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
This exposes the on-board firmware-managed sensors as a
|
||||||
|
hardware monitor device.
|
||||||
config SFC_SIENA_SRIOV
|
config SFC_SIENA_SRIOV
|
||||||
bool "Solarflare SFC9000-family SR-IOV support"
|
bool "Solarflare SFC9000-family SR-IOV support"
|
||||||
depends on SFC_SIENA && PCI_IOV
|
depends on SFC_SIENA && PCI_IOV
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ struct efx_mcdi_mtd_partition {
|
|||||||
*/
|
*/
|
||||||
struct efx_mcdi_data {
|
struct efx_mcdi_data {
|
||||||
struct efx_mcdi_iface iface;
|
struct efx_mcdi_iface iface;
|
||||||
#ifdef CONFIG_SFC_MCDI_MON
|
#ifdef CONFIG_SFC_SIENA_MCDI_MON
|
||||||
struct efx_mcdi_mon hwmon;
|
struct efx_mcdi_mon hwmon;
|
||||||
#endif
|
#endif
|
||||||
u32 fn_flags;
|
u32 fn_flags;
|
||||||
@@ -130,7 +130,7 @@ static inline struct efx_mcdi_iface *efx_mcdi(struct efx_nic *efx)
|
|||||||
return &efx->mcdi->iface;
|
return &efx->mcdi->iface;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_SFC_MCDI_MON
|
#ifdef CONFIG_SFC_SIENA_MCDI_MON
|
||||||
static inline struct efx_mcdi_mon *efx_mcdi_mon(struct efx_nic *efx)
|
static inline struct efx_mcdi_mon *efx_mcdi_mon(struct efx_nic *efx)
|
||||||
{
|
{
|
||||||
EFX_WARN_ON_PARANOID(!efx->mcdi);
|
EFX_WARN_ON_PARANOID(!efx->mcdi);
|
||||||
@@ -365,7 +365,7 @@ void efx_siena_mcdi_mac_pull_stats(struct efx_nic *efx);
|
|||||||
enum reset_type efx_siena_mcdi_map_reset_reason(enum reset_type reason);
|
enum reset_type efx_siena_mcdi_map_reset_reason(enum reset_type reason);
|
||||||
int efx_siena_mcdi_reset(struct efx_nic *efx, enum reset_type method);
|
int efx_siena_mcdi_reset(struct efx_nic *efx, enum reset_type method);
|
||||||
|
|
||||||
#ifdef CONFIG_SFC_MCDI_MON
|
#ifdef CONFIG_SFC_SIENA_MCDI_MON
|
||||||
int efx_siena_mcdi_mon_probe(struct efx_nic *efx);
|
int efx_siena_mcdi_mon_probe(struct efx_nic *efx);
|
||||||
void efx_siena_mcdi_mon_remove(struct efx_nic *efx);
|
void efx_siena_mcdi_mon_remove(struct efx_nic *efx);
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ void efx_siena_mcdi_sensor_event(struct efx_nic *efx, efx_qword_t *ev)
|
|||||||
type, name, state_txt, value, unit);
|
type, name, state_txt, value, unit);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_SFC_MCDI_MON
|
#ifdef CONFIG_SFC_SIENA_MCDI_MON
|
||||||
|
|
||||||
struct efx_mcdi_mon_attribute {
|
struct efx_mcdi_mon_attribute {
|
||||||
struct device_attribute dev_attr;
|
struct device_attribute dev_attr;
|
||||||
@@ -528,4 +528,4 @@ void efx_siena_mcdi_mon_remove(struct efx_nic *efx)
|
|||||||
efx_siena_free_buffer(efx, &hwmon->dma_buf);
|
efx_siena_free_buffer(efx, &hwmon->dma_buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_SFC_MCDI_MON */
|
#endif /* CONFIG_SFC_SIENA_MCDI_MON */
|
||||||
|
|||||||
Reference in New Issue
Block a user