Commit Graph

13 Commits (f754e913e51709b7d842a9c5e17184198e83b2c8)

Author SHA1 Message Date
Ben Hutchings e5621545e2 sfc: Expose FPGA bitfile partition through MTD
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-09-19 02:56:24 +01:00
Ben Hutchings e3f5ec1108 sfc: Support variable-length response to MCDI GET_BOARD_CFG
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-09-19 02:56:23 +01:00
Linus Torvalds 623ff7739e MTD merge for 3.4
Artem's cleanup of the MTD API continues apace.
 Fixes and improvements for ST FSMC and SuperH FLCTL NAND, amongst others.
 More work on DiskOnChip G3, new driver for DiskOnChip G4.
 Clean up debug/warning printks in JFFS2 to use pr_<level>.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iEYEABECAAYFAk92K6UACgkQdwG7hYl686NrMACfWQJRWasR78MWKfkT2vWZwTFJ
 X5AAoKiSYO2pfo5gWJGOAahNC1zUqMX0
 =i3Vb
 -----END PGP SIGNATURE-----

Merge tag 'for-linus-3.4' of git://git.infradead.org/mtd-2.6

Pull MTD changes from David Woodhouse:
 - Artem's cleanup of the MTD API continues apace.
 - Fixes and improvements for ST FSMC and SuperH FLCTL NAND, amongst
   others.
 - More work on DiskOnChip G3, new driver for DiskOnChip G4.
 - Clean up debug/warning printks in JFFS2 to use pr_<level>.

Fix up various trivial conflicts, largely due to changes in calling
conventions for things like dmaengine_prep_slave_sg() (new inline
wrapper to hide new parameter, clashing with rewrite of previously last
parameter that used to be an 'append' flag, and is now a bitmap of
'unsigned long flags').

(Also some header file fallout - like so many merges this merge window -
and silly conflicts with sparse fixes)

* tag 'for-linus-3.4' of git://git.infradead.org/mtd-2.6: (120 commits)
  mtd: docg3 add protection against concurrency
  mtd: docg3 refactor cascade floors structure
  mtd: docg3 increase write/erase timeout
  mtd: docg3 fix inbound calculations
  mtd: nand: gpmi: fix function annotations
  mtd: phram: fix section mismatch for phram_setup
  mtd: unify initialization of erase_info->fail_addr
  mtd: support ONFI multi lun NAND
  mtd: sm_ftl: fix typo in major number.
  mtd: add device-tree support to spear_smi
  mtd: spear_smi: Remove default partition information from driver
  mtd: Add device-tree support to fsmc_nand
  mtd: fix section mismatch for doc_probe_device
  mtd: nand/fsmc: Remove sparse warnings and errors
  mtd: nand/fsmc: Add DMA support
  mtd: nand/fsmc: Access the NAND device word by word whenever possible
  mtd: nand/fsmc: Use dev_err to report error scenario
  mtd: nand/fsmc: Use devm routines
  mtd: nand/fsmc: Modify fsmc driver to accept nand timing parameters via platform
  mtd: fsmc_nand: add pm callbacks to support hibernation
  ...
2012-03-30 17:31:56 -07:00
Shmulik Ladkani 88dfda5f74 sfc: mtd: Use MTD_FAIL_ADDR_UNKNOWN instead of 0xffffffff
As of bb0eb217, MTD_FAIL_ADDR_UNKNOWN should be used to indicate mtd
erase failure not specific to any particular block.

Use MTD_FAIL_ADDR_UNKNOWN instead of 0xffffffff when setting
'erase->fail_addr' in 'efx_mtd_erase()'.

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:34:54 +01:00
Artem Bityutskiy 3c3c10bba1 mtd: add leading underscore to all mtd functions
This patch renames all MTD functions by adding a "_" prefix:

mtd->erase -> mtd->_erase
mtd->read_oob -> mtd->_read_oob
...

The reason is that we are re-working the MTD API and from now on it is
an error to use MTD function pointers directly - we have a corresponding
API call for every pointer. By adding a leading "_" we achieve the following:

1. Make sure we convert every direct pointer users
2. A leading "_" suggests that this interface is internal and it becomes
   less likely that people will use them directly
3. Make sure all the out-of-tree modules stop compiling and the owners
   spot the big API change and amend them.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:20:01 +01:00
Ben Hutchings 7c43161c11 sfc: Warn if unable to create MTDs
Log an explicit warning if we are unable to create MTDs for a net
device.  Also correct the comment about why mtd_device_register() may
fail; there is no longer an MTD table to fill up.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-02-13 23:40:50 +00:00
Ben Hutchings 8b1c36b357 sfc: MTD: Leave the DEBUG macro alone
<linux/mtd/mtd.h> no longer defines DEBUG so we do not need to
un-define it here.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-01-30 16:53:37 +00:00
Matthew Slattery 6aa9c7f625 sfc: Support extraction of CAPABILITIES from GET_BOARD_CFG response.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-01-27 00:10:49 +00:00
Ben Hutchings 5f3f9d6c44 sfc: Consistently test DEBUG macro, not EFX_ENABLE_DEBUG
The netif_dbg() macro is defined in <linux/netdevice.h>.  If the DEBUG
macro is defined, it logs a message at 'debug' level, otherwise it
does nothing.

In net_driver.h we define DEBUG if EFX_ENABLE_DEBUG is defined, but
this is too late for those source files that already got a
definition of netif_dbg() by including <linux/netdevice.h>

Get rid of EFX_ENABLE_DEBUG, and only define and test DEBUG.

In mtd.c, we do not use DEBUG as a condition flag but are forced to
use the DEBUG macro-function from <linux/mtd/mtd.h>.  Undefine DEBUG
before including it.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-01-27 00:10:48 +00:00
Ben Hutchings 05a9320f7e sfc: Update MCDI (firmware interface) definitions
Some commands and constants have been renamed; adjust the code
accordingly.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-01-09 17:08:16 +00:00
Ben Hutchings 18e83e4cd1 sfc: Const-qualify static data as appropriate, partly prompted by checkpatch
Fix the following warnings:

WARNING: struct dev_pm_ops should normally be const
WARNING: static const char * array should probably be static const char * const

Similarly const-qualify struct i2c_board_info, struct i2c_algo_bit_data,
struct efx_ethtool_stat, struct efx_mtd_ops and struct siena_nvram_type_info.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-01-09 17:08:13 +00:00
Rusty Russell 3db1cd5c05 net: fix assignment of 0/1 to bool variables.
DaveM said:
   Please, this kind of stuff rots forever and not using bool properly
   drives me crazy.

Joe Perches <joe@perches.com> gave me the spatch script:

	@@
	bool b;
	@@
	-b = 0
	+b = false
	@@
	bool b;
	@@
	-b = 1
	+b = true

I merely installed coccinelle, read the documentation and took credit.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-19 22:27:29 -05:00
Jeff Kirsher 874aeea5d0 sfc: Move the Solarflare drivers
Moves the Solarflare drivers into drivers/net/ethernet/sfc/ and
make the necessary Kconfig and Makefile changes.

CC: Steve Hodgson <shodgson@solarflare.com>
CC: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-08-11 02:33:50 -07:00