sfc: Move MTD operations into efx_nic_type
authorBen Hutchings <bhutchings@solarflare.com>
Wed, 28 Nov 2012 04:38:14 +0000 (04:38 +0000)
committerBen Hutchings <bhutchings@solarflare.com>
Tue, 27 Aug 2013 21:25:21 +0000 (22:25 +0100)
commit45a3fd55acc8989ff93d469e57b123cd3702a948
tree39c1d3c5fdd95182b6832b2b7e27b765f4f97575
parent141d748e70a22629ef1e1823f88b3d5741ac38af
sfc: Move MTD operations into efx_nic_type

Merge the per-NIC-type MTD probe selection and struct efx_mtd_ops into
struct efx_nic_type.  Move the implementations into the appropriate
source files.

Several NVRAM functions are now only called from MTD operations which
are now implemented in the same file (falcon.c or mcdi.c).  There is no
need for them to be extern, or to be defined at all if CONFIG_SFC_MTD
is not enabled, so move them into the #ifdef CONFIG_SFC_MTD sections
in those files.

Most of the SPI-related definitions are also only used in falcon.c,
so move them there.  Put the remainder of spi.h into nic.h (which
previously included it).

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
drivers/net/ethernet/sfc/efx.h
drivers/net/ethernet/sfc/falcon.c
drivers/net/ethernet/sfc/mcdi.c
drivers/net/ethernet/sfc/mcdi.h
drivers/net/ethernet/sfc/mtd.c
drivers/net/ethernet/sfc/net_driver.h
drivers/net/ethernet/sfc/nic.h
drivers/net/ethernet/sfc/siena.c
drivers/net/ethernet/sfc/spi.h [deleted file]