-From: Nathan Williams <nathan@traverse.com.au>
-To: netdev@vger.kernel.org
-Date: Wed, 05 Oct 2011 15:46:08 +1100
-Cc: linux-atm-general@lists.sourceforge.net,
- David Woodhouse <dwmw2@infradead.org>, linux-kernel@vger.kernel.org
-Subject: [Linux-ATM-General] [PATCH 4/4] atm: solos-pci: M25P/M25PE SPI
- flash support
-
-Newer Geos ADSL2+ routers have different SPI flash.
-The FPGA on these boards require driver version = 1 to enable
-flash upgrades so old drivers can't corrupt new boards.
-
-Signed-off-by: Nathan Williams <nathan@traverse.com.au>
----
- drivers/atm/solos-pci.c | 51 ++++++++++++++++++++++++++++++++++++----------
- 1 files changed, 40 insertions(+), 11 deletions(-)
-
-diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c
-index 33c0c2b..2a75bf7 100644
---- a/drivers/atm/solos-pci.c
-+++ b/drivers/atm/solos-pci.c
-@@ -42,7 +42,8 @@
- #include <linux/swab.h>
- #include <linux/slab.h>
-
--#define VERSION "0.07"
-+#define VERSION "1.0"
-+#define DRIVER_VERSION 0x01
- #define PTAG "solos-pci"
-
- #define CONFIG_RAM_SIZE 128
-@@ -57,16 +58,20 @@
- #define FPGA_MODE 0x5C
- #define FLASH_MODE 0x58
- #define GPIO_STATUS 0x54
-+#define DRIVER_VER 0x50
- #define TX_DMA_ADDR(port) (0x40 + (4 * (port)))
- #define RX_DMA_ADDR(port) (0x30 + (4 * (port)))
-
- #define DATA_RAM_SIZE 32768
- #define BUF_SIZE 2048
- #define OLD_BUF_SIZE 4096 /* For FPGA versions <= 2*/
--#define FPGA_PAGE 528 /* FPGA flash page size*/
--#define SOLOS_PAGE 512 /* Solos flash page size*/
--#define FPGA_BLOCK (FPGA_PAGE * 8) /* FPGA flash block size*/
--#define SOLOS_BLOCK (SOLOS_PAGE * 8) /* Solos flash block size*/
-+/* Old boards use ATMEL AD45DB161D flash */
-+#define ATMEL_FPGA_PAGE 528 /* FPGA flash page size*/
-+#define ATMEL_SOLOS_PAGE 512 /* Solos flash page size*/
-+#define ATMEL_FPGA_BLOCK (ATMEL_FPGA_PAGE * 8) /* FPGA block size*/
-+#define ATMEL_SOLOS_BLOCK (ATMEL_SOLOS_PAGE * 8) /* Solos block size*/
-+/* Current boards use M25P/M25PE SPI flash */
-+#define SPI_FLASH_BLOCK (256 * 64)
-
- #define RX_BUF(card, nr) ((card->buffers) + (nr)*(card->buffer_size)*2)
- #define TX_BUF(card, nr) ((card->buffers) + (nr)*(card->buffer_size)*2 + (card->buffer_size))
-@@ -128,6 +133,7 @@ struct solos_card {
- int using_dma;
- int fpga_version;
- int buffer_size;
-+ int atmel_flash;
- };
-
-
-@@ -631,16 +637,25 @@ static int flash_upgrade(struct solos_card *card, int chip)