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>
To compile this driver as a module, choose M here. The module
will be called sfc.
config SFC_MTD
- bool "Solarflare SFC9000/SFC9100-family MTD support"
+ bool "Solarflare SFC9100-family MTD support"
depends on SFC && MTD && !(SFC=y && MTD=m)
default y
help
To compile this driver as a module, choose M here. The module
will be called sfc-siena.
+config SFC_SIENA_MTD
+ bool "Solarflare SFC9000-family MTD support"
+ depends on SFC_SIENA && MTD && !(SFC_SIENA=y && MTD=m)
+ default y
+ help
+ This exposes the on-board flash and/or EEPROM as MTD devices
+ (e.g. /dev/mtd1). This is required to update the firmware or
+ the boot configuration under Linux.
selftest.o ethtool.o ethtool_common.o ptp.o \
mcdi.o mcdi_port.o mcdi_port_common.o \
mcdi_mon.o
-sfc-siena-$(CONFIG_SFC_MTD) += mtd.o
-sfc-siena-$(CONFIG_SFC_SRIOV) += siena_sriov.o
+sfc-siena-$(CONFIG_SFC_SIENA_MTD) += mtd.o
+sfc-siena-$(CONFIG_SFC_SRIOV) += siena_sriov.o
obj-$(CONFIG_SFC_SIENA) += sfc-siena.o
void efx_siena_update_sw_stats(struct efx_nic *efx, u64 *stats);
/* MTD */
-#ifdef CONFIG_SFC_MTD
+#ifdef CONFIG_SFC_SIENA_MTD
int efx_siena_mtd_add(struct efx_nic *efx, struct efx_mtd_partition *parts,
size_t n_parts, size_t sizeof_part);
static inline int efx_mtd_probe(struct efx_nic *efx)
INIT_LIST_HEAD(&efx->node);
INIT_LIST_HEAD(&efx->secondary_list);
spin_lock_init(&efx->biu_lock);
-#ifdef CONFIG_SFC_MTD
+#ifdef CONFIG_SFC_SIENA_MTD
INIT_LIST_HEAD(&efx->mtd_list);
#endif
INIT_WORK(&efx->reset_work, efx_reset_work);
return rc;
}
-#ifdef CONFIG_SFC_MTD
+#ifdef CONFIG_SFC_SIENA_MTD
#define EFX_MCDI_NVRAM_LEN_MAX 128
efx->name, part->type_name, mcdi_part->fw_subtype);
}
-#endif /* CONFIG_SFC_MTD */
+#endif /* CONFIG_SFC_SIENA_MTD */
static inline void efx_siena_mcdi_mon_remove(struct efx_nic *efx) {}
#endif
-#ifdef CONFIG_SFC_MTD
+#ifdef CONFIG_SFC_SIENA_MTD
int efx_siena_mcdi_mtd_read(struct mtd_info *mtd, loff_t start, size_t len,
size_t *retlen, u8 *buffer);
int efx_siena_mcdi_mtd_erase(struct mtd_info *mtd, loff_t start, size_t len);
unsigned irq_level;
struct delayed_work selftest_work;
-#ifdef CONFIG_SFC_MTD
+#ifdef CONFIG_SFC_SIENA_MTD
struct list_head mtd_list;
#endif
bool (*filter_rfs_expire_one)(struct efx_nic *efx, u32 flow_id,
unsigned int index);
#endif
-#ifdef CONFIG_SFC_MTD
+#ifdef CONFIG_SFC_SIENA_MTD
int (*mtd_probe)(struct efx_nic *efx);
void (*mtd_rename)(struct efx_mtd_partition *part);
int (*mtd_read)(struct mtd_info *mtd, loff_t start, size_t len,
**************************************************************************
*/
-#ifdef CONFIG_SFC_MTD
+#ifdef CONFIG_SFC_SIENA_MTD
struct siena_nvram_type_info {
int port;
return rc;
}
-#endif /* CONFIG_SFC_MTD */
+#endif /* CONFIG_SFC_SIENA_MTD */
static unsigned int siena_check_caps(const struct efx_nic *efx,
u8 flag, u32 offset)
#ifdef CONFIG_RFS_ACCEL
.filter_rfs_expire_one = efx_farch_filter_rfs_expire_one,
#endif
-#ifdef CONFIG_SFC_MTD
+#ifdef CONFIG_SFC_SIENA_MTD
.mtd_probe = siena_mtd_probe,
.mtd_rename = efx_siena_mcdi_mtd_rename,
.mtd_read = efx_siena_mcdi_mtd_read,