Commit 65d4b471 authored by Martin Habets's avatar Martin Habets Committed by Jakub Kicinski
Browse files

siena: Make MTD support specific for Siena



Add a Siena Kconfig option and use it in stead of the sfc one.

Signed-off-by: default avatarMartin Habets <habetsm.xilinx@gmail.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 75db72de
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ config SFC
	  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
+8 −0
Original line number Diff line number Diff line
@@ -10,3 +10,11 @@ config SFC_SIENA

	  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.
+2 −2
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ sfc-siena-y += farch.o siena.o \
			   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_SIENA_MTD)	+= mtd.o
sfc-siena-$(CONFIG_SFC_SRIOV)		+= siena_sriov.o

obj-$(CONFIG_SFC_SIENA)	+= sfc-siena.o
+1 −1
Original line number Diff line number Diff line
@@ -162,7 +162,7 @@ void efx_siena_get_irq_moderation(struct efx_nic *efx, unsigned int *tx_usecs,
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)
+1 −1
Original line number Diff line number Diff line
@@ -997,7 +997,7 @@ int efx_siena_init_struct(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);
Loading