flash: Introduce flash_validate()

Clean up the protocol_negotiate_version() mess. The existing approach
came about due to viewing the vpnor implementation as an edge case in
its own right. The code becomes much neater if we consider all backends
as equal and afford them the callbacks necessary for correct behaviour.

Change-Id: Ifaeee9da459818cf22b2f137ddc5b8d0356b9be9
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/vpnor/Makefile.am.include b/vpnor/Makefile.am.include
index 75bd92e..36e3c50 100644
--- a/vpnor/Makefile.am.include
+++ b/vpnor/Makefile.am.include
@@ -2,9 +2,7 @@
 	%reldir%/mboxd_pnor_partition_table.cpp \
 	%reldir%/flash.cpp \
 	%reldir%/pnor_partition.cpp \
-	%reldir%/lpc_reset.cpp \
-	%reldir%/protocol.cpp \
-	%reldir%/protocol_negotiate_version.cpp
+	%reldir%/lpc_reset.cpp
 
 mboxd_LDFLAGS += -lstdc++fs \
 	$(SDBUSPLUS_LIBS) \