Move serial handling from serprog.c to serial.c

This is the first step in enabling platform independent serprog and it
also allows other drivers to use serial port functionality without
requiring serprog.

Pure code move, no code changed.

Corresponding to flashrom svn r771.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
diff --git a/flash.h b/flash.h
index 0606f00..9f6a8be 100644
--- a/flash.h
+++ b/flash.h
@@ -736,8 +736,11 @@
 uint8_t serprog_chip_readb(const chipaddr addr);
 void serprog_chip_readn(uint8_t *buf, const chipaddr addr, size_t len);
 void serprog_delay(int delay);
+
+/* serial.c */
 void sp_flush_incoming(void);
 int sp_openserport(char *dev, unsigned int baud);
+void __attribute__((noreturn)) sp_die(char *msg);
 extern int sp_fd;
 
 #endif				/* !__FLASH_H__ */