Use struct flashctx instead of struct flashchip for flash chip access

Struct flashchip is used only for the flashchips array and for
operations which do not access hardware, e.g. printing a list of
supported flash chips.

struct flashctx (flash context) contains all data available in
struct flashchip, but it also contains runtime information like
mapping addresses. struct flashctx is expected to grow additional
members over time, a prime candidate being programmer info.
struct flashctx contains all of struct flashchip with identical
member layout, but struct flashctx has additional members at the end.

The separation between struct flashchip/flashctx shrinks the memory
requirement of the big flashchips array and allows future extension
of flashctx without having to worry about bloat.

Corresponding to flashrom svn r1473.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
diff --git a/sst28sf040.c b/sst28sf040.c
index 2038d53..ca40164 100644
--- a/sst28sf040.c
+++ b/sst28sf040.c
@@ -30,7 +30,7 @@
 #define RESET			0xFF
 #define READ_ID			0x90
 
-int protect_28sf040(struct flashchip *flash)
+int protect_28sf040(struct flashctx *flash)
 {
 	chipaddr bios = flash->virtual_memory;
 
@@ -45,7 +45,7 @@
 	return 0;
 }
 
-int unprotect_28sf040(struct flashchip *flash)
+int unprotect_28sf040(struct flashctx *flash)
 {
 	chipaddr bios = flash->virtual_memory;
 
@@ -60,7 +60,7 @@
 	return 0;
 }
 
-int erase_sector_28sf040(struct flashchip *flash, unsigned int address, unsigned int sector_size)
+int erase_sector_28sf040(struct flashctx *flash, unsigned int address, unsigned int sector_size)
 {
 	chipaddr bios = flash->virtual_memory;
 
@@ -76,7 +76,7 @@
 }
 
 /* chunksize is 1 */
-int write_28sf040(struct flashchip *flash, uint8_t *src, unsigned int start, unsigned int len)
+int write_28sf040(struct flashctx *flash, uint8_t *src, unsigned int start, unsigned int len)
 {
 	int i;
 	chipaddr bios = flash->virtual_memory;
@@ -100,7 +100,7 @@
 	return 0;
 }
 
-static int erase_28sf040(struct flashchip *flash)
+static int erase_28sf040(struct flashctx *flash)
 {
 	chipaddr bios = flash->virtual_memory;
 
@@ -114,7 +114,7 @@
 	return 0;
 }
 
-int erase_chip_28sf040(struct flashchip *flash, unsigned int addr, unsigned int blocklen)
+int erase_chip_28sf040(struct flashctx *flash, unsigned int addr, unsigned int blocklen)
 {
 	if ((addr != 0) || (blocklen != flash->total_size * 1024)) {
 		msg_cerr("%s called with incorrect arguments\n",