vbe: Move reading the version into the common file

All VBE methods read a version string, so move this function into a
common file.

Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/boot/vbe_common.h b/boot/vbe_common.h
index 0cd9617..a122bea 100644
--- a/boot/vbe_common.h
+++ b/boot/vbe_common.h
@@ -61,4 +61,21 @@
  */
 int vbe_get_blk(const char *storage, struct udevice **blkp);
 
+/**
+ * vbe_read_version() - Read version-string from a block device
+ *
+ * Reads the VBE version-string from a device. This function reads a single
+ * block from the device, so the string cannot be larger than that. It uses a
+ * temporary buffer for the read, then copies in up to @size bytes
+ *
+ * @blk: Device to read from
+ * @offset: Offset to read, in bytes
+ * @version: Place to put the string
+ * @max_size: Maximum size of @version
+ * Return: 0 if OK, -E2BIG if @max_size > block size, -EBADF if the offset is
+ * not block-aligned, -EIO if an I/O error occurred
+ */
+int vbe_read_version(struct udevice *blk, ulong offset, char *version,
+		     int max_size);
+
 #endif /* __VBE_ABREC_H */