Draw struct flashchip into struct flashprog_flashctx

We used to have a reference to a dynamically allocated  struct flashchip
inside the flash context. But now that we only ever allocate both in one
go, we can let go of the reference and make it a single structure.

Change-Id: I857acb1def6d133a5cbc28fc7a99b7b1a22b55e0
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/494
diff --git a/include/flash.h b/include/flash.h
index 5566067..9ab8cde 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -178,7 +178,7 @@
 #define FEATURE_ANY_QUAD	(FEATURE_QPI_35_F5 | FEATURE_QPI_38_FF | \
 				 FEATURE_FAST_READ_QOUT | FEATURE_FAST_READ_QIO | FEATURE_FAST_READ_QPI4B)
 
-#define ERASED_VALUE(flash)	(((flash)->chip->feature_bits & FEATURE_ERASED_ZERO) ? 0x00 : 0xff)
+#define ERASED_VALUE(flash)	(((flash)->chip.feature_bits & FEATURE_ERASED_ZERO) ? 0x00 : 0xff)
 
 #define OK   FLASHPROG_TEST_OK
 #define NT   FLASHPROG_TEST_NT
@@ -424,7 +424,7 @@
 struct spi_read_op;
 
 struct flashprog_flashctx {
-	struct flashchip *chip;
+	struct flashchip chip;
 	/* FIXME: The memory mappings should be saved in a more structured way. */
 	/* The physical_* fields store the respective addresses in the physical address space of the CPU. */
 	uintptr_t physical_memory;